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

# Credits

> How prompt runs are billed and how to check your balance

Billable endpoints deduct credits from your organization. A prompt run is billed as the total number of runs (prompts × models × `repeatCount`) multiplied by the per-model unit price, and credits are **charged after completion for each run whose collection finishes**. Failed runs are not charged.

All 8 currently supported models cost **1.5 credits** per run. **During the launch 50% discount, each run costs 0.75 credits.**

```
20 prompts × 4 models × repeatCount 5 = 400 runs

List price        400 × 1.5  = 600 credits
With discount     400 × 0.75 = 300 credits
```

> [!NOTE]
>
> The discount lowers **credits consumed per run**. The price you pay to purchase credits is not discounted.
>
> For the latest per-model unit prices and credit pricing, see the [platform pricing page](https://platform.trychainshift.ai).

* If your balance is zero, the submission is rejected with `402` (`INSUFFICIENT_CREDITS`).
* If your balance is lower than the total required, the submission succeeds, but once the balance runs out mid-run the remaining collections are marked as failed.
* Check your balance with `GET /credits/me`. This call itself does not consume credits.

## Checking your balance

```bash theme={null}
curl -H "API-Key: YOUR_API_KEY" \
  "https://dev-platform-api.trychainshift.ai/api/v1/platform/credits/me"
```

```json theme={null}
{ "balance": 1250.5 }
```

`balance` is the number of credits remaining. With this balance you can submit a 400-run request twice at list price, or four times with the launch discount.

> [!TIP]
>
> Check your balance with `GET /credits/me` before requesting a large run. If the balance is lower than the expected charge, collection may fail partway through.


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