Opennan

Video generation API

Live

Every major video model behind one endpoint. Switch models with one field.

From $0.0078/s at 480p across 17 modelsCheapestWan 2.2 Fast
from $0.0078/s · 48% below official

Input

79 / 4,000
Quality
Duration
Aspect ratio

-48% vs official

Output

Example
Example outputMade with this prompt

Compare Video generation API models

Every model behind this endpoint, with live prices. Try one in the playground or open its page.

  • Wan 2.2 FastAlibaba$0.0078/s at 480p
    $0.015/s-48%Cheapest480p · 720p
    Page
  • Hailuo 02MiniMax$0.013/s at 480p
    $0.01667/s-22%480p · 720p · 1080p
    Page
  • Grok Imagine VideoxAI$0.0156/s at 480p
    $0.05/s-68%Best value480p · 720p
    Page
  • Seedance 2.0 MiniByteDance$0.0247/s at 480p
    $0.0352/s-29%480p · 720p
    Page
  • Kling 2.1Kling$0.0325/s at 720p
    720p · 1080p
    Page
  • Hailuo 2.3MiniMax$0.03792/s at 720p
    $0.04667/s-18%720p · 1080p
    Page
  • Wan 2.5Alibaba$0.039/s at 480p
    $0.05/s-22%480p · 720p · 1080p
    Page
  • Kling 2.5 Turbo ProKling$0.0546/s at 1080p
    $0.07/s-22%1080p
    Page
  • Kling O3Kling$0.065/s at 720p
    $0.084/s-22%720p · 1080p
    Page
  • Seedance 1.5 ProByteDance$0.065/s at 1080p
    $0.116/s-43%1080p
    Page
  • Veo 3.1 FastGoogle$0.065/s at 720p
    $0.08/s-18%720p · 1080p · 4K
    Page
  • Wan 2.6Alibaba$0.091/s at 720p
    Below the maker's price720p · 1080p
    Page
  • Wan 3.0Alibaba$0.0975/s at 720p
    Below the maker's price720p
    Page
  • HappyHorse 1.0Alibaba$0.104/s at 720p
    $0.14/s-25%Best720p · 1080p
    Page
  • Kling 3.0 TurboKling$0.1105/s at 720p
    Below the maker's price720p
    Page
  • Veo 3.1Google$0.156/s at 720p
    $0.20/s-22%720p · 1080p · 4K
    Page
  • Seedance 2.5ByteDance$0.2867/s at 480p
    Below the maker's price480p · 720p · 1080p
    Page

Call Video generation API from your code

One endpoint for every model above. Change the model field to switch.

POSThttps://api.opennan.com/v1/videos/generations
  • GET/v1/models?category=videoEvery model of this endpoint, with prices
  1. Get an API key

    Create a key in the console. It uses the same balance as the playground.

    Create a key
  2. Send your first request

    The same request the playground sends. Set OPENNAN_KEY to your key.

    curl https://api.opennan.com/v1/videos/generations \
      -H "Authorization: Bearer $OPENNAN_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model":"wan-2-2-fast","prompt":"Rain on a neon street at night, slow push-in","duration":5,"quality":"480p","aspect_ratio":"16:9"}'
    
    # Then poll until "status" is "succeeded" or "failed":
    curl https://api.opennan.com/v1/tasks/<task id> -H "Authorization: Bearer $OPENNAN_KEY"
  3. Poll the task

    The call answers right away with a task id. Ask for the task until it finishes:

    GEThttps://api.opennan.com/v1/tasks/{id}
    queued
    Waiting for a worker
    running
    Being made
    succeeded
    Done: outputs[].url holds the files
    failed
    Failed: you are not charged

Parameters

Built from the live catalog: every value listed here is one the API accepts.

