🎉 New User Bonus — ₹1,000 CreditsNew to TopBilling? Sign up and apply promo code LAUNCH-1000 to get ₹1,000 in credits. Start exploring premium AI services today.Learn more
Top Billing
OpenAI-compatible API · India

Keep the OpenAI SDK.
Pay in rupees.

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.

app.py− before+ after
 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,
 )

Why Top Billing

01 · Same SDK

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.

02 · Strict

Never silently ignored.

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.

03 · Local billing

UPI and a GST invoice.

Prepaid INR credits by UPI, cards or net banking through Cashfree. A tax invoice with our GSTIN follows every payment.

How to start

4 steps.
A few minutes.

  1. 01

    Create an account

    Sign up free. There is no subscription and no platform fee.

  2. 02

    Add credits

    Top up from ₹100 by UPI, cards or net banking.

  3. 03

    Create a key

    Create a live API key for your project in the console.

  4. 04

    Change the base URL

    Point the OpenAI SDK at the Top Billing endpoint and pick a model ID.

Questions

Before you
start.

More in the full FAQ.

Do I need to change my code?

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.

Which SDKs and tools work?

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.

What if a model cannot do what I ask?

The request is rejected with 400 capability_not_supported before anything is reserved or charged. Parameters a model cannot honour are never silently ignored.

How do I trace a request and its charge?

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.

How do I pay?

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.

Do I get a GST invoice?

Yes. GST is shown before you pay, and a tax invoice carrying our GSTIN is on the Billing page after every successful payment.

Is there a subscription or platform fee?

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.

Two lines.
Paid in rupees.

Create an account, add credits by UPI, create a key and send your first request with the OpenAI SDK already in your code.