NewMiniMax H3 Lite is live: our cheapest video model, at a launch price until Dec 31. Try it free

OG filename: text-to-video-api-cover-v3.png
All guides
How-to

Text to Video API: How to Generate Videos in 2026

Turn a text prompt into a video with sound from your own code. One AiWings API key covers MiniMax H3 and Seedance, billed per second. Step by step, in cURL, JavaScript and Python.

·5 min read·

Text to Video API: How to Generate Videos in 2026

Need to generate videos from text in your own app, script or automation? This guide shows how to do it with the AiWings API, step by step. One key gives you five video models from two families, MiniMax H3 and Seedance, all with sound and billed per second, and every finished video comes back as a permanent MP4 link.

What you need

  • An AiWings account. Sign in with Google; new accounts get 10 free credits, enough for a 5-second MiniMax H3 Lite video at 480p.
  • An AiWings API key, which you create in the next step.
  • Somewhere to run code on a server: a script, a backend route, a serverless function or an automation tool that can send HTTP requests. Keys don’t work from browser or mobile app code, where anyone could read them.

Step 1: Create an API key

  1. 1Sign in to AiWings and open the API page in your dashboard.
  2. 2Click Create key, give it a name (for example “my-app production”) and, if you like, a monthly credit limit.
  3. 3Copy the key. It starts with aiw_live_ and is shown only once.
  4. 4Save it as an environment variable on the machine or service that will call the API.
export AIWINGS_API_KEY="aiw_live_your_key_here"

The API uses the same credits as AiWings in ChatGPT, Claude and the dashboard, so there’s no separate plan to buy. Every request sends the key in the Authorization header as a Bearer token.

Create an API key

Step 2: Choose a video model

Every model here turns a text prompt into a video with sound. Pick one with the model field; they’re billed per second:

Modelmodel valueResolutionsLength5 seconds fromBest for
Seedance 2.0seedance-2.0480p, 720p, 1080p, 4K4–15 seconds50 credits ($0.50) at 480pShort clips up to 4K, reference videos
Seedance 2.5seedance-2.5480p, 720p4–30 seconds65 credits ($0.65) at 480pClips up to 30 seconds, big reference sets
MiniMax H3minimax-h3768p, 2K4–15 seconds50 credits ($0.50) at 768pPolished clips, up to 2K
MiniMax H3 Highspeedminimax-h3-highspeed768p4–15 seconds20 credits ($0.20) at 768pFast drafts and everyday clips
MiniMax H3 Liteminimax-h3-lite480p, 768p4–15 seconds10 credits ($0.10) at 480pThe lowest price, for testing and volume

Prices are at the top-up rate of $0.01 per credit, and plans include more credits per dollar. Each finished job reports exactly what it cost in its credits field, and GET /v1/models lists every price.

Step 3: Make your first video

Send a POST request to /v1/videos with a prompt and a model. This one makes a 5-second vertical clip with MiniMax H3 Lite at 480p, the lowest-cost option, for 10 credits ($0.10):

1# 1. Start the job
2curl https://aiwings.io/api/v1/videos \
3 -H "Authorization: Bearer $AIWINGS_API_KEY" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "prompt": "A paper boat sails down a rainy street at night, streetlights reflecting in the puddles, with the sound of rain and distant traffic",
7 "model": "minimax-h3-lite",
8 "resolution": "480p",
9 "duration": 5,
10 "aspect_ratio": "9:16"
11 }'
12
13# 2. Check it until status is "succeeded" (or "failed")
14curl "https://aiwings.io/api/v1/videos/VIDEO_ID?wait=30" \
15 -H "Authorization: Bearer $AIWINGS_API_KEY"
POST /v1/videosShell

Creating a video returns right away with an id and status "processing". Videos usually take one to a few minutes, so you check back with GET /v1/videos/{id}. Adding ?wait=30 holds each check open for up to 30 seconds and returns the moment the video is ready, so the loop above makes only a handful of requests.

When status is "succeeded", output.url is a permanent link to the MP4. If a video fails, status is "failed", error.message says why, and the credits are refunded automatically. Every video you make through the API also shows up in your AiWings library.

Step 4: Write a prompt that works

Video models follow a prompt best when it reads like a short shot description. Cover these, in this order:

  • The subject and what it does: “a paper boat sails down a flooded street”.
  • The camera: slow push-in, handheld, top-down orbit, a fixed wide shot.
  • The look and light: night, neon reflections, soft morning light, film grain.
  • The sound: rain, footsteps, a quiet café. Every model here adds audio, so say what you want to hear.
  • For longer clips, the beats with timestamps: 0–3s, 3–6s and so on.
Slow push-in on a paper boat sailing down a flooded street at night. Neon signs reflect in the water. 0-3s: the boat drifts past a lamppost. 3-5s: it tips over a small wave. Sound of heavy rain and distant thunder.

Step 5: Set the length, shape and sound

duration, aspect_ratio and audio control the rest. Seedance 2.5 goes up to 30 seconds, so it suits longer clips. Here is a 10-second vertical clip with the sound switched off, for 130 credits ($1.30):

