Video ads API

Video ads API for every placement, made from your backend

Generate the vertical, feed and wide cuts of an ad from one brief, test variants side by side and get a signed webhook when each one is ready. Your ad stack stays in your code.

Prices in EURFree test keyWebhooks included
Sample videos · choose a format
Sample9:16 · 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": "Sneaker drop: white high-tops on a wet city street at night, neon reflections, slow orbit, bass hit on the reveal",
  "duration": 10,
  "aspect_ratio": "9:16",
  "resolution": "1080p",
  "audio": true,
  "idempotency_key": "demo-9x16-10s"
}
Response
// Run the preview to see the steps and the answer.
Use cases

Formats per placement

9:16 · Sneaker drop

9:16 for Stories and Reels

Full-screen vertical for Stories, Reels, Shorts and TikTok placements. Keep the top third clear for your headline.

    1:1 · Coffee shop

    4:5 and 1:1 for feeds

    4:5 fills more of the screen in Instagram and Facebook feeds; 1:1 suits carousel cards and older placements.

      16:9 · Summer sale

      16:9 for video sites

      Wide clips for YouTube pre-roll, landing page heroes and display networks that accept video.

        4:5 · Talk-to-camera ad

        Variants for testing

        Change one line of the prompt (setting, colour, music) and make five versions. Run them all and keep the winner.

          Code

          One brief, one call per format

          Send the same prompt with a different aspect_ratio for each placement. An idempotency_key per ad and format makes retries safe: a repeat never makes a second video.

          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.

          const BASE = "https://withconflux.com/api/v1";
          const formats = ["9:16", "4:5", "1:1", "16:9"];
          
          for (const aspect_ratio of formats) {
            await fetch(`${BASE}/videos/generations`, {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.CONFLUX_API_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                model: process.env.CONFLUX_VIDEO_MODEL, // VIDEO_MODEL_ID
                prompt: "Running shoes splash through a puddle at dusk, slow motion, punchy beat",
                duration: 10,
                aspect_ratio,
                // one key per ad and format: a retry never makes a second video
                idempotency_key: `ad-7731-${aspect_ratio.replace(":", "x")}`,
              }),
            });
          }
          // Each video sends its own signed webhook when it is ready.
          Good to know

          Webhooks instead of waiting

          Add one HTTPS endpoint and we send video.succeeded, video.failed or video.refused, signed with your secret. Failed deliveries are retried with backoff.

          Your account makes several videos at once. Extra requests wait in line and start on their own, so a campaign of 50 cuts needs no queue of your own.

          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 video ads API?

          An API that produces ad videos from a brief, so your platform can create creatives for many products or clients without manual editing.

          Which aspect ratio goes with which placement?

          9:16 for Stories, Reels and Shorts, 4:5 or 1:1 for feeds, 16:9 for YouTube and display. You choose it per request.

          Can I add my own text and logo?

          The video comes back without text from us. Add headlines, prices and logos in your own editor or template so they stay sharp and on brand.

          How do I know when a batch is done?

          Each video triggers its own webhook. Count the events per campaign on your side, or poll the ids you created.

          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.