Skip to main content
GET
Get Credits Balance
Returns the current credit balance and subscription status for the authenticated user.

Reading the response

subscriptionStatus is free on every new account and becomes active once a credit pack is purchased. free is not an error and does not mean credits are missing — an account can sit on free with a healthy balance from its signup credits. subscriptionId holds the Stripe Checkout Session ID of the most recent purchase (cs_...), not a Stripe subscription ID. Credit packs are one-time purchases.

Balance reads 0 and free after paying

This almost always means the request authenticated as a different account from the one that was billed. It is easy to end up with more than one account without realising: signing in with a different Google identity, or with a work address instead of a personal one, creates a separate account with its own API key and its own balance. A purchase credits the account that checked out. It has no effect on keys belonging to any other account. To check which account a key belongs to, call this endpoint with that exact key and compare the balance against the one your dashboard shows:
If the two disagree, the key is from another account. Copy the key again from the dashboard of the account you purchased on, then update it everywhere it is configured — scripts, environment variables, CI secrets, and the ?apiKey= query parameter if you use the hosted MCP server.
Keys belong to an account, not to a person. Two accounts owned by the same person do not share a balance, and regenerating the key on one account does not affect the other.

Which header to use

API keys go in X-API-Key. Sending an sk_live_... key as Authorization: Bearer returns 401, because the Bearer scheme is reserved for dashboard session tokens.
The two failure codes mean different things. A 402 means the request authenticated fine and was stopped at the credit check, so the key itself is valid. A 401 means the key was not accepted at all.

Authorizations

X-API-Key
string
header
required

API key for authentication. Format: sk_live_xxxxxxxxxxxxx

Get your API key from the Dashboard.

Response

Successful response

credits
integer
required

Remaining credits available

Example:

950

subscriptionStatus
enum<string>
required

Billing state of the account. free is the default for every new account, including accounts that still hold their signup credits, and remains the value until a credit pack is purchased. active means a credit pack has been purchased on this account. These are the only two values the API returns.

Available options:
free,
active
Example:

"active"

subscriptionId
string | null

Stripe Checkout Session ID of the most recent credit pack purchase, or null if there has not been one. Despite the field name this is a checkout session (cs_...), not a Stripe subscription - credit packs are one-time purchases.

Example:

"cs_live_a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0u1V2w3X4y5Z6"