
FLUX 3 Image now available on AI Gateway
Quick Answer
FLUX 3 Image from Black Forest Labs is now accessible via AI Gateway, allowing users to generate and edit images with a single API key.
Quick Take
It supports up to ten reference images and five resolution tiers, including 4K, with various aspect ratios.
Key Points
- Generate images from text or edit existing images using FLUX 3 Image.
- Supports up to ten reference images for editing and composition changes.
- Offers five resolution tiers, ranging from 768 × 768 to 4K.
- Use AI SDK 7 or later with model ID 'bfl/flux-3-image'.
- Edit images by passing them in the prompt with specific instructions.
📖 Reader Mode
~2 min readFLUX 3 Image from Black Forest Labs is now available on AI Gateway. Generate images from text or edit existing images using the same model, with one API key and no Black Forest Labs account required.
FLUX 3 Image supports up to ten reference images for editing, combining subjects, or changing the composition. It supports five resolution tiers from 768 × 768 to 4K, with square, portrait, and landscape aspect ratios.
Set AI_GATEWAY_API_KEY, then use bfl/flux-3-image as the model ID in AI SDK 7 or later. To generate an image, call generateImage with a text prompt:
import { generateImage } from 'ai';
const { image } = await generateImage({
model: 'bfl/flux-3-image',
prompt: 'A blue ceramic vase with wildflowers on a sunlit wooden table.',
aspectRatio: '1:1',
providerOptions: {
blackForestLabs: { resolution: '1k' },
},
});
Generate a square, 1K-resolution image with FLUX 3 Image and the AI SDK.
To edit an image, pass it in prompt.images with an instruction. This example edits the image generated above:
const { image: editedImage } = await generateImage({
model: 'bfl/flux-3-image',
prompt: {
text: 'Change the vase to terracotta and keep the flowers and setting.',
images: [image.uint8Array],
},
aspectRatio: '1:1',
providerOptions: {
blackForestLabs: { resolution: '1k' },
},
});
Edit the generated image while preserving the flowers and setting.
You can also use FLUX 3 Image from the terminal using the same AI Gateway API key and model ID with AI CLI.
Try FLUX 3 Image in the model playground, or see the image generation guide.
— Originally published at vercel.com
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Vercel AI
See more →
The Agent Stack
The Agent Stack by Vercel AI provides essential building blocks for creating production-grade agents, enabling seamless integration across multiple AI models and secure operations. It features components like AI Gateway for model routing, Workflow SDK for durable execution, and Vercel Connect for scoped access, streamlining agent development and deployment across various platforms.

