Skip to main content

Create Veo 3.1 Video

POST 

/v1/videos

Create an asynchronous Veo 3.1 video generation task with the OpenAI-compatible Video API. Veo 3.1 is suitable for high-fidelity video generation, including text-to-video, image-referenced video generation, and synchronized audio when supported by the configured channel and upstream model.

Flow

  1. Call POST /v1/videos to submit the video generation task.
  2. Read id or task_id from the response.
  3. Poll GET /v1/videos/{task_id} for task status and results.

Example

curl --location 'https://newapi.xxd.fans/v1/videos' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"model": "veo-3.1",
"prompt": "A serene mountain landscape at sunset with clouds drifting by"
}'

If the configured upstream channel uses the official Google Gemini or Vertex Veo model name, map veo-3.1 to the actual upstream model in the dashboard.

Request

Responses

Task submitted successfully

Response Example

{
"id": "task_DCAvd1SdbNi3Gv6NAt5uoSS3tbyCuZ4m",
"task_id": "task_DCAvd1SdbNi3Gv6NAt5uoSS3tbyCuZ4m",
"object": "video",
"model": "veo-3.1",
"status": "queued",
"progress": 0,
"created_at": 1710000000
}

Notes

  • Use veo-3.1 as the public model name. Configure model mapping if the upstream provider requires another model name.
  • Video generation is asynchronous. A successful submission does not mean the video has already finished.
  • If the upstream provider returns 201 Created or 202 Accepted, the gateway version must accept 2xx responses as successful task submissions.