Skip to content
Docs menu

Image models

Flux.1 Kontext

On this page

In-context image generation and precise editing.

modelIdflux-kontext
Modalityimage
PricingSee this model on the Pricing page for the current per-call price (with your markup).

Operations

OperationmodelIdEndpointRequired input
Defaultflux-kontextPOST /api/v1/generateprompt, aspectRatio, outputFormat
Poll taskGET /api/v1/task/{id}?model=flux-kontext

Input parameters

FieldTypeRequiredValues / example
imageUrlstringNoImage URL
promptstringYesText value (default: A cozy reading nook inside a treehouse at dusk, string lights, rain on the round window, storybook illustration.)
enableTranslationbooleanNoTrue/false (default: true)
aspectRatiostringYesOptions: 16:9 | 21:9 | 4:3 | 1:1 | 3:4 | 9:16 (default: 1:1)
outputFormatstringYesOptions: JPEG | PNG (default: JPEG)

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-kontext","input":{"imageUrl":"https://example.com/input.jpg","prompt":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","enableTranslation":true,"aspectRatio":"1:1","outputFormat":"JPEG"}}'