
FLUX 3 Image is available through Vercel AI Gateway for text generation of images and reference-based editing. A useful first integration should answer three questions: does the correct model return an image, does an edit preserve the details the brief requires, and what does an accepted asset cost after retries?
Vercel's official availability note supplies the model identifier, SDK requirement and reference-image workflow. The examples below follow that contract; this guide does not claim to have generated test images with FLUX 3.
The gateway model identifier is bfl/flux-3-image. Vercel specifies AI SDK 7 or later for the illustrated generateImage path and an AI_GATEWAY_API_KEY environment variable. The gateway route does not require a separate Black Forest Labs account for the documented use.
Check the SDK version in the application where the example will run. An older project can expose a function with a similar name without supporting the new model's contract. Test in a small isolated project before upgrading an established application.
The announcement describes up to ten reference images and five resolution tiers ranging from 768 × 768 to 4K, with multiple aspect ratios. Those capabilities do not mean every existing image client forwards the same fields.
| Integration item | Reviewed value | First check |
|---|---|---|
| Gateway model | bfl/flux-3-image | Exact identifier in the request |
| SDK path | AI SDK 7 or later | Installed package version |
| Credential | AI_GATEWAY_API_KEY | Authorized account and usable balance |
| Reference limit | Up to ten images | Input count and relevance |
| Resolution option | Provider-specific setting | Request and returned dimensions |
Use the account intended for the project and keep the key in its environment configuration. A successful image response establishes that route's access, not the reliability of a complete editing application.
Begin with a simple subject, explicit aspect ratio and the documented 1K resolution option. This example uses an original prompt while preserving Vercel's API shape:
import { generateImage } from 'ai';
const { image } = await generateImage({
model: 'bfl/flux-3-image',
prompt: 'A green ceramic teapot on a pale stone table, soft daylight, plain background.',
aspectRatio: '1:1',
providerOptions: {
blackForestLabs: { resolution: '1k' },
},
});
console.log('Returned image bytes:', image.uint8Array.length);
The byte count is a basic response check. Save the returned asset using the SDK's actual media type, along with the prompt, model and request configuration. Do not infer the dimensions or file format solely from a filename you chose.
Inspect the image itself. Confirm the requested subject, framing and major visual properties before proceeding to an editing test. If the result is incomplete, record whether the failure is a request error or a creative mismatch; those require different fixes.
Vercel also provides an image-generation guide. Use the current guide when integrating error handling and storage rather than treating a minimal code sample as an entire production workflow.
The documented edit path passes image bytes through prompt.images and supplies an instruction in prompt.text. Continuing from the generated image above:
const { image: editedImage } = await generateImage({
model: 'bfl/flux-3-image',
prompt: {
text: 'Change the teapot to matte navy blue. Keep its shape, camera position and background.',
images: [image.uint8Array],
},
aspectRatio: '1:1',
providerOptions: {
blackForestLabs: { resolution: '1k' },
},
});
console.log('Edited image bytes:', editedImage.uint8Array.length);
An editing brief should identify both the desired change and the details that must remain. “Make it better” leaves the model to decide what matters. A bounded change, such as material color with fixed geometry, gives the reviewer a concrete acceptance rule.
When combining several references, assign each a purpose. One can define the subject, another the background and another the composition. Conflicting references can make the output harder to judge, even when the request remains below the ten-image limit.
Do not use more images simply because the API allows them. Start with the smallest useful set, then add a reference only when it resolves a missing requirement. Check that the images are yours to use or otherwise authorized for the intended workflow.
Use the final display task to decide the output settings. A small product card, a wide article hero and a detailed presentation image need different framing and dimensions. Start at a moderate tier to settle the composition before requesting a larger version.
Keep the aspect ratio stable during the first edit comparison. Changing it alongside subject color or composition makes it harder to determine why the result changed. Once the edit behaves acceptably, evaluate the aspect ratio needed by the destination.
Inspect small details at the final size. Text, product geometry and repeated objects can look plausible in a thumbnail but fail on closer viewing. A larger canvas is not proof that those details are accurate.
For a comparison with Chinese image models, our image-model alternatives guide provides a broader selection context. Keep the same brief and acceptance criteria when comparing a gateway model with another provider's image route.
Use the gateway's current rate and actual usage record for the selected model and resolution. This article does not assign an unverified per-image price from another FLUX generation or another provider. Similar product names can have different billing rules.
Record all attempts for one brief, including edits and failed creative results. Divide the total generation spend by the number of assets accepted for that purpose. That gives a more useful operating measure than the price of the strongest single output you selected.
Also measure review time and downstream corrections. An inexpensive image that requires repeated manual repair may be a poor choice for a workflow with strict product fidelity. A more costly route can be useful if it produces an acceptable asset with less rework; the pilot has to establish that trade-off.
Keep a ledger containing request settings, source references, returned asset, acceptance decision and charged usage. That record makes it possible to compare resolution tiers or reference strategies without relying on memory of a particularly good sample.
FLUX 3 Image through Vercel offers a documented gateway route for generation and reference editing. Verify the SDK and model ID, establish a simple baseline and write bounded edit instructions. Choose resolution after the composition works, then evaluate cost across all attempts needed for an accepted asset.
Vercel's availability note says the documented gateway route uses one gateway key without a separate Black Forest Labs account.
No. Select inputs and resolution for the actual brief. More references or pixels do not establish a more accurate result.
Check the current rate for the exact route and resolution. Use its actual usage record rather than substituting a similarly named model's price.