Skip to guide

API

API billing

Ask about this guide

How Aditya API token charges, prepaid balance, monthly budgets and billing errors work.

Updated 7 sections · Cloud API

On this page · 7 sections

Pay as you go from a prepaid balance

API-key calls are charged per token from your prepaid balance in real time, including during the beta. The chat app remains free during beta; that does not make API calls free.

Input tokens cost ₹25 per million, cached input tokens ₹6 per million, and output tokens ₹100 per million. Generated reasoning tokens are included in output charges. One credit equals ₹1. Read the current public price list at GET https://api.adityalab.in/v1/pricing before integrating.

Per-call rounding and the minimum charge

Each call's token charge is rounded to the nearest paisa, with a minimum of ₹0.01 per call. Rounding applies to each request, not only to a monthly total.

For example, 1,000 uncached input tokens plus 500 output tokens cost ₹0.075 before rounding, or ₹0.08 for that call. This is a calculation illustration, not a measured model response. Cached tokens, when present, use the separate cached-input rate rather than being charged again at the uncached rate.

Read your balance with an API key

GET /v1/credits/balance accepts your API key. The response includes balance, planTier and planExpiresAt. Keep the key on your server or in a protected environment variable, never in public browser code or a shared log.

Use the numeric balance to monitor prepaid API funds. planTier and planExpiresAt describe the chat plan; a chat plan does not remove API token charges.

Read API balance
curl --fail-with-body https://api.adityalab.in/v1/credits/balance \
  -H "Authorization: Bearer $ADITYA_API_KEY"

Top up API credits

Buy a credit pack in the platform's Billing page to add prepaid API balance. Credit packs are on sale independently of chat plans. Chat plans are coming soon and are not required for free beta chat.

A checkout callback is not proof that funds are active. The platform verifies the payment with the server and, if activation is pending, checks the order until the server confirms it. Do not assume a cancelled checkout added credits.

Balance, budgets and concurrency

API calls require sufficient balance and are subject to account and per-key monthly budgets and concurrency limits. Budgets stop API calls once reached, including during beta, and reset on the first day of each month in IST.

The five-hour usage window is the chat app's limit. It never stops an API-key call. Increasing a chat plan's window does not raise an API budget or top up prepaid API balance.

Handle billing errors deliberately

Read the HTTP status and the response's code together. Retrying without changing an exhausted balance or budget will not resolve the failure. A readable Retry-After header gives the retry time in seconds for rate-limited responses.

Billing errors and recovery
Status / codeWhat to do
402 insufficient_creditsTop up your prepaid API balance in Billing.
429 budget_exceededRaise the account monthly budget in Limits & budgets, or wait until next month (IST).
429 key_budget_exceededRaise that key's monthly budget on API keys, or wait until next month (IST).
429 rate_limitedRespect Retry-After and reduce concurrent requests; do not retry in a tight loop.

Keep the request ID for support

Every request returns X-Request-Id. Capture this response header on success and failure, especially for billing errors, so support can match a report to server logs. The platform displays it as Error ID in error notices.

Share the request ID, time and status when asking for help. Do not send API keys, passwords or private prompts with the report.

Search covers these six guides. Press Esc to close.
Documentation