Black Forest Labs
FLUX 3.1
flux-3.1/fast/text-to-image
Black Forest Labs' FLUX 3.1 image models, available in Quality and Fast tiers, with separate pipelines for text-to-image and editing. Supports 1K, 2K, and native 4K, and editing accepts up to 10 reference images.
Try flux-3.1/fast/text-to-image
Input
Showcases
View all showcasesOutput
Pricing
flux-3.1/fast/text-to-image per image
| Specifications | Unit Price |
|---|---|
| 1K | |
| 2K | |
| 4K | |
Overview
This is a fast text-to-image model that directly outputs static images from textual descriptions. It suits creators, designers, and developers who need to quickly explore visual directions, for early-stage work such as cover drafts, storyboard mood, and direction comparisons. It offers three output resolutions—1k, 2k, and 4k, with 1k as the default—and each request uses one of 18 aspect ratios. Output format can be JPEG or PNG, with JPEG as the default, and prompt auto-expansion can optionally be enabled to help turn a short description into a more complete scene description. Prompts are limited to 4,000 characters.
Key Features
- Quickly turn text into comparable images—Repeatedly generate images from the same description, making it easy to rapidly explore composition directions early in a project and then select the ones worth refining further.
- Three resolution tiers from preview to final output—Choose 1k, 2k, or 4k, defaulting to 1k. Confirm the composition at the lower tier first, then switch to a higher tier for publishing or print needs.
- Choose from wide to portrait aspect ratios—A range of aspect ratios from 21:9 to 9:16 lets you pick directly for covers, landscape banners, or vertical content, reducing later cropping.
- Prompt expansion fills in details—When enable_prompt_expansion is enabled, the model expands a short description into a more complete scene description, useful when inspiration is just starting.
Capabilities
- Text-to-image and composition exploration: Enter a scene description to generate a static image. Describe the subject, scene, style, and composition as clearly as possible to produce drafts with a clear direction that can be compared side by side for later selection.
- Resolution tier selection: resolution can be 1k, 2k, or 4k, defaulting to 1k, with one tier selected per request. Confirm the composition at 1k first, then switch to 2k or 4k and regenerate as needed for the final output.
- Aspect ratio selection: aspect_ratio offers landscape, square, portrait, and other ratios, defaulting to auto. Choose a ratio for the publishing destination so the image matches the final layout from the start.
- Format and prompt expansion: output_format can be JPEG or PNG, defaulting to JPEG; enabling enable_prompt_expansion automatically expands the prompt. After generation, check whether the expansion has drifted from the original intent.
Use Cases
- Content teams generate cover drafts first—Content creators use short descriptions with a 16:9 ratio and 1k resolution to batch-generate images, quickly compare which composition works better as an article header or video cover, then pick one and upscale it for output.
- Lay out mood references during storyboarding—In film or animation pre-production, use the same scene description with different aspect ratios to generate multiple mood images, helping directors and art teams confirm lighting, color tone, and spatial feel without getting stuck in details too early.
- Compare multiple design directions—Designers change only one variable at a time, such as only the style word or only the ratio, generate a set of images, and view them side by side to judge which visual direction is worth pursuing further.
- Quickly draft marketing assets—Marketers generate campaign key visual drafts in a vertical 9:16 or square 1:1 social format, output JPEG for internal review, and then switch to a higher resolution once the direction is chosen.
Limitations and Selection Advice
This item outputs only static images and does not generate video or audio. Reference image input is currently not available, so images cannot be uploaded as a generation starting point or style reference. Prompts are limited to 4,000 characters, so descriptions must be trimmed beyond that. Resolution and aspect ratio each take one value per request, and multiple specifications cannot be output at once. The content moderation tolerance is adjustable from 0 to 6, with higher values being more permissive, but the practically usable range is still subject to platform moderation policies.
What's new
View changelog →- New model New model release: flux-3.1/text-to-image
Frequently asked questions
View all FAQs →-
Can Quality text-to-image directly take a reference image and edit it?
No. This route only accepts text descriptions and does not accept any image input; to edit an image based on a reference image, use Quality Edit or Fast Edit instead, which require 1–10 HTTPS images. If you only have text-based creation needs, just use this route directly; aspect ratio, resolution, and output format are all set separately in the request.
-
How can I write Quality text-to-image prompts for more stable results?
Write in the order of "subject — action and scene — composition and viewpoint — lighting and atmosphere — style and image quality," covering these five categories of elements in a single paragraph; this is more reliable than piling up keywords. The prompt limit is 4000 characters, but you don't need to fill it up; put the elements you want to lock in first and secondary modifiers later, so it's easier for you to delete, edit, and pinpoint problems.
-
How many reference images can a single Quality edit take?
You can provide anywhere from 1 to 10, and they must all be HTTPS URLs. When using multiple images, clearly state in the edit instruction what role each image plays, for example which one is the main image and which one provides material or color reference; otherwise the model can only guess. The instruction is likewise subject to the 4000-character limit.
-
How do I configure Quality editing to output a large 4K image?
Just set resolution to 4k; the available values are 1k, 2k, and 4k, with 1k as the default. Specify the aspect ratio with aspect_ratio; auto lets the model decide on its own. For the output format, choose between jpeg and png with output_format; the default is jpeg. If you want lossless detail preservation, choose png.
Create a generation task
https://api.hiapi.sh/v1/tasks Headers
AuthorizationstringRequiredAccount API key. Required on every request. Example: Bearer YOUR_HIAPI_API_KEY. Get your API key
Content-TypestringOptionalThe request body is always parsed as JSON; when sent, only application/json (optionally with charset) is accepted — any other value returns 415. Example: application/json.
Idempotency-KeystringOptionalIdempotency key, up to 255 bytes. Retries with the same key from the same account create the task only once; replays return the original taskId.
On network timeouts or client retries, the same key creates the task only once — no double charges (scope: the API key's account). Use a business-unique identifier as the key (e.g. "order-42"); replays return the original taskId, and keys expire 24 hours after the first request. See the Unified Async API overview for the full scenario matrix.
Body
modelstringRequiredCurrent fixed value: flux-3.1/fast/text-to-image
routestringOptionalCurrent fixed value: default
inputobjectRequired
Business parameters for flux-3.1/fast/text-to-image and route default — see the parameter table below.
promptstringRequiredminLength 1maxLength 4000Text describing the scene, used to tell the model what content to generate.
resolutionstringOptionalDefault: "1k"Output resolution tier, default 1k.
1k2k4kaspect_ratiostringOptionalDefault: "auto"Aspect ratio, default auto.
auto21:92:116:93:27:54:35:4Show all (6)Show less
1:14:53:42:39:219:16output_formatstringOptionalDefault: "jpeg"Output image format, default jpeg.
jpegpngsafety_toleranceintegerOptionalDefault: 2min 0max 6Content moderation tolerance, an integer; the larger the value, the looser the moderation, default 2.
enable_prompt_expansionbooleanOptionalDefault: falseWhether to automatically expand the prompt, a boolean value, default false.
callbackobjectOptional
Terminal-state notification config. When omitted, no callback is delivered — poll the task yourself. See the callback note below.
Provide callback.url when creating a task and HiAPI POSTs to your service once the task reaches a terminal state — no polling needed. The callback payload mirrors the task detail structure; signature verification, delivery retries and idempotency are documented on the Unified Async API overview page.
urlstringRequiredRequired when callback is present. A POST is sent to this URL once the task reaches a terminal state; must be a valid http(s) URL.
whenstringOptionalDefault: "final"Only final is supported today — notified on both success and fail.
finalstoragestringOptionalDefault: "temp"Artifact storage tier: temp (default, retained about 7 days) or persistent (long-term, billed by size). Insufficient balance or exceeding the storage cap silently downgrades to temp; the effective tier is shown in the task detail response.
temppersistentRequest examples
# Submit an async task; returns a taskId immediately (no waiting for generation)
curl -X POST "https://api.hiapi.sh/v1/tasks" \
-H "Authorization: Bearer $HIAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-3.1/fast/text-to-image",
"input": {
"prompt": "…",
"resolution": "1k",
"aspect_ratio": "auto",
"output_format": "jpeg",
"safety_tolerance": 2,
"enable_prompt_expansion": false
}
}' const res = await fetch("https://api.hiapi.sh/v1/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HIAPI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "flux-3.1/fast/text-to-image",
input: {
"prompt": "…",
"resolution": "1k",
"aspect_ratio": "auto",
"output_format": "jpeg",
"safety_tolerance": 2,
"enable_prompt_expansion": false
}
}),
});
const task = await res.json();
// { code: 200, message: "success", data: { taskId } } import os, requests
res = requests.post(
"https://api.hiapi.sh/v1/tasks",
headers={"Authorization": f"Bearer {os.environ['HIAPI_API_KEY']}"},
json={
"model": "flux-3.1/fast/text-to-image",
"input": {
"prompt": "…",
"resolution": "1k",
"aspect_ratio": "auto",
"output_format": "jpeg",
"safety_tolerance": 2,
"enable_prompt_expansion": False
}
},
)
print(res.json()) # { code, message, data: { taskId } } 200 OK
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR"
}
} 400 Bad Request
{
"code": 400,
"message": "invalid request",
"data": null,
"error_code": "INVALID_REQUEST"
} Get task detail
https://api.hiapi.sh/v1/tasks/:id Response fields
taskIdstringRequiredTask ID, always prefixed with tk-hiapi-.
modelstringRequiredResolved full model name. Tasks submitted with the route parameter return base@route (e.g. gpt-image-2/text-to-image@ext); otherwise identical to the name passed at creation.
routestringOptionalPresent only when the task was submitted with an explicit route parameter; echoes the submitted value.
statusstringRequiredTask status.
queued Queued, not started yet.
handling Being processed.
archiving Processing finished, artifacts being prepared.
success Terminal: completed, artifacts available (output returned).
fail Terminal: failed (error returned).
After submission, check status: success and fail are terminal, everything else is non-terminal. Poll every 1–3 seconds until terminal. On success, download artifacts from output[].url and transfer them before expireAt; pass storage: "persistent" at creation time when long-term retention is needed.
creatednumberRequiredTask creation time (Unix seconds).
completednumberRequiredUnix seconds when the task reached a terminal state; fixed to 0 while not terminal.
outputarrayOptional
Present only when status == success. Artifact list — always an array; a single task may return multiple types at once (e.g. video + first_frame).
Array [ object ]
Array items
urlstringRequiredArtifact URL, directly downloadable.
typestringRequiredCurrent possible values: video, image, audio, first_frame, last_frame, thumbnail; more may be added later.
expireAtnumberRequiredUnix seconds until which the artifact remains accessible; download or transfer before it expires.
errorobjectOptional
Present only when status == fail.
codestringRequiredBusiness error code.
messagestringRequiredError description.
Response examples
Success
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR",
"model": "happyhorse-1-0",
"status": "success",
"created": 1777282033,
"completed": 1777282099,
"output": [
{
"url": "https://cdn.hiapi.ai/tasks/.../video.mp4",
"type": "video",
"expireAt": 1777886899
}
]
}
} Processing (non-terminal)
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "archiving",
"created": 1777282033,
"completed": 0
}
} Failed
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "fail",
"created": 1777282033,
"completed": 1777282099,
"error": {
"code": "TASK_FAILED",
"message": "task failed"
}
}
} Articles
View all articles →-
Guide
flux-3.1/fast/text-to-image Getting Started Guide: Capability Boundaries, Billing, and Calling Practices
A hands-on route for developers to quickly integrate a text-to-image model, from capability boundaries to cost estimation
-
Comparison
flux-3.1/fast/text-to-image vs. comparable models: a developer's guide to model selection and migration
-
Tutorial
FLUX 3.1 Fast Poster Creative Comparison: Round-by-Round Practice with Text-to-Image and Image-Based Editing
-
Comparison
How to Choose Among the Four FLUX 3.1 Routes: A Decision Guide for Text-to-Image and Edit Routes
Choose Quality/Fast and text-to-image/edit based on asset type and resolution tier
-
Guide
FLUX 3.1 Cover Generation in Practice: Defining Whitespace, Light Direction, and Aspect Ratio with a Single Prompt
Composition checks and 1K price comparison for the Quality and Fast text-to-image lines
-
Tutorial
flux-3.1/fast/text-to-image in practice: 5 high-value application scenarios and key implementation points
From e-commerce assets to content production pipelines: model selection and integration approaches for image generation models in real business
Related Models
View all models →Same Type
-
Seedream 5.0 ByteDance $0.025 /image -
Recraft Creative Upscale Recraft $0.357 /image -
Imagen 4 Google $0.030 /image -
FLUX 1.1 Pro Black Forest Labs $0.050 /image -
Recraft V4.1 Recraft $0.010 /image -
BRIA Product Shot Bria $0.058 /image -
FLUX.1 Fill Pro Black Forest Labs $0.071 /image -
FLUX.1 Schnell Black Forest Labs $0.005 /image -
Recraft Crisp Upscale Recraft $0.004 /image -
BRIA Eraser Bria $0.058 /image -
Grok Imagine Image 2.0 xAI $0.052 /image -
FIBO 2.0 Bria $0.057 /image
Same Provider
-
FLUX.2 Black Forest Labs $0.035 /image -
FLUX.2 Klein 9B Black Forest Labs $0.0086 /image -
FLUX 3 Image Klein Black Forest Labs $0.0092 /image -
FLUX 3 Max Black Forest Labs $0.243 /second -
FLUX 1.1 Pro Black Forest Labs $0.050 /image -
FLUX 3 Video Black Forest Labs $0.090 /second -
FLUX.1 Fill Pro Black Forest Labs $0.071 /image -
FLUX.1 Kontext Max Black Forest Labs $0.071 /image -
FLUX.1 Schnell Black Forest Labs $0.005 /image -
FLUX.2 Klein 4B Black Forest Labs $0.0004 /image -
FLUX 3 Image Black Forest Labs $0.041 /image


