Skip to content
Home

Poll Status

Multimodal generation such as image and video generation usually takes time. The create-task endpoint only creates an asynchronous task; final status and results are obtained by polling.

Status queries can use the status_url from the create-task response, or build the request path with BASE_URL, endpoint, and request_id.

Terminal window
curl -sS "${STATUS_URL}" \
"${COMMON_HEADERS[@]}"

The status query response indicates whether the task still needs to wait and provides the basis for retrieving results or handling errors.

statusDescriptionRecommended next step
IN_QUEUEThe task has been submitted and is waiting to runContinue polling
IN_PROGRESSThe task is runningContinue polling
COMPLETEDThe task has reached a terminal stateCheck whether error exists; if not, retrieve the result
{
"status": "IN_QUEUE",
"request_id": "mmsu_01hxyz...",
"queue_position": 0,
"response_url": "https://.../response"
}
{
"status": "IN_PROGRESS",
"request_id": "mmsu_01hxyz...",
"response_url": "https://.../response"
}

COMPLETED only means the task has reached a terminal state. The response may represent either success or failure; determine success by checking whether the error field exists. Examples:

{
"status": "COMPLETED",
"request_id": "mmsu_01hxyz...",
"response_url": "https://.../response",
"metrics": {
"inference_time": 12.34
}
}

Common error_type values:

error_typeMeaning
INFERENCE_FAILUREModel execution failed
INFERENCE_TIMEOUTModel execution timed out
REQUEST_INVALIDRequest parameters are invalid or do not match model requirements
CONTENT_BLOCKEDInput or output content was blocked by safety policy
CANCELEDThe task has been canceled
INTERNAL_SERVER_ERRORInternal server error