Overview
VEO 3.1 Official is APIYI’s official-relay channel for Google Veo 3.1 — a transparent passthrough to Google AI Studio’sveo-3.1-generate-preview / veo-3.1-fast-generate-preview async endpoints, with model IDs, response fields, and constraints identical to the upstream. Pay-per-request billing, callable on the Default group — the lowest-friction official-quality Veo 3.1 channel available today.
Default group + Pay-per-request or Pay-as-you-go Priority Tokens (no dedicated group needed; pure Pay-as-you-go is not supported). Suited for ad shorts, e-commerce assets, social-media content, and product demos that need official-grade quality with the simplest possible onboarding.Text-to-Video API
POST /v1/videos, generate video from text only — JSON request body, the simplest entry point.Image-to-Video API
POST /v1/videos + multipart upload of input_reference to animate a static image into a clip.Official vs Reverse
Visual API Testing
Async Task Lookup / Download
Why APIYI’s VEO 3.1 Official?
Drop-in replacement for the Google official / Vertex AI channel, optimized for production scenarios across onboarding friction, stability, and cost:Official Passthrough · Identical Model IDs
veo-3.1-generate-preview / veo-3.1-fast-generate-preview) match the upstream exactly, with one-to-one alignment on request and response fields and constraints.Zero-Friction Onboarding · No Group Switching
Default group with Pay-per-request or Pay-as-you-go Priority Tokens (pure Pay-as-you-go is not supported). No dedicated group switch needed; existing Pay-per-request Tokens work as-is — the lowest-friction official-quality channel for Veo 3.1.Unlimited Concurrency · Production Scale
Per-Request Pricing · 60%+ Cheaper than Google
veo-3.1-fast-generate-preview $0.3/req, veo-3.1-generate-preview $1.2/req — flat across 4/6/8 sec and 720p/1080p/4k. Vs. Google’s official 8s 1080p, save 62–68%, stack top-up bonuses for further savings; failed tasks not billed.Global Zero-Friction Access
api.apiyi.com directly from Mainland China data centers, residential networks, or overseas nodes. Skip the Google AI Studio / Vertex AI cross-border setup entirely.Professional Support · Enterprise Onboarding
Key Features
Native Synchronized Audio
Flexible 4 / 6 / 8 Second Durations
seconds string enum: "4" / "6" / "8". Per-request billing, duration does not affect price. 1080p / 4k tiers require "8".Three Resolution Tiers
720p / 1080p / 4k, uniform per-request pricing. Toggle landscape (16:9) and portrait (9:16) freely.Precise Instruction Following
Image-to-Video (input_reference)
Async Task Model
task_id immediately. Poll status independently and download the final video — ideal for batch management and resume-on-failure flows.OpenAI-Compatible Protocol
base_url=https://api.apiyi.com/v1 + Bearer auth. Works via raw HTTP or the OpenAI SDK’s low-level client.post().Failures Are Free
status=completed tasks are charged.Pricing
APIYI uses pay-per-request billing — flat price within supported duration/resolution combos, no surcharge for longer or higher-res output. Perai.google.dev/gemini-api/docs/pricing public rates, Google’s official Veo 3.1 charges per second; the discounts below are computed for 8-second videos.
- Charged per request by model name, independent of duration (4/6/8 sec), resolution (720p/1080p/4k), or whether
input_referenceis provided — picking 4K costs the same as 720p - In async mode, failed generations / content-policy rejections / capacity errors are all not billed
- Top-up bonus tiers under Top-Up Promotions further reduce effective cost
- 4K renders 4–6× slower and produces files ~10× larger — default to 1080p for daily use
- Google’s official 4K rate is $0.30/sec (fast) / $0.60/sec (standard), i.e. $2.40 / $4.80 for 8 sec (source:
ai.google.dev/gemini-api/docs/pricing)
Group Setup
VEO 3.1 Official works on theDefault group (1x), no dedicated group switching required. The Token’s billing mode must be Pay-per-request or Pay-as-you-go Priority — pure Pay-as-you-go is not supported (switch the Token mode in the console if needed).
Technical Specs
API Endpoints
Key Parameters
seconds (video length)
The length field is named seconds (not duration) and must be a string ("4" / "6" / "8"). Passing a number returns:
metadata.durationSeconds > seconds > 8
metadata.resolution (resolution tier)
metadata.resolution > size > 720p
⚠️ Do not pass generateAudio
Veo 3 / 3.1 is natively audio-aware, but the generateAudio parameter must not be passed — upstream will reject with INVALID_ARGUMENT. To control audio, write the intent into your prompt:
“Coastal lighthouse at dusk; waves, distant seabirds, low wind sounds, cinematic atmosphere”
Best Practices
Pick a model by need
- Iteration / batch previews →
veo-3.1-fast-generate-preview($0.3/request) - Final delivery / 4K →
veo-3.1-generate-preview($1.2/request) - Run both with the same prompt + seed; pick by eye
Validate with 4 seconds first
seconds: "4" to validate camera direction and style (60–90 sec render, $0.3). Scale up to 8 sec or 1080p once the look is locked.Use async polling, not sync wait
task_id → poll GET /v1/videos/{task_id} every 8–10 sec until status: "completed" → download from /content. No webhooks; polling only.Set client timeouts by tier
- 720p / 1080p: 3 min hard timeout
- 4K: 10 min hard timeout
- POST submit (multipart): 30 sec minimum
Download immediately on completion
status flips to completed, download to your own OSS / CDN immediately — do not depend long-term on the remote task_id. The /content endpoint occasionally returns 400 right after status flips; retry after 4 seconds (the sample clients have this baked in).Encode audio intent in the prompt
generateAudio (it returns INVALID_ARGUMENT). For ambient sound, dialogue, BGM, describe in the prompt: “waves, distant seabirds, low wind sounds”.Rate-limit on your end
Error Codes & Retries
- POST submit timeout: 30 sec (multipart uploads may need more)
- Polling interval: 8–10 sec; max wait 720p/1080p 3 min, 4K 10 min
- Exponential backoff retry for 5xx and
failed(1–2 attempts recommended) - Retry
/content3–5 times with 4-second gaps
FAQ
Official vs Reverse channel — what's the difference? Is the Reverse channel still usable?
Official vs Reverse channel — what's the difference? Is the Reverse channel still usable?
veo-3.1-generate-preview / veo-3.1-fast-generate-preview), priced at $0.3 / $1.2 per request, async endpoint only.Reverse (existing VEO 3.1): Reverse-engineered access to Google Flow. Model IDs are veo-3.1-fast / veo-3.1 / -fl series, priced from $0.15 per request — cheaper, and supports both streaming sync and async modes, plus frame-to-video (first/last frame).See the full Official vs Reverse decision matrix. Both channels coexist; pick by business need.Is the length field seconds or duration? And why must it be a string?
Is the length field seconds or duration? And why must it be a string?
seconds (string "4" / "6" / "8"). Naming it duration is not recognized — it’s silently dropped and length falls back to the default 4 sec, which is the root cause of “sent 8s but only got 4s”.As for why it must be a string: the backend Go struct declares this field (internally named duration) as string, so a number is rejected at the decoder layer with parse_request_failed: cannot unmarshal number into Go struct field ... duration of type string (the duration in that error is the backend’s internal field name — your request still sends seconds). Remember: send seconds, and quote the value: "4" / "6" / "8".How do I add dialogue / ambient sound / BGM? Can I pass generateAudio?
How do I add dialogue / ambient sound / BGM? Can I pass generateAudio?
generateAudio parameter must not be passed (upstream returns INVALID_ARGUMENT). To control sound, write the intent into your prompt:“Coastal lighthouse at dusk; waves, distant seabirds, low wind sounds, cinematic atmosphere”
fast vs standard — which to pick? Is fast actually faster?
fast vs standard — which to pick? Is fast actually faster?
- At equivalent parameters, render time is roughly the same (measured 720p 8 sec: fast 83s, standard 78s). fast is not faster — it is cheaper ($0.3 vs $1.2)
- Default to
veo-3.1-fast-generate-preview - Switch to
veo-3.1-generate-previewfor final delivery or when detail fidelity / physics consistency matters - A/B in production: run both with same prompt + seed, pick by eye
Is 4K worth using?
Is 4K worth using?
- Same per-request price sounds attractive
- But rendering is 4–6× slower (720p 80s → 4K 350s)
- Files are ~10× larger (720p 4MB → 4K 40MB) — bandwidth and storage costs double
- 1080p is visually sufficient for most playback scenarios
veo-3.1-generate-preview, set seconds="8" (mandatory), client timeout ≥ 10 min, run as a backgrounded async task.When is a task done? Are there webhooks?
When is a task done? Are there webhooks?
- There are no webhooks; poll
GET /v1/videos/{task_id}only - Recommended polling interval: 8 sec (measured sufficient, won’t trip rate limits)
- Measured times: 720p / 1080p 60–115 sec, 4K 5–6 min
- Client timeouts: 3 min for 720p/1080p, 10 min for 4K
Why does GET /content return 400?
Why does GET /content return 400?
status flips to completed, calling /v1/videos/{task_id}/content occasionally returns 400 due to upstream CDN sync delay. Wait 4 sec and retry once typically resolves it (the sample clients retry 3–5 times with 4-second gaps).Can I get a CDN URL for the video? Can the frontend hit the endpoint directly?
Can I get a CDN URL for the video? Can the frontend hit the endpoint directly?
video_url / data.url / any other directly distributable link.The only way to retrieve the video: after status: "completed", call GET /v1/videos/{task_id}/content to get the MP4 binary stream (requires Authorization: Bearer header).Standard production pattern:- Backend downloads the MP4 as soon as the task completes → push to your own OSS / CDN
- Serve your CDN URL to end users
- The frontend
<video>tag should NOT point directly at/content— browsers can’t include the auth header, requests will 401
How long are videos kept on the server? Do I need to download immediately?
How long are videos kept on the server? Do I need to download immediately?
task_id; /content will eventually 404 after expiry.Why does progress stay at 50%?
Why does progress stay at 50%?
progress field is coarse-grained — only jumps between 0 / 50 / 100. Do not use it for a percentage progress bar. Use a spinner, or compute “elapsed / expected” yourself.Are failed generations billed?
Are failed generations billed?
status=completed tasks are charged. failed / canceled / content-policy rejected / parameter error are all free. No real video output, no charge.Can seed reproduce identical videos?
Can seed reproduce identical videos?
88888) + same params, fast run twice — file sizes 9.81 MB vs 9.25 MB, md5 completely different, render times also differ.But seed is not decorative: same-seed outputs cluster together (5-run test, intra-group file size spread only 6%), different seeds shift systematically (inter-group spread +36.8%). Implications:- Want a “stable look” → fix the seed
- Want to “explore variations” → swap seed instead of fiddling with prompt
- Want “exact replay” → forget it, store the mp4
Can I pass multiple reference images? First/last frame?
Can I pass multiple reference images? First/last frame?
input_reference, and only as file or Base64, not remote URL.Google upstream Veo 3.1 supports multi-reference / first-last-frame / video extension, but this channel does not. For first/last frame, use the VEO 3.1 (Reverse) -fl series.Concurrency limits? QPS caps?
Concurrency limits? QPS caps?
Do videos carry watermarks or provenance metadata?
Do videos carry watermarks or provenance metadata?
- No visible watermark
- But they carry Google C2PA Content Credentials (issued by Google C2PA Media Services, format
urn:c2pa:...) embedded in MP4 metadata. End users cannot see them; C2PA tools (e.g., Adobe Content Authenticity) can verify “generated by Veo” - For redistribution scenarios, be aware; usually does not affect playback
Can I use the official OpenAI SDK directly?
Can I use the official OpenAI SDK directly?
Bearer auth + /v1/...), but the OpenAI official SDK does not expose a videos.create method (/v1/videos is a custom path). Use the OpenAI SDK’s low-level client.post() or raw HTTP. Raw HTTP is simplest — see code samples in Text-to-Video Playground.Related Docs
- Text-to-Video Playground —
POST /v1/videos(JSON) interactive debugger + 5-language code samples - Image-to-Video Playground —
POST /v1/videos(multipart) +input_referenceusage - Official vs Reverse decision matrix — Differences vs VEO 3.1 (Reverse)
- Top-Up Promotions — Bonus tiers and eligible channels
- API Manual — Generic call conventions, timeout and retry guidance
- Google official model page:
ai.google.dev/gemini-api/docs/models/veo-3.1-generate-preview - Google video generation docs:
ai.google.dev/gemini-api/docs/video