Build with
Top Billing.
Everything you need to go from API key to production — with the SDK already in your codebase.
All systems operationalView API statusEverything on one bench.
Eight tools, one account. Pick one to see what it does and where it lives.
- POST/v1/chat/completionsOpenAI-compatible chat
- POST/v1/responsesOpenAI-compatible Responses (Codex)
- POST/v1/messagesAnthropic-compatible messages
- POST/v1/embeddingsOpenAI-compatible embeddings
- GET/v1/modelsModels your key can use
- POST/v1/chat/completionsOpenAI-compatible chat
- POST/v1/responsesOpenAI-compatible Responses (Codex)
- POST/v1/messagesAnthropic-compatible messages
- POST/v1/embeddingsOpenAI-compatible embeddings
- GET/v1/modelsModels your key can use
Four steps to the first request.
- Step 01
Create your API key.
Sign up, create a project, add credits (top up or redeem a promo code) and create a key. New accounts start with zero credit.
Create an account - Step 02
Install your SDK.
The official OpenAI client works as-is. Nothing Top Billing-specific to install.
pip install openai # or npm install openai - Step 03
Change your base URL.
Point the client at Top Billing and use your key.
TB_API_KEY=tb_live_... TB_BASE_URL=https://api.topbilling.in/v1 - Step 04
Make your first request.
Send it, then open Usage in the dashboard to see its tokens and charge next to its request ID.
Full quickstart
The same request, four ways.
Your language choice follows you across the site and the docs.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["TB_API_KEY"],
base_url="https://api.topbilling.in/v1",
)
response = client.chat.completions.create(
model="<model-id>",
messages=[{"role": "user", "content": "Summarise this ticket in one line."}],
)
print(response.choices[0].message.content)
<model-id> with an ID from Model Square.Run it in the Playground Three lines change.
Nothing else does.
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,
)
- Changes
- base_url, the API key and the model ID.
- Stays the same
- The SDK, the request and response shapes, streaming, tool calls and the SDK’s error classes.
- Documented, not assumed
- Parameters a model cannot honour — n > 1, logprobs, seed and others — return a clear 400 instead of being ignored.
Try it before
you write it.
The Playground sends a real request through the gateway with your project’s key: the same route, price, limits and ledger. You see the output as it streams, then its usage, latency and exact charge — and the snippet that reproduces it.
Open Playground- Tokens
- 18 → 12
- Latency
- 640 ms
- Charge
- ₹0.0009
What to install, honestly.
| Client | Status | Endpoints | Guide |
|---|---|---|---|
OpenAI-compatible clientofficial openai SDKs for Python and Node.js | Supported | /v1/chat/completions · /v1/responses · /v1/embeddings · /v1/models | OpenAI SDK |
Anthropic-compatible clientofficial anthropic SDKs and Claude Code | Supported | /v1/messages · /v1/messages/count_tokens | Anthropic SDK |
| Top Billing APIany HTTP client, cURL, fetch | Supported | all /v1 endpoints | cURL |
| Official Top Billing SDK | Not available | — | Use the clients above |
Top Billing CLInpx @topbilling/cli — sets up Claude Code, Codex, OpenCode, Continue, Zed and Aider | Supported | — | CLI |
| Community integrations | None listed | — | — |