Google Veo 3.1 API: Docs, Setup & Pricing (2026)

Hands-on guide to Google DeepMind's Veo 3.1 video generation API via ofox — setup, code examples, native audio, and production considerations.

A flat-illustration style film strip unrolling into lines of code, with a warm coral and indigo gradient background — video generation meets API development

TL;DR: Veo 3.1 is Google DeepMind’s latest video generation model, and it does something no other major video API does out of the box: it generates synchronized audio alongside video — dialogue, ambient sound, sound effects — in a single generation pass. On ofox it is listed but not yet callable — Veo 3.1, Sora 2 Pro and Kling v3.0 all sit behind a coming soon flag as of August 2026, while Seedance, Wan and HappyHorse answer on the same endpoint today. Veo 3.1 outputs 1080p and 4K video with camera movement controls and scene-level prompt adherence. For a detailed comparison between these three models, see Sora 2 Pro vs Veo 3.1 vs Kling 2.6 Pro. This guide covers authentication, working code, and what to expect.

What Veo 3.1 Actually Is

Veo 3.1 is Google DeepMind’s flagship video generation model, announced in early 2026 as an upgrade to Veo 3. The headline difference from every other video API on the market: native audio generation. It produces synchronized sound effects, ambient noise, and dialogue alongside the video frames — no separate audio model or post-processing step required.

Under the hood it’s a diffusion-based model trained on video-audio pairs. You send a text prompt (or an image plus instructions) and get back video with audio in one shot. The model supports 1080p and 4K output resolutions, camera movement directives in natural language, and frame-level editing operations like outpainting, object insertion, and scene extension.

Google benchmarked Veo 3.1 against competitors on text-to-video quality, visual fidelity, and text alignment — human raters preferred its outputs across all three dimensions, according to published results on the DeepMind Veo page.

Accessing Veo 3.1 Through ofox

You need an ofox API key. Get one at ofox.ai. Billing is pay-as-you-go — there are no monthly plan tiers to pick between, and video is charged per second of output rather than per token.

# Your environment
OFOX_API_KEY="ofox-your-key-here"
OFOX_BASE_URL="https://api.ofox.run/v1"

Video on ofox does not run through the image endpoint. It has its own asynchronous endpoint, POST /v1/videos, and the model ID carries a vendor prefix — google/veo-3.1, not veo-3.1. The full line-up and per-second pricing live on the ofox video model page.

Status check before you write code: as of August 2026 the ofox video page lists Veo 3.1, Veo 3.1 Fast and Veo 3.1 Lite as coming soon ($0.200 / $0.080 / $0.030 per second). The models that answer today on the same endpoint are Seedance 2.0 / 2.0 Fast / 2.0 Mini / 2.5, Wan 2.6 / 2.7 and HappyHorse 1.0 / 1.1. Build the pipeline against one of those and swap the model string when Veo flips to live — the request schema does not change.

The client setup is the ordinary OpenAI-compatible one:

from openai import OpenAI

client = OpenAI(
    api_key="ofox-your-key-here",
    base_url="https://api.ofox.run/v1"
)

List available video models to confirm what is actually live on your account — this is the authoritative check, not the marketing page:

curl -s https://api.ofox.run/v1/models \
  -H "Authorization: Bearer $OFOX_API_KEY" | grep -i veo

Generating Video

Video generation is asynchronous. You submit a job with your prompt and parameters, poll for completion, then download the result. This is the same pattern across Sora, Veo, and Kling — the model needs time to render.

Submit a generation job to /v1/videos. One schema covers every model on the endpoint — switching vendors is a change to the model string and nothing else:

curl -X POST https://api.ofox.run/v1/videos \
  -H "Authorization: Bearer $OFOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/veo-3.1",
    "prompt": "Aerial drone shot of a Tokyo street market at night, neon signs reflecting in puddles, slow pan right, ambient city soundscape",
    "duration": 5,
    "resolution": "1080p",
    "aspect_ratio": "16:9"
  }'
# → 202 {"id": "...", "status": "pending", "polling_url": "..."}

The call returns 202 immediately with a job id and a polling_url. Poll it until status is completed, or pass a callback_url and let ofox notify you:

import time, requests

HEADERS = {"Authorization": f"Bearer {OFOX_API_KEY}"}

job = requests.post(
    "https://api.ofox.run/v1/videos",
    headers=HEADERS,
    json={
        "model": "bytedance/seedance-2.0",   # swap to google/veo-3.1 once it is live
        "prompt": "Aerial drone shot of a Tokyo street market at night, neon signs reflecting in puddles, slow pan right, ambient city soundscape",
        "duration": 5,
        "resolution": "1080p",
        "aspect_ratio": "16:9",
    },
).json()

while True:
    state = requests.get(job["polling_url"], headers=HEADERS).json()
    if state["status"] in ("completed", "failed"):
        break
    time.sleep(5)

print(state)

The finished job carries a temporary URL to your video. Download and store it — those URLs expire, so do not put one in a page or a database and expect it to still resolve next week.

