CrossModel

Credits

Read your wallet balance. This is a lightweight, read-only endpoint suitable for polling from dashboards and menu-bar tools.

Endpoint

GET https://api.crossmodel.ai/v1/credits
Authorization: Bearer cm-YOUR_KEY
# Or: x-api-key: cm-YOUR_KEY

Accepts either OpenAI-style Authorization: Bearer or Anthropic-style x-api-key authentication.

Get balance

GET /v1/credits

curl https://api.crossmodel.ai/v1/credits \
  -H "Authorization: Bearer cm-YOUR_KEY"

Anthropic-style authentication works on the same URL:

curl https://api.crossmodel.ai/v1/credits \
  -H "x-api-key: cm-YOUR_KEY"
{
  "currency": "USD",
  "balance_micro": 12340000,
  "uncollected_micro": 0
}

The credits object

All amounts are integers in micro units of currency (1 USD = 1,000,000 micro). Divide by 1,000,000 to get the decimal amount.

FieldTypeNotes
currencystringWallet currency, e.g. USD.
balance_microintegerSpendable balance, in micro units. Divide by 1,000,000 for the dollar amount.
uncollected_microintegerFunds currently held by in-flight requests (settlement pending), in micro units. Usually 0.

A user with no wallet yet returns zeros.

Errors

Bearer-authenticated requests use the OpenAI-compatible error format; requests carrying a non-empty x-api-key use the Anthropic-compatible error format (see Models for both shapes).

HTTP statustypeCommon codeNotes
401authentication_errormissing_api_key, invalid_api_keyAPI key missing or invalid.
500api_errordb_errorA CrossModel internal error.