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

# Monitor Balance and Concurrency

> Check your balance and concurrency from code, or show a live usage counter on your own page.

Check your remaining balance with an [admin API key](https://docs.cartesia.ai/use-the-api/api-conventions.md#use-admin-api-keys-for-management-endpoints):

```bash theme={null}
curl https://api.cartesia.ai/balance \
  -H "Authorization: Bearer $CARTESIA_ADMIN_API_KEY" \
  -H "Cartesia-Version: 2026-08-14"
```

```json theme={null}
{ "remaining_credits": 1250000, "remaining_agent_cents": 4210, "as_of": "2026-11-09T18:00:00.000Z" }
```

`remaining_credits` is the model credits you have left, and `remaining_agent_cents` is your voice agent balance in US cents, so `4210` is \$42.10. They're the same balances as the **Subscription** page in the playground. See [Get Balance](https://docs.cartesia.ai/api-reference/usage/balance.md).

## Live concurrency

See how many sessions you have open right now, each with the limit it counts against:

```bash theme={null}
curl https://api.cartesia.ai/concurrency \
  -H "Authorization: Bearer $CARTESIA_ADMIN_API_KEY" \
  -H "Cartesia-Version: 2026-08-14"
```

```json theme={null}
{
  "tts_requests": { "active": 7, "limit": 10 },
  "tts_websockets": { "active": 5, "limit": 100 },
  "stt_requests": { "active": 0, "limit": 10 },
  "stt_websockets": { "active": 1, "limit": 100 },
  "agent_inbound_calls": { "active": 2, "limit": 20 },
  "agent_outbound_calls": { "active": 4, "limit": 20 },
  "agent_calls": { "active": 6, "limit": null },
  "as_of": "2026-11-09T18:00:00.000Z"
}
```

* `limit` is `null` when no limit applies. `agent_calls` is both directions together, and each direction has its own limit, so its `limit` is always `null`.
* An agent direction is `null` when its calls can't be counted, such as when your account has no limit in that direction.
* Readings are shared for up to 10 seconds, so polling faster returns the same numbers.
* Live concurrency isn't available on the free plan, where the endpoint returns 403.

See [Get Concurrency](https://docs.cartesia.ai/api-reference/usage/concurrency.md) for every field.

## Concurrency history

Get your peak concurrency in five-minute buckets, for up to 31 days at a time:

```bash theme={null}
curl -G https://api.cartesia.ai/usage/concurrency \
  -H "Authorization: Bearer $CARTESIA_ADMIN_API_KEY" \
  -H "Cartesia-Version: 2026-08-14" \
  --data-urlencode "start_ts=2026-11-09T17:00:00Z" \
  --data-urlencode "end_ts=2026-11-09T18:00:00Z"
```

```json theme={null}
{
  "data": [
    {
      "start_ts": "2026-11-09T17:00:00.000Z",
      "end_ts": "2026-11-09T17:05:00.000Z",
      "tts_requests": 4,
      "tts_websockets": 6,
      "stt_requests": 2,
      "stt_websockets": 2,
      "agent_calls": 0
    }
  ]
}
```

Each point is the highest value seen in its bucket, the same data as the **Concurrency** tab on the [Usage page](https://play.cartesia.ai/usage?tab=concurrency). Compare `tts_requests` and `stt_requests` with your [concurrency limits](https://docs.cartesia.ai/use-the-api/concurrency-limits-and-timeouts.md) to see how close you came to them.

* Buckets with no recorded concurrency are left out rather than returned as zeros.
* History is recorded every five minutes, so the newest bucket is at least five minutes behind.
* Requests and WebSockets overlap, because work over a WebSocket counts in both. Don't add them together.

See [Get Concurrency History](https://docs.cartesia.ai/api-reference/usage/concurrency-history.md) for every field.

## Embed live usage on your own page

Show a live usage counter on a status page or an internal dashboard. An embed is a read-only link that shows your balance and live concurrency, and nothing else.

**1. Create a link**

In the playground, open the **Concurrency** tab on the [Usage page](https://play.cartesia.ai/usage?tab=concurrency) and click **Embed**. Give the link a name, like "Status page".

Under **Sites that can show it**, list each site that will show the embed, one per line:

```text theme={null}
https://status.example.com
http://localhost:3000
```

Each site is `https://` and an exact host, with a port only if it isn't 443. `http://` works for `localhost` and `127.0.0.1` only, so you can try the embed while you build. List the site, not the page: `https://status.example.com`, not `https://status.example.com/usage`. Wildcards like `https://*.vercel.app` aren't accepted. You can list up to 10 sites, and the list starts with your organization's verified email domains.

Click **Create link**. Only organization admins can create links, and embeds aren't available on the free plan.

**2. Copy the snippet**

Copy the snippet right away. The link isn't shown again.

```html theme={null}
<iframe src="https://play.cartesia.ai/embed/pk_car_embed_..." width="360" height="140" style="border:0;border-radius:12px" title="Cartesia usage"></iframe>
```

**3. Add it to your page**

Paste the snippet into your page's HTML on one of the sites you listed. The counter refreshes every 10 seconds.

Browsers won't load the embed in a frame on any other site. The link itself still opens on its own, and anyone who can view your page can find it in the HTML. If your balance shouldn't be public, put the embed on a page that needs a login.

The embed shows TTS generations by default. Add `?show=` to the `src` URL to pick another counter, for example `https://play.cartesia.ai/embed/pk_car_embed_...?show=credits`:

| `show` | Shows |
| - | - |
| `tts_requests` | TTS generations (default) |
| `tts_websockets` | TTS WebSockets |
| `stt_requests` | STT streams |
| `stt_websockets` | STT WebSockets |
| `agent_inbound_calls` | Inbound and web agent calls |
| `agent_outbound_calls` | Outbound agent calls |
| `credits` | Model credits |
| `agent_balance` | Voice agent balance |

Viewers can click the Cartesia logo in the embed to switch counters. Their choice is saved in their browser.

If a refresh fails, the counter dims its last number and shows **Reconnecting…** until the next one succeeds.

While an incident or maintenance is in progress on [status.cartesia.ai](https://status.cartesia.ai), the embed shows it above the number, with a link to the status page. The line disappears when it's resolved.

### Revoke a link

Click **Embed** on the **Concurrency** tab again, click **Revoke** next to the link, then click **Revoke** again to confirm. The embed stops showing numbers at its next refresh.

Each organization can have up to 10 links. Revoke one to create another.

If your account moves to the free plan, its embeds show "This usage link isn't available" and start working again when you upgrade. The **Embed** button stays on the **Concurrency** tab while you have links, so you can revoke them.
