Skip to content
Dashboard

Flux 3

Flux 3 is Black Forest Labs's first video model, generating clips up to 20 seconds with synchronized native audio from text, images, or reference video, at HD and Full HD.

View API reference
Price
$0.06, Per second
Lowest available configuration
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({
model: 'bfl/flux-3-video',
prompt: 'A serene mountain lake at sunrise.'
});
Read docs

Copy link to headingPlayground

Try out Flux 3 by Black Forest Labs. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

bfl logo
Images(optional)
Add up to 10 images
Videos(optional)
Prompt(optional)

End frame(optional)
Duration8s
5s20s
Aspect ratio
Videos to generate
bfl logo

Your generated video will appear here.

Copy link to headingProviders

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Input
Output
Capabilities
ZDR
No Training
Free Tier
Release Date
$0.06/sec+2 more
08/04/2026

Getting started

Generate videos with Flux 3 using the experimental_generateVideo function from AI SDK 6 or later. AI Gateway handles routing and polls until the video is ready.

Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the video generation quickstart.

index.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bfl/flux-3-video',
prompt: 'A white kitten chases a butterfly across a sunlit garden.',
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Top-level parameters

Load the supported top-level parameters: prompt, duration, aspectRatio, and resolution. The {width}x{height} resolution is mapped onto the hd/fhd tier by its shorter side.

top-level-params.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bfl/flux-3-video',
prompt: 'A white kitten chases a butterfly across a sunlit garden.',
duration: 8,
aspectRatio: '16:9',
resolution: '1920x1080',
poll: {
intervalMs: 2000,
timeoutMs: 600000,
},
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);
ParameterTypeRequiredDescription
promptstringNoText description of the video to generate.
durationnumberNoVideo length in seconds. 5-20 seconds.
aspectRatiostringNoAspect ratio ('21:9', '2:1', '16:9', '4:3', '1:1', '3:4', '9:16').
prompt.imagestringNoURL or base64 image to open the clip with, switching the call to image-to-video. Equivalent to a frameImages entry with frameType: "first_frame".
resolutionstringNoOutput size as {width}x{height}, mapped onto the hd or fhd tier by its shorter side. Set providerOptions.blackForestLabs.resolution to pick the tier directly.
frameImagesArray<{ image: string; frameType: 'first_frame' | 'last_frame' }>NoImages that open and close the clip. A last_frame without a first_frame is dropped with a warning.
inputReferencesArray<{ data: string; mediaType: string }>NoA single MP4 to continue from, as { data, mediaType: "video/mp4" }. FLUX 3 has no reference-image input, so an image here is ignored with a warning.
poll{ intervalMs?: number; timeoutMs?: number }NoPolling for the asynchronous job. Defaults to a 2000 ms interval and a 600000 ms (10 minute) timeout. FLUX 3 has no poll provider options.
generateAudiobooleanNoAudio is generated by default, so this only has to be set to turn it off.

Input limits

InputFormatsSourcesMax countMax sizeLimits
Imageurl, base6410
Videomp4url, base641

Provider options

Pass FLUX 3 options under providerOptions.blackForestLabs. The tier and ratio set here take precedence over their top-level equivalents, and auto is only available on the provider option.

Learn more in the AI SDK Black Forest Labs video docs.

provider-options.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bfl/flux-3-video',
prompt: 'A white kitten chases a butterfly across a sunlit garden.',
duration: 8,
providerOptions: {
blackForestLabs: {
resolution: 'fhd',
aspectRatio: 'auto',
safetyTolerance: 2,
},
},
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Pass FLUX 3 options under providerOptions.blackForestLabs in your generateVideo call. The chef slug is bfl, but the provider reads its options from blackForestLabs.

