FLUX 2 flash is a fast, production-grade AI text-to-image generator from Black Forest Labs, optimized for realistic renders and crisp, typo-free text. It supports prompt-faithful styles and native editing—image-to-image, inpainting/outpainting, background replacement, and quick variants—for posters, logos, product shots, and social ads. Ready-to-use REST API with low latency, no cold starts, and affordable pricing.
Idle

$0.008per run·~125 / $1

Luxury product photograph of a gold mechanical wristwatch floating above black water surface, perfect reflection beneath, dramatic rim lighting highlighting brushed metal details, water droplets suspended in air, ultra sharp focus on dial complications, premium advertising campaign quality, 8K photorealistic

Cinematic portrait of a 25-year-old woman with auburn hair in soft waves, sitting by a rain-streaked window in a dimly lit café, wearing an oversized cream knit sweater, holding a steaming cup of coffee, warm tungsten lighting from vintage Edison bulbs above, shallow depth of field, Kodak Portra 800 film aesthetic, melancholic mood

Photorealistic science fiction scene of an astronaut in white spacesuit standing in a field of glowing bioluminescent flowers on an alien planet, two moons visible in the purple twilight sky, helmet visor reflecting the ethereal landscape, cinematic lighting, Ridley Scott film aesthetic, IMAX quality

Extreme macro photograph of a honeybee collecting pollen from a lavender flower, individual pollen grains visible on fuzzy legs, translucent wings with visible veins, shallow depth of field isolating subject, soft purple bokeh background, morning dew droplets on petals, scientific precision with artistic beauty

