---
title: "Get the credit balance – Superbot API"
canonical_url: "https://superbot.gg/developers/usage/getCredits"
summary: "The credit balance, the period meter and the plan."
---

> Markdown of https://superbot.gg/developers/usage/getCredits. Site index: /llms.txt.

# Get the credit balance

`GET /v1/credits`

The credit balance, the period meter and the plan.

- Operation id: `getCredits`
- Group: [Usage & spend](https://superbot.gg/developers/usage.md)
- Auth: A caller key holding `billing:read` (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: `billing:read`

## Response 200

The balance.

`application/json`: Credits.

- `credits` (object, required): The pot view: beta, plan and permanent credits with a total.
- `balance_credits` (number, required)
- `balance_tokens` (number, required)
- `total_usage_tokens` (number, required)
- `period_usage_tokens` (number, required)
- `capacity_tokens` (number, required)
- `keys_count` (integer, required)
- `paid_usd_week` (number, required)
- `list_usd_week` (number, required)
- `saved_usd_week` (number, required)
- `plan` (string, required)
- `renews_at` (string)

## Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |

## Examples

```sh
curl -sS -X GET "https://superbot.gg/v1/credits" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY"
```

```js
const res = await fetch(`https://superbot.gg/v1/credits`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

```python
import os
import requests

res = requests.request(
    "GET",
    "https://superbot.gg/v1/credits",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
    },
)
print(res.status_code, res.json())
```
