预置能力现有:UIE抽取,适用于通用智能预标注。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
documentautoml:PredictPreTrainModel |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Content |
string |
否 |
预测内容,格式为 JSON 字符串。 UIE 抽取参数格式{"query":"xxx","schema":["字段 1","字段 2"]}, query 对应图片 URL,schema 对应要抽取的字段数组 |
{"query":"https://doc-automl-public.oss-cn-hangzhou.aliyuncs.com/demo/extractBill.png", "schema":["姓名", "住址"]} |
| ServiceVersion |
string |
否 |
预置能力服务版本,默认 V1 |
V1 |
| ServiceName |
string |
否 |
预置能力服务名称,必填 UIE 抽取对应“FormUIE” |
FormUIE |
| BinaryToText |
boolean |
否 |
content 字段内容为图片 URL 时:false, body 字段内容为图片 base64 时:true |
false |
| Body |
string |
否 |
图片传递 base64 编码时的预测内容,格式为 json 字符串。 UIE 抽取参数格式{"query":"xxx","schema":["字段 1","字段 2"]}, query 对应图片 base64 编码,schema 对应要抽取的字段数组 |
{"query":"data:image/png;base64,xxxxx","schema":["姓名", "住址"]} |
BinaryToText 为非必填项
content 字段和 body 字段传参二选一,图片内容是 URL,在传递 content 字段,内容是 base64,传递 body 字段,且 BinaryToText 传 true
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
29413C69-11EF-15CB-BE20-70D318E2F4E9 |
| Code |
integer |
请求结果状态,200 为成功 |
200 |
| Message |
string |
错误信息 |
success |
| Data |
object |
接口返回信息 |
{ "RequestId": "29413C69-11EF-15CB-BE20-70D318E2F4E9", "Message": "success", "Data": { "score": 1, "data": [ { "prob": 0.9138551354408264, "fieldWordRaw": "xx", "wordInfo": [ { "prob": 0.9138551354408264, "pos": [ { "x": 468, "y": 139 }, { "x": 476, "y": 139 }, { "x": 476, "y": 153 }, { "x": 468, "y": 153 } ], "word": "xx", "charInfo": [ { "prob": 0.99, "pos": [ { "x": 468, "y": 139 }, { "x": 471, "y": 139 }, { "x": 471, "y": 153 }, { "x": 468, "y": 153 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 473, "y": 139 }, { "x": 476, "y": 139 }, { "x": 476, "y": 153 }, { "x": 473, "y": 153 } ], "word": "x" } ] } ], "name": "姓名", "location": [ { "x": 468, "y": 139 }, { "x": 476, "y": 139 }, { "x": 476, "y": 153 }, { "x": 468, "y": 153 } ], "fieldWord": "xx" }, { "prob": 0.9594210982322693, "fieldWordRaw": "xxxxxxxxxxx", "wordInfo": [ { "prob": 0.9594210982322693, "pos": [ { "x": 168, "y": 164 }, { "x": 467, "y": 164 }, { "x": 467, "y": 239 }, { "x": 168, "y": 239 } ], "word": "xxxxxxxxxxx", "charInfo": [ { "prob": 0.99, "pos": [ { "x": 366, "y": 164 }, { "x": 383, "y": 164 }, { "x": 383, "y": 179 }, { "x": 366, "y": 179 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 384, "y": 164 }, { "x": 401, "y": 164 }, { "x": 401, "y": 179 }, { "x": 384, "y": 179 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 402, "y": 164 }, { "x": 414, "y": 164 }, { "x": 414, "y": 179 }, { "x": 402, "y": 179 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 418, "y": 164 }, { "x": 427, "y": 164 }, { "x": 427, "y": 179 }, { "x": 418, "y": 179 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 429, "y": 164 }, { "x": 438, "y": 164 }, { "x": 438, "y": 179 }, { "x": 429, "y": 179 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 439, "y": 164 }, { "x": 448, "y": 164 }, { "x": 448, "y": 179 }, { "x": 439, "y": 179 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 450, "y": 164 }, { "x": 467, "y": 164 }, { "x": 467, "y": 179 }, { "x": 450, "y": 179 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 168, "y": 224 }, { "x": 180, "y": 224 }, { "x": 180, "y": 239 }, { "x": 168, "y": 239 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 180, "y": 224 }, { "x": 192, "y": 224 }, { "x": 192, "y": 239 }, { "x": 180, "y": 239 } ], "word": "x" }, { "prob": 0.99, "pos": [ { "x": 195, "y": 224 }, { "x": 209, "y": 224 }, { "x": 209, "y": 239 }, { "x": 195, "y": 239 } ], "word": "1" }, { "prob": 0.99, "pos": [ { "x": 211, "y": 224 }, { "x": 223, "y": 224 }, { "x": 223, "y": 239 }, { "x": 211, "y": 239 } ], "word": "7" }, { "prob": 0.99, "pos": [ { "x": 224, "y": 224 }, { "x": 236, "y": 224 }, { "x": 236, "y": 239 }, { "x": 224, "y": 239 } ], "word": "2" }, { "prob": 0.99, "pos": [ { "x": 237, "y": 224 }, { "x": 249, "y": 224 }, { "x": 249, "y": 239 }, { "x": 237, "y": 239 } ], "word": "7" }, { "prob": 0.99, "pos": [ { "x": 253, "y": 224 }, { "x": 270, "y": 224 }, { "x": 270, "y": 239 }, { "x": 253, "y": 239 } ], "word": "x" } ] } ], "name": "住址", "location": [ { "x": 168, "y": 164 }, { "x": 467, "y": 164 }, { "x": 467, "y": 239 }, { "x": 168, "y": 239 } ], "fieldWord": "xxxxxxxx" } ], "specificType": "formuie-anti", "classType": "preDefinedServer", "predictFile": "https://xxxx" }, "Code": 200 } |
模板服务预测接口,返回 Data 字段解释说明:
score 预测服务置信度 0-1
data. 算法返回的预测结果,数组格式
prob 算法结果置信度 0-1
name 抽取 key
fieldWord 抽取 value
location 抽取结果坐标位置 { "x": 119,"y": 48 }表示页面坐标点
wordInfo 抽取内容详细信息,包括了每个字符的位置信息
specificType 算法类型(formuie-anti:UIE 抽取)
classType preDefinedServer: 预置能力
predictFile 预测文件地址(失效时间 60 分钟)
示例
正常返回示例
JSON格式
{
"RequestId": "29413C69-11EF-15CB-BE20-70D318E2F4E9",
"Code": 200,
"Message": "success",
"Data": {
"RequestId": "29413C69-11EF-15CB-BE20-70D318E2F4E9",
"Message": "success",
"Data": {
"score": 1,
"data": [
{
"prob": 0.9138551354408264,
"fieldWordRaw": "xx",
"wordInfo": [
{
"prob": 0.9138551354408264,
"pos": [
{
"x": 468,
"y": 139
},
{
"x": 476,
"y": 139
},
{
"x": 476,
"y": 153
},
{
"x": 468,
"y": 153
}
],
"word": "xx",
"charInfo": [
{
"prob": 0.99,
"pos": [
{
"x": 468,
"y": 139
},
{
"x": 471,
"y": 139
},
{
"x": 471,
"y": 153
},
{
"x": 468,
"y": 153
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 473,
"y": 139
},
{
"x": 476,
"y": 139
},
{
"x": 476,
"y": 153
},
{
"x": 473,
"y": 153
}
],
"word": "x"
}
]
}
],
"name": "姓名",
"location": [
{
"x": 468,
"y": 139
},
{
"x": 476,
"y": 139
},
{
"x": 476,
"y": 153
},
{
"x": 468,
"y": 153
}
],
"fieldWord": "xx"
},
{
"prob": 0.9594210982322693,
"fieldWordRaw": "xxxxxxxxxxx",
"wordInfo": [
{
"prob": 0.9594210982322693,
"pos": [
{
"x": 168,
"y": 164
},
{
"x": 467,
"y": 164
},
{
"x": 467,
"y": 239
},
{
"x": 168,
"y": 239
}
],
"word": "xxxxxxxxxxx",
"charInfo": [
{
"prob": 0.99,
"pos": [
{
"x": 366,
"y": 164
},
{
"x": 383,
"y": 164
},
{
"x": 383,
"y": 179
},
{
"x": 366,
"y": 179
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 384,
"y": 164
},
{
"x": 401,
"y": 164
},
{
"x": 401,
"y": 179
},
{
"x": 384,
"y": 179
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 402,
"y": 164
},
{
"x": 414,
"y": 164
},
{
"x": 414,
"y": 179
},
{
"x": 402,
"y": 179
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 418,
"y": 164
},
{
"x": 427,
"y": 164
},
{
"x": 427,
"y": 179
},
{
"x": 418,
"y": 179
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 429,
"y": 164
},
{
"x": 438,
"y": 164
},
{
"x": 438,
"y": 179
},
{
"x": 429,
"y": 179
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 439,
"y": 164
},
{
"x": 448,
"y": 164
},
{
"x": 448,
"y": 179
},
{
"x": 439,
"y": 179
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 450,
"y": 164
},
{
"x": 467,
"y": 164
},
{
"x": 467,
"y": 179
},
{
"x": 450,
"y": 179
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 168,
"y": 224
},
{
"x": 180,
"y": 224
},
{
"x": 180,
"y": 239
},
{
"x": 168,
"y": 239
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 180,
"y": 224
},
{
"x": 192,
"y": 224
},
{
"x": 192,
"y": 239
},
{
"x": 180,
"y": 239
}
],
"word": "x"
},
{
"prob": 0.99,
"pos": [
{
"x": 195,
"y": 224
},
{
"x": 209,
"y": 224
},
{
"x": 209,
"y": 239
},
{
"x": 195,
"y": 239
}
],
"word": "1"
},
{
"prob": 0.99,
"pos": [
{
"x": 211,
"y": 224
},
{
"x": 223,
"y": 224
},
{
"x": 223,
"y": 239
},
{
"x": 211,
"y": 239
}
],
"word": "7"
},
{
"prob": 0.99,
"pos": [
{
"x": 224,
"y": 224
},
{
"x": 236,
"y": 224
},
{
"x": 236,
"y": 239
},
{
"x": 224,
"y": 239
}
],
"word": "2"
},
{
"prob": 0.99,
"pos": [
{
"x": 237,
"y": 224
},
{
"x": 249,
"y": 224
},
{
"x": 249,
"y": 239
},
{
"x": 237,
"y": 239
}
],
"word": "7"
},
{
"prob": 0.99,
"pos": [
{
"x": 253,
"y": 224
},
{
"x": 270,
"y": 224
},
{
"x": 270,
"y": 239
},
{
"x": 253,
"y": 239
}
],
"word": "x"
}
]
}
],
"name": "住址",
"location": [
{
"x": 168,
"y": 164
},
{
"x": 467,
"y": 164
},
{
"x": 467,
"y": 239
},
{
"x": 168,
"y": 239
}
],
"fieldWord": "xxxxxxxx"
}
],
"specificType": "formuie-anti",
"classType": "preDefinedServer",
"predictFile": "https://xxxx"
},
"Code": 200
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 200 | 21002 | 模板预测超时 | |
| 200 | 21003 | 模版预测失败 | |
| 200 | 10001 | 参数出错 | |
| 200 | 16001 | 未找到可预测的模型 | |
| 200 | 13018 | 未找到模型信息 | |
| 200 | 16004 | 指定模型不存在 | |
| 200 | 23002 | 获取资源HTTP异常 | |
| 200 | 11002 | 账号没有开通服务 | |
| 200 | 19999 | 未知异常 | |
| 200 | 50008 | 文件过大 | |
| 200 | 50007 | 文件格式不支持 | |
| 200 | 10005 | 服务不存在 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。