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

# Get your credit balance

> Read your available and held token credits.

```http theme={null}
GET https://api.tokenpath.ai/v1/me/credits
```

Returns your prepaid token balance. Check it before a large batch, or use it to alert yourself before you run out.

Requires the `usage:read` scope.

## Response

**customer\_id** `string`

Your account ID.

**available\_tokens** `integer`

Tokens you can spend now. When a request starts, its estimated cost moves from here to `reserved_tokens`.

**reserved\_tokens** `integer`

Tokens held by requests that are still running. When each request finishes, its hold is either charged (on success) or returned to `available_tokens` (on failure).

```bash curl theme={null}
curl https://api.tokenpath.ai/v1/me/credits \
  -H "Authorization: Bearer $TOKENPATH_API_KEY"
```

```python Python theme={null}
import os
import httpx

balance = httpx.get(
    "https://api.tokenpath.ai/v1/me/credits",
    headers={"Authorization": f"Bearer {os.environ['TOKENPATH_API_KEY']}"},
).json()

if balance["available_tokens"] < 1_000_000:
    print("Fewer than 1M tokens left. Top up at platform.tokenpath.ai.")
```

```json 200 theme={null}
{
  "customer_id": "cus_abc123",
  "available_tokens": 9985000,
  "reserved_tokens": 1500
}
```

See [Credits and billing](https://docs.tokenpath.ai/concepts/credits-billing.md) for pricing and how holds work.

## Errors

In addition to the [authentication errors](https://docs.tokenpath.ai/api-reference/overview.md#errors):

| Status | Code | Meaning |
| - | - | - |
| `404` | `balance_not_found` | Account setup did not finish. Email [support@tokenpath.ai](mailto:support@tokenpath.ai). |


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