Back to blog

Getting startedGuide

Where to plug in your own API key: chat, editor, terminal, code

You have an OpenAI-compatible API key. Pick the tool by task, from a browser chat to a terminal agent, and follow the matching connection guide.

By CheapTokens TeamPublished Updated 5 min read

Cover: where to plug in your own API key, a flow from task to tool to key
On this page
  1. The three things every tool asks for
  2. Pick by task
  3. If you are new: start with a chat
  4. If you code: editor or terminal?
  5. If you write code: skip the tools
  6. What it costs to try
  7. If it does not work
  8. Where to look for more tools

Paste the key into whatever matches your task: a browser chat (Open WebUI) if you just want to talk to a model, an editor extension (Cline, Kilo Code) if you code in VS Code, a terminal tool (Aider, OpenCode) if you live in the shell, or a ten-line script if you are building something yourself. All of them take the same three things: an address, a key and a model id.

You topped up the balance, got the key, and now there is a text field somewhere asking for it. Which field? That depends on what you want to do next, so start there.

The three things every tool asks for#

Whatever the tool looks like, the settings screen wants the same trio:

  • Base URL: https://api.cheaptokens.dev/v1 (the tool talks to this address instead of the default one). If the word is new, what base_url is and how to switch takes three minutes.
  • API key: the secret string from your account. Treat it like a password; how to store it safely.
  • Model id: the full name, for example deepseek-ai/DeepSeek-V4-Flash-0731. Short nicknames from price tables are not accepted by the API, so copy the full id from the docs.

The CheapTokens API speaks OpenAI Chat Completions and Anthropic Messages, so tools that let you set a custom base URL for either family can connect, and the guides below cover them. One balance covers every model.

Settings fields before and after: default Base URL and short model name replaced by the CheapTokens address and full model id
What changes in a tool's settings

Pick by task#

Ask yourself what you want to see on the screen five minutes from now.

You want to... Tool class Start with Guide
Chat with a model in a browser Chat UI Open WebUI connect Open WebUI
Have an assistant inside your editor Editor extension Cline or Kilo Code Cline, Kilo Code
Edit a repo from the shell Terminal tool Aider or OpenCode Aider, OpenCode
Keep using an editor or CLI you already know Existing tool Cursor or Claude Code Cursor, Claude Code
Use an agent framework Agent tool Hermes Agent or OpenClaw Hermes, OpenClaw
Build your own thing Your code A plain request first request

A quick note on Claude Code: it uses the Anthropic format, so its address is https://api.cheaptokens.dev without /v1. Its guide has the exact variables.

If you are new: start with a chat#

Say you have never touched an API and just want to check that the key works. Open WebUI is the gentlest start: it looks like the chat you already know, and your key sits in one settings field. Ask it something small, see the answer, and you have proof that balance, key and model are wired up. Then move on to the editor or terminal when you need it.

For a chat like this, MiniMax-M2.7 (180K context, up to 8,192 output tokens per answer) is a light option for short, frequent questions.

If you code: editor or terminal?#

This is mostly a question of where your hands already are.

In VS Code, Cline and Kilo Code are extensions that sit in a side panel and work on your project files. You open the provider settings, choose an OpenAI-compatible provider, and paste the three values from above.

In the shell, Aider and OpenCode work on your repo from the terminal. OpenCode is configured with an opencode.json file, Aider through environment variables or a config; both guides show the exact lines.

For these tools the model matters more than the interface, because an agent loop can run for many steps. DeepSeek-V4-Flash (380K context, up to 32,768 output tokens per answer, one price at any hour with no peak pricing) is a good default here: there is room for long edits.

If you write code: skip the tools#

The shortest route is no tool at all. Set the key in an environment variable and send one request:

bash
export CHEAPTOKENS_API_KEY="sk-your-key"

curl https://api.cheaptokens.dev/v1/chat/completions \
  -H "Authorization: Bearer $CHEAPTOKENS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-ai/DeepSeek-V4-Flash-0731", "messages": [{"role": "user", "content": "Say hi in five words"}]}'

The reply is a JSON object: the text is in choices[0].message.content, and the usage field shows how many input and output tokens the request used. The same call in Python, Node and streaming form is in your first request.

What it costs to try#

A chat message or an editor request is small. Take a typical one: 2,000 tokens in (your question plus the files or history the tool sends) and 500 tokens out, 100 times. Here is the live table:

Model Per request 100 requests OpenRouter, 100 requests
GLM-5.3-Flash $0.00006 $0.006 $0.0121
DeepSeek-V4-Flash $0.00008 $0.008 $0.0173
MiniMax-M2.7 $0.00018 $0.0175 $0.12

2,000 input and 500 output tokens per request. Prices per 1M tokens are current and change together with our tariffs; the OpenRouter column shows reference prices for the same workload.

One such request on MiniMax-M2.7 costs $0.00018. For this workload it is cheaper than OpenRouter in total, with input and output counted together. Prices are fixed per model, with no peak hours; the whole price list is on the pricing page.

GLM-5.3-Flash is also available in the same tools (390K context, up to 8,192 output tokens, and a lower output price than OpenRouter), so you can switch models in the settings by changing only the model id (take the full id from the docs).

If it does not work#

Most first-run failures come from three places:

  • The tool still talks to the default address. Check that the base URL field holds https://api.cheaptokens.dev/v1 and that you did not paste it into a field meant for something else.
  • The model id is the short nickname. Use the full deepseek-ai/DeepSeek-V4-Flash-0731 form.
  • The key has a stray space or newline from copying. Paste it again.

For error texts such as 401 or 429, see common connection errors.

Where to look for more tools#

There are far more tools than the ones above. The community catalog Awesome AI DevTools RU (checked 23 October 2026) lists 281 tools in 20 categories with labels such as BYOK (bring your own key), MCP, local models and open source, so it is a handy place to browse. Before you pick a tool from it, open that tool's own documentation and look for a custom base URL or an OpenAI-compatible provider setting: that is what lets it work with your key.

Ready to start? Open the docs, copy the base URL and model id, and pick the row of the table that matches your task.