Image GenerationFlux
Flux 1.1 Pro
Fast, high-quality image generation using FLUX1.1 [pro] by Black Forest Labs.
POST /v2/images/generate — model: "flux-1.1-pro"
Fast, high-quality image generation with excellent prompt adherence. FLUX1.1 [pro] generates images 6x faster than its predecessor while improving quality and diversity.
See Image Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Description |
|---|---|---|
fluxParams.aspect_ratio | string | Aspect ratio in "W:H" format (e.g. "16:9", "1:1") |
fluxParams.output_format | string | Output format: "jpg", "png", or "webp" |
fluxParams.output_quality | integer | Output quality (0–100). Not relevant for PNG |
fluxParams.seed | integer | Random seed for reproducible generation |
fluxParams.width | integer | Width (256–1440). Only used when aspect_ratio is custom |
fluxParams.height | integer | Height (256–1440). Only used when aspect_ratio is custom |
fluxParams.image_prompt | string | Image URL for Flux Redux (guides composition) |
fluxParams.prompt_upsampling | boolean | Automatically modify the prompt for more creative results |
Code examples
curl -X POST https://api.apiframe.ai/v2/images/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a futuristic city skyline at sunset, cyberpunk style",
"model": "flux-1.1-pro",
"fluxParams": {
"aspect_ratio": "16:9",
"output_format": "webp"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/images/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "a futuristic city skyline at sunset, cyberpunk style",
"model": "flux-1.1-pro",
"fluxParams": {
"aspect_ratio": "16:9",
"output_format": "webp",
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "a futuristic city skyline at sunset, cyberpunk style",
model: "flux-1.1-pro",
fluxParams: { aspect_ratio: "16:9", output_format: "webp" },
}),
});
console.log(await response.json());Try it
POST
/v2/images/generateTry it