Documentation Index
Fetch the complete documentation index at: https://docs.laozhang.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Veo 3.1 official API forwarding is now available through
api.laozhang.ai. For new integrations, create a dedicated token, keep it in the default group, and set Billing mode to Pay-per-request. This page documents the API format, parameters, pricing, and code examples.Pricing Advantage
Veo 3.1 official forwarding uses Pay-per-request billing with one unified price across supported duration and resolution combinations. Duration and resolution do not add extra charges. Based on public pricing from Google Gemini API Pricing, Google bills Veo 3.1 per second; the comparison below uses 8-second videos.| Model | LaoZhang price | Google 8s 1080p | Lower by | Google 8s 4K | Lower by |
|---|---|---|---|---|---|
veo-3.1-fast-generate-preview | $0.3/call | $0.96 | 68.8% | $2.40 | 87.5% |
veo-3.1-generate-preview | $1.2/call | $3.20 | 62.5% | $4.80 | 75.0% |
| Step | Method | Path | Response |
|---|---|---|---|
| Create a video task | POST | /v1/videos | JSON task object |
| Poll task status | GET | /v1/videos/{id} | JSON status object |
| Compatibility status polling | GET | /v1/video/generations/{id} | JSON status object |
| Download video output | GET | /v1/videos/{id}/content | video/mp4 bytes |
multipart/form-data when creating video tasks. Text-to-video and image-to-video both use the same /v1/videos task API.
Token Setup
| Setting | Value |
|---|---|
| Console entry | Token management → create a new token |
| Group | Default group |
| Billing mode | Pay-per-request |
| Recommendation | Create a dedicated Veo 3.1 official-forward token for easier usage review |
Veo 3.1 official forwarding uses the
Pay-per-request billing mode across supported duration and resolution combinations. Duration and resolution do not add extra charges.Supported Models
| Model | Price per call | Description | Best for |
|---|---|---|---|
veo-3.1-fast-generate-preview | $0.3 | Veo 3.1 Fast preview model | Quick tests, drafts, cost-sensitive workflows |
veo-3.1-generate-preview | $1.2 | Veo 3.1 standard preview model | Higher-quality outputs, production assets, complex shots |
Parameters
Core Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | veo-3.1-fast-generate-preview or veo-3.1-generate-preview |
prompt | string | Yes | Video prompt |
seconds | string | No | Duration. For production integrations, use "8" |
duration | string | No | Duration. Keep it aligned with seconds, such as "8" |
size | string | No | Output size such as 1280x720, 720x1280, 1920x1080, 1080x1920, 3840x2160 |
resolution | string | No | 720p, 1080p, or 4k |
aspectRatio | string | No | 16:9 or 9:16 |
metadata | string | No | JSON string. 4K requests must include {"durationSeconds":8,"resolution":"4k","aspectRatio":"16:9"} |
negativePrompt | string | No | Negative prompt, such as blurry, watermark, distorted |
seed | string | No | Random seed for similar repeatability |
input_reference | file | No | Reference image for image-to-video. Only one image is supported, uploaded as multipart/form-data |
Duration and Resolution
| Use case | Suggested parameters |
|---|---|
| 8s landscape 720p | seconds="8", size="1280x720", resolution="720p", aspectRatio="16:9" |
| 8s landscape 1080p | seconds="8", size="1920x1080", resolution="1080p", aspectRatio="16:9" |
| 8s portrait 1080p | seconds="8", size="1080x1920", resolution="1080p", aspectRatio="9:16" |
| 8s landscape 4K | seconds="8", duration="8", size="3840x2160", resolution="4k", aspectRatio="16:9", metadata='{"durationSeconds":8,"resolution":"4k","aspectRatio":"16:9"}' |
4K requests use the unified price. If you need to verify native 4K output, download the MP4 and inspect its media metadata. Do not rely only on create-task parameters for final file resolution.
Text-to-Video
Create a Task
Create Response
Image-to-Video
Image-to-video uses the same create endpoint with an additionalinput_reference file upload. The API supports only one initial image, and the field name must be input_reference; multiple uploaded images are not treated as multi-reference input.
4K Landscape Image-to-Video
For 4K landscape image-to-video, upload a 16:9 reference image and pass bothresolution="4k" and metadata.resolution="4k".
Poll Status
Save theid or task_id from the create response, then poll status.
Status Values
| Status | Meaning |
|---|---|
queued | Queued |
in_progress | Generating |
completed | Completed and ready to download |
failed | Failed |
Compatibility Status Polling
If existing code uses the older video generations polling path, use this compatibility endpoint:The compatibility polling endpoint does not return a separate public video URL. Download video results through
/v1/videos/{id}/content.Download Video
After the task completes, use/content to retrieve MP4 bytes. The API returns video file bytes, not a public video URL.
Python Complete Example
FAQ
Does the API return a video URL or file bytes?
Does the API return a video URL or file bytes?
/v1/videos/{id}/content returns video/mp4 bytes, not a public video URL. /v1/video/generations/{id} returns a task status object, not a separate public video URL. In production, download it server-side, store it in your own OSS/CDN, and return your own URL to users.Which token group should I choose?
Which token group should I choose?
Use the default group for Veo 3.1 official forwarding. Create a dedicated token and set Billing mode to
Pay-per-request for cleaner billing review.Which duration and resolution should I use?
Which duration and resolution should I use?
Billing uses
Pay-per-request, not separate duration or resolution pricing. veo-3.1-fast-generate-preview is $0.3/call, and veo-3.1-generate-preview is $1.2/call. For production integrations, use 8-second requests; 1080p and 4k require 8 seconds. For 4K, also pass metadata.resolution="4k".Can image-to-video use multiple images?
Can image-to-video use multiple images?
Only one initial image is supported, and the field name must be
input_reference. Multi-reference images, first/last-frame generation, and video extension fields are not supported; do not pass referenceImages, lastFrame, or video.Can I pass generateAudio to control sound?
Can I pass generateAudio to control sound?
Do not pass
generateAudio. Veo 3 / Veo 3.1 models have native audio, but this API does not support toggling audio with generateAudio; describe the desired audio in the prompt instead.Can I use Chat Completions?
Can I use Chat Completions?
Not recommended. Veo 3.1 official forwarding should use the same
/v1/videos task API style as Sora2 official forwarding.