bfl/flux-2/dev
Flux 2 Dev by BFL - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runbfl/flux-2/devInput Schema
6 parameters · 1 required · 5 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | The prompt to generate an image from. |
seed | integer | Optional | The seed to use for the generation. If not provided, a random seed will be used. |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 · Default: "16:9" 21:916:93:24:35:41:14:53:42:39:16 |
output_format | string | Optional | The format of the generated image. · Options: jpeg, png · Default: "png" jpegpng |
guidance_scale | number | Optional | Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. · Min: 0 · Max: 20 · Default: 2.5 |
num_inference_steps | integer | Optional | The number of inference steps to perform. · Min: 4 · Max: 50 · Default: 28 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "bfl/flux-2/dev",
"prompt": "Dutch angle close-up of a survivor in post-apocalyptic setting, dust-covered face, dramatic harsh sunlight creating deep shadows, happy expression, desaturated dystopian color palette, gritty realism",
"aspect_ratio": "16:9",
"output_format": "png",
"guidance_scale": 2.5,
"num_inference_steps": 28
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
FLUX.2 [dev]
FLUX.2 [dev] is a 32-billion-parameter rectified-flow transformer for image generation from text instructions. The model is positioned for maximum-quality FLUX.2 work when latency is not the primary constraint, making this endpoint a strong choice for deliberate concept development and detailed final-image exploration.
Its official model card describes leading open text-to-image performance and an ability to follow instructions that can also drive image generation, editing, and combination across the underlying model. This route focuses that visual intelligence on text-to-image output and returns one generated image asynchronously.
Highlights
- High-end text-to-image generation. FLUX.2 [dev] is identified as the maximum-quality option in the FLUX.2 family when generation quality matters more than latency.
- Detailed instruction interpretation. Translate a layered written brief into an image while retaining subject, environment, composition, lighting, material, and stylistic direction.
- Character, object, and style understanding. The underlying model is trained to represent these visual identities without task-specific fine-tuning, strengthening descriptive prompts that depend on a coherent design language.
- Prompt-upsampling gains. FLUX.2 [dev] benefits significantly from expanded prompts, so a concise idea can be developed into a richer production brief before generation.
Pricing
| Unit | Base price |
|---|---|
| Per request | $0.0012 |
When to Use
| Use case | Why this model fits |
|---|---|
| High-detail concept art | Prioritize the development model's maximum-quality positioning over low-latency output. |
| Layered cinematic scenes | Express subject, action, setting, camera, lighting, and texture in one descriptive brief. |
| Character and object design | Build a coherent visual identity from detailed appearance, material, and style language. |
| Prompt-expansion workflows | Turn a short concept into richer production prose before sending the final request. |
| Controlled visual comparisons | Hold the seed stable while comparing meaningful prompt revisions. |
Prompt Guide
Use descriptive prose rather than a keyword pile. Establish the main subject and framing first, then add action, environment, lighting, lens or perspective, palette, materials, and fine surface detail. If expanding a short idea, remove contradictions and repeated adjectives before generation.
{
"prompt": "Dutch-angle close-up of a cheerful survivor in a post-apocalyptic market, dust on the face, layered weathered fabrics, harsh late-afternoon sunlight and deep shadows, desaturated earth palette, tactile material detail, cinematic gritty realism",
"guidance_scale": 2.5,
"num_inference_steps": 28,
"aspect_ratio": "16:9",
"output_format": "png",
"seed": 41827
}
Technical Specs
| Property | Details |
|---|---|
| Model ID | bfl/flux-2/dev |
| Required input | prompt |
| Optional inputs | guidance_scale, num_inference_steps, aspect_ratio, output_format, seed |
| Guidance scale | 0–20; default 2.5 |
| Inference steps | 4–50; default 28 |
| Aspect ratios | 21:9, 16:9 (default), 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 |
| Output formats | png (default) or jpeg |
| Output | Downloadable image URL with optional content type |
| Execution | Asynchronous |
| License | FLUX.2-dev Non-Commercial License |
Related Models
bfl/flux-2/dev/edit— use FLUX.2 [dev] for image editing.bfl/flux-2/kontext/dev— use the Kontext development route for context-aware edits.bfl/flux-1.1/pro— compare with a production-oriented FLUX generation model.

