图片识别结构式
接口说明
本接口提供通过化学结构式图片识别化学物质信息的功能。
计费方式
按照调用次数收费,调用成功,单次调用收费0.01元。
接口地址
POST https://openapi.molaid.com/v1/ocr/structure
请求参数
全局请求参数详见全局请求参数
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
image_url | string | 是 | 图片地址 |
返回参数
名称 | 类型 | 说明 |
---|---|---|
mol | string | MOL码 |
smiles | string | SMILES码 |
inchikey | string | InChIKey值 |
请求示例
{
"image_url": "https://xxxx"
}
返回示例
正常返回
{
"code": 200,
"data": {
"mol": "mol",
"smiles": "smiles",
"inchikey": "inchikey"
},
"reason": "",
"message": "",
"metadata": {
"request_id": "d8f3c006d858acf3c6d3e05438bfca4c"
}
}
错误返回
{
"code": 422,
"reason": "STRUCTURE_OCR_ERROR",
"message": "structure ocr error",
"metadata": {
"request_id": "d8f3c006d858acf3c6d3e05438bfca4c"
}
}
错误码
全局错误码详见错误码
http status | 错误码 | 错误说明 |
---|---|---|
400 | STRUCTURE_OCR_ERROR | 结构式识别错误;请检查图片格式、图片大小,或图片过于复杂。 |
注意事项
- 图片格式支持 PNG/JPG/JPEG。图片大小不超过2MB。
- 复杂结构式识别耗时可能超过10秒。