Skip to content
Guides

Text to Video API: From Prompt to Clip by Code

Use a text to video API to turn a prompt into a clip: the models to call, lengths, resolutions and sound, code in curl, Python and Node, and the cost.

Updated 6 min read

A text to video API turns a written prompt into a video clip: you send the prompt with a length, a resolution and a shape, then fetch the MP4 when it is ready. On Frameport, all 13 video models take a prompt alone, on one API key and one request shape, from $0.02 per second, and a clip that fails costs nothing.

This guide lists those models side by side, sends a first request in curl, Python and Node, explains the length, resolution and shape rules, and shows how to price a clip before you send it.

The text to video models on one key

Every model below makes a clip from a prompt alone. They differ on how long a clip can be, how sharp, whether it has sound, and what a second costs:

ModelLengthsResolutionsSoundFrom
Frameport Motion 15 to 15 seconds480p, 768p, 1080p and 2KOn or off, same price$0.02 / s
Seedance 2.54 to 30 seconds480p and 720pOn or off, same price$0.12 / s
Seedance 2.04 to 15 seconds480p, 720p, 1080p and 4KOn or off, same price$0.08 / s
Seedance 2.0 Fast4 to 15 seconds480p and 720pOn or off, same price$0.063 / s
Seedance 2.0 Mini4 to 15 seconds480p and 720pOn or off, same price$0.041 / s
Veo 3.14, 6 or 8 seconds720p, 1080p and 4KOn or off, priced apart$0.235 / s
Veo 3.1 Fast4, 6 or 8 seconds720p, 1080p and 4KOn or off, priced apart$0.093 / s
Veo 3.1 Lite4, 6 or 8 seconds720p and 1080pOn or off, priced apart$0.036 / s
Hailuo 35 to 15 seconds2KOn or off, same price$0.15 / s
Hailuo 3 Max5 to 15 seconds480p and 768pNo soundtrack$0.06 / s
Wan 3.02 to 30 seconds480p, 720p and 1080pOn or off, same price$0.06 / s
Grok Imagine1 to 15 seconds480p, 720p and 1080pNot listed$0.093 / s
Runway Gen-4.52 to 10 seconds720pNo soundtrack$0.14 / s

A few ways to narrow it down:

  • Lowest price per second: Frameport Motion 1, our own video model, from $0.02 per second at 480p.
  • Long takes: Seedance 2.5 and Wan 3.0 make a single clip of up to 30 seconds (Seedance 2.5, Wan 3.0).
  • Sharpest frames: Veo 3.1 and Seedance 2.0 go up to 4K, and Hailuo 3 renders at 2K (Veo 3.1, Seedance 2.0, Hailuo).
  • Silent clips for less: where the Sound column says "priced apart", a clip with "audio": false bills the silent rate.

Which model wins at which job is weighed in the best AI video generation APIs of 2026.

Your first text to video API request

A clip takes longer than one HTTP request can wait, so the API works in two steps: POST /v1/videos/generations answers 202 at once with an id and the amount held, then GET on that id tells you when the file is ready. This request asks Frameport Motion 1 for 5 seconds at 768p:

# 1. Submit
curl https://frameport.ai/v1/videos/generations \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fp-motion-1",
    "prompt": "A lighthouse keeper climbs a spiral staircase with a lantern as a storm hits the windows, handheld camera following from behind, thunder and rain",
    "duration": 5,
    "resolution": "768p",
    "aspect_ratio": "16:9"
  }'

# 2. Poll with the id it returned until "status" is "succeeded"
curl https://frameport.ai/v1/videos/generations/$GENERATION_ID \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY"

When it is done, the same generation reads like this:

200 OK, succeeded
{
  "id": "gen_9sLq2VbX7mN4kR1tYc8WpE",
  "object": "generation",
  "type": "video",
  "model": "fp-motion-1",
  "status": "succeeded",
  "input": {
    "prompt": "A lighthouse keeper climbs a spiral staircase with a lantern as a storm hits the windows, handheld camera following from behind, thunder and rain",
    "duration": 5,
    "resolution": "768p",
    "aspect_ratio": "16:9",
    "audio": true,
    "reference_images": 0,
    "end_image": false
  },
  "reserved_usd": 0.3,
  "cost_usd": 0.3,
  "outputs": [
    {
      "id": "file_2Tn7XcQ9vLm4Ra8Ws1KbZd",
      "status": "succeeded",
      "url": "https://frameport.ai/v1/files/file_2Tn7XcQ9vLm4Ra8Ws1KbZd?expires=1795779600&signature=Qm9yZW1fZXhhbXBsZV9zaWduYXR1cmU",
      "url_expires_at": "2026-11-28T11:10:00.000Z",
      "cost_usd": 0.3,
      "content_type": "video/mp4"
    }
  ],
  "error": null,
  "created_at": "2026-11-28T10:00:00.000Z",
  "completed_at": "2026-11-28T10:01:30.000Z"
}

