Back to blog
Guide·May 23, 2026·7 min read

Veo 3 API quickstart after the Sora API shutdown

Your first Veo 3 calls on an OpenAI-style API: text-to-video, image-to-video, uploads, Python and Node. OpenAI shut down the Sora API on September 24, 2026.

Veo 3 puts text-to-video at the same quality bar where text-to-image was eighteen months ago. The catch: providers gate access behind waitlists, regional restrictions and bespoke billing flows that don't play with the rest of your AI stack.

On Kunavo the live text-to-video model today is Google Veo 3, served through one OpenAI-compatible endpoint — no waitlist, OpenAI-compatible auth, billed per video, results served from a permanent URL. OpenAI shut down the Sora API (sora-2, sora-2-pro) on September 24, 2026, with no one-to-one replacement. This guide gets your first Veo 3 call running in about five minutes. See the Sora API guide for the full picture.

Setup

  1. Sign up at kunavo.com/app/signup. Top up from $10, pay-as-you-go — enough to run every example in this guide several times, and your balance never expires.
  2. Create a key in /app/keys. It starts with sk-kn-.
  3. Export it: export KUNAVO_API_KEY=sk-kn-....

Text-to-video with Veo 3

Veo 3 is currently the best text-to-video model on the market for cinematic shots — it understands camera language (dolly, push-in, rack focus), produces stable lighting across cuts, and handles 24fps motion correctly. Generations take 30 seconds to a few minutes; the HTTP response is synchronous — set a long client timeout.

text_to_video.py
import requests, os, time

KEY = os.environ["KUNAVO_API_KEY"]

resp = requests.post(
    "https://api.kunavo.com/v1/video/generations",
    headers={"Authorization": f"Bearer {KEY}"},
    json={
        "model": "veo-3",
        "prompt": "A drone shot pulling back from a quiet mountain lake at dawn, mist rising off the water. Cinematic, 24fps, soft golden light.",
        "aspect_ratio": "16:9",
        "resolution": "1080p",
    },
    timeout=600,   # generations take 30s to several minutes
)
resp.raise_for_status()
data = resp.json()
print(data["data"][0]["url"])

duration (seconds) sets the clip length on the models billed per second: the Seedance models and Wan 2.7. The Veo models ignore it; every Veo clip is 8 seconds, billed per video.

The response is OpenAI-style: { data: [{ url: '...' }] }. The URL is permanent, served from files.kunavo.com — download it once into your own storage if you need long-term hosting.

Image-to-video

Anchoring with an image is usually where you get production-quality results. Veo 3 supports two image modes:

  • image_mode: "frame" — single image is the first frame; two images is first + last frame. Default for image_url.
  • image_mode: "reference" — up to 3 style references for character / wardrobe consistency without forcing frames.
image_to_video.py
# image-to-video: pass an image_url to anchor the first frame.
resp = requests.post(
    "https://api.kunavo.com/v1/video/generations",
    headers={"Authorization": f"Bearer {KEY}"},
    json={
        "model": "veo-3",
        "prompt": "She smiles, then walks out of frame to the left",
        "image_url": "https://example.com/anchor.jpg",
        "image_mode": "frame",      # one image => first frame
        "aspect_ratio": "9:16",     # vertical, mobile-native
    },
    timeout=600,
)
print(resp.json()["data"][0]["url"])

If you don't already have a public URL for your anchor image, post the bytes to /v1/files and Kunavo hosts the file for you at a permanent public URL:

upload_anchor.py
# If you don't have a public URL, upload bytes; Kunavo hosts the file.
with open("anchor.jpg", "rb") as f:
    up = requests.post(
        "https://api.kunavo.com/v1/files",
        headers={"Authorization": f"Bearer {KEY}"},
        files={"file": f},
    )
image_url = up.json()["url"]   # a permanent public URL

Video models on the same endpoint

The same endpoint shape works for every video model in the catalog — pass the relevant model slug:

  • veo-3 — cinematic, 1080p, supports image-to-video. Live now.
  • seedance-2, seedance-2-5 — ByteDance, very strong on character motion.

Sora (sora-2) is not on this list: OpenAI shut down the Sora API on September 24, 2026, with no one-to-one replacement.

See /models for the live list and the price of each model.

From Node / TypeScript

veo.mjs
// OpenAI's SDK sends videos.create as a multipart form, which /v1/videos
// refuses (it takes JSON), so call it with fetch. A clip takes minutes and
// Node's fetch stops waiting for a response after 300 s: submit a task, then
// poll it.
const API = "https://api.kunavo.com/v1";
const headers = {
  "Content-Type": "application/json",
  Authorization: `Bearer ${process.env.KUNAVO_API_KEY}`,
};

let task = await fetch(`${API}/videos`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    model: "veo-3",
    prompt: "A red origami crane unfolding into a paper plane and flying away through a window",
    resolution: "1080p",
  }),
}).then((r) => r.json());

while (task.status === "queued" || task.status === "in_progress") {
  await new Promise((r) => setTimeout(r, 10_000));
  task = await fetch(`${API}/videos/${task.id}`, { headers }).then((r) => r.json());
}
if (task.status !== "completed") throw new Error(JSON.stringify(task.error ?? task));
console.log(task.output.url);

Pricing model

Video models bill per video or per second of output, not per token: the Veo models per video, with every clip 8 seconds long, and the Seedance models and Wan 2.7 per second. Kunavo publishes each model's rate on /pricing. An 8-second Veo 3 clip at 1080p costs $0.42. Failed generations (4xx / 5xx) are never billed.

Production checklist

  • Set a 10-minute HTTP timeout. The gateway polls upstream up to 540s, returning 504 if the model is still working past that. A retry is a new task, and every task that succeeds is billed. For very long jobs, submit to /v1/videos instead and poll the task it returns: with an Idempotency-Key header, a second submit with the same key returns that task instead of starting another.
  • Node's built-in fetch stops waiting for response headers after 300 seconds, whatever timeout you set: from Node, use the async API, or call fetch from the undici package with the option dispatcher: new Agent({ headersTimeout: 600_000 }).
  • Persist the result URL. Even though files.kunavo.com URLs are permanent, your product should own its own copy in the storage you control.
  • Handle 429s with backoff. Video models are GPU-bound; brief contention is normal. The retry-after header is honored when present.
  • Cache by prompt hash if reasonable. Sending the same prompt twice generates two clips and is billed twice: the gateway does not reuse an earlier result, and it sends the model no seed.

Questions: contact@kunavo.com. The team behind the gateway reads every email and replies within 24 hours.