> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ttapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Flux API Documentation

> Explore the full Flux API on TTAPI, including Flux image generation, image edits, fetch, and official model endpoints such as Flux Pro, Flux Dev, Flux Kontext, and Flux.2.

# Flux API

The **Flux API** on TTAPI gives developers a complete entry point for Flux image generation, image edits, async fetch, and official model-specific endpoints.

## Flux.2 Overview

**FLUX.2** spans the full spectrum of image generation—from sub-second inference with \[klein] to highest quality with \[max]. Generate photorealistic images with precise control over colors, poses, and composition, or edit existing images by referencing up to 10 sources simultaneously.
Choose \[klein] for real-time, high-volume generation, \[pro] for production at scale, \[flex] for fine-grained control, or \[max] for maximum quality and grounding search.

## Compare FLUX.2 Models

<CardGroup cols={2}>
  <Card title="[klein]" href="/api/en/flux/flux-2-klein-4b">
    Sub-second inference. Our fastest models with open weights.
  </Card>

  <Card title="[max]" href="/api/en/flux/flux-2-max">
    Maximum performance. Highest editing consistency across tasks. Vast world knowledge. Strongest prompt following and faithful style representation.
  </Card>

  <Card title="[pro]" href="/api/en/flux/flux-2-pro">
    Top performance at affordable price. The high quality, production-grade image editing and generation model.
  </Card>

  <Card title="[flex]" href="/api/en/flux/flux-2-flex">
    Specialized for typography. Best for text rendering and preserving small details.
  </Card>
</CardGroup>

## What You Can Build With The Flux API

* Generate images through the [Flux Generate API](/api/en/flux/generate)
* Edit images with the [Flux Edits API](/api/en/flux/edits)
* Fetch async results with the [Flux Fetch API](/api/en/flux/fetch)
* Use official model endpoints such as [Flux Pro](/api/en/flux/flux-pro), [Flux Dev](/api/en/flux/flux-dev), [Flux Kontext Pro](/api/en/flux/flux-kontext-pro), and [Flux 2 Pro](/api/en/flux/flux-2-pro)

## Popular Flux API Endpoints

| Use case                | Endpoint                                   |
| :---------------------- | :----------------------------------------- |
| Image generation        | [Flux Generate API](/api/en/flux/generate) |
| Image editing           | [Flux Edits API](/api/en/flux/edits)       |
| Result fetch            | [Flux Fetch API](/api/en/flux/fetch)       |
| Official model endpoint | [Flux Pro API](/api/en/flux/flux-pro)      |

## Recommended Workflow

1. Start with the [Flux Generate API](/api/en/flux/generate) for TTAPI-format generation.
2. Use [Flux Edits](/api/en/flux/edits) when your workflow edits existing images.
3. Use [Flux Fetch](/api/en/flux/fetch) for async jobs.
4. Use model-specific endpoints when you need one official Flux model family.
