Documentation Index
Fetch the complete documentation index at: https://docs.together.ai/llms.txt
Use this file to discover all available pages before exploring further.
Generate an image
To query an image model, use the.images method and specify the image model:

Save to disk
The recommended pattern for saving a generated image locally isresponse_format="base64". This avoids a separate download step and works without any special HTTP headers.
url instead, download it with a non-empty User-Agent header. The CDN rejects requests with a blank User-Agent (HTTP 403):
Python
Supported models
For the current list of image-generation models, see the serverless catalog or the dedicated endpoint model catalog. The table below shows the most commonly used serverless image models.| Model | API string | Serverless | Notes |
|---|---|---|---|
| FLUX.1 Schnell | black-forest-labs/FLUX.1-schnell | ✓ | Fastest; default 4 steps. Good starting point. |
| FLUX.1.1 Pro | black-forest-labs/FLUX.1.1-pro | ✓ | Higher quality than Schnell. |
| FLUX.2 Pro | black-forest-labs/FLUX.2-pro | ✓ | High fidelity; supports reference images. |
| FLUX.2 Dev | black-forest-labs/FLUX.2-dev | ✓ | Supports guidance, steps, and LoRAs. |
| FLUX.2 Flex | black-forest-labs/FLUX.2-flex | ✓ | Adjustable steps/guidance; best typography. |
| FLUX.1 Kontext Pro | black-forest-labs/FLUX.1-kontext-pro | ✓ | Image editing via image_url. |
| FLUX.2 Max | black-forest-labs/FLUX.2-max | ✓ | Highest fidelity FLUX.2 variant. |
| FLUX.1 Kontext Max | black-forest-labs/FLUX.1-kontext-max | ✓ | Highest-quality image editing. |
Parameters
The image generation endpoint accepts a common set of parameters across models, includingprompt, model, width, height, n, steps, seed, and negative_prompt. For the full parameter reference (including image_url, reference_images, frame_images, and model-specific notes), see Image generation parameters.
A few quick notes:
promptis required for all models except Kling.widthandheightrely on defaults unless otherwise specified. Available dimensions differ by model.- FLUX Schnell and Kontext (Pro/Max/Dev) models use the
aspect_ratioparameter to set the output image size, whereas FLUX.1 Pro, FLUX 1.1 Pro, and FLUX.1 Dev usewidthandheight.
Generate multiple variations
Generate multiple variations of the same prompt and choose between them:
Next steps
- Image-to-image generation: edit or transform an existing image with
image_urlorreference_images. - Image generation parameters: full parameter reference, custom dimensions, quality control, base64 responses, safety checker, and troubleshooting.