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

# Get balance

> GET /v1/dashboard/billing/subscription — the current account quota

Returns the current account's (or token's) balance and quota information.

## Request

```bash theme={null}
curl https://openp.ai/v1/dashboard/billing/subscription \
  -H "Authorization: Bearer $OPENPAI_API_KEY"
```

## Response

```json theme={null}
{
  "object": "billing_subscription",
  "has_payment_method": true,
  "soft_limit_usd": 100.0,
  "hard_limit_usd": 1000.0,
  "system_hard_limit_usd": 1000.0,
  "access_until": 4102444800,
  "plan": {"title": "vip", "id": "vip"}
}
```

Field meanings:

| Field                   | Meaning                                                    |
| ----------------------- | ---------------------------------------------------------- |
| `hard_limit_usd`        | The account's (or token's) hard quota ceiling              |
| `soft_limit_usd`        | The soft quota threshold (triggers an alert)               |
| `system_hard_limit_usd` | The system-level hard ceiling                              |
| `access_until`          | The Unix time when account access ends (0 means permanent) |
| `plan`                  | The current group                                          |

## Differences from official OpenAI

OpenPAI's query endpoint is compatible with OpenAI's legacy structure.
For more fine-grained information (account balance, current token's spend, used quota, etc.), use the **dedicated endpoint**:

```bash theme={null}
# Query account-level balance (in ¥)
curl https://openp.ai/api/user/self \
  -H "Authorization: Bearer $OPENPAI_USER_TOKEN"
```

<Note>A user token and an API key (sk-) are two separate credentials — the user token is for the management backend API, while sk- is for model calls.</Note>

## Client integration

Many clients (such as NextChat, ChatBox) automatically call `/v1/dashboard/billing/subscription` and `/v1/dashboard/billing/usage` to display the balance.
OpenPAI implements both endpoints so client UIs work correctly.
