Change two lines.
Set base_url to the Top Billing endpoint and use a Top Billing key and model ID. Your messages, streaming and error handling stay as they are.
Point the official OpenAI SDK at Top Billing, use a Top Billing key and model ID, and every request is billed per token from prepaid INR credits. Chat Completions, Embeddings and Models, with a GST invoice on every top-up.
import os
from openai import OpenAI
-client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
+client = OpenAI(
+ api_key=os.environ["TB_API_KEY"],
+ base_url="https://api.topbilling.in/v1",
+)
response = client.chat.completions.create(
- model="<your-current-model>",
+ model="<top-billing-model-id>",
messages=messages,
)
Set base_url to the Top Billing endpoint and use a Top Billing key and model ID. Your messages, streaming and error handling stay as they are.
A parameter a model cannot honour is rejected with a clear 400 before anything is reserved or charged, so behaviour never changes behind your back.
Prepaid INR credits by UPI, cards or net banking through Cashfree. A tax invoice with our GSTIN follows every payment.
Sign up free. There is no subscription and no platform fee.
Top up from ₹100 by UPI, cards or net banking.
Create a live API key for your project in the console.
Point the OpenAI SDK at the Top Billing endpoint and pick a model ID.
Prices in INR per 1M tokens, before GST, from each model’s active pricing version. See every price.
More in the full FAQ.
Usually two lines. Point the official OpenAI SDK at https://api.topbilling.in/v1, or the Anthropic SDK at https://api.topbilling.in, and use a Top Billing API key and model ID. A parameter a model cannot honour is rejected with a clear 400, never silently ignored.
The official OpenAI SDKs pointed at https://api.topbilling.in/v1, the official Anthropic SDKs pointed at https://api.topbilling.in (no /v1 suffix; the SDK appends it), plain HTTP such as cURL, and Claude Code. See the SDK guides.
The request is rejected with 400 capability_not_supported before anything is reserved or charged. Parameters a model cannot honour are never silently ignored.
Every response carries an x-request-id header (tb_req_…). The same ID appears on the request’s charge in Usage, so any line of your bill can be traced to one request.
Add credits on the Billing page with UPI, cards or net banking through Cashfree, our payment gateway. Card, UPI and bank details are entered with the gateway and never reach our servers.
Yes. GST is shown before you pay, and a tax invoice carrying our GSTIN is on the Billing page after every successful payment.
No. Credits are prepaid in INR and charged per token at the model’s listed price on the pricing page. No subscription, no platform fee, no minimum monthly spend.
Create an account, add credits by UPI, create a key and send your first request with the OpenAI SDK already in your code.