> ## 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](https://docs.nunchux.ai/performance-tiers.md), 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 tier. |
| 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, HiDream O1, Z-Image Turbo, Krea 2 Turbo and MiniMax H3 Fast models have the Radical Speed and Radical Value tiers. MiniMax H3 Fast bills per second of output video, at a rate that also depends on the short edge. FLUX.1 dev, FLUX.2 dev, Qwen Image and Qwen Image Edit have Radical Speed only. FLUX.2 dev Flash has Radical Value only. 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](https://docs.nunchux.ai/performance-tiers.md) for a description of each tier, and the [pricing page](https://nunchux.ai/pricing) for current rates.

## Discounts

Some models carry a 10% default discount off list price. Negotiated and trial discounts are a multiplier on list price, and they replace the default discount. See [Discounts](https://docs.nunchux.ai/discounts.md) for which models carry the default discount and how to check which discounts 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 the account the key bills. On a [team](https://docs.nunchux.ai/teams.md) key, that is the team. It uses the same API key for [authentication](https://docs.nunchux.ai/authentication.md) as every other endpoint.

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

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

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

print(response.json())
```

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

```json theme={"system"}
{
  "credits_remaining": 96.49,
  "plan_level": "pro",
  "rpm_limit": 200,
  "concurrent_limit": 10,
  "period_start": "2026-10-01T00:00:00+00:00",
  "period_end": "2026-10-13T18:30:00+00:00",
  "period_gross": 3.51,
  "pending_discount_estimate": 0.0,
  "net_balance_estimate": 96.49,
  "spend_limit": null
}
```

| 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 the account's plan allows. Shared by every key billed to this account. |
| `concurrent_limit` | number | Simultaneous jobs the account's plan allows. Shared by every key billed to this account. |
| `period_start` | string | Start of the current billing month, in ISO 8601 UTC. |
| `period_end` | string | The time of this response, in ISO 8601 UTC. |
| `period_gross` | number | Credits charged so far this month, before the month-end discount credit. Requests your discount already reduced when they were charged are left out, so on an entrypoint with a discount only batch requests count here. |
| `pending_discount_estimate` | number | Credits you expect back when this month's invoice closes, from your discount on batch requests. Zero without one. See [Discounts](https://docs.nunchux.ai/discounts.md). |
| `net_balance_estimate` | number | `credits_remaining` plus `pending_discount_estimate`. |
| `spend_limit` | object or null | The organization's monthly spending limit, as the API enforces it: `cap`, `spent`, `remaining`, `period` (`YYYY-MM`, UTC) and `limit_reached`. `null` when the organization has no limit. |

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

## Credit Packages

Add credits from the [Billing tab](https://nunchux.ai/dashboard/admin/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.

Top Up opens the Add Credits window, which also has a field for a promo code. See [Redeem a promo code](https://docs.nunchux.ai/promo-codes.md).

## 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](https://docs.nunchux.ai/errors.md) 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.