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
- Call
POST /v1/videosto submit the video generation task. - Read
idortask_idfrom the response. - 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
- 200
- 400
- 401
- 502
Task submitted successfully
Invalid request parameters
Unauthorized
Upstream task submission failed
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.1as 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 Createdor202 Accepted, the gateway version must accept 2xx responses as successful task submissions.