Query the status and results of any task created in the Market models
task_12345678200 indicates success."success" for successful queries.| State | Description | Action |
|---|---|---|
waiting | Task is queued and waiting to be processed | Continue polling |
queuing | Task is in the processing queue | Continue polling |
generating | Task is currently being processed | Continue polling |
success | Task completed successfully | Parse resultJson to get results |
fail | Task failed | Check failCode and failMsg for details |
Recommended Polling Intervals
Using Callbacks Instead of Polling
callBackUrl parameter when creating tasks:Handling Completed Tasks
state is success:resultJson string to JSONresultUrls array| Code | Description | Solution |
|---|---|---|
401 | Unauthorized - Invalid or missing API key | Check your API key |
404 | Task not found | Verify the taskId is correct |
422 | Validation error in original request | Check the failMsg for details |
500 | Internal server error | Retry after a few minutes |
501 | Generation failed | Check failMsg for specific error details |
All APIs require authentication via Bearer Token.
Get API Key:
Usage: Add to request header: Authorization: Bearer YOUR_API_KEY
Note:
The unique task identifier returned when you created the task.
"task_12345678"
Request successful
Response status code
200, 401, 402, 404, 422, 429, 455, 500, 501, 505 Response message, error description when failed
"success"
The task data object containing all task information