Skip to main content
Use /v1/tasks/{task_id} to query asynchronous task state.
curl https://api.apiany.ai/v1/tasks/task_123 \
  -H "Authorization: Bearer $APIANY_API_KEY"

Status values

  • pending
  • processing
  • completed
  • failed
  • expired

Completed task

{
  "task_id": "task_123",
  "status": "completed",
  "model": "nano-banana",
  "result": {
    "type": "image",
    "urls": ["https://.../result.png"]
  }
}

Failed task

{
  "task_id": "task_123",
  "status": "failed",
  "error": {
    "type": "service_error",
    "message": "The task could not be completed."
  }
}