Skip to content
Docs menu

Image models

FLUX.2

On this page

FLUX.2 — fast, high-fidelity AI image generation & editing.

modelIdflux-2-pro-text-to-image
Modalityimage
PricingSee this model on the Pricing page for the current per-call price (with your markup).

Operations

OperationEndpointDescription
Text to imagePOST /api/v1/generateBase generation from a text prompt.
Poll taskGET /api/v1/task/{id}?model=flux-2-pro-text-to-imageRetrieve state and result URLs.

Input parameters

FieldTypeRequiredValues / example
prompttextarearequiredEnter your image description...
aspect_ratioselectrequired1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3
resolutionselectrequired1K, 2K
nsfw_checkerselectoptionalfalse, true

Example request

bash
curl -X POST https://you.bot/api/v1/generate \
  -H "Authorization: Bearer $YOUBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"modelId":"flux-2-pro-text-to-image","input":{"prompt":"Hyperrealistic studio photo of a glass terrarium shaped like a vintage camera, a tiny forest growing inside, product lighting.","aspect_ratio":"1:1","resolution":"1K","nsfw_checker":"true"}}'