Skip to content

Token balance

GET
/v1/tokens

The current token balance of the presented API key’s account. Requires a key and counts toward the per-key rate limit, but never charges tokens, so a zero-balance key can always check.

Successful Response

TokensResponse

GET /v1/tokens (routers.tokens.token_balance)

object
tokens_remaining
required
Tokens Remaining

Current prepaid token balance of the key’s account

integer

Missing or invalid API key (missing-key, invalid-key)

Problem

RFC 9457 problem detail. Served as application/problem+json. Additional members appear for some problem types (e.g. errors). (core.problems.problem)

object
detail
Any of:
string
status
required
Status
integer
title
required
Title
string
type
required
Type

Problem type URI; the final path segment is the stable slug

string
key
additional properties
any

Key disabled (account-disabled)

Problem

RFC 9457 problem detail. Served as application/problem+json. Additional members appear for some problem types (e.g. errors). (core.problems.problem)

object
detail
Any of:
string
status
required
Status
integer
title
required
Title
string
type
required
Type

Problem type URI; the final path segment is the stable slug

string
key
additional properties
any

Rate limited or token balance exhausted (rate-limited, tokens-exhausted); sets Retry-After

Problem

RFC 9457 problem detail. Served as application/problem+json. Additional members appear for some problem types (e.g. errors). (core.problems.problem)

object
detail
Any of:
string
status
required
Status
integer
title
required
Title
string
type
required
Type

Problem type URI; the final path segment is the stable slug

string
key
additional properties
any