Credits API
Check your credit balance and spend credits on AI chat completions through the credits gateway.Credits gateway
openrouter/xiaomi/mimo-v2-pro(default)openrouter/google/gemini-2.0-flash-001openrouter/openai/gpt-4o-mini
openrouter/xiaomi/mimo-v2-pro.
Request body
The request body follows the OpenAI chat completions format. You can include any standard chat completion parameters.Response
On success, the response contains the AI completion along with a_credits object showing the cost and remaining balance.
X-Credits-Remaining header with your updated balance.
When stream is true, the response is a server-sent event stream with Content-Type: text/event-stream. The X-Credits-Remaining header is still included.
Response fields
Response headers
Errors
Check balance (v1)
Response
Response fields
Errors
Get credit balance
Response
Response fields
Errors
Credits from token holder claims (see Claim API) are added to the same
credits balance returned by these endpoints. Use the Referrals API for a detailed breakdown of referral-specific statistics.