FLUX 3 Image 現已於 AI Gateway 上架
FLUX 3 Image now available on AI Gateway
FLUX 3 Image 已可透過 Vercel AI Gateway 進行影像生成與編輯,無需 Black Forest Labs 帳號。
- 模型來源:Black Forest Labs 的 FLUX 3 Image。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
FLUX 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.