Skip to main content
Veo is not available on LaoZhang API right now (checked November 16, 2026). Moving the token to another group does not help; requests return 503 Current group default has no available channels. For video with sound, use one of these instead:
  • Gemini Omni 1.2 Flash: Google’s video model. Every clip has an audio track, characters speak the lines in your prompt, and clips run 3–10 seconds.
  • Muse: every clip comes with music and sound effects, up to 60 seconds per request.
Both take a default group token on /v1/videos. Prices for every video model are in Compare video APIs.

Overview

This route follows the OpenAI Videos API style: OpenAI removed its own Videos API on September 24, 2026 (OpenAI API deprecations). That change affects code built on the OpenAI SDK videos resource, including the SDK examples on this page. Whether the gateway’s /v1/videos endpoints still accept Veo requests depends on what the console shows for your account. Text-to-video and single first-frame image-to-video use multipart form requests, with local image files uploaded as input_reference. First/last-frame generation uses a JSON request body with images and metadata.lastFrame Data URIs. Multi-reference images aren’t supported.
First/last-frame requests must follow these rules.
  • Send a JSON body, not multipart.
  • The field name is case-sensitive: use lastFrame, not lastframe.
  • Pass duration as the string "8", not the number 8.
  • metadata.referenceImages returns referenceImage isn't supported by this model, so multi-reference images aren’t available.
This route uses only the model names and the /v1/videos task API on this page. Older model names such as veo-3.1, veo-3.1-fast, and veo-3.1-fl, and the Chat Completions examples written for them, belong to a different route.

Token setup

Availability and the current price for this route are shown in the console.

Models

OpenAI SDK example

These examples use the OpenAI SDK videos resource. If your SDK version no longer includes it, send the multipart or JSON HTTP requests shown later on this page instead. Set base_url to https://api.laozhang.ai/v1.
For single-image image-to-video, pass the local file as input_reference:

Parameters

Core parameters

Do not pass generateAudio. Veo 3 / Veo 3.1 models have native audio, but this API does not support audio toggling through generateAudio. Passing it may return INVALID_ARGUMENT. To guide audio content, describe dialogue, ambient sound, effects, or music style in the prompt.

Duration and resolution

Parameter limit: 1080p and 4k must be used with 8-second requests. Do not combine them with 4-second or 6-second requests.
  • For 4K, also pass metadata.resolution="4k"; otherwise the downloaded file may be rendered as 1080p.
  • To confirm native 4K output, download the MP4 and inspect its media metadata. Don’t rely only on the create-task parameters for the final file resolution.
  • Pass seconds and duration as strings rather than numbers.
  • Use 720p + 4s for quick tests. For production integrations, use 8-second requests.
  • For image-to-video, upload a local image file instead of a remote image URL.

Text-to-video

Create a task

Create response

Image-to-video

Image-to-video uses the same create endpoint, with a different request format for each image input:
  • Single first-frame image-to-video: multipart input_reference
  • First/last-frame generation: JSON images[] + metadata.lastFrame
Do not use multipart last_frame / lastFrame file fields as a replacement for JSON metadata.lastFrame.

4K landscape image-to-video

For 4K landscape image-to-video, upload a 16:9 reference image and pass both resolution="4k" and metadata.resolution="4k".

First/last-frame generation

First/last-frame generation must use a JSON request body. Pass the first frame as a Data URI inside images, and pass the last frame as a Data URI inside metadata.lastFrame. Pass duration as a string, such as "8", so OpenAI-compatible gateways do not reject the numeric type.

Multi-reference images

Multi-reference images aren’t available. With metadata.referenceImages, both the Fast and standard models return referenceImage isn't supported by this model / INVALID_ARGUMENT. Don’t offer material reference images in production; for first/last-frame control, use the JSON metadata.lastFrame request above.

Video extension

Video extension uses the video file field to upload an existing MP4. Use 8-second requests. This mode continues the style and content from the uploaded video according to your prompt; it does not guarantee frame-perfect stitching.
Reference image dimensions should match the target size when possible. For example, use a 1280x720 image when size=1280x720. JPEG, PNG, and WebP are supported. For video extension, upload an MP4 file and use streaming downloads with retries for the result.

Poll status

Save the id or task_id from the create response, then poll status.
In progress:
Completed:

Status values

Compatibility status polling

If existing code uses the older video generations polling path, use this compatibility endpoint:
This endpoint returns a task status object:
The compatibility polling endpoint does not return a separate public video URL. Download video results through /v1/videos/{id}/content.

Download the video

After the task completes, use /content to retrieve MP4 bytes. The API returns video file bytes, not a public video URL.
The video file may lag briefly after GET /v1/videos/{id} returns completed. If the content endpoint returns task status is IN_PROGRESS, a 400 JSON response, or a short-lived stream interruption, wait 10-20 seconds and retry. For 4K outputs, use streaming downloads and retries.

Python example

FAQ

/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.
Use the default group with the Per-call billing mode, and create a dedicated token so usage is easy to review. Check the console first: this route isn’t in the current public model catalog.
For production integrations, use 8-second requests; 1080p and 4k require 8 seconds. For 4K, also pass metadata.resolution="4k". Check the console for the current price of this route.
Two image-control paths are available: single first-frame generation with multipart input_reference, and first/last-frame generation with JSON images[] + metadata.lastFrame. Don’t offer metadata.referenceImages as a material-reference feature; upstream returns referenceImage unsupported.
Yes. Upload an MP4 through the video file field and use seconds="8" plus duration="8". Video extension continues style and content from the uploaded video according to your prompt; it does not guarantee frame-perfect stitching.
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.
No. This route uses the /v1/videos task API described on this page.