How to Buy AI API Tokens for Coding Agents on Ruvicode
Pay as you go for Claude, GPT, DeepSeek, GLM and more with one API key. Top-ups, per-token pricing, and setup for Cursor, Cline, OpenCode and Aider.
Ruvicode sells pay-as-you-go access to AI models through one OpenAI-compatible API. You top up a wallet, every request is billed per token at the model's live rate, and the same rvcd_ key works with Claude, GPT, Gemini, DeepSeek, GLM, Kimi, Qwen and the rest of the model catalog. Point your coding tool at https://api.ruvicode.com/v1 and you are done.
This guide covers what you actually pay for, the ways to top up, which models people use, and how to connect the coding tools that matter.
The short version
| How it works on Ruvicode | |
|---|---|
| Billing | Per request, per token, in USD. No subscription, no monthly fee |
| Top-up | USDC on Base, QRIS in Rupiah, or the Telegram bot |
| Minimum | $0.01 in USDC, Rp10.000 by QRIS |
| Balance | Never expires. 30-day money-back guarantee on what is left |
| API | OpenAI-compatible, base URL https://api.ruvicode.com/v1 |
| Models | Claude, GPT, Gemini, DeepSeek, GLM, Kimi, Qwen, MiniMax, Grok and more |
| Cost per request | Reported in usage.cost on every billed response |
What you are paying for
You pay for tokens. Every chat model has an input and an output rate per million tokens, and most also list a cheaper cached input rate. A request costs its token counts times those rates, and the amount comes straight out of your wallet. There are no credits to convert, so the rate on a model page is the rate you pay.
Rates follow the provider market and refresh continuously. Each model page shows the official provider list price next to our rate, so you can compare the two yourself instead of taking our word for it. The site can show prices in USD or Rupiah with the currency switch in the header. Your wallet balance itself is kept in USD.
For coding agents, the cached input rate matters more than the headline input rate. An agent resends the whole conversation on every tool call, so most of each prompt is a prefix the model has already seen. In October 2026, on the three most requested models on Ruvicode, more than 80 percent of all prompt tokens were served from cache. Those tokens bill at the cache read rate, automatically. Prompt caching for AI agents explains how it works in detail.
How to top up
USDC on Base. Your dashboard shows a deposit address unique to your account. Deposits start at $0.01 and are credited automatically after on-chain confirmation.
QRIS in Rupiah. On the top-up page, pick an amount and scan the QR code with any bank or e-wallet app that supports QRIS. You see the exchange rate before you pay, and the balance lands as soon as the payment clears. One payment can be anywhere from Rp10.000 to Rp1.000.000.
Telegram. Connect your account to the Ruvicode Telegram bot in Settings and you can top up from a chat.
Balance never expires and there is no fee for holding it. If you change your mind, the refund policy gives you 30 days to get the unused part back.
Which models to start with
The models catalog lists every model with its context window, its maximum output, and what it can do (vision, tools, reasoning). As a starting point, these were the most requested models on Ruvicode in October 2026:
- DeepSeek V4.1 Flash
- DeepSeek V4 Flash
- DeepSeek V4.1 Flash Uncensored
- GPT-5.6 Luna
- GPT-6 Luna
A common pattern is a fast, cheap model for routine agent turns and a larger one such as Claude Opus 5.5, GPT-6.1 Sol, DeepSeek V4 Pro or Kimi K3.1 Pro when a task gets hard. Both run on the same key, so switching is a change of model id and nothing else.
One thing to watch with reasoning models: their thinking counts against max_tokens. A small budget can be spent entirely on reasoning and come back as an empty answer. Reasoning model returns empty content shows what that looks like and how to avoid it.
Connect your coding tool
Every tool needs the same three things: the base URL https://api.ruvicode.com/v1, your rvcd_ key, and a model id from the catalog.
| Tool | Where to set it | Notes |
|---|---|---|
| Cursor | Settings, Models, Override OpenAI Base URL | Add model ids with Add Model, then Verify |
| Cline | Settings, API Provider: OpenAI Compatible | Paste base URL, key, and model id |
| Roo Code, Continue | OpenAI-compatible provider settings | Same three values |
| OpenCode | opencode.json, custom provider | List the models you want explicitly |
| Aider | OPENAI_API_BASE and OPENAI_API_KEY | Run with --model openai/<model-id> |
| Hermes Agent | config.yaml, provider custom | Key goes in the Hermes .env as MODEL_API_KEY |
| OpenClaw | models.providers block | Use api: "openai-completions" |
| OpenAI SDK, LangChain | base_url parameter | Works with the official SDKs as is |
For Aider, two environment variables are enough:
export OPENAI_API_BASE=https://api.ruvicode.com/v1
export OPENAI_API_KEY=rvcd_...
aider --model openai/glm-5.2OpenCode does not fetch model lists from custom providers yet, so name the models you want in opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"ruvicode": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ruvicode",
"options": {
"baseURL": "https://api.ruvicode.com/v1",
"apiKey": "rvcd_..."
},
"models": {
"glm-5.2": { "name": "GLM 5.2", "limit": { "context": 1000000, "output": 128000 } },
"deepseek-v4-flash": { "name": "DeepSeek V4 Flash", "limit": { "context": 1048576, "output": 384000 } }
}
}
}
}The integrations page has step-by-step setup for each tool.
Agents depend on tool calling, so we checked that path while writing this. We streamed a request with a read_file tool through the API, got the tool call back with its arguments intact, then sent the tool result in a second turn and got the model's answer. Tool calls and tool results pass through unchanged, which is all an agent loop needs.
What about Claude Code?
Claude Code does not connect to Ruvicode directly. It talks to the Anthropic /v1/messages endpoint, and Ruvicode serves the OpenAI-compatible /v1/chat/completions endpoint. 9router, a free router that runs on your machine, translates between the two, and the Claude Code guide walks through the setup. We ran Claude Code through it on GLM 5.3 Flash and Claude Sonnet 5.5. OpenAI-compatible agents such as OpenCode and Cline need no router at all.
Keep spending under control
Agents can run for a long time without anyone watching, so set limits before you hand one a key.
- Spend limits per key. Give each key a daily and a monthly cap. Once a key reaches its limit, new requests are refused before they reach a model.
- Model allow-lists. Restrict a key to the models it should use, so an agent cannot switch itself to an expensive one.
- Per-request cost. Every billed response reports its charge in
usage.cost, and non-streaming responses also send it as anX-Costheader. - Usage history. The dashboard shows every request with its tokens, its cost, and how much of the prompt came from cache, and you can export it.
When a provider is busy
Behind each model sit one or more providers. When the capacity behind a listed rate is busy, the request is rerouted instead of failing. A rerouted request can cost more than the listed rate when the other provider is more expensive. The pricing docs spell out exactly how such a request is billed, and the exact charge is always in usage.cost.
Flat-rate and free options
Unlimited Pass. One flat price for unlimited use of a chat model for 6 hours to 7 days, with no per-token charges while it runs. It suits a long agent session on one model. Passes are non-refundable. See Unlimited Pass.
Free community key. The Ruvicode treasury earns interest, and that interest pays for a shared key posted in our Discord each day. It has a small daily budget on fast models and a limit of 10 requests per minute, which is enough to try the API before you top up. Details are on the free API key page.
Getting started
- Create an account.
- Top up with USDC or QRIS.
- Create an API key in the dashboard, with a spend limit if an agent will use it.
- Set the base URL to
https://api.ruvicode.com/v1in your tool and pick a model from the catalog.
If a request does something you do not expect, the response headers carry an X-Ruvicode-Request-ID. Send it to us through the contact page and we can trace that exact request.
Frequently asked questions
- Do I need a subscription to use Ruvicode?
- No. You top up a wallet and pay per request at the model's live per-token rate. There is no monthly fee, and an unused balance does not expire.
- How do I pay for AI API tokens on Ruvicode?
- With USDC on Base, sent to a deposit address unique to your account, or with QRIS in Rupiah from any bank or e-wallet app on the top-up page. Both credit your wallet automatically. You can also top up from the Ruvicode Telegram bot after connecting your account in Settings.
- What is the minimum top-up?
- USDC deposits start at $0.01. A single QRIS payment can be anywhere from Rp10.000 to Rp1.000.000, and you can pay more than once.
- Which coding tools work with Ruvicode?
- Any tool that speaks the OpenAI chat completions format, including Cursor, Cline, Roo Code, Continue, OpenCode, Aider, Hermes Agent and OpenClaw, as well as the OpenAI SDKs and LangChain. Set the base URL to https://api.ruvicode.com/v1 and use your rvcd_ key as the API key.
- Does Ruvicode work with Claude Code?
- Yes, through 9router. Claude Code talks to the Anthropic /v1/messages endpoint, while Ruvicode serves the OpenAI-compatible /v1/chat/completions endpoint. 9router, a free local router, translates between the two. OpenAI-compatible agents such as OpenCode and Cline connect directly.
- How do I see what each request cost?
- Every billed response carries its exact charge in usage.cost, in USD. Non-streaming responses also send it in an X-Cost header, and your dashboard usage history shows the same figure for every request.
- Can I cap how much an API key spends?
- Yes. Each key can have a daily and a monthly spend limit, and you can restrict a key to a list of models. Once a key reaches its limit, new requests are refused before they reach a model.
- Are cached prompt tokens cheaper?
- On most models, yes, and each model page lists the cached input rate next to the input rate. Caching is automatic: when a request repeats a prompt prefix that was already processed, that part is billed at the cache read rate instead of the full input rate.
- Can I get a refund on an unused balance?
- Yes. Wallet top-ups have a 30-day money-back guarantee on the remaining balance, refunded in the same form you paid. Requests that were already served are not refundable, and Unlimited Pass purchases are non-refundable.
- Is there a free way to try it?
- Yes. A shared community key, paid for by the interest the Ruvicode treasury earns, is posted in the Ruvicode Discord every day. It has a small daily budget on fast models and a limit of 10 requests per minute.