---
title: "Balance and spend limits: read credits, cap keys and users"
canonical: https://uncensoredllm.ai/docs/budgets
generated: 2026-11-23T06:12:08.769Z
source: https://uncensoredllm.ai/docs/budgets
base_url: https://api.uncensoredllm.ai/v1
---

# Balance and spend limits.

Updated November 22, 2026.

Your organization runs on a prepaid balance, and two things sit on top of it: reading how much is left, and capping how fast any one key, session or end user can draw it down. The balance routes are at `https://api.uncensoredllm.ai/v1` and read with any API key on the organization; the per-key limits are fields on the key, set with an admin key through the [keys API](https://uncensoredllm.ai/docs/keys).

[Get a key](https://app.uncensoredllm.ai/console)

## Read the balance

`GET /v1/credits` returns `data.total_credits`, the available balance in USD, with `data.total_usage` always 0, because spend is tracked per request and per key rather than accrued here. For tools that expect the One API billing shape, `GET /v1/dashboard/billing/subscription` returns the same balance as `soft_limit_usd` and `hard_limit_usd` with `object` set to `billing_subscription` and `has_payment_method` always true, and `GET /v1/dashboard/billing/usage` returns zero usage in that shape.

## Cap a key, a session or a user

The limits live on the key object, so they are set when you create or patch a key:

| Limit | Field | What it bounds |
| --- | --- | --- |
| Prepaid budget | `budget_usd` in, `budget_micro` on the key | Dollars carved from the balance for this key; the key stops when it is spent. |
| Spend cap | `monthly_cap_usd` with `spend_limit_period` | Dollars per day, week or month, reset at 00:00 UTC on the period boundary. |
| Session spend | `session_max_spend_usd` | Dollars one session may be charged per UTC day. |
| Session volume | `session_max_requests` | Requests one session may make per sliding hour. |
| User budget | `user_budget_usd` with `user_budget_period` | Dollars one end user may be charged per period, the user taken from the customer id in the request headers or the body’s `user`. |

A key near its monthly cap can fall back to a cheaper model instead of failing, through the key’s `autopilot_model`. The key reports all of these amounts in micro-dollars, a million to the dollar.

## Example

```bash
curl https://api.uncensoredllm.ai/v1/credits \
  -H "Authorization: Bearer sk-ullm-live-…"
```

The response holds your available balance under `data.total_credits`.

## Status codes

`200` on each balance route. A bad or absent key returns `401 invalid_api_key`. Setting a per-key limit is a keys-API call, so its errors (for example a budget below what the key has spent) are documented on the [keys page](https://uncensoredllm.ai/docs/keys).

## Balance and limits: questions

### How do I check my balance from the API?

Call GET /v1/credits with any key on the organization and read data.total_credits. The dashboard billing routes return the same figure in the One API shape for tools that expect it.

### Why does the usage endpoint always return zero?

The balance is prepaid, and usage is recorded per request and per key, not accumulated on the balance route, so total_usage stays 0 by design. Use the requests and export routes for actual usage.

### How do I stop one customer from spending too much?

Set user_budget_usd on the key and identify the customer with the customer id header or the body’s user; the gateway refuses that user once the budget for the period is reached.

## Read next

- [MCP servers](https://uncensoredllm.ai/docs/mcp-servers)
- [Log export](https://uncensoredllm.ai/docs/exports)
- [Invoices](https://uncensoredllm.ai/docs/invoices)
- [Billing details](https://uncensoredllm.ai/docs/billing-details)
- [Statement signing key](https://uncensoredllm.ai/docs/statements-public-key)
- [Keys](https://uncensoredllm.ai/docs/keys)
- [Requests and receipts](https://uncensoredllm.ai/docs/requests)
- [Batches](https://uncensoredllm.ai/docs/batches)
- [Files](https://uncensoredllm.ai/docs/files)
- [Count tokens](https://uncensoredllm.ai/docs/count-tokens)
- [App usage stats](https://uncensoredllm.ai/docs/stats-apps)
- [Auth keys](https://uncensoredllm.ai/docs/auth-keys)
- [Webhook deliveries](https://uncensoredllm.ai/docs/webhooks-deliveries)
- [Docs: connect in two minutes](https://uncensoredllm.ai/docs)
