Skip to main content

Retrieve Veo 3.1 Video

GET 

/v1/videos/:task_id

Use the id or task_id returned by the submission response to retrieve the status of a Veo 3.1 video generation task. Video generation is asynchronous, so poll at a reasonable interval until the task reaches a completed or failed state.

Example

curl --location 'https://newapi.xxd.fans/v1/videos/task_DCAvd1SdbNi3Gv6NAt5uoSS3tbyCuZ4m' \
--header 'Authorization: Bearer YOUR_API_KEY'

Request

ParameterLocationTypeRequiredDescription
task_idpathstringYesThe id or task_id returned by the submission response.

Responses

Query succeeded

Status Values

  • queued: The task is queued.
  • in_progress: The task is being processed.
  • completed: The task completed successfully. Download the video through the content proxy endpoint.
  • failed: The task failed. Check error.message.
  • cancelled: The task was cancelled.

Download Video Content

Download video files through the gateway proxy:

curl --location 'https://newapi.xxd.fans/v1/videos/task_DCAvd1SdbNi3Gv6NAt5uoSS3tbyCuZ4m/content' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--output veo.mp4

After the download finishes, the actual file size should match the Content-Length response header. If the file is smaller than Content-Length, the download was interrupted and the file may not be playable.

Response Example

{
"id": "task_lr4P3EGXFQMP8VlEqOTAqZfCTUQ640Og",
"usage": {
"cost": 3.2,
"is_byok": false
},
"status": "completed"
}