Claude Code is one of the best agentic coding tools available right now. It runs in your terminal, reads your entire repo, writes and runs commands, and iterates on its own output. If you haven't tried it, the experience of watching it navigate a large codebase and fix a multi-file bug without hand-holding is genuinely different from using a chat interface.
The problem for Indian developers: Anthropic only accepts international credit cards. No UPI, no domestic debit card, no net banking. The billing page has blocked thousands of developers who'd otherwise be using it today.
There's a clean workaround. Use AICredits.in as your API backend — pay in ₹ via UPI, get a standard API key, and point Claude Code at that endpoint instead of Anthropic's servers directly.
What is Claude Code and why do Indian developers want it?
Claude Code is Anthropic's terminal-based agentic coding tool. Unlike Cursor or GitHub Copilot (which sit inside an IDE), Claude Code runs as a CLI command. You invoke it from your project root, describe what you want, and it:
- Reads your full repository (up to 200K tokens of context)
- Writes, edits, and creates files
- Executes terminal commands (tests, builds, linters)
- Reads command output and adjusts its approach
- Loops until the task is done or it needs your input
For tasks like "add Razorpay webhook verification to the existing Express app" or "refactor this module to use async/await throughout," it's faster than most developers working manually.
The billing problem
Anthropic offers two ways to use Claude Code:
- claude.ai Pro subscription — $20/month, requires a dollar-denominated card
- API credits — pay-as-you-go, also requires an international card
Indian debit cards with international transactions enabled sometimes work, sometimes don't. Domestic credit cards almost never work. Virtual Visa cards from platforms like Niyo or FI sometimes go through but are inconsistent. Even when a payment succeeds, Anthropic occasionally reverses it during a fraud review.
The root cause: Anthropic uses Stripe, and Stripe's fraud models flag many Indian billing addresses for high-value recurring charges. It's not personal — it's a blanket policy that catches a lot of legitimate users.
The workaround: Claude Code + AICredits.in
AICredits.in is an OpenAI-compatible API gateway that routes requests to Anthropic (and 6 other providers) and bills you in INR via Razorpay. Every Indian payment method works: UPI, GPay, PhonePe, Paytm, net banking, domestic debit and credit cards.
The key technical detail: Claude Code supports a ANTHROPIC_BASE_URL environment variable that overrides where it sends API requests. AICredits exposes an Anthropic-compatible endpoint at https://api.aicredits.in/v1, so Claude Code talks to AICredits instead of Anthropic's servers directly, using the same request format.
Pricing: AICredits bills at live forex + 5% forex buffer + 5% platform fee — roughly 10-11% over the raw USD price. Claude Sonnet 4.6 (the recommended model for Claude Code) costs $3/M input tokens (~₹252/M via AICredits). Compare this to a Wise card: you'd pay ~4-5% in currency conversion fees plus the same USD rate, and you still need to have gotten a Wise card approved. The AICredits markup is comparable and requires nothing more than a UPI app.
Try it now with AICredits.in
Access Claude, GPT-4o, Gemini, and 300+ models with UPI payment in ₹. No international card needed. Create free account →
Step-by-step setup
Step 1 — Create your AICredits account
- Go to aicredits.in and sign up with your email
- Click "Add Credits" and top up ₹100 via UPI (minimum amount; enough to get started)
- Go to Dashboard → API Keys → Create Key
- Set a budget cap — I suggest ₹500 to start (more on why below)
- Copy the key; it starts with
sk-
Step 2 — Install Claude Code
npm install -g @anthropic-ai/claude-code
Verify the install:
claude --version
You need Node.js 18+ for this. If you're on an older version, use nvm to switch:
nvm install 20
nvm use 20
Step 3 — Point Claude Code at AICredits
Claude Code reads two environment variables to override its default API behavior. Set them in your shell profile (~/.zshrc or ~/.bashrc):
export ANTHROPIC_BASE_URL="https://api.aicredits.in/v1"
export ANTHROPIC_API_KEY="sk-your-aicredits-key"
Then reload:
source ~/.zshrc
Alternatively, if you prefer per-project configuration, create ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.aicredits.in/v1",
"ANTHROPIC_API_KEY": "sk-your-aicredits-key"
}
}
The settings.json approach is useful if you work on a shared machine or want to keep your Claude Code config separate from your shell environment.
Step 4 — Verify it works
Navigate to any project directory and run:
claude "explain the structure of this project in 3 bullet points"
You should see Claude Code read your files and respond within a few seconds. If it works, you're live.
Troubleshooting:
| Error | Cause | Fix |
|---|---|---|
Authentication error | Wrong API key or key not set | Re-export ANTHROPIC_API_KEY and verify it starts with sk- |
Model not found | Model string format issue | Use anthropic/claude-sonnet-4-6 explicitly (see below) |
Insufficient credits | AICredits wallet empty | Top up at aicredits.in dashboard |
| Connection timeout | Network issue | Try curl https://api.aicredits.in/v1/models to test connectivity |
Setting a budget cap
Claude Code uses a lot of tokens. With a 200K context window, a single session on a large codebase can consume 50K–150K tokens depending on how many files it reads and how many iterations it takes. At ₹252/M for Claude Sonnet 4.6 input, a heavy session might cost ₹20–40 in API credits.
That's still very affordable, but if you leave Claude Code running unattended or accidentally kick off a loop, costs can accumulate. Set a per-key budget cap in the AICredits dashboard before you start using it seriously.
A ₹500 cap gives you roughly 15–25 normal coding sessions before you hit the limit. When the key hits the cap, API calls return a rate-limit error and Claude Code stops — no runaway charges. You can always increase the cap or create a new key when you need more.
Which Claude model to use via AICredits
Claude Code defaults to Claude Sonnet 4.6, which is the right choice for most tasks. Here's how the models compare for coding work:
| Model | AICredits string | Input cost | Best for |
|---|---|---|---|
| Claude Sonnet 4.6 | anthropic/claude-sonnet-4-6 | ₹252/M | Default — best balance of quality and speed |
| Claude Haiku 3.5 | anthropic/claude-haiku-3-5-20241022 | ₹67/M | Quick lookups, simple edits, tight budgets |
| Claude Opus 4.6 | anthropic/claude-opus-4-6 | ₹1,260/M | Complex architectural work, very deep reasoning |
To override the model Claude Code uses, set:
export ANTHROPIC_MODEL="anthropic/claude-sonnet-4-6"
Or pass it per-session:
claude --model anthropic/claude-haiku-3-5-20241022 "add comments to this function"
For day-to-day coding, stick with Sonnet 4.6. Use Haiku when you're doing something lightweight and want to conserve credits. Opus when you're tackling something genuinely hard and the higher cost is worth it.
Limitations to know
A few things that work differently compared to a direct Anthropic account:
API gateway, not Anthropic directly. Your requests go through AICredits' infrastructure before reaching Anthropic. This adds ~50–100ms latency compared to direct API calls. For interactive coding sessions, you won't notice. For automated batch processing, it's worth knowing.
claude.ai usage dashboard won't reflect your usage. If you have a claude.ai account, the usage shown there is only for web/app usage — not for API calls routed through AICredits. Your actual usage tracking is in the AICredits dashboard.
Pure API access. Claude Code via API doesn't have access to claude.ai-specific features like Projects or Memory. You're getting the model's capabilities, not the full claude.ai product.
No system-level API features. Some advanced Anthropic API features (batch processing, certain enterprise capabilities) may not be available through the gateway. For standard Claude Code usage, this doesn't matter.
Next steps
Once you have Claude Code running, a few things will help you get significantly more out of it:
- How to write a CLAUDE.md for any project — Claude Code reads this file at startup. A good CLAUDE.md cuts the number of back-and-forth clarifications in half.
- Cursor AI prompt engineering guide — If you're also using Cursor, the prompting patterns transfer well between tools.
- Build your first AI agent — Claude Code's agentic loop is one implementation of a broader pattern. Understanding the fundamentals helps when things go sideways.
- AICredits.in review — Full breakdown of the gateway, pricing, and what to watch for.



