How to pay for an AI coding API from India with UPI (Claude Code, Codex, Cursor)
Disclosure: I run ScaleMax, which is one of the options below. I've tried to make this useful even if you never use it. If you've tried to buy API credit for a coding agent from India, you've probably hit the same wall
Disclosure: I run ScaleMax, which is one of the options below. I've tried to make this useful even if you never use it.
If you've tried to buy API credit for a coding agent from India, you've probably hit the same wall I did. At the time of writing, the big model providers' API consoles sell prepaid credit in US dollars, to a card. UPI and net banking aren't offered for API credit. (Some providers show rupee prices for their chat subscriptions, but that's a different product from API credit.) Check each provider's billing page, because this changes.
So what are your options?
Option 1: an international card
If you have a credit card with international transactions switched on, this is the most direct route. You get first-party terms and new features on day one.
Things to watch:
- Turn on international / online transactions in your bank app first. Most declines are this.
- Your bank adds a foreign-currency markup, plus GST on that markup. Look up your card's rate.
Option 2: a prepaid gateway that bills in rupees
A gateway sells you credit in rupees and relays your requests to the models. You change one base URL in your tool and keep working.
What to check before trusting any gateway with your traffic:
-
Which endpoints does it speak? You want OpenAI-compatible
/v1for most tools, and the Anthropic Messages API if you use Claude Code. - Can you see every request? Tokens and cost per call, not just a balance.
- How is cached input billed? Some gateways bill cached tokens at the full input rate, others at a discount. It matters for agents that resend a large context on every step.
- Refunds and status page. Is there a published policy and incident history?
Example: setting it up with ScaleMax
ScaleMax checks out in rupees by UPI, Indian cards or net banking, at a fixed โน100 = $1, with no payment fee. New accounts get $2 of trial credit without a card.
Fastest: run the installer and pick your tool. It backs up existing config files:
npx scalemax@latest
Manual: OpenAI-style tools (Codex, Cursor, Cline, Continue, Aider, Zed)
Base URL: https://api.scalemax.pro/v1
API key: your key
Model: an exact ID, e.g. gpt-6.2-sol or gpt-6-luna
Manual: Claude Code (Anthropic Messages endpoint, no /v1)
export ANTHROPIC_BASE_URL="https://api.scalemax.pro"
export ANTHROPIC_AUTH_TOKEN="YOUR_KEY"
export ANTHROPIC_MODEL="gpt-6.2-sol"
claude
Claude Code accepts any model ID your key includes on this endpoint. Tool-use quality varies by model, so run a small task first.
Check what your key can call:
curl https://api.scalemax.pro/v1/models -H "Authorization: Bearer YOUR_KEY"
What it costs in rupees
Credit is charged at each model's published per-1M-token rate. Packs add bonus credit. As of writing, โน1,000 buys $105 of credit, so $1 of credit costs about โน9.52.
One coding-agent step with 30,000 input tokens and 2,000 output tokens:
| Model | Rate per 1M (in / out) | Credit used | โ Rupees (โน1,000 pack) |
|---|---|---|---|
| GPT-6.2 Sol | $2 / $10 | $0.080 | โน0.76 |
| GPT-6.1 Terra | $1 / $5 | $0.040 | โน0.38 |
| GPT-6 Luna | $0.10 / $0.50 | $0.004 | โน0.04 |
These are the GPT models a pay-as-you-go key covers. DeepSeek, GLM, Kimi and Grok models are sold on a separate token pack with its own key, also priced in rupees (see the pricing link below).
Agents resend context on every step. Cache reads can bill below the input rate on models that support caching, so the real figure is often lower. Multiply by your real step count, and watch the per-request log for the first day.
Which option should you pick?
- You have an international card and want first-party terms: go direct.
- You pay by UPI, or want one key across several model families and tools: a rupee-billing gateway is simpler.
Either way, keep keys out of your repo and your prompts, and set a small budget first.
Disclosure again: I run ScaleMax. Pricing and model list: https://scalemax.pro/india
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.