Cozy Scandinavian living room interior at golden hour, soft sunlight streaming through sheer linen curtains, plush cream sofa with textured throw blankets, fiddle leaf fig plant in corner, warm wood floors, steaming cup of tea on coffee table, hygge atmosphere, interior design magazine quality, natural and inviting
FLUX.2 Flash Text-to-Image is a fast, production-focused image generation model designed for high-volume, low-latency workflows. It turns a single text prompt into a ready-to-use image, making it a strong default for rapid iteration, batch pipelines, and “generate lots of options quickly” use cases.
This wrapper is text-to-image (text in, image out). If you need prompt-based edits to existing images (image-to-image, inpainting/outpainting, background replacement, etc.), use the related FLUX.2 Flash Edit model instead.
size or explicit width/height for banners, posters, square assets, and more.seed for controlled exploration and reruns.enable_sync_mode) and base64 responses (enable_base64_output) for easier server-side integration.prompt: (required) The text instruction that describes what you want to generate.size: A shorthand output size string (commonly formatted like WIDTH*HEIGHT).seed: Randomness control for reproducibility (-1 for a new random result each run).enable_sync_mode: If true, wait for generation/upload and return the result directly (API only).enable_base64_output: If true, return base64 output instead of a URL (API only).Write your prompt like you’re briefing a photographer or designer:
Start with the subject + setting, then add style, camera/lighting, and details that matter (materials, mood, composition).
For marketing/product visuals, include: background type, surface/reflection, lighting direction, and “clean” constraints (e.g., “no extra objects, no watermark”).
For on-image text, keep it short and explicit:
Put the exact text in quotes.
Specify placement and typography cues (e.g., “centered headline, bold sans-serif, high contrast”).
If you get typos, simplify the layout and reduce the amount of text.
size
Use when you want a quick preset-like size string. Across WaveSpeedAI FLUX endpoints, this is commonly written as WIDTH*HEIGHT (for example, 1024*1024). If you set width and height, keep them consistent with size to avoid ambiguity.
width / height
Use when you need exact dimensions (e.g., wide banners vs. tall posters).
seed
Use -1 for a fresh random result each run.
Use a fixed integer (e.g., 12345) to reproduce a composition or generate controlled variations while you iterate on the prompt.
enable_sync_mode (API only)
Set to true when you want the call to wait and return the generated result in the same response (useful for simple backends and demos).
enable_base64_output (API only)
Set to true when you want the output encoded as base64 instead of a hosted URL (useful for storage, pipelines, or environments that can’t fetch URLs).
After you finish configuring the parameters, click Run, preview the result, and iterate if needed.
$0.008 per run
size (or width/height) and a fixed seed consistent while you tune the prompt—this makes changes easier to compare.Grab a WaveSpeedAI API key, then call POST https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-2-flash/text-to-image with your input as JSON. The endpoint returns a prediction id. Start polling the result endpoint around every 2 seconds, increase the interval for long-running tasks, and stop on any terminal status. On completed, read output values from data.outputs. Examples for Flux 2 Flash Text To Image below.
set -euo pipefail
: "${WAVESPEED_API_KEY:?Set WAVESPEED_API_KEY}"
REQUEST_BODY=$(cat <<'JSON'
{
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1024*1024",
"seed": -1
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-2-flash/text-to-image" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $WAVESPEED_API_KEY" \
-d "$REQUEST_BODY")
TASK=$(printf '%s' "$SUBMIT_RESPONSE" | jq 'if has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "$TASK" | jq -r '.id')
if [ -z "$PREDICTION_ID" ] || [ "$PREDICTION_ID" = "null" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL=$(printf '%s' "$TASK" | jq -r '.urls.get // empty')
if [ -z "$RESULT_URL" ]; then
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/$PREDICTION_ID/result"
fi
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body "$RESULT_URL" \
-H "Authorization: Bearer $WAVESPEED_API_KEY")
RESULT=$(printf '%s' "$RESPONSE" | jq 'if has("data") then .data else . end')
STATUS=$(printf '%s' "$RESULT" | jq -r '.status')
case "$STATUS" in
completed) printf '%s\n' "$RESULT" | jq '.outputs'; break ;;
failed|cancelled|timeout) printf '%s\n' "$RESULT" | jq . >&2; exit 1 ;;
created|processing) sleep 2 ;;
*) printf 'Unexpected status: %s
' "$STATUS" >&2; exit 1 ;;
esac
doneconst submitUrl = "https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-2-flash/text-to-image";
const apiKey = process.env.WAVESPEED_API_KEY;
if (!apiKey) throw new Error('Set WAVESPEED_API_KEY');
async function requestJson(url, options = {}) {
const response = await fetch(url, options);
if (!response.ok) throw new Error(await response.text());
return response.json();
}
// 1. Submit the prediction.
const body = await requestJson(submitUrl, {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1024*1024",
"seed": -1
}),
});
const task = body.data ?? body;
if (!task.id) throw new Error("Submission response did not contain a prediction id");
const resultUrl = task.urls?.get ||
`https://api.wavespeed.ai/api/v3/predictions/${task.id}/result`;
// 2. Poll until the prediction finishes.
while (true) {
const resultBody = await requestJson(resultUrl, {
headers: { "Authorization": `Bearer ${apiKey}` },
});
const result = resultBody.data ?? resultBody;
if (result.status === "completed") {
console.log(result.outputs);
break;
}
if (["failed", "cancelled", "timeout"].includes(result.status)) throw new Error(JSON.stringify(result));
if (!["created", "processing"].includes(result.status)) throw new Error("Unexpected status: " + result.status);
await new Promise(resolve => setTimeout(resolve, 2000));
}import json
import os
import time
from urllib.request import Request, urlopen
api_key = os.environ["WAVESPEED_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
payload = {
"prompt": "A cinematic shot of a city at sunset, soft golden light",
"size": "1024*1024",
"seed": -1
}
def request_json(url, data=None):
request = Request(url, data=data, headers=headers, method="POST" if data else "GET")
with urlopen(request) as response:
return json.load(response)
# 1. Submit the prediction.
body = request_json("https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-2-flash/text-to-image", json.dumps(payload).encode())
task = body.get("data", body)
if not task.get("id"):
raise RuntimeError("Submission response did not contain a prediction id")
result_url = task.get("urls", {}).get("get") or f"https://api.wavespeed.ai/api/v3/predictions/{task['id']}/result"
# 2. Poll until the prediction finishes.
while True:
result_body = request_json(result_url)
result = result_body.get("data", result_body)
status = result.get("status")
if status == "completed":
print(result.get("outputs", []))
break
if status in {"failed", "cancelled", "timeout"}:
raise RuntimeError(result)
if status not in {"created", "processing"}:
raise RuntimeError(f"Unexpected status: {status}")
time.sleep(2)Flux 2 Flash Text To Image is a WaveSpeedAI model for image generation, exposed as a REST API on WaveSpeedAI. FLUX 2 flash is a fast, production-grade AI text-to-image generator from Black Forest Labs, optimized for realistic renders and crisp, typo-free text. It supports prompt-faithful styles and native editing—image-to-image, inpainting/outpainting, background replacement, and quick variants—for posters, logos, product shots, and social ads. Ready-to-use REST API with low latency, no cold starts, and affordable pricing. You can call it programmatically or try it from the playground above.
POST your input parameters to the model's REST endpoint (shown in the API tab of this playground) with your WaveSpeedAI API key in the Authorization header. Submission returns a prediction ID. Poll the result endpoint starting around every 2 seconds, increase the interval for long-running tasks, and stop on any terminal status. The playground generates production-oriented Python, JavaScript, and cURL examples with timeouts, transient-error handling, and safe GET retries. Full request/response shape is documented at https://wavespeed.ai/docs/docs-api/wavespeed-ai/flux-2-flash-text-to-image.
Flux 2 Flash Text To Image starts at $0.008 per run. That figure is the base price — the final charge scales with the parameters you set in the form (output size, length, count, references, or whatever knobs this model exposes), so a higher-quality or larger output costs more than a minimal one. The exact cost for your current input is shown live next to the Generate button before you submit, and the actual per-call charge is recorded on the prediction afterwards.
Key inputs: `prompt`, `size`, `seed`, `enable_base64_output`, `enable_sync_mode`. The full JSON schema (types, defaults, allowed values) is rendered above the Generate button and mirrored in the API reference at https://wavespeed.ai/docs/docs-api/wavespeed-ai/flux-2-flash-text-to-image.
Median end-to-end generation time on WaveSpeedAI is around 5 seconds per request, based on recent successful runs. Queue time varies with global demand; live status is visible in the prediction record.
Commercial usage rights depend on the model's license, set by its provider (WaveSpeedAI). The license summary appears on the model card above; see WaveSpeedAI's Terms of Service for platform-level conditions.