For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
ModelsChatRankingsDocs
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
DocsAPI ReferenceClient SDKsAgent SDKCookbookChangelog
  • API Guides
    • Overview
    • Streaming
    • Embeddings
    • Limits
    • Authentication
    • Parameters
    • Errors and Debugging
  • API Reference
      • GETGet remaining credits
LogoLogo
ModelsChatRankingsDocs
API ReferenceCredits

Get remaining credits

GET
https://openrouter.ai/api/v1/credits
GET
/api/v1/credits
$curl https://openrouter.ai/api/v1/credits \
> -H "Authorization: Bearer <token>"
1{
2 "data": {
3 "total_credits": 100.5,
4 "total_usage": 25.75
5 }
6}

Get total credits purchased and used for the authenticated user. Management key required.

Was this page helpful?
Previous

Submit an embedding request

Next
Built with

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Response

Returns the total credits purchased and used
dataobject

Errors

401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error