What you will build
You will create one Veo video task with multipart form data, store the returned task ID, poll the retrieve endpoint, and save the final asset URL or file in your own system.Prerequisites
- A CometAPI API key stored in
COMETAPI_KEY - Python 3.10+ with
requests, or Node.js 18+ - A server-side job runner for polling
API key, base URL, authentication
Create Veo tasks with:Code examples
Use the tabs below for copyable examples in cURL, Python, and Node.js.Flow explanation
Veo video generation is asynchronous. The create endpoint accepts multipart form data and returns a task ID immediately. Poll the retrieve endpoint until the task reaches a terminal status, then persist the final video URL or file details from the completed response. Use short durations and the smallest useful size for first tests. Move completed assets into your own storage when your application needs retention.Common parameters
| Parameter | Use |
|---|---|
model | Veo model ID. The API reference example uses veo3.1-fast. |
prompt | Text prompt for the video job. |
seconds | Duration form field. The reference documents 4, 6, and 8. |
size | Exact WxH size, such as 1280x720. |
input_reference | Optional first-frame image file for image-to-video. |
Troubleshooting / FAQ
The request fails with a content type problem
The request fails with a content type problem
Send multipart form data. Do not send Veo create requests as JSON.
Polling takes longer than expected
Polling takes longer than expected
Use a bounded polling loop, store the task ID, and surface a pending state in your application instead of blocking a web request.
How should I control cost
How should I control cost
Start with a short duration, one task, and the smallest acceptable size. Use account quotas and cost estimation before scaling task count.
Next steps
- Read the Create a Veo 3 video API reference.
- Poll with Retrieve a Veo 3 video.
- Find Veo video models in Models.
- Review Use polling and webhooks for video generation.
- Estimate task cost with Estimate request cost before calling a model.