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

> ## Agent Instructions
> Authenticate every request with your API key in the `X-API-Key` header or `Authorization: Bearer`. Keys start with `sk-nunchux-`.
> Image generation is synchronous: the image is in the response.
> Video generation is asynchronous: submit the job, poll its task until it reaches a terminal status, then download the output promptly, because output URLs expire.

# Overview

> Models optimized by Nunchux, served through Nunchux's own endpoints. One request returns the output.

# Nunchux Optimized models

Nunchux Optimized models run on Nunchux's proprietary Model Optimizer and Inference Engine. You call them through Nunchux's own endpoints. Every request is synchronous: you send one POST, and the image or the video clip is in the response. There is no task to poll.

All Nunchux Optimized models accept the same request shape. The `model` field selects the model. On the FLUX, Qwen and HiDream O1 models, the `tier` field selects the tier: Radical Speed or Radical Value. Ideogram 4 has three other tiers, Turbo, Balanced and Quality. On Ideogram 4, the `steps` field selects the tier. The LTX models have two other tiers, 720p (1280x720) and 1080p (1920x1080). On LTX, the output size (`width` and `height`) selects the tier.

## Models

### Image

| Model | Model ID | Task | Tiers |
| - | - | - | - |
| FLUX.2 Klein 4B | `nunchux-flux.2-klein-4b` | Text-to-image | Radical Speed, Radical Value |
| FLUX.2 Klein 9B | `nunchux-flux.2-klein-9b` | Text-to-image | Radical Speed, Radical Value |
| FLUX.1 Schnell | `nunchux-flux.1-schnell` | Text-to-image | Radical Speed, Radical Value |
| Qwen Image 2512 Lightning | `nunchux-qwen-image-2512` | Text-to-image | Radical Speed, Radical Value |
| FLUX.2 Klein 4B Edit | `nunchux-flux.2-klein-4b-edit` | Image-to-image | Radical Speed, Radical Value |
| FLUX.2 Klein 9B Edit | `nunchux-flux.2-klein-9b-edit` | Image-to-image | Radical Speed, Radical Value |
| Qwen Image Edit 2511 Lightning | `nunchux-qwen-image-edit-2511` | Image-to-image | Radical Speed, Radical Value |
| HiDream O1 | `nunchux-hidream-o1-image` | Text-to-image | Radical Speed, Radical Value |
| Ideogram 4 | `nunchux-ideogram-4` | Text-to-image | Turbo, Balanced, Quality |

### Video

| Model | Model ID | Tasks | Tiers |
| - | - | - | - |
| LTX 2.5 | `nunchux-ltx-2.5-video` | Text-to-video, image-to-video | 720p, 1080p |
| LTX 2.3 | `nunchux-ltx-2.3-video` | Text-to-video, image-to-video | 720p, 1080p |

Text-to-image models go to the [Text-to-image](/nunchux-optimized/text-to-image) endpoint. Image-to-image models go to the [Image-to-image](/nunchux-optimized/image-to-image) endpoint. The LTX models go to the [Text-to-video](/nunchux-optimized/text-to-video) and [Image-to-video](/nunchux-optimized/image-to-video) endpoints.

## Choosing a model

FLUX.2 Klein 9B or 4B. The 9B models give higher quality, stronger text rendering, and better results on complex prompts. The 4B models are faster. Use 9B for production output. Use 4B when speed matters more than detail.

FLUX or Qwen. FLUX Klein is faster. Qwen Image renders text best, in English and in Chinese, and suits typography and layout work. Qwen Image Edit 2511 is the recommended editing model when the edit must keep the identity of the subject.

HiDream O1. It makes large, photographic images, up to four megapixels, with fine texture in skin, fabric and surfaces. It takes more time per image than FLUX and Qwen. It has a guidance control.

Ideogram 4. It renders the words in a prompt legibly, for posters, labels and covers. It takes more time per image than FLUX and Qwen. For Chinese text, use Qwen Image.

FLUX.1 Schnell. The earlier FLUX generation. It stays available for work that already depends on it.

LTX 2.5 or 2.3. LTX 2.5 is the newer release, with the same controls as LTX 2.3. Use LTX 2.3 only for continuity with clips you already made.

## Endpoints

The base URL is `https://api.nunchux.ai`. Each page describes one endpoint.

| Page | Method and path |
| - | - |
| [Text-to-image](/nunchux-optimized/text-to-image) | `POST /v1/images/generations` |
| [Image-to-image](/nunchux-optimized/image-to-image) | `POST /v1/images/edits` |
| [Text-to-video](/nunchux-optimized/text-to-video) | `POST /v1/video/generations` |
| [Image-to-video](/nunchux-optimized/image-to-video) | `POST /v1/video/animations` |

The image endpoints also work with the OpenAI SDK. See [OpenAI compatibility](/nunchux-optimized/openai-compatibility).

## How a request works

1. Send a POST with a JSON body to the endpoint. Put your API key in the `X-API-Key` header. See [Authentication](/authentication).
2. Set `model` to a model ID from the tables above. Set `prompt` to the text that describes the output. Image-to-image and image-to-video requests also carry the input image. Then select the tier. Each model uses a different field:

   * FLUX, Qwen and HiDream O1: set `tier` to `radical_speed` or `radical_value`.
   * Ideogram 4: set the inference steps with `steps`. The step count selects the tier: 12 for Turbo, 20 for Balanced, or 48 for Quality.
   * LTX: set the size with `width` and `height`. The size selects 720p or 1080p.

   Do not send `tier` to Ideogram 4 or LTX.
3. Read the output from the response. Images return as base64 data or as a URL, selected by `response_format`. The video endpoint pages describe the video response.

Each endpoint page lists every field and shows a full example.

## Billing

Each image request is billed on its tier. Radical Speed gives the lowest latency. Radical Value gives the lowest cost per output. Ideogram 4 bills a fixed price per image, at the rate of its tier: Turbo costs the least and Quality the most. Each LTX request is billed per second of output video, at the rate of its tier: 1080p costs more per second than 720p. Nunchux charges only for successful requests. When a request fails after the credits are deducted, Nunchux refunds them.

See [Performance tiers](/performance-tiers) for the tier comparison and [Credits & pricing](/credits-pricing) for how credits work.

## Errors and limits

A failed request returns an HTTP error status with a JSON body that names the error. See [Error codes](/errors) for the codes and the retry guidance.

Every request counts toward the requests-per-minute cap of your plan. See [Rate limits](/rate-limits).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.