Anthropic Messages API
An Anthropic-Compatible API, Billed in ₹
Keep the Anthropic SDK and change the base URL. Messages API with tools, streaming, images and prompt caching, charged to a prepaid rupee wallet.
# Two settings change in your existing code
base_url = "https://api.aicredits.in/v1" api_key = "sk-your-aicredits-key"
- No international card needed
- Minimum ₹50 top-up
- Credits valid 1 year
Two base URLs, one account
- Anthropic SDK and Claude Code: https://api.aicredits.in
- OpenAI SDK and OpenAI-format tools: https://api.aicredits.in/v1
- The same key, wallet and usage log for both
Native format for Claude models
Requests to Claude models are forwarded in Anthropic's own format, so Anthropic parameters reach the model unchanged. You do not have to rewrite Messages API code into the OpenAI format to pay in rupees.
Claude prices in ₹ per 1M tokens
Read from the live catalog, in rupees.
| Model | Input / 1M tokens | Output / 1M tokens | Provider |
|---|---|---|---|
| Claude Opus 5.5 | ₹390.13 | ₹1,950.67 | anthropic |
| Claude Sonnet 5.5 | ₹195.07 | ₹975.34 | anthropic |
| Claude Haiku 5.5 | ₹9.75 | ₹48.77 | anthropic |
| Claude Fable 5.2 | ₹780.27 | ₹3,901.34 | anthropic |
Prices are read from the live catalog and include the 5% forex buffer and the default 5% markup. They change with the live USD/INR rate.
What you get
OpenAI-compatible
Drop-in endpoint for chat, embeddings, and images. No SDK changes needed.
Automatic failover
If a provider errors or rate-limits you, we retry on the next available route.
INR wallet
Prepaid wallet in ₹. Top up via UPI, Net Banking, or Debit Card.
Budget controls
Per-key rate limits and spend budgets. Prevent runaway costs.
Run your first request
- 1Create an account and an API keySign up with your email. Creating the account and the key is free and needs no card.
- 2Add ₹50 or morePay by UPI, net banking or a card through Razorpay. The balance shows in your wallet in rupees.
- 3Copy the code and run itPut the key in AICREDITS_API_KEY. The cost of the request is deducted from the wallet and listed in your usage log.
# pip install anthropic
import os
import anthropic
client = anthropic.Anthropic(
base_url="https://api.aicredits.in",
api_key=os.environ["AICREDITS_API_KEY"],
)
message = client.messages.create(
model="anthropic/claude-sonnet-5.5",
max_tokens=300,
messages=[{"role": "user", "content": "Say hello"}],
)
print(message.content[0].text)Model IDs are written as provider/model. The full list is in the model catalog.
Frequently asked questions
What is an Anthropic-compatible API?
An endpoint that accepts requests in Anthropic's Messages API format, so tools and code written for the Anthropic SDK work by changing the base URL and the key. AICredits serves it at POST /v1/messages.
What base URL do I use with the Anthropic SDK?
https://api.aicredits.in, without /v1. The Anthropic SDK adds /v1/messages itself. OpenAI-format clients use https://api.aicredits.in/v1 instead.
Which Messages API features are supported?
System prompts, sampling parameters, tools and tool_choice, image inputs, extended thinking, prompt caching and streaming. The Messages API reference lists the request fields and the limits.
Can I call non-Claude models with the Anthropic SDK?
Yes. Put any model ID from the catalog in the model field. Claude models are passed through in native format; requests to other models are converted to their format and the answer is converted back.
Does it work with Claude Code and other Anthropic-format tools?
Yes. Claude Code uses the Messages API, so it works by setting ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. Other tools that let you set an Anthropic base URL work the same way.
How is it billed?
Per token from a prepaid rupee wallet, the same as every other endpoint. Top up from ₹50 by UPI, net banking or a card, with a GST invoice for each top-up.
Get an API key and make a first call.
Create your account, top up via UPI, and make your first API call. No international card needed.