← Practice · August 30, 2026
Setting up access to Kimi, Qwen, DeepSeek, Gemini, and Grok with one key and pay-per-token billing—and calculating what a consultation actually costs.
7 min readtools

A ChatGPT subscription costs a thousand rubles a month. Claude costs the same. And if you also want to ask Kimi, Qwen, DeepSeek, Gemini, and Grok, you need seven subscriptions, and that is no longer “comparing models”—it is a budget item.
There is a third option: OpenRouter—one key that provides access to dozens of models, pay-per-token billing, and no monthly charges. I used it to run an entire season comparing seven neural networks—nine tasks, sixty-three submissions, fifty-seven votes—and spent 22 dollars.
Below is how to set it up and what it actually costs.
A subscription makes sense if you work with a model for many hours every day. Pay-per-use makes sense when requests are infrequent but varied: getting a second opinion, comparing answers from three models, processing a text once, or checking whether anything better than your primary tool has appeared.
A rough estimate: a typical consultation—a question a couple thousand characters long and a four-thousand-character answer—is about a thousand input tokens and fifteen hundred output tokens. With DeepSeek, such an exchange costs about a quarter of a cent. A thousand such questions cost around three dollars. A subscription pays off only if you ask hundreds of them per day.
Register at openrouter.ai, add funds to your balance (the minimum is small—starting at five dollars), and create a key in the Keys section. It looks like sk-or-v1-….
The key is money. Never put it in your code or publish it in articles:
mkdir -p ~/.config/openrouter
printf 'sk-or-v1-your-key\n' > ~/.config/openrouter/key
chmod 600 ~/.config/openrouter/key
Save this as ~/.local/bin/ask-or:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Ask any model through OpenRouter: ask-or <model> "question" (or text via stdin)."""
import json, os, sys, urllib.request
КЛЮЧ = open(os.path.expanduser('~/.config/openrouter/key')).read().strip()
МОДЕЛИ = { # short names, so I do not have to remember the full ones
'kimi': 'moonshotai/kimi-k3',
'qwen': 'qwen/qwen3.8-max',
'deepseek': 'deepseek/deepseek-v4-pro-0813',
'gemini': 'google/gemini-3.7-flash',
'grok': 'x-ai/grok-4.6',
}
имя = sys.argv[1] if len(sys.argv) > 1 else 'deepseek'
вопрос = ' '.join(sys.argv[2:]) or sys.stdin.read()
if not вопрос.strip():
sys.exit('empty question')
запрос = urllib.request.Request(
'https://openrouter.ai/api/v1/chat/completions',
data=json.dumps({
'model': МОДЕЛИ.get(имя, имя),
'messages': [{'role': 'user', 'content': вопрос}],
'max_tokens': 8000,
}).encode(),
headers={
'Authorization': f'Bearer {КЛЮЧ}',
'Content-Type': 'application/json',
'X-Title': 'personal cli', # ASCII only: Cyrillic breaks the header
})
ответ = json.load(urllib.request.urlopen(запрос, timeout=600))
выбор = ответ['choices'][0]
print(выбор['message']['content'])
п = ответ.get('usage', {})
print(f"\n[{ответ.get('model')}: input {п.get('prompt_tokens')}, "
f"output {п.get('completion_tokens')}, reason: {выбор.get('finish_reason')}]",
file=sys.stderr)
chmod +x ~/.local/bin/ask-or
ask-or deepseek "Answer with one word: does it work?"
cat модуль.py | ask-or kimi "find errors in this code"
Usage is printed to stderr, which is convenient: you can redirect the answer to a file while the numbers remain on the screen.
OpenRouter rates at the time of my season, in dollars per million tokens:
| Model | Input | Output |
|---|---|---|
| DeepSeek V4 Pro | 0.66 | 1.98 |
| Gemini 3.7 Flash | 0.75 | 3.75 |
| Qwen 3.8 Max | 2.00 | 6.00 |
| Grok 4.6 | 2.00 | 6.00 |
| Kimi K3 | 3.00 | 15.00 |
The difference between the extremes is more than sevenfold for output. And here is what matters: more expensive does not mean better for your task. In my comparison, Kimi cost almost eight times as much as GPT and scored only sixteen more points out of a possible two hundred and seventy.
Another trap is “reasoning” models. They spend tokens on reasoning that you do not see but still pay for. During my season, DeepSeek burned 313 thousand tokens on one logic task and did worse than a model that spent a thousand. So look not at the price per million tokens, but at the price per answer.
You can check your remaining balance at any time:
curl -s -H "Authorization: Bearer $(cat ~/.config/openrouter/key)" \
https://openrouter.ai/api/v1/key | python3 -m json.tool
Cyrillic in HTTP headers. An X-Title header containing Russian text causes the request to fail: the library cannot encode it as Latin-1. Use ASCII only.
Hitting the token limit looks like a complete answer. If finish_reason comes back as length, the answer was cut off mid-word—the model did not finish. Because of this, one participant in my comparison submitted truncated work and finished last until I raised the limit. Always check this field.
An empty answer with nonzero usage. Some models manage to spend the entire limit on internal reasoning and return an empty content field. Formally a success, effectively nothing. Handle this case separately, or you will get empty output with no idea what happened.
Not all models can see images. You can send an image only to models with vision; the rest need a text description. Check this in advance, not after receiving a strange answer.
Models change and disappear. Identifiers such as moonshotai/kimi-k3 do not last forever: versions are updated and old ones are retired. Keep the model list in one place—as in the dictionary above—so an update requires changing one line.
The most useful application is not to “replace your primary model,” but to get different opinions. You can give the same task to three models at once and see where they disagree: disagreement almost always points to genuine ambiguity rather than an error by one of them.
for м in deepseek qwen gemini; do
echo "=== $м"; cat вопрос.txt | ask-or $м
done
Three answers from a batch like this will cost a few cents—less than half an hour of your own second-guessing.