# Get the balance

`GET /v1/balance`

Needs an API key.

Read your account's balance.

While a call runs, the balance reserves the most it may cost; what is left to start new calls with is `available_balance_usd`. A call the available balance cannot cover is refused.

## Example request

cURL:

```bash
curl https://api.voxoria.ai/v1/balance \
  -H "Authorization: Bearer $VOXORIA_API_KEY"
```

Python:

```python
import os

import httpx

response = httpx.get(
    "https://api.voxoria.ai/v1/balance",
    headers={"Authorization": f"Bearer {os.environ['VOXORIA_API_KEY']}"},
)
print(response.json())
```

TypeScript:

```ts
const response = await fetch("https://api.voxoria.ai/v1/balance", {
  headers: {
    Authorization: `Bearer ${process.env.VOXORIA_API_KEY}`,
  },
});
console.log(await response.json());
```

MCP (`tools/call` params):

```json
{
  "name": "get_balance",
  "arguments": {}
}
```

## Response

### 200

Your account's balance.

Your account's balance, as decimal strings in USD. Every workspace on the account draws on it.

| Field | Type | Nullable | Description |
| --- | --- | --- | --- |
| `balance_usd` | string | No | Everything the balance holds, including what calls in flight have reserved. |
| `available_balance_usd` | string | No | What new calls can draw on: the balance minus what calls in flight have reserved. |

### Example 200 response

```json
{
  "balance_usd": "25.0000",
  "available_balance_usd": "24.9786"
}
```

## Errors

| Status | Body | Description |
| --- | --- | --- |
| 400 | [Refused request](/docs/call-response.md#refused-request) | The request was refused. |
| 401 | [Refused request](/docs/call-response.md#refused-request) | The API key is missing, wrong or revoked (`INVALID_AUTH_TOKEN`). |
| 422 | [Invalid request](/docs/call-response.md#invalid-request) | The request is not valid (`VALIDATION`). |
| 429 | [Refused request](/docs/call-response.md#refused-request) | Too many requests with this API key (`RATE_LIMITED`). |
