Skip to main content
GET
Get credit balance and key spend

Authorizations

Authorization
string
header
default:YOUR_API_KEY
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

since
integer

Unix time in seconds. When set, key_spent counts only requests started at or after it.

Required range: x >= 0

Response

Credit balance

object
string
required
Allowed value: "credits"
balance
number
required

Total credits on the account, including credits held by in-flight requests.

Example:

42.5

reserved
number
required

Credits currently held by in-flight requests. Unused holds return to the balance when each request settles.

Example:

1.2

available
number
required

What a new request can reserve: balance minus reserved, capped by key_limit when the key has a budget.

Example:

41.3

key_limit
number | null
required

What this key's spend budget (or its workspace's limit) still allows. null when the key has no budget.

Example:

null

key_spent
number
required

Credits billed to this key for finished requests, all time or since the since parameter. Excludes in-flight requests and plan or promo usage.

Example:

3.184211

key_spent_since
integer | null
required

The since parameter echoed back, or null for all time.

Example:

null

unit
string
required

Amounts are in US dollars, with up to 6 decimal places.

Allowed value: "usd"
updated_at
integer
required

Unix time in seconds when the balance was read. Values are live, not cached.

Example:

1793836800