Skip to main content

Check balance

GET /credits/balance
Returns the credit balance for the authenticated wallet.

Headers

x-wallet-address
string
required
Your EVM wallet address.
Authorization
string
Bearer token if not in free mode.

Response

{
  "address": "0x1234...abcd",
  "credits": 4950,
  "total_deposited": 5000,
  "total_spent": 50
}

Pricing

Credits are deducted per request based on total token usage across all tool-calling rounds:
MetricCost
Input tokens1 credit per 1,000 tokens
Output tokens2 credits per 1,000 tokens
Minimum charge1 credit per request
These values are configurable via CREDIT_COST_INPUT and CREDIT_COST_OUTPUT environment variables.

Grant credits (development only)

POST /credits/grant
Available only when NODE_ENV=development. Grants credits to any address without requiring an on-chain deposit.

Request body

{
  "address": "0x1234...abcd",
  "credits": 1000
}

Response

{
  "address": "0x1234...abcd",
  "credits": 5950,
  "granted": 1000
}