Disclosure: I run Ezkielyna, the gateway used in the examples. Everything below works with any provider that speaks the OpenAI or Anthropic format; swap the base URL and key.
A lot of developers outside the US and EU hit the same wall: the tools are free or open source, but the model APIs want an international credit card and bill in dollars. In Indonesia, where I work, most people pay with QRIS (a national QR standard every bank and e-wallet supports), not cards.
The good news is that almost every AI tool lets you change the API server. You need exactly three values:
| Value | OpenAI format | Anthropic format |
|---|---|---|
| Base URL | https://api.ezkielyna.store/v1 |
https://api.ezkielyna.store (no /v1) |
| API key | sk-... |
same key |
| Model | e.g. deepseek-v4.1-flash
|
same names |
The examples use Ezkielyna API, which you can top up from $0.50 with QRIS, USDT or Binance Pay. Copy-paste code for every tool below is in this repo.
Test the key first
curl https://api.ezkielyna.store/v1/chat/completions \
-H "Authorization: Bearer $EZKIELYNA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"say ok"}]}'
If this fails, no tool will work either. 401 means a wrong key or an empty balance; 404 almost always means the /v1 part is wrong.
Claude Code (Anthropic format)
Claude Code appends /v1/messages itself, so the base URL has no /v1. Set the three DEFAULT_* variables too, otherwise background calls still ask for Claude model names.
export ANTHROPIC_BASE_URL="https://api.ezkielyna.store"
export ANTHROPIC_AUTH_TOKEN="sk-..."
export ANTHROPIC_MODEL="deepseek-v4.1-flash"
export ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4.1-flash"
export ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4.1-flash"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4.1-flash"
claude -p "Reply with one word: ready"
On Windows, put the same values in the env block of %USERPROFILE%\.claude\settings.json.
Cline, Roo Code, Kilo Code
Provider OpenAI Compatible, base URL https://api.ezkielyna.store/v1, your key, model ID deepseek-v4.1-flash. Agents resend the whole conversation on every step, so start a new task when you change topics. It is the single biggest cost saver.
Cursor
Settings ‚Üí Models ‚Üí OpenAI API Key, turn on Override OpenAI Base URL (https://api.ezkielyna.store/v1), click Verify, then Add model with the exact name. Your key is used for chat and agent with the models you add; Tab completion stays on Cursor's own service.
n8n
Credentials ‚Üí OpenAI ‚Üí API Key + Base URL (.../v1). Any OpenAI Chat Model or AI Agent node can then use it. There is an importable HTTP Request workflow in the repo.
Open WebUI
docker run -d -p 3000:8080 \
-e OPENAI_API_BASE_URL=https://api.ezkielyna.store/v1 \
-e OPENAI_API_KEY=sk-... \
-v open-webui:/app/backend/data \
--name open-webui ghcr.io/open-webui/open-webui:main
Prefer an open-source terminal agent?
Ezkielyna Agent is our MIT fork of OpenCode, preconfigured for this gateway: it lists the models your key can use, has an optional "Auto" router that picks a light or heavy model per message with a per-session cost cap, and keeps the key in the OS keychain. It is beta, and macOS on Apple Silicon is the only platform we use daily; Linux and Windows reports are welcome. Plain OpenCode works too: add an OpenAI-compatible provider with the same base URL.
Keeping the bill small
- Prompt caching is your friend: keep the long, stable part of the prompt (system prompt, docs) at the start, and the gateway bills cached input at a fraction of the normal price.
- Use a flash model for routine work (tests, refactors, summaries) and switch to a bigger model only for planning.
- Watch the per-request log (input, cached, output tokens and cost). It shows within minutes which tool or step is burning tokens.
Live per-token prices: api.ezkielyna.store/pricing. Questions or a tool I missed? Leave a comment.
Top comments (0)