# Get your AI credit balance

`GET https://api.cryptohopper.com/v1/ai/credits`

Part of [AI](https://www.cryptohopper.com/api-documentation/api-reference/ai.md) in the Cryptohopper API reference.

Returns your purchased AI credit balance and the free AI credits you have left for the current day.

The handler checks no OAuth scope. free_credits is 0 when your account has no subscription. When you never had an AI credit balance, one is created and ai_credits is 0.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Example request

```bash
curl "https://api.cryptohopper.com/v1/ai/credits" \
  -H "access-token: YOUR_ACCESS_TOKEN"
```

## Response

Example response (illustrative values):

```json
{
    "data": {
        "ai_credits": "125.50",
        "free_credits": "3.00"
    }
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
