Text-to-video API

Text-to-video API: describe a scene, get an MP4 back

Write what should happen on screen and what it should sound like. One POST from your server returns an id at once, and the finished clip arrives a few minutes later with sound, ready to publish.

Prices in EURFree test keyWebhooks included
Sample videos · choose a format
Sample16:9 · 720p · sound0:10

Samples, shown as examples of each format.

Try the API

Build a request, see what comes back

Pick a format, a length and sound. The request is exactly what your server sends, and the answer is what it gets back.

Preview, nothing is sent
Format
Length
Sound

This video costs €1.00: reserved while it is made, charged only if it succeeds.

Steps
  1. Queued: waiting for a free slot
  2. Making: the video is being made
  3. Ready: the file link works for 30 days
RequestPOST /v1/videos/generations
{
  "model": "VIDEO_MODEL_ID",
  "prompt": "Summer sale: beach towels and sunglasses on bright sand, space for text at the top, upbeat track",
  "duration": 10,
  "aspect_ratio": "16:9",
  "resolution": "1080p",
  "audio": true,
  "idempotency_key": "demo-16x9-10s"
}
Response
// Run the preview to see the steps and the answer.
Use cases

What teams write prompts for

9:16 · Sneaker drop

Product explainers

A 10-second clip that shows what a product does, generated from the copy you already keep in your catalog.

    16:9 · Summer sale

    Social posts at volume

    One template prompt with fields for product, season and tone, filled in by your code for each post.

      1:1 · Coffee shop

      Mood and b-roll shots

      Short establishing shots for intros, transitions or backgrounds, without a shoot or a long search through stock libraries.

        16:9 · Summer sale

        Storyboards before a shoot

        Turn a script line into a moving draft, so the team agrees on the scene before anyone books a studio.

          Code

          Prompt to clip in two requests

          The create call checks the request and reserves the cost. The GET returns progress and, when ready, the file link. A webhook can replace the polling.

          What happens after the call
          queuedrunningsucceeded

          Each video moves from queued to running to succeeded, usually in 2 to 4 minutes for 10 seconds. Poll the id or get a signed webhook.

          # 1. Create: returns at once with an id
          curl https://withconflux.com/api/v1/videos/generations \
            -H "Authorization: Bearer $CONFLUX_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{
              "model": "VIDEO_MODEL_ID",
              "prompt": "Morning light over a quiet harbour, slow push-in on a fishing boat, gulls and soft waves",
              "duration": 10,
              "aspect_ratio": "16:9",
              "audio": true
            }'
          
          # 2. Poll until status is succeeded, failed or refused
          curl https://withconflux.com/api/v1/videos/generations/vgen_7Rt4Kd9Wq2 \
            -H "Authorization: Bearer $CONFLUX_API_KEY"
          Good to know

          Writing prompts that work

          Name the subject first, then the setting, the camera move and the sound. Two or three sentences are enough: longer prompts do not make better clips.

          Every request is checked against the content rules before any cost. A refused prompt comes back with a plain reason you can act on.

          How it works

          Prompt in. Video out.

          Two calls, or one call and a webhook. Your server stays in charge.

          1
          POST /v1/videos/generations "prompt": "Sneaker drop at night" "aspect_ratio": "9:16"

          Send a prompt

          Text, plus up to three reference images if you want to start from a product photo.

          2
          queuedrunningsucceeded

          We make it

          Your request waits for a free slot, then the video is made. Usually 2 to 4 minutes for 10 seconds.

          3
          webhook
          Sample1:1 · 720p · sound0:10

          Get the video

          Poll for the status or get a signed webhook. Download the MP4 from our link within 30 days.

          Pricing

          Pay per second. Only for videos that are ready.

          Video generation
          €0.10 per second, 1080p

          About €1.00 for a 10-second scene. €0.06 per second at 720p.

          • Reserved while your video is made, charged only if it succeeds
          • Failed or refused videos cost nothing
          • No monthly fee. Prepaid credits in EUR
          • Test keys: free sample clips
          720p€0.60per 10-second scene
          1080p€1.00per 10-second scene
          Scene720p1080p
          5 seconds€0.30€0.50
          10 seconds€0.60€1.00
          20 ads of 10 seconds€12.00€20.00
          Your campaign

          Work out a budget before you write a line of code.

          Length
          Resolution
          Total€20.00

          Reserved while each video is made, charged only for videos that are ready.

          Real people need consent

          Reference images of real people need consent confirmed in the request.

          Clear content rules

          A refused prompt comes back with a plain reason, and is free.

          Your files for 30 days

          Download the MP4 or copy it to your storage any time in that window.

          FAQ

          Questions

          What is a text-to-video API?

          An API that turns a written description into a short video. Your code sends the prompt and options such as length, aspect ratio and sound, then picks up the finished file.

          How long are the clips?

          Each video model lists the durations it accepts, for example 5 or 10 seconds. Longer pieces are made by joining several scenes in your own editor or pipeline.

          Can I choose the format?

          Yes. Pick 9:16, 4:5, 1:1 or 16:9 per request. Sound is on by default and can be turned off with one flag.

          Which model should I use?

          Call GET /v1/models?type=video to list the video models your key can use, with the price per second of each. Send its id in the model field.

          Looking to check if a video is AI-made? That is AI detection, a separate product. AI detection

          Make your first video today.

          Free test key. Same key works for text and video.

          We use a single analytics cookie to understand traffic to this site. Nothing loads until you choose. See our Privacy Policy.