Skip to main content
POST
/
doc-agent
/
api
/
v1
/
image_quality
cURL
curl --request POST \
  --url https://agents.textin.com/doc-agent/api/v1/image_quality \
  --header 'Content-Type: application/json' \
  --header 'x-ti-app-id: <x-ti-app-id>' \
  --header 'x-ti-secret-code: <x-ti-secret-code>' \
  --data '
{
  "file": {
    "filedata": "<string>",
    "filename": "<string>",
    "url": "<string>"
  },
  "file_url": "https://example.com/file.jpg"
}
'
{
  "risk_details": {
    "blurry": {
      "score": 0.85,
      "valid": true
    },
    "photocopy": {
      "score": 0.92,
      "valid": true
    },
    "screen_remark": {
      "score": 0.05,
      "valid": false
    },
    "un_integrity": {
      "score": 0.1,
      "valid": false
    }
  },
  "risk_type": [
    "blurry",
    "photocopy"
  ]
}

Headers

x-ti-app-id
string
required
x-ti-secret-code
string
required

Body

application/json
file
object

上传文件(与file_url二选一)

file_url
string

文件URL(与file二选一)

Example:

"https://example.com/file.jpg"

Response

200 - application/json

OK

risk_details
object

风险详情(每种风险类型的详细检测结果)

Example:
{
"blurry": { "score": 0.85, "valid": true },
"photocopy": { "score": 0.92, "valid": true },
"screen_remark": { "score": 0.05, "valid": false },
"un_integrity": { "score": 0.1, "valid": false }
}
risk_type
string[]

风险类型列表(blurry:模糊、un_integrity:不完整、photocopy:复印件、screen_remark:屏幕水印)

Example:
["blurry", "photocopy"]