Claude API in Singapore: Get a Key and Set Up Claude Code
Claude models are popular with Singapore developers for coding, long-context analysis and careful writing. Whether you are building a product feature or running Claude Code in your terminal, you need an API key and a way to pay for usage.
TokenSpark gives you a prepaid key that works with Claude through an OpenAI-compatible endpoint and with Claude Code directly. The same key also reaches GPT, DeepSeek, Gemini and Qwen.
Two ways to use Claude through TokenSpark
Pick the route that matches how you work.
- From your own code: use the OpenAI SDK with base_url https://api.tokenspark.app/v1 and a Claude model name.
- In Claude Code: point Claude Code at TokenSpark with two environment variables.
- Both draw from the same prepaid balance, billed per use.
How to get a Claude API key
Top up a prepaid balance and receive your key.
- Open tokenspark.app and choose the Claude API plan or Claude API credit. Prices are shown on the product page.
- Pay with Visa/Mastercard, USDT/USDC, Alipay or WeChat Pay.
- Check your email for a redemption code and your order number.
- Enter the code at /redeem. Due to high order volume, delivery usually takes 1–2 business days.
- Copy your API key into your code or terminal.
Setting up Claude Code
Claude Code reads two environment variables. Note that the base URL here has no /v1 at the end.
- Set ANTHROPIC_BASE_URL to https://api.tokenspark.app
- Set ANTHROPIC_AUTH_TOKEN to your TokenSpark API key.
- Run claude in your project folder.
- To keep the settings, add both variables to your shell profile.
Calling Claude from the OpenAI SDK
If your app already uses the OpenAI SDK, create the client with your TokenSpark key and base_url https://api.tokenspark.app/v1, then set model to a Claude model name from /docs. Switching to GPT or DeepSeek later is just a change of model name.
Quick tests with the TokenSpark CLI
The CLI is handy for checking a key or trying a prompt. It needs Node.js 18 or later.
- Install on macOS or Linux: curl -fsSL https://tokenspark.app/dl/install.sh | sh
- On Windows, run: npx -y https://tokenspark.app/dl/tokenspark-cli.tgz
- Log in: tokenspark login sk-...
- Ask Claude something: tokenspark chat "Explain this error" -m model-name
- Run tokenspark models to find Claude model names and tokenspark balance to check your balance.
Good to know
Usage is billed per call from your prepaid balance, at the rates shown in /docs and on the product page. TokenSpark is not affiliated with Anthropic. Track orders at /track and contact /help for support.
What base URL does Claude Code need?
Set ANTHROPIC_BASE_URL to https://api.tokenspark.app with no /v1, and ANTHROPIC_AUTH_TOKEN to your key.
Can I use Claude with the OpenAI SDK?
Yes. Use base_url https://api.tokenspark.app/v1 and a Claude model name from /docs.
Do I need an Anthropic account?
No. Your TokenSpark key and prepaid balance are all you need.
How long until my key is ready?
Due to high order volume, delivery usually takes 1–2 business days. Track progress at /track.
How is usage billed?
Per use, from your prepaid balance. Rates are listed in /docs and on the product page.