Guide

Veo 3 API: how to use Veo 3.1 with Python or curl, and what it costs

Prices checked Nov 26, 2026 · 4 min read

How to use the Veo 3 API: a request turning into a short video clip

To use the Veo 3 API, send one POST /v1/tasks with model set to veo-3-1, then poll GET /v1/tasks/{id} or give us a callback_url. When the task succeeds, output.urls holds the video. On TapModels, Veo 3.1 costs $0.30 per clip on Fast at 720p and $1.25 on Quality at 720p, whatever the length of the clip (4, 6 or 8 seconds). Credits are held on submit and charged only on success.

What Google's docs say about Veo today

Check one fact before you build. Google's own Gemini API video page says "The Veo 3.1 Preview in the Gemini API has been shut down" and gives October 22, 2026 as the date. It points developers to Gemini Omni Flash or to GA models on its Gemini Enterprise Agent Platform. We checked that page on 2026-11-26.

TapModels lists Veo 3.1 under the model id veo-3-1. Its status shows in GET /v1/models as online, degraded or offline. Check that field before a launch, and read Google's page for the current state of its own endpoints.

The request

Video runs asynchronously. Auth is a bearer key, and the base URL is https://api.tapmodels.com/v1.

{
  "model": "veo-3-1",
  "input": {
    "prompt": "A slow dolly shot along a rain-wet market street at dusk, neon reflections",
    "mode": "Fast",
    "duration": "8",
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "audio": true
  },
  "callback_url": "https://your.app/hooks/tapmodels"
}

The reply is 202 { "id": "task_...", "status": "queued", "estimated_credits": 32.5 }.

Parameters and valid values

FieldRequiredValid valuesDefault
promptyesThe shot, the motion and the cameranone
modenoFast, QualityFast
image_urlnoFirst frame for image to videonone
durationno4, 6, 8 (seconds)4
resolutionno720p, 1080p, 4K720p
aspect_rationo16:9, 9:16, 1:116:9
audionotrue, falsetrue

The tier you pay for is the mode plus the resolution, such as "Fast 1080p". An invalid value returns 422 invalid_input, and the message names the field.

Python example

import os, time, requests

BASE = "https://api.tapmodels.com/v1"
H = {"Authorization": f"Bearer {os.environ['TAPMODELS_API_KEY']}"}

r = requests.post(f"{BASE}/tasks", headers=H, json={
    "model": "veo-3-1",
    "input": {
        "prompt": "A slow dolly shot along a rain-wet market street at dusk",
        "mode": "Fast", "duration": "8", "resolution": "1080p",
    },
})
r.raise_for_status()
task = r.json()
print("estimated credits:", task["estimated_credits"])

while task["status"] in ("queued", "running"):
    time.sleep(5)
    task = requests.get(f"{BASE}/tasks/{task['id']}", headers=H).json()

print(task["status"], task.get("output"), task["credits_charged"])

Curl example

curl https://api.tapmodels.com/v1/tasks \
  -H "Authorization: Bearer $TAPMODELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"veo-3-1","input":{"prompt":"A slow dolly shot along a rain-wet market street at dusk","mode":"Fast","duration":"8","resolution":"1080p"}}'

curl https://api.tapmodels.com/v1/tasks/task_123 \
  -H "Authorization: Bearer $TAPMODELS_API_KEY"

Polling or callback_url

Poll every few seconds in a script. In a web app, pass callback_url. On a final status we POST the task object to it with an X-Signature header (t=<unix>,v1=<hex hmac-sha256 of "t.body">, signed with your account's webhook secret). Non-2xx replies are retried with backoff for 24 hours. Output files are kept for 14 days.

Image to video

Upload the first frame with POST /v1/files (multipart, up to 30 MB). The reply carries a url. Pass it as image_url and keep the prompt about motion, such as "the camera pushes in while steam rises". When image_url is present, the request runs as image to video. The price is the same as text to video at the same tier.

Veo 3 API cost per clip

List price is the provider's published rate as recorded in our catalog on 2026-11-26. Credits are 100 per dollar.

TierResolutionTapModelsList price
Fast720p$0.30$0.80
Fast1080p$0.325$0.96
Fast4K$0.90$2.40
Quality720p$1.25$3.20
Quality1080p$1.275$3.20
Quality4K$1.85$4.80

Worked example: you try five prompt ideas, then render one final.

  • Five drafts on Fast 720p: 5 x $0.30 = $1.50
  • One final on Quality 1080p: $1.275
  • Total: $2.775 (277.5 credits)

At list price the same plan is 5 x $0.80 + $3.20 = $7.20. Draft on Fast, finish on Quality only where it shows. The full tier breakdown is in the Veo 3.1 Fast vs Quality guide.

Common errors

HTTPCodeWhat to do
401unauthorizedCheck the key is present and not revoked
402insufficient_creditsBalance minus held credits is below the estimate
402key_limit_reachedThe key's spend limit would be exceeded
403model_not_allowedThe key's allowed_models excludes veo-3-1
422invalid_inputA field is outside the valid values above
429rate_limitedWait for Retry-After, then retry
task failedupstream_errorResubmit: 0 credits were charged

The default limit is 20 new tasks per 10 seconds per account. For how to handle it, see the Veo 3 API rate limit guide.

Next step: see every tier on the Veo pricing page, or compare it with Kling.

Frequently asked questions

How do I use the Veo 3 API?

Send POST /v1/tasks with model veo-3-1 and an input object holding a prompt, a mode (Fast or Quality), a duration of 4, 6 or 8 seconds and a resolution. You get a task id back. Poll GET /v1/tasks/{id} until it succeeds, then download the file from output.urls.

How much does the Veo 3.1 API cost per video?

On TapModels a Veo 3.1 clip costs $0.30 on Fast at 720p, $0.325 at 1080p and $0.90 at 4K. Quality costs $1.25, $1.275 and $1.85 for the same resolutions. The price is per clip, so a 4 second and an 8 second clip cost the same.

Can Veo 3.1 make video from an image?

Yes. The model is listed for text to video and image to video. Upload your first frame with POST /v1/files, then pass its URL in the image_url field. The request then runs as image to video. The price does not change, only the tier and resolution set it.

Is there a Python library for the Veo 3 API?

We do not ship a Veo-specific SDK. Video runs through the same asynchronous task endpoint as every media model, so the requests library is enough: one POST to create the task and a loop that polls it, as in the example above.

Sources