Sign-up and API keys are open. Paid top-ups open soon.What changed
Docs menu

API reference, Account

Current prepaid balance and price tier

View as Markdown

GET/v1/balanceoperation id getBalance

Authentication. API key as authorization: Bearer <key>, scope balance:read.

Parameters

x-client-request-idheader ยท string
Your own correlation id, accepted on every public operation. Logged with the request metadata and echoed in the response. A malformed value answers 400 invalid_header.
  • 1 to 128 characters
  • pattern ^[\x21-\x7E]+$

Responses

200Balance of the calling key's account.

Headers: x-request-id, x-client-request-id, ratelimit-policy, ratelimit

objectstringrequired
  • always "balance"
account_idAccountIdrequired
  • pattern ^acc_[0-9A-HJKMNP-TV-Z]{26}$
balance_micro_centsintegerrequired
Integer micro-cents. Stays below 2^53 for any balance under EUR 90 million, so JavaScript reads it exactly.
  • format int64
balance_eurstringrequired
The same amount as a decimal string with 8 decimals.
  • pattern ^-?[0-9]+\.[0-9]{8}$
currencystringrequired
  • always "EUR"
month_to_date_tokensintegerrequired
Billable tokens in the current UTC calendar month, which set the tier.
  • format int64
tierstringrequired
  • one of "t1", "t2", "t3"
unit_price_micro_centsintegerrequired
  • at least 0
next_tier_at_tokensinteger | nullrequired
Month-to-date token count at which the next lower price applies; null in t3.
  • format int64
updated_atstringrequired
  • format date-time
400The request could not be read. Codes: invalid_json (not JSON, not UTF-8, or a \u escape that is half of a surrogate pair, such as "\ud800" without its low half), duplicate_key (a JSON object repeats a key; param is the JSON pointer of the repeated member, such as /questions/q1/options/a), unsupported_media_type (not application/json) and invalid_header (a malformed idempotency-key or x-client-request-id; param names the header).

Headers: x-request-id, x-client-request-id

Error envelope. See Errors for every type and code.

401Missing, unknown, revoked or expired credentials.

Headers: x-request-id, x-client-request-id

Error envelope. See Errors for every type and code.

403The credentials are valid but not allowed to do this (missing scope, suspended account or failed CSRF check).

Headers: x-request-id, x-client-request-id

Error envelope. See Errors for every type and code.

429A rate limit or quota is exhausted. Retry after the given number of seconds. For test_daily_quota that is the time until 00:00 UTC; clients should not retry it automatically.

Headers: x-request-id, x-client-request-id, retry-after, ratelimit-policy, ratelimit

Error envelope. See Errors for every type and code.

500An unexpected error. Any charge was refunded. Retry with the same idempotency key.

Headers: x-request-id, x-client-request-id

Error envelope. See Errors for every type and code.

503No serving path could answer in time, or a dependency is down. Any charge was refunded.

Headers: x-request-id, x-client-request-id, retry-after

Error envelope. See Errors for every type and code.

Example request

curl "https://api.thinqit.ai/v1/balance" \
  -H "authorization: Bearer $DEX_API_KEY"

Examples

Illustrative values. Examples show the shape of requests and responses; the numbers in them are not measured results.

Response: EUR 36.10 left, in the first price tier

{
  "object": "balance",
  "account_id": "acc_01M4ZPXYG0F5KZNWJ47TAN9ZT2",
  "balance_micro_cents": 3610145620,
  "balance_eur": "36.10145620",
  "currency": "EUR",
  "month_to_date_tokens": 212450110,
  "tier": "t1",
  "unit_price_micro_cents": 5,
  "next_tier_at_tokens": 1000000000,
  "updated_at": "2026-10-20T12:00:03Z"
}