1# 1. Start the job
2curl https://aiwings.io/api/v1/videos \
3 -H "Authorization: Bearer $AIWINGS_API_KEY" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "prompt": "A time-lapse of clouds rolling over a mountain lake from sunrise to midday, the light warming across the water",
7 "model": "seedance-2.5",
8 "resolution": "480p",
9 "duration": 10,
10 "aspect_ratio": "9:16",
11 "audio": false
12 }'
13
14# 2. Check it until status is "succeeded" (or "failed")
15curl "https://aiwings.io/api/v1/videos/VIDEO_ID?wait=30" \
16 -H "Authorization: Bearer $AIWINGS_API_KEY"
POST /v1/videosShell

Seedance can turn the sound off with "audio": false. MiniMax always adds sound, so mute it in your player if you don’t need it.

See what these models make

Real, unedited 15-second videos made with MiniMax H3 at 768p, each from a single text prompt. The videos have sound; it is muted here.

A crayon sprout grows on a palm and turns into a caterpillar, a goldfish and a field of flowersMiniMax H3 · 768p · 15s
A raindrop on a bus window becomes a frog, then a balloon, and the city outside turns into line artMiniMax H3 · 768p · 15s

More models with the same key

Your key isn’t limited to one model. The same key, balance and request format cover every video and image model on AiWings. To switch, change the model field: video models go to POST /v1/videos and image models to POST /v1/images.

Modelmodel valueEndpointFrom
Seedance 2.0seedance-2.0/v1/videos50 credits ($0.50) for 5 seconds at 480p
Seedance 2.5seedance-2.5/v1/videos65 credits ($0.65) for 5 seconds at 480p
MiniMax H3minimax-h3/v1/videos50 credits ($0.50) for 5 seconds at 768p
MiniMax H3 Highspeedminimax-h3-highspeed/v1/videos20 credits ($0.20) for 5 seconds at 768p
MiniMax H3 Liteminimax-h3-lite/v1/videos10 credits ($0.10) for 5 seconds at 480p
GPT Image 2.6 Flaregpt-image-2.6-flare/v1/images7 credits ($0.07) per image
GPT Image 2.6 Sunburstgpt-image-2.6-sunburst/v1/images7 credits ($0.07) per image
GPT Image 2.5 Flaregpt-image-2.5-flare/v1/images2 credits ($0.02) per image
GPT Image 2.5 Sunburstgpt-image-2.5-sunburst/v1/images2 credits ($0.02) per image
GPT Image 2gpt-image-2/v1/images2 credits ($0.02) per image
GPT Image 1.5gpt-image-1.5/v1/images2 credits ($0.02) per image
Nano Banananano-banana/v1/images5 credits ($0.05) per image
Nano Banana 2nano-banana-2/v1/images8 credits ($0.08) per image
Nano Banana Pronano-banana-pro/v1/images19 credits ($0.19) per image
Seedream 5 Liteseedream-5-lite/v1/images5 credits ($0.05) per image
Grok Imaginegrok-imagine/v1/images3 credits ($0.03) per image
Flux Fastflux-fast/v1/images1 credit ($0.01) per image

GET /v1/models returns the same list with every price, size and option, so your code can check what’s available instead of hard-coding it.

See every model with samples

Things to know

  • Test new prompts with MiniMax H3 Lite at 480p, then send the winner to a higher-quality model or resolution. Only the model and resolution fields change.
  • Lengths: 4–15 seconds on MiniMax and Seedance 2.0, up to 30 on Seedance 2.5.
  • Shapes: 16:9 for the web, 9:16 for Reels, TikTok and Shorts, 1:1 for feeds.
  • Send an Idempotency-Key header with each new job (the JavaScript and Python examples do). If a request times out and you retry with the same key, you get the same job back instead of paying twice.
  • Each key has its own rate limit, and you can give each key a monthly credit cap so a bug in one app can’t spend your whole balance.
  • Output URLs are public but unguessable, like a share link. Download the file to your own storage if you need to control who can see it.

If something goes wrong

  • 401 authentication_failed: the key is missing, mistyped or revoked. Check the Authorization header reads Bearer followed by your key.
  • 400 invalid_request: a field isn’t allowed for that model, for example a resolution or length it doesn’t support. The error’s param names the field to fix.
  • 402 insufficient_credits: your balance can’t cover the video. Top up in the dashboard and send the request again.
  • 403 spend_limit_reached: this key hit its monthly credit limit. Raise or remove the limit on the API page.
  • 429 rate_limited or too_many_jobs: you’re sending too fast or have too many jobs rendering at once. Wait for the Retry-After time, or for a video to finish.
  • The video failed with a content error: the prompt or image was blocked by the model’s safety filter. Reword it; the credits were already refunded.

Bottom line

One AiWings key gives your code five text-to-video models with sound, from the lowest-cost MiniMax H3 Lite to 4K Seedance, billed per second from one balance, with permanent links and automatic refunds on failures. The same key also makes images.

Read the full API reference

FAQ

What’s the cheapest text-to-video API option here?

MiniMax H3 Lite at 480p: a 5-second clip is 10 credits ($0.10).

Which model makes the longest videos?

Seedance 2.5, up to 30 seconds in one clip. The others go up to 15 seconds.

Do the videos have sound?

Yes, every model adds sound. Seedance can turn it off with "audio": false; MiniMax always includes it.

How long does a video take?

Usually one to a few minutes. Your code starts the job and checks back with ?wait=30, which returns as soon as the video is ready.

Can I use it from n8n, Make or Zapier?

Yes, any tool that can send an HTTP request works. Send the POST request, then check the video with a GET request until its status is succeeded.