← All docs

Endpoints

Generate images

POST/v1/images/generations

Loading models…

Generates images from a text prompt. Image models have category: "IMAGE" in GET /v1/models.

Returns

url expires after 10 minutes. Within 24 hours you can get a new link from GET /v1/outputs/{requestId} using this response's x-request-id header, so save it.

Body

modelstringYes
IMAGE model ID
promptstringYes
1–16,000 characters. Providers with lower limits may reject longer prompts
nintegerNo
1–10. Default 1
sizestringNo
WxH pixels (such as 256x256, 512x512, 1024x1024, 1792x1024, 1024x1792, 1536x1024, 1024x1536), auto, or a resolution tier. Pixels win; a conflicting aspect_ratio or resolution returns 400
aspect_ratiostringNo
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 1:2, 2:1, 7:5, 5:7, 1:4, 4:1, 1:8, 8:1, 9:21, 21:9, auto (provider default)
resolutionstringNo
512, 768, 1K (≈1 MP), 1.5K, 2K (≈4 MP), 4K (the model's largest tier)
qualitystringNo
standard, hd, low, medium, high, xhigh, max, auto. xhigh and max: GPT Image 2.5 only. See limits.supported_qualities
response_formatstringNo
url (default) or b64_json
output_formatstringNo
png, jpeg, webp. Only models with output_format in parameter_profile; others return 400
output_compressionintegerNo
0–100 for jpeg and webp. GPT Image only
backgroundstringNo
transparent, opaque, auto. GPT Image only. transparent needs png or webp
moderationstringNo
low or auto. GPT Image only
userstringNo
End-user identifier
prompt_upsamplingbooleanNo
FLUX 3 Image Klein only. Default true. Other models return 400
extra_body.gpunodeobjectNo
Open-weight models: seed (same seed, same image; image i of n uses seed + i) and num_inference_steps
extra_body.googleobjectNo
deprecated. aspect_ratio and image_size are old names for aspect_ratio and resolution. Conflicting values return 400

Aspect ratio and resolution

Each model's accepted values are in parameter_profile.tasks["image-generation"].parameters. Under the default auto policy, an unsupported ratio moves to the nearest supported one and a resolution to the nearest supported tier at or below it (or the smallest), with a note in x_everyais.parameter_warnings. strict returns 400.

  • Gemini: a pixel size maps to the nearest ratio and tier (3840x2160 → 16:9, 4K).
  • GPT Image 2.5: tiers become WxH on a 16 px grid (1360x768, 2720x1536 and 3840x2160 at 16:9). Custom sizes work with sides in multiples of 16 up to 3840, ratio 1:3–3:1 and 655,360–8,294,400 pixels.
  • Models with a size list, such as FLUX 3 Image Klein, pick by ratio, then resolution. Prices by size are in pricing.variants[].meta.sizes.

Check limits.supported_sizes. Token-priced image models cost more at larger sizes and higher quality.

FLUX 3 Image Klein

everyais/flux-3-image-klein is a 5.6B open-weight model from Black Forest Labs.

OptionValue
n1–4
SizeOne of the 60 sizes below, or aspect_ratio + resolution. Default 1024x1024 (1:1, 1K). size: "auto" equals omitting it
output_formatpng, jpeg, webp. Default jpeg
extra_body.gpunode.seed0–2147483647
extra_body.gpunode.num_inference_steps1–16. Default 16
prompt_upsamplingDefault true: BFL's upsampler rewrites the prompt into a detailed caption, as in BFL's API. false uses your prompt as written. extra_body.gpunode.prompt_upsampling is the same switch; don't send conflicting values
guidance_scale, negative_promptNot supported (400)

With upsampling on, each response item includes the rewritten caption as revised_prompt.

Supported sizes

Resolutions are 768, 1K, 1.5K and 2K. 4K is not supported: auto lowers it to 2K and strict returns 400. Under auto, an unlisted size becomes the largest listed size of the nearest ratio that fits inside it (1024x768 → 880x672, 1920x1080 → 1360x768), with a warning. Sizes are never enlarged, so anything below 768x768 returns 400, as does any unlisted size under strict. The response's top-level size is the actual output size.

Aspect ratio7681K1.5K2K
21:91168x4961568x6722352x10083136x1344
2:11088x5441456x7202176x10882896x1456
16:91024x5761360x7682048x11522736x1536
3:2944x6241248x8321888x12482512x1680
7:5912x6561216x8641824x12962416x1728
4:3880x6721184x8801776x13282368x1776
5:4864x6881152x9121712x13762288x1824
1:1768x7681024x10241536x15362048x2048
4:5688x864912x11521376x17121824x2288
3:4672x880880x11841328x17761776x2368
5:7656x912864x12161296x18241728x2416
2:3624x944832x12481248x18881680x2512
9:16576x1024768x13601152x20481536x2736
1:2544x1088720x14561088x21761456x2896
9:21496x1168672x15681008x23521344x3136

Pricing (per image, USD)

Output tierPrice
768$0.008
1K$0.009
1.5K$0.011
2K$0.014

Editing costs the same. Multiply by n; your account rates apply.

Bounding-box layout

Append a JSON list to the prompt to place elements: {"id","bbox":[top,left,bottom,right],"desc"} on a 0–1000 grid. Refer to each element in the caption as <id>.

json
{
  "model": "everyais/flux-3-image-klein",
  "prompt": "A cozy cafe window scene: a <cat> sleeps on the left windowsill and a <plant> stands on the right. [{\"id\":\"cat\",\"bbox\":[500,50,900,450],\"desc\":\"orange tabby cat curled up\"},{\"id\":\"plant\",\"bbox\":[300,600,900,900],\"desc\":\"potted monstera\"}]",
  "aspect_ratio": "3:2",
  "resolution": "1K",
  "extra_body": { "gpunode": { "seed": 42 } }
}

Tips

  • Describe the whole scene. There is no negative prompt, so say what should be there.
  • Put text you want rendered in quotes.
  • License: FLUX Kommunity License (non-commercial, plus commercial use of outputs for qualifying users). Outputs pass an NSFW filter.

Model options

Pick a model at the top of this page, or read capabilities, limits and parameter_constraints from GET /v1/models. Parameter policy decides whether unsupported values are adjusted or rejected with 400. Omitted size, ratio, resolution and quality use the model's defaults.

Contact support