ParameterTypeRequiredDescription
resolution'hd' | 'fhd'NoOutput resolution tier. Defaults to hd; fhd is finished by the video upsampler. Takes precedence over the top-level resolution.
aspectRatio'21:9' | '2:1' | '16:9' | '4:3' | '1:1' | '3:4' | '9:16' | 'auto'NoAspect ratio of the generated video. Takes precedence over the top-level aspectRatio, and unlike it can be set to auto (the API default), which infers the ratio from the prompt and any conditioning media.
keyframesArray<string | [number, string]>NoOne to ten images pinning the clip, as URLs or base64 strings, or as [seconds, image] pairs in chronological order. One opens the clip, two open and close it, and extras are spaced evenly between; three or more untimed images require an explicit duration. Takes precedence over prompt.image and frameImages.
safetyTolerancenumberNoModeration strictness from 0 (strictest) to 4. Defaults to 2. Sexual content is capped at 3 and hate content at 2 regardless of the request, and any request carrying conditioning media is capped at 2.
draftbooleanNoRender a fast, lower-quality preview instead of the finished video. Defaults to false.
draftCachestringNoEncrypted draft-cache bundle from a prior draft generation, which switches the request to draft-enhance mode. Either the base64-encoded .bin or its download URL while the link is still valid.
version'latest'NoModel version to pin. Only latest is available today.

First and last frame

Open on one image and close on another with frameImages. A first_frame on its own animates a starting image; a last_frame without one is dropped with a warning.

first-last-frame.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bfl/flux-3-video',
prompt: 'The kitten crosses the garden and settles under the bench.',
duration: 8,
frameImages: [
{ image: 'https://example.com/start.jpg', frameType: 'first_frame' },
{ image: 'https://example.com/end.jpg', frameType: 'last_frame' },
],
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Timed keyframes

Pin images to specific seconds with [seconds, image] pairs in chronological order. Untimed images work too — one opens the clip, two open and close it — but three or more untimed keyframes require an explicit duration.

keyframes.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bfl/flux-3-video',
prompt: 'The cat, then the dog, then the owl each take a turn in the room.',
duration: 12,
providerOptions: {
blackForestLabs: {
keyframes: [
[0, 'https://example.com/cat.png'],
[4.5, 'https://example.com/dog.png'],
[9, 'https://example.com/owl.png'],
],
},
},
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Video continuation

Continue from the final frames of an existing MP4 by passing it in inputReferences with an explicit media type. FLUX 3 accepts a single video, and continuation cannot be combined with keyframes.

video-continuation.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bfl/flux-3-video',
prompt: 'The camera keeps pushing forward as the fog lifts.',
duration: 8,
inputReferences: [
{ data: 'https://example.com/clip.mp4', mediaType: 'video/mp4' },
],
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Draft, then enhance

Preview with draft: true, then replay the same generation at full quality by passing the returned bundle back as draftCache. The bundle pins the original mode, prompt, seed, and media, so an enhance call takes an empty prompt and no other options besides safetyTolerance. Both calls are billed.

