PredictPreTrainModel_文档自学习产品_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

流控信息

当前云产品API请求速率暂未透出。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
documentautoml:PredictPreTrainModel
Get
全部资源
*

请求参数

字段名称字段详情
Contentstring

预测内容,格式为 JSON 字符串。展开详情

示例值:{"query":"https://doc-automl-public.oss-cn-hangzhou.aliyuncs.com/demo/extractBill.png", "schema":["姓名", "住址"]}
ServiceVersionstring

预置能力服务版本,默认 V1

示例值:V1
ServiceNamestring

预置能力服务名称,必填展开详情

示例值:FormUIE
BinaryToTextboolean

content 字段内容为图片 URL 时:false,展开详情

示例值:false
Bodystring

图片传递 base64 编码时的预测内容,格式为 json 字符串。展开详情

示例值:{"query":"data:image/png;base64,xxxxx","schema":["姓名", "住址"]}

请求说明

BinaryToText 为非必填项

content 字段和 body 字段传参二选一,图片内容是 URL,在传递 content 字段,内容是 base64,传递 body 字段,且 BinaryToText 传 true

返回参数

字段名称字段详情
RequestIdstring

Id of the request

示例值:29413C69-11EF-15CB-BE20-70D318E2F4E9
Codeinteger<int32>

请求结果状态,200 为成功

示例值:200
Messagestring

错误信息

示例值:success
Dataobject

接口返回信息

示例值:{ "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 分钟)

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
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
服务不存在诊断

变更历史

暂无变更历史

相关示例