> ## 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.

# Credits & Pricing

> Understand how credits work for the Nunchux API.

# Credits & Pricing

### How billing works for your API requests

## How Credits Work

Nunchux uses a prepaid credit system. One credit costs \$1.00.

Credits are deducted per successful request, based on the model, the [performance tier](/performance-tiers), and the output size. How a model bills depends on what it generates.

| Model type | Billing basis |
| - | - |
| Image models | Most image models price per megapixel of the output. Ideogram 4 prices per image, by step count. |
| Video models | Most are priced by the duration of the output, some also by resolution or mode. Seedance is priced per million video tokens of the finished clip, billed when it completes. |

The [pricing page](https://nunchux.ai/pricing) lists the current rate for each combination.

## Tier Pricing

The price of a Nunchux Optimized model depends on the tier. The FLUX, Qwen and HiDream O1 models have the Radical Speed and Radical Value tiers. Ideogram 4 has the Turbo, Balanced and Quality tiers, billed per image. The LTX video models have the 720p and 1080p tiers, billed per second of output video. Partner models do not use the tiers, and each one has its own price basis, such as output size, resolution, or mode. See [Performance Tiers](/performance-tiers) for a description of each tier, and the [pricing page](https://nunchux.ai/pricing) for current rates.

## Discounts

Negotiated and trial discounts apply to those rates. See [Discounts](/discounts) to see how to check which apply to your account.

## Checking Your Balance

Check your credit balance in the [Dashboard](https://nunchux.ai/dashboard). You can also call `GET /v1/credits`, which takes no parameters and returns your own account only. It uses the same API key for [authentication](/authentication) as every other endpoint.

<CodeGroup>
  ```bash curl theme={"system"}
  curl https://api.nunchux.ai/v1/credits \
    -H "X-API-Key: $NUNCHUX_API_KEY"
  ```

  ```python python theme={"system"}
  import os
  import requests

  response = requests.get(
      'https://api.nunchux.ai/v1/credits',
      headers={'X-API-Key': os.environ['NUNCHUX_API_KEY']},
      timeout=30,
  )
  response.raise_for_status()

  print(response.json())
  ```
</CodeGroup>

A `200` carries the balance and the caps that apply to your plan. The API returns [standard error codes](/errors) with a JSON error body.

```json theme={"system"}
{
  "credits_remaining": 96.49,
  "plan_level": "pro",
  "rpm_limit": 200,
  "concurrent_limit": 10
}
```

| Field | Type | Description |
| - | - | - |
| `credits_remaining` | number | Credits left on the account. One credit is \$1.00. |
| `plan_level` | string | The plan the account is on. Each plan has its own caps. |
| `rpm_limit` | number | Requests per minute this plan allows. |
| `concurrent_limit` | number | Simultaneous jobs this plan allows. |

<Note>
  Polling

  This poll is free and it never takes a job slot. It still counts toward your [requests per minute](https://nunchux.ai/docs/rate-limits).
</Note>

## Credit Packages

Add credits from the [Billing tab](https://nunchux.ai/dashboard/billing) of your dashboard. Select a preset package, or enter a custom whole-dollar amount between $5 and $5,000.

| Package | Credits | \~Images |
| - | - | - |
| \$10 | 10 | \~15,900 |
| \$20 | 20 | \~31,800 |
| \$50 | 50 | \~79,500 |

<Note>
  Image estimates assume FLUX.2 Klein 4B on the Radical Value tier at 1024×1024.
  This is our lowest published rate, 0.0006 credits per megapixel. Other models
  and tiers have different costs per image.
</Note>

## Insufficient Credits

If you do not have enough credits, the API returns a 402 status code. The response gives the credits required and your current balance:

```json theme={"system"}
{
  "error": {
    "code": "insufficient_credits",
    "message": "Your account does not have enough credits for this request.",
    "creditsRequired": 0.005,
    "creditsBalance": 0.002
  }
}
```

See [Error Handling](/errors) for a full list of API error codes.

## Refunds

Sometimes a request fails after Nunchux deducts the credits, for example because of a server error. Nunchux refunds those credits automatically.


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