Image models
Flux.1 Kontext
On this page
In-context image generation and precise editing.
| modelId | flux-kontext |
| Modality | image |
| Pricing | See this model on the Pricing page for the current per-call price (with your markup). |
Operations
| Operation | modelId | Endpoint | Required input |
|---|---|---|---|
| Default | flux-kontext | POST /api/v1/generate | prompt, aspectRatio, outputFormat |
| Poll task | — | GET /api/v1/task/{id}?model=flux-kontext | — |
Input parameters
| Field | Type | Required | Values / example |
|---|---|---|---|
| imageUrl | string | No | Image URL |
| prompt | string | Yes | Text value (default: A cozy reading nook inside a treehouse at dusk, string lights, rain on the round window, storybook illustration.) |
| enableTranslation | boolean | No | True/false (default: true) |
| aspectRatio | string | Yes | Options: 16:9 | 21:9 | 4:3 | 1:1 | 3:4 | 9:16 (default: 1:1) |
| outputFormat | string | Yes | Options: 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"}}'