> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.blende.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.blende.dev/_mcp/server.

# Get usage

GET https://api.blende.dev/api/v1/usage

Returns the tokens billed in the current period.

Reference: https://docs.blende.dev/api-reference/account/get-usage

## Authentication

- `Authorization` header (bearer token, required) — An API key: `Authorization: Bearer bl_live_…`.
- `Authorization` header (bearer token, required) — Blende's apps: a sign-in JWT, sent with `Blende-Context-Key`.

## Response

### 200

The current period's usage.

- `period_start_time` (datetime, required) — RFC 3339: when the period started.
- `period_end_time` (datetime, required) — RFC 3339: when the period ends.
- `tokens_used` (integer, required) — The tokens billed in the period.

## Errors

### 401 Unauthorized Error

`unauthenticated`, `key_expired`.

- `type` (string, required) — `https://blende.dev/errors/<code>`.
- `title` (string, required) — A short summary of the code.
- `status` (integer, required) — The HTTP status.
- `code` (enum, required) — The stable error code.
  - Allowed values: `invalid_request`, `invalid_context_key`, `invalid_rule`, `invalid_pattern`, `too_many_patterns`, `too_many_matches`, `unauthenticated`, `key_expired`, `quota_exceeded`, `insufficient_scope`, `context_key_mismatch`, `policy_read_only`, `not_found`, `policy_not_found`, `text_too_large`, `unsupported_media_type`, `rate_limited`, `internal`, `model_busy`, `store_full`
- `request_id` (string, required) — The request's id, also in the `Request-Id` header.
- `detail` (string, optional) — What went wrong; never echoes input.
- `errors` (list of ProblemErrorsItems, optional) — Field errors, each pointing to a field of the schema.

### 403 Forbidden Error

`insufficient_scope`.

- `type` (string, required) — `https://blende.dev/errors/<code>`.
- `title` (string, required) — A short summary of the code.
- `status` (integer, required) — The HTTP status.
- `code` (enum, required) — The stable error code.
  - Allowed values: `invalid_request`, `invalid_context_key`, `invalid_rule`, `invalid_pattern`, `too_many_patterns`, `too_many_matches`, `unauthenticated`, `key_expired`, `quota_exceeded`, `insufficient_scope`, `context_key_mismatch`, `policy_read_only`, `not_found`, `policy_not_found`, `text_too_large`, `unsupported_media_type`, `rate_limited`, `internal`, `model_busy`, `store_full`
- `request_id` (string, required) — The request's id, also in the `Request-Id` header.
- `detail` (string, optional) — What went wrong; never echoes input.
- `errors` (list of ProblemErrorsItems, optional) — Field errors, each pointing to a field of the schema.

### 429 Too Many Requests Error

`rate_limited`.

- `type` (string, required) — `https://blende.dev/errors/<code>`.
- `title` (string, required) — A short summary of the code.
- `status` (integer, required) — The HTTP status.
- `code` (enum, required) — The stable error code.
  - Allowed values: `invalid_request`, `invalid_context_key`, `invalid_rule`, `invalid_pattern`, `too_many_patterns`, `too_many_matches`, `unauthenticated`, `key_expired`, `quota_exceeded`, `insufficient_scope`, `context_key_mismatch`, `policy_read_only`, `not_found`, `policy_not_found`, `text_too_large`, `unsupported_media_type`, `rate_limited`, `internal`, `model_busy`, `store_full`
- `request_id` (string, required) — The request's id, also in the `Request-Id` header.
- `detail` (string, optional) — What went wrong; never echoes input.
- `errors` (list of ProblemErrorsItems, optional) — Field errors, each pointing to a field of the schema.

### 500 Internal Server Error

`internal`.

- `type` (string, required) — `https://blende.dev/errors/<code>`.
- `title` (string, required) — A short summary of the code.
- `status` (integer, required) — The HTTP status.
- `code` (enum, required) — The stable error code.
  - Allowed values: `invalid_request`, `invalid_context_key`, `invalid_rule`, `invalid_pattern`, `too_many_patterns`, `too_many_matches`, `unauthenticated`, `key_expired`, `quota_exceeded`, `insufficient_scope`, `context_key_mismatch`, `policy_read_only`, `not_found`, `policy_not_found`, `text_too_large`, `unsupported_media_type`, `rate_limited`, `internal`, `model_busy`, `store_full`
- `request_id` (string, required) — The request's id, also in the `Request-Id` header.
- `detail` (string, optional) — What went wrong; never echoes input.
- `errors` (list of ProblemErrorsItems, optional) — Field errors, each pointing to a field of the schema.

## Types

### ProblemErrorsItems

One field error.

- `pointer` (string, required) — The schema field, e.g. `#/redaction_policy/overrides/0/match/pattern`.
- `detail` (string, required) — What is wrong with it.

## Examples

**Response**

```json
{
  "period_start_time": "2026-11-01T00:00:00Z",
  "period_end_time": "2026-12-01T00:00:00Z",
  "tokens_used": 184230
}
```

**SDK Code**

```python November
import requests

url = "https://api.blende.dev/api/v1/usage"

headers = {"Authorization": "Bearer <apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript November
const url = 'https://api.blende.dev/api/v1/usage';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```