v1

latestOpenAPI 3.1.0MIT2026-07-2614271305.9 KB
Task Management

Query Task Status

Query the status, progress, and result information of asynchronous tasks by task ID

get/v1/tasks/{task_id}

Path parameters

task_idstring required

Task ID, ignore {} when querying, append the id from the async task response body at the end of the path

Response

Task status details

createdinteger

Task creation timestamp

idstring

Task ID

modelstring

Model used

object'image.generation.task' | 'video.generation.task' | 'audio.generation.task'

Task type

progressinteger

Task progress percentage

resultsstring[]

Task result list (provided when completed)

status'pending' | 'processing' | 'completed' | 'failed'

Task status

type'image' | 'video' | 'audio' | 'text'

Task type

Example response

{
  "created": 1756817821,
  "id": "task-unified-1756817821-4x3rx6ny",
  "model": "gemini-3.1-flash-image-preview",
  "object": "image.generation.task",
  "progress": 100,
  "results": [
    "http://example.com/image.jpg"
  ],
  "status": "completed",
  "error": {
    "code": "content_policy_violation",
    "message": "Content policy violation.\nYour request was blocked by safety filters.",
    "type": "task_error"
  },
  "type": "image"
}