draft-enhance.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const draft = await generateVideo({
model: 'bfl/flux-3-video',
prompt: 'A white kitten chases a butterfly across a sunlit garden.',
duration: 6,
providerOptions: {
blackForestLabs: { draft: true },
},
});
const draftCacheUrl = (
draft.providerMetadata.blackForestLabs?.videos as
| Array<{ draftCache?: string }>
| undefined
)?.[0]?.draftCache;
// The download URL expires, so send the base64 `.bin` for anything but an
// immediate follow-up.
const response = await fetch(draftCacheUrl!);
const draftCache = Buffer.from(await response.arrayBuffer()).toString('base64');
const result = await generateVideo({
model: 'bfl/flux-3-video',
prompt: '',
providerOptions: {
blackForestLabs: { draftCache },
},
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Copy link to headingMore models by Black Forest Labs

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
Providers
ZDR
No Training
Free Tier
Release Date
$0.014/MP
bfl logo
01/15/2026
$0.015/MP
bfl logo
01/15/2026
$0.06/MP
bfl logo
11/25/2025
512
$0.08/img
bfl logo
05/29/2025
512
$0.04/img
bfl logo
prodia logo
05/29/2025
$0.05/img
bfl logo
10/01/2024

Flux 3 is Black Forest Labs's first public video model, from the team whose earlier work underpins much of open image generation. It generates clips up to 20 seconds with synchronized audio, at HD and Full HD.

The distinguishing property is that one set of weights handles images, video, and audio together rather than stitching separate models into a pipeline. Audio is produced with the picture, so dialogue lands in sync and lip movement matches without a separate dubbing pass. Multilingual dialogue is supported across a broad language set with lip-sync.

Generation modes cover text-to-video, image-to-video from a starting frame or visual reference, video-to-video from a reference clip, generative continuation of existing footage, and keyframe-to-video for controlled transitions between defined points. Clips can be chained agentically into longer multi-shot sequences, which is how you get past the 20 second ceiling.

Generate video with generateVideo from the AI SDK.

Copy link to headingWhat To Consider When Choosing a Provider

  • Configuration: Preference results published at launch are company-run. Black Forest Labs reports Flux 3 winning most head-to-head comparisons against other video models, but the margins narrow considerably against the strongest of them, and sample sizes, rater counts, and methodology were not published. Generate your own comparisons before committing a production pipeline.
  • Configuration: Output tops out at Full HD. If your pipeline needs 4K natively, this is not the model for it.
  • Configuration: Video generation is slower and costlier per output than image generation, and iterating on a 20 second clip compounds both. Prototype at shorter durations and lower resolution, then generate the final at full length. See the pricing panel on this page for current rates.
  • Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

Copy link to headingWhen to Use Flux 3

Best for

  • Dialogue-Driven Clips: Audio generated with the picture, lip-sync intact
  • Multi-Shot Sequences: Agentic chaining past the single-clip ceiling
  • Keyframe Transitions: Controlled movement between defined points
  • Reference-Guided Video: Continuation from a frame or a reference clip
  • Multilingual Output: Lip-sync across a broad language set

Consider alternatives when

  • Native 4K Output: Resolution tops out at Full HD
  • Single Clips Past 20 Seconds: Longer runs require agentic chaining
  • Independently Verified Quality: Launch comparisons are company-run
  • Still Image Generation: The FLUX image models are the right family

Flux 3 is Black Forest Labs's first video model, generating up to 20 seconds with audio produced alongside the picture rather than added later. Call bfl/flux-3-video through generateVideo in the AI SDK, and chain clips agentically when you need a sequence longer than a single generation.

Copy link to headingFrequently Asked Questions

  • How long can a Flux 3 clip be?

    Up to 20 seconds in a single generation, at HD or Full HD. Longer sequences come from chaining clips agentically into multi-shot runs.

  • Does Flux 3 generate audio?

    Yes, synchronized with the picture rather than dubbed afterwards. Multilingual dialogue is supported with lip-sync across a broad language set.

  • How do I call Flux 3 on AI Gateway?

    Use generateVideo from the AI SDK with bfl/flux-3-video. The Chat Completions, Responses, and Messages APIs do not serve video generation.

  • What generation modes does Flux 3 support?

    Text-to-video, image-to-video from a starting frame or visual reference, video-to-video from a reference clip, generative continuation, and keyframe-to-video for controlled transitions.

  • Does Flux 3 output 4K?

    No. Output is released at HD and Full HD. Choose a different model if your pipeline requires native 4K.

  • How reliable are the quality comparisons for Flux 3?

    They are company-run preference tests. Black Forest Labs reports winning most head-to-head comparisons, with narrower margins against the strongest competitors, but sample sizes and methodology were not published. Generate your own comparisons before committing.

  • Does Flux 3 support Zero Data Retention?

    Zero Data Retention is not currently available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

Your use is subject to Black Forest Labs's Terms & Privacy Policies.