The url opens without a key for about an hour, so you can hand it to a browser or a download tool. To be told when a clip is done instead of polling, add a webhook. The Python guide adds quotes, retries and error handling around the same calls.

Lengths, resolutions and aspect ratios

Every model has its own grid of values, listed in its options by GET /v1/models and on its model page. A value off the grid is refused with 400 invalid_request before anything is held, and the message lists what the model takes.

FieldWhen you leave it outNotes
duration5 seconds, or the nearest length the model allowsWhole seconds on the model's grid: 4, 6 or 8 seconds on Veo 3.1, 2 to 30 seconds on Wan 3.0
resolutionThe model's default resolution1080p on Veo 3.1, 768p on Frameport Motion 1
aspect_ratio16:9, wherever the model offers it16:9, 4:3, 1:1, 3:4, 9:16 and 21:9 on Seedance 2.5; 16:9 and 9:16 on Veo 3.1
audiotrueHonoured where the model lets you switch sound off
seedNot sentOn models whose options list seed: the same seed and request give a similar take again
negative_promptNoneOn models whose options list it: what to keep out of the clip

Two price details sit in these fields. On Seedance 2.0 and its Fast and Mini tiers, a 21:9 clip costs more per second than the other shapes. On the Veo models, sound is priced apart, so "audio": false is cheaper. The quote and the model page show both.

Writing prompts video models follow

A prompt is up to 2,400 characters, but a clip holds less story than that suggests. What works across models:

  • One subject, one action. "A lighthouse keeper climbs a spiral staircase" gives a model one thing to get right. Three actions in 5 seconds tend to come out rushed or half done.
  • Subject, action, place, camera, light, sound, roughly in that order. "A cyclist rides through a night market, tracking shot from the side, neon signs and steam, crowd chatter and bicycle bell" leaves little to guess.
  • One named camera move: a static wide shot, a slow push-in, a handheld follow, an orbit, a crane up.
  • Concrete detail over adjectives. "Rain streaks the window, the lantern swings" shows more than "a dramatic, cinematic storm".
  • Sound in words, on models that render it: the ambience, the effects, a line of dialogue in quotes.
  • Length to match the story. A 5-second clip holds one beat; a long take on Seedance 2.5 or Wan 3.0 can hold a short sequence.

When a clip should start from a picture you already have, a product shot or a character, send it as a frame instead of describing it: the image to video API guide covers frames and reference pictures.

More on writing prompts that hold: the AI video prompt guide.

What text to video costs, and how to check

A clip costs its seconds times the model's rate at the resolution you ask for. A 6-second clip and a minute of footage, sound on:

ModelResolutionPer second6 s clipA minute
Frameport Motion 1480p$0.02$0.12$1.20
Seedance 2.0 Mini480p$0.041$0.246$2.46
Veo 3.1 Lite720p$0.06$0.36$3.60
Wan 3.0720p$0.12$0.72$7.20
Runway Gen-4.5720p$0.14$0.84$8.40
Seedance 2.5720p$0.27$1.62$16.20
Hailuo 32K$0.15$0.90$9.00
Veo 3.11080p$0.465$2.79$27.90

A minute of footage is several clips cut together, each billed at the same rate per second. When you submit, the price is held from your balance; it is charged only when the clip succeeds, and a failed clip gives the hold back with cost_usd: 0. To see the price of an exact body first, send it to POST /v1/generations/quote: nothing is held or started.

Quote · 200 OK
{
  "object": "quote",
  "model": "fp-motion-1",
  "type": "video",
  "mode": "generate",
  "price_usd": 0.3,
  "reserved_usd": 0.3,
  "breakdown": "5 s at 768p × $0.06/s",
  "available_usd": 42.5,
  "enough_balance": true
}

For code that builds requests from user input, add max_cost_usd to the body: a request that would cost more is refused before anything is held. Every model's full price table is on Pricing.

FAQ

Which text to video API is the cheapest?

On Frameport, Frameport Motion 1 starts at $0.02 per second at 480p, so a 5-second clip costs $0.10. You pay per second of video, with no subscription and nothing for a clip that fails.

Is there a free text to video API?

The account, the API key and quotes are free. Clips are paid from a prepaid balance, topped up from $10, and a failed clip costs nothing. You can write a prompt by hand in the Studio before you script it.

How do I get a text to video API key?

Create an account, add funds under Billing, then create a key under API keys. It starts with fp_live_ and is shown once: keep it in the FRAMEPORT_API_KEY environment variable, as the examples do, and out of client-side code.

How long can a generated clip be?

Up to 30 seconds in one take on Seedance 2.5 and Wan 3.0. Other models stop sooner: 4, 6 or 8 seconds on Veo 3.1, 2 to 10 seconds on Runway Gen-4.5. For longer videos, make several clips and cut them together.

Do the clips come with sound?

On most models, yes: audio is true unless you send false. Runway Gen-4.5 and Hailuo 3 Max make clips without a soundtrack, and on the Veo models a silent clip costs less.

Start building.

Your API key is free. Top up from $10 when you are ready.