[B067-2]Get OCSR Task Status And Results
Query OCSR task execution status and results by task ID
Request Parameters
List of parameters supported by this API endpoint
| Name | Type | Example | Description |
|---|---|---|---|
Required | string | 7babe24e5abc4f1cb1cfaea27b6e0e43 | Task ID |
Response Schema
Structure of the API response data
| Field Name | Type | Example | Description |
|---|---|---|---|
data | object | - | response data |
count | integer<int32> | 1 | Number of recognition results, equal to the size of the result list |
result | array | [
{
"mol": "...",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"inchi_key": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
"locations": [
{
"bbox": [
0.12,
0.34,
0.45,
0.67,
0.99
],
"image_name": "mol_001.png"
}
]
}
] | OCSR recognition results |
mol | string | Mrv2211 01012400002D
9 9 0 0 0 0 999 V2000
1.2124 0.7000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
M END | SDF, may be null |
smiles | string | CC(=O)Oc1ccccc1C(=O)O | SMILES representation |
formula | string | C9H8O4 | Molecular formula |
inchi_key | string | BSYNRYMUTXBXSQ-UHFFFAOYSA-N | InChIKey identifier |
locations | array | [
{
"bbox": [
0.12,
0.35,
0.67,
0.78,
0.99
],
"page": 0,
"image_name": "mol_001.png"
}
] | List of locations of the chemical structure |
bbox | array | [
0.12,
0.35,
0.67,
0.78,
0.99
] | Normalized bounding box [x1, y1, x2, y2, confidence], 0 to 1, the fifth is confidence. |
page | integer<int32> | - | 0-based page index (PDF scenario) |
image_name | string | mol_001.png | Image file name (image scenario) |
status | string | SUCCESS | Task Status: PENDING, PROCESSING, SUCCESS, FAILED |
task_id | string | 7babe24e5abc4f1cb1cfaea27b6e0e43 | Task ID |
statusRequired | boolean | false | Status |
error_msg | string | The request parameter format is incorrect! | Error Message |
error_codeRequired | integer | 0 | Error Code |
Success Response Example
Example of a successful API response
JSON
{
"data": {
"count": 1,
"result": [
{
"mol": "\n Mrv2211 01012400002D\n\n 9 9 0 0 0 0 999 V2000\n 1.2124 0.7000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\nM END",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"formula": "C9H8O4",
"inchi_key": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
"locations": [
{
"bbox": [
0.12,
0.35,
0.67,
0.78,
0.99
],
"page": 0,
"image_name": "mol_001.png"
}
]
}
],
"status": "SUCCESS",
"task_id": "7babe24e5abc4f1cb1cfaea27b6e0e43"
},
"status": true,
"error_code": 0
}Error Codes
List of possible error codes returned by this endpoint
Business Errors
| Error Code | Description |
|---|---|
68300004 | Invalid parameter! |
68300005 | Search api failure! |
68300006 | Analytic basic access error! |
68300007 | Bad request! |
68300008 | Service error, please try again later! |
68300010 | The file does not comply with upload specifications! |
Platform Errors
| Error Code | Description |
|---|---|
67200000 | API call exceeds the total limit set by the platform! |
67200001 | API call exceeds the total limit set by the platform! |
67200002 | The current call rate is too fast, exceeding the current configuration limit QPS! |
67200003 | The key and secret parameters for applying for the token are incorrect or the client has been disabled! |
67200004 | The requested api does not have permission. Please contact our support personnel! |
67200005 | Insufficient account balance/number of calls! |
67200006 | The client has exceeded the activation validity period! |
67200007 | The current call exceeds the configured usage limit of the day! |
67200008 | Please check if the required apikey in the query parameter has been transmitted! |
67200009 | The apikey does not match the passed bearerToken. Please check if a valid token is being used! |
67200012 | The request is illegal! |
67200100 | The current server status is busy, request response timeout! |
67200101 | The API requested currently does not exist. Please check the request path! |
HTTP Status Codes
| Status Code | Description |
|---|---|
0 | Success |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
Performance Metrics
Expected performance characteristics for this endpoint
Normal Response Time
5000 ms
Max Response Time
10000 ms