Skip to content
Home

Create Task

Create a task with the POST method. The request path is composed of BASE_URL and endpoint. The request body is the model parameter object itself and does not need an input wrapper.

Complete request example:

Terminal window
export BASE_URL="https://cloud.seaart.ai/model"
export ENDPOINT="nano_banana_2"
curl -sS -X POST "${BASE_URL}/v1/queue/${ENDPOINT}" \
"${COMMON_HEADERS[@]}" \
-d '{
"prompt": "a cinematic photo of a cat astronaut"
}'
{
"request_id": "mmsu_01hxyz...",
"response_url": "https://cloud.seaart.ai/model/v1/queue/nano_banana_2/requests/mmsu_01hxyz.../response",
"status_url": "https://cloud.seaart.ai/model/v1/queue/nano_banana_2/requests/mmsu_01hxyz.../status",
"cancel_url": "https://cloud.seaart.ai/model/v1/queue/nano_banana_2/requests/mmsu_01hxyz.../cancel",
"queue_position": 0
}
FieldTypeDescription
request_idstringTask ID used for later status queries, result retrieval, and cancellation
response_urlstringURL for retrieving the final result
status_urlstringURL for polling task status
cancel_urlstringURL for canceling the task
queue_positionnumberQueue position, currently returned as a fixed value of 0