Account & Credits
These authenticated utility endpoints help integrations identify the project
behind a key and check whether there is enough spendable balance for traffic.
They are useful for startup diagnostics, billing dashboards, and preflight
checks, but they do not replace the dashboard for changing keys, projects, or
funding settings.
Current account
curl "https://api.llmapi.ai/v1/me" \
-H "Authorization: Bearer $LLM_API_KEY"
GET /v1/me returns the key owner, organization, and project information.
{
"user": { "email": "owner@example.com", "name": "API Owner" },
"organization": {
"id": "org_123",
"name": "Example Organization",
"credits": 42.5
},
"project": { "id": "proj_123", "name": "Production" }
}
Credit balance
curl "https://api.llmapi.ai/v1/credits" \
-H "Authorization: Bearer $LLM_API_KEY"
GET /v1/credits returns the spendable credit balance and funding mode. This
route remains readable when the balance is zero, which makes it suitable for
preflight checks and billing dashboards.
{
"credits": 42.5,
"credits_bonus": 5,
"currency": "USD",
"mode": "prepaid",
"gated_on_balance": true
}
gated_on_balance tells you whether zero credits block inference. The balance
mode can be prepaid, payg, subscription, or byok; in pay-as-you-go,
subscription, and BYOK modes, the displayed credit figures may not be the
condition that admits traffic. Partner organizations may also receive a
monthly_cap object with limit, used, and remaining.
Authentication and errors
Send the API key as a bearer token on every request:
curl "https://api.llmapi.ai/v1/credits" \
-H "Authorization: Bearer $LLM_API_KEY"
Both endpoints return 401 for a missing or invalid key. /v1/me can return
403 when the organization or project is unavailable; /v1/credits can return
403 or 503 when billing verification is unavailable. Treat a transient
503 as retryable rather than assuming the account has no credits.
See API Keys, Pricing, and Usage & Analytics for account and billing details.
API operation: GET /v1/me
API operation: GET /v1/credits