Camera controls work through natural language in the prompt. Veo 3.1 understands direction, speed, and framing:

"Slow dolly zoom into a character's face, shallow depth of field, 35mm lens"
"Static wide shot of a mountain range at sunrise, clouds moving left to right"
"Handheld tracking shot following a cyclist through a city, natural motion blur"

Multi-shot sequences keep visual consistency across generations by reusing the same prompt style and specifying consistent lighting conditions. Chain multiple calls with matching “golden hour, warm color grade, anamorphic lens” descriptors and the outputs will share the same visual DNA.

What Veo 3.1 Excels At

Native audio that actually matches the visuals. No other major video API ships this. Footsteps sync to walking. Rain sounds match the intensity of the precipitation on screen. Background chatter fades as the camera pulls away from a crowd. Competing APIs give you silent video and leave audio to a separate pipeline — Veo 3.1 handles both in one generation.

Prompt adherence with spatial precision. Describe “a red bicycle leaning against a stone wall, ivy covering the left third of frame, overcast lighting” and the composition lands where you said it would. Camera movement instructions (“pan right,” “dolly in,” “bird’s eye descending to eye level”) are followed with directional accuracy that earlier video models struggled with.

Physics and temporal consistency. Objects don’t morph between frames. Water flows in consistent directions. Fabric drapes and wrinkles naturally during motion. Google trained Veo 3 on physics-aware objectives, and 3.1 refined it — the result is less of the “AI video weirdness” that plagued first-generation models.

Resolution options that matter. 1080p for fast iteration and cost control, 4K for final output. You decide per-request rather than being locked into a single quality tier.

Where It Falls Short

Fast action and rapid scene cuts can still produce artifacts. If your use case involves sports footage, explosions, or anything with sharp velocity changes, test thoroughly — diffusion models in general struggle with high-frequency motion, and Veo 3.1 isn’t exempt.

Generation time is meaningfully longer than text or image models. A 6-second 1080p clip can take 30-90 seconds. 4K output can take several minutes. Architect your pipeline for asynchronous processing from day one.

The model is Google-first in its ecosystem integration. Native SDK support exists for the Gemini API and Vertex AI. Through ofox, you get OpenAI-compatible access, which works well but may lag behind Google’s first-party SDK features by a release cycle or two.

Practical Use Cases

Social media content automation. Generate short-form video clips from product feeds or CMS content. A Python script that reads product descriptions and generates 8-second showcase videos with ambient audio costs pennies per clip and runs unattended.

E-learning and documentation. Turn a step-by-step tutorial into visual demonstrations with narration-ready ambient audio. A 15-second clip of a concept beats three paragraphs of text — and generates in under two minutes.

Pre-visualization for video production. Storyboard a scene, generate reference footage with camera moves and audio, hand it to a director. Faster than sketches, richer than mood boards, and the audio gives the editor something to work with immediately.

A/B testing video creative. Generate the same product shot with four different lighting setups, camera angles, and ambient moods. Test which drives higher watch time or conversion. Video iteration at this speed was science fiction two years ago.

Pricing

Video is billed per second of output, not per token, and the rate is per model rather than per plan. The ofox video page lists Veo 3.1 from $0.200/sec, Veo 3.1 Fast from $0.080/sec and Veo 3.1 Lite from $0.030/sec — all three still flagged coming soon. Of the models live today, Seedance 2.0 starts at $0.070/sec, which is the realistic yardstick for budgeting a pipeline you can run this week.

A 5-second 1080p clip is the cheapest useful unit of testing. Start there before scaling to production volumes — at per-second billing, a batch of 4K retries gets expensive faster than most teams expect.

Production Checklist

  • Async architecture is non-negotiable. Generation takes 30 seconds to several minutes. Never block a request loop waiting for video output. Use a job queue, poll with exponential backoff, or set up webhook callbacks.
  • Download outputs immediately. Generated video URLs are temporary. Store outputs in your own bucket (S3, R2, GCS) the moment they’re ready.
  • Default to 1080p. 4K looks great but costs substantially more and takes longer. Let users opt into higher quality rather than making it the default.
  • Prompt-moderation layer. Text-to-video prompts are user-generated content. Filter inputs before they reach the API — standard content moderation APIs handle this well.
  • Cost monitoring from day one. Video generation costs add up fast. Set spend alerts and per-request caps before you open the pipeline to users or automated workflows.
  • Provider flexibility. The video generation landscape shifts quarterly. Architect your system so the generation layer can swap between Veo, Sora, and Kling without touching the rest of your pipeline. ofox’s unified API makes this straightforward — same endpoint, same SDK, different model parameter.

Veo 3.1 raises the bar by making audio a first-class output rather than an afterthought. If your video pipeline currently runs silent and bolts on audio later, switching to native audio-visual generation eliminates an entire post-processing step.


For more on working with video and multimodal AI, see our Multimodal AI API Guide and Gemini 3.1 Pro API Guide.