38 lines
810 B
HTTP
38 lines
810 B
HTTP
@host = http://127.0.0.1:8000
|
||
|
||
### 健康检查
|
||
GET {{host}}/healthz
|
||
|
||
### 上传图片
|
||
# @name uploadImage
|
||
POST {{host}}/api/v1/upload
|
||
Content-Type: multipart/form-data; boundary=ocrBoundary
|
||
|
||
--ocrBoundary
|
||
Content-Disposition: form-data; name="file"; filename="general_ocr_002.png"
|
||
Content-Type: image/jpeg
|
||
|
||
< ./fixtures/general_ocr_002.png
|
||
--ocrBoundary--
|
||
|
||
> {% client.global.set("fileId", response.body.data.file_id); %}
|
||
|
||
### 使用上传返回的 file_id 识别文字
|
||
# 先执行上面的上传请求,IDEA 会自动保存返回的 file_id。
|
||
POST {{host}}/api/v1/i2t
|
||
Content-Type: application/json
|
||
|
||
{
|
||
"file_id": "{{fileId}}",
|
||
"min_confidence": 0.0
|
||
}
|
||
|
||
### 识别并过滤低置信度文本
|
||
POST {{host}}/api/v1/i2t
|
||
Content-Type: application/json
|
||
|
||
{
|
||
"file_id": "{{fileId}}",
|
||
"min_confidence": 0.8
|
||
}
|