SnapEditDocs
API HomeGet API Key
API Reference

Get task status

Retrieve the status and result of an async task. Poll this endpoint after creating a task. Auto-fails tasks with CREATED status older than 120 seconds.

get/v1/tasks/{task_id}

Authorization β€” This endpoint requires an API key. Pass it in the api-key header on every request. See the quickstart

Body

NameTypeStatusDescription
task_id
stringRequiredThe task ID returned from the create task endpoint.

Responses

Task status retrievedTaskStatusResponse

NameTypeDescription
task_idstring
statusstring
progressintegerProgress 0-100 (when PROCESSING)
output_image_urlstringResult image URL (when COMPLETED)
error_msgstringError message (when FAILED)
created_atinteger
started_atinteger
completed_atinteger
curl -X GET "https://api.snapapi.ai/v1/tasks/YOUR_TASK_ID" \
  -H "api-key: YOUR_API_KEY"
Response
{
  "task_id": "task_abc123",
  "status": "COMPLETED",
  "progress": 75,
  "output_image_url": "https://outputs.snapapi.ai/outputs/result.png",
  "error_msg": "string",
  "created_at": 0,
  "started_at": 0,
  "completed_at": 0
}