Parameters
NameTypeAllowed valuesDefaultEffect on price
modelrequiredWhich model runs the call.string———
promptoptionalWhat happens in the video. Required unless you send a start image.string———
imageoptionalStart image (https link). The video begins on it.URL———
end_imageoptionalEnd image (https link). The video ends on it.URL———
reference_imagesoptionalImages of people or things to keep in the video (https links).list———
durationoptionalLength of the video in seconds.integer4 · 5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13 · 14 · 15 · 16 · 17 · 18 · 19 · 20 · 21 · 22 · 23 · 24 · 25 · 26 · 27 · 28 · 29 · 30—Longer costs more
qualityoptionalOutput resolution.string480p · 720p · 1080p · 4K—Higher costs more
aspect_ratiooptionalFrame shape, for example 16:9 or 9:16.string16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 21:9 · 9:21——
generate_audiooptionalAdd sound made for the video.boolean——Sound costs more
callback_urloptionalWe send the finished task to this URL.URL———

Errors and how to fix them

  • 401Missing or wrong key

    Send the header Authorization: Bearer with a key from the console.

  • 402Balance too low

    Add credit in Billing, then send the same call again.

  • 400A value is not accepted

    Read error.message: it names the field. Use a value from the parameter table.

  • 429Too many requests

    Wait a few seconds and try again, waiting longer after each 429.

Add Opennan to your AI app

One install gives your AI every Opennan tool: video, images, chat, voice, music, sound effects, 3D, captions and dubbing. Pick your app and follow the steps.

MCP serverhttps://api.opennan.com/v1/mcp

Works in the Codex CLI, the Codex app and the Codex IDE extension: they share ~/.codex/config.toml. If the app or IDE does not see OPENNAN_KEY, use the config.toml option with your key in it. Codex asks before each tool call: approve it to go on.

  1. Get an API key

    Create a key in the console. It starts with sk- and uses the same balance as the website.

    Create a key
  2. Save your key as OPENNAN_KEY

    # macOS / Linux (zsh shown; bash: ~/.bashrc)
    echo 'export OPENNAN_KEY="sk-..."' >> ~/.zshrc
    source ~/.zshrc
    
    # Windows (PowerShell), then open a new terminal
    setx OPENNAN_KEY "sk-..."
  3. Install the Opennan plugin: the server plus a skill that teaches your AI to pick models, confirm prices and wait for results

    codex plugin marketplace add Opennan/opennan-ai-plugin
    codex plugin add opennan@opennan
  4. Or add only the server

    codex mcp add opennan --url https://api.opennan.com/v1/mcp --bearer-token-env-var OPENNAN_KEY
  5. Or add this to ~/.codex/config.toml

    [mcp_servers.opennan]
    url = "https://api.opennan.com/v1/mcp"
    http_headers = { Authorization = "Bearer sk-..." }
  6. Check that opennan is listed

    codex mcp list
  7. Restart Codex, then ask for anything

    “Make a 5 second video of rain on a neon street, a song to go with it and a poster image.”

Replace sk-... with your own key and keep it private: anyone who has it can spend your balance. Your app can list the tools before you add a key; making anything needs one.

This tool from your AI

Once Opennan is added, your AI calls this tool with arguments like these.

Tool
generate_video
Example arguments
{
  "model": "wan-2-2-fast",
  "prompt": "Rain on a neon street at night, slow push-in",
  "duration": 5
}

Video generation API: questions

Every model and price
How much does Video generation API cost?

From $0.0078/s at 480p with Wan 2.2 Fast, the cheapest of 17 models here. You see the price before you run.

How do I call it from my code?

Send POST https://api.opennan.com/v1/videos/generations with your API key. It answers with a task id: ask https://api.opennan.com/v1/tasks/{id} until the task succeeds or fails.

Can I switch models without changing my code?

Yes. Change the model field and keep the rest of the request, the same key and the same balance.

Can my AI agent use it?

Yes. Add the MCP server https://api.opennan.com/v1/mcp and call the generate_video tool, or point your agent at https://api.opennan.com/llms.txt.

What happens if a run fails?

A failed run is not charged. You pay only for results.

We only use the cookies the site needs, such as your language and a referral code. No ads. We count page visits with cookie-free analytics. See our Cookie Policy for details.