$2 Budget: Connect a VS Code Assistant
01 / Plan around $2 before connecting your editor
Start with a $2 spending budget and one small coding task. That is a planning example, not a quoted CheapRelay top-up minimum or a promise about how many requests you can make. Check the available payment amounts and current model rates before adding credit. If the minimum exceeds your budget, stop there.
A VS Code assistant has two separate parts: the extension inside your editor and the API that generates responses. An extension that accepts an OpenAI-compatible base URL can send requests to a relay instead of its default provider. You supply the endpoint, an API key, and a model ID.
CheapRelay offers pay-as-you-go access through one key, with no monthly fee or subscription. Billing follows actual token usage, including cache reads and writes. That makes a small experiment possible, but your account balance still needs watching.
02 / Choose an extension with custom endpoint settings
For a concrete starting point, install Cline from the VS Code Extensions panel and open its provider settings. Choose its OpenAI Compatible provider option. Labels can change between extension releases; the essential fields are the base URL, API key, and model ID.
Before connecting, check whether the extension itself charges for the mode you intend to use. Also check whether it supports the features your task needs through a custom provider. Basic chat compatibility does not guarantee that every model supports tool calls, image input, or every agent feature.
03 / Enter the base URL with the correct path
Sign up for CheapRelay, check its current pricing and funding options, and create an API key if those fit your budget. In the extension, enter these three values:
- ■ Base URL: https://api.cheapapirelay.com/v1
- ■ API key: the key created in your CheapRelay account
- ■ Model ID: the exact API identifier shown in the service’s model listing
The /v1 suffix belongs to the OpenAI-compatible routes. CheapRelay also provides Gemini-native routes under /v1beta, but those are a different interface. For the OpenAI Compatible provider selected here, use the OpenAI-compatible route even when choosing a Gemini model.
Some clients ask for a server address and append /v1 themselves. Follow the field’s instructions so the resulting path contains /v1 only once. Avoid pasting a complete chat-completions endpoint into a field that expects a base URL.
For your first price comparison, inspect the current listing for Gemini 2.5 Flash. Use its published API ID rather than guessing from the display name. Keep your key in the extension’s credential settings and out of source files, shared screenshots, and Git commits.
04 / Test one function before enabling wider access
Open a small project without credentials or private data. Select one short function and ask: “Explain this function in three sentences. Do not edit files or run commands.” Review any requested tool access before approving it.
This checks whether authentication, routing, and the selected model work together. If the request fails, read the error before retrying. An authentication error suggests checking the key; a missing-model error suggests checking the model ID and availability. A missing-route error can indicate an incorrect base path.
Once the explanation works, request one narrow change, such as adding an empty-input check. Inspect the proposed diff and run the relevant local test. Leave automatic command approval disabled while learning the extension.
05 / Measure the first task before spending the next dollar
Check usage after the first completed task. If your $2 planning budget has spent $0.10, $1.90 remains. That subtraction is reliable; predicting a fixed number of future tasks is not. File size, conversation history, output length, retries, and tool loops all affect consumption.
Set a personal checkpoint at $0.50 spent. Review what the assistant accomplished before continuing. Use a provider spending cap if one is available, but do not assume your editor enforces your budget. Keep requests narrow, start fresh conversations for unrelated work, and inspect each task’s usage until the costs become predictable.
Sign up Try the prices yourself, sign-up credit included.
More reading
| Date | Aisle | Written in | Title |
|---|---|---|---|
| 2026-10-28 | Coding agents, cheaply | EN | $1 Budget: Catch a Coding Agent Loop Before It Spends Spot repeated tool calls, rising token use and stalled edits early, then stop and restart a coding agent within a tiny budget. |
| 2026-10-28 | Coding agents, cheaply | EN | $1 Budget: Codex and Claude Code on One Tiny Repo Compare Codex and Claude Code on one tiny Python repo with a $1 planning budget, identical tasks, local tests, and honest cost tracking. |
| 2026-10-28 | Coding agents, cheaply | EN | $0.50 task budget: Claude Code, fewer file reads A beginner workflow for limiting Claude Code's file reads, narrowing searches, and checking token spending on a tiny pay-as-you-go budget. |
| 2026-10-28 | Coding agents, cheaply | EN | Save Tokens: 6 Claude Code Commands for 2026 A practical 2026 guide to /compact, /clear, /context and other Claude Code commands that reduce waste on pay-as-you-go billing. |
| 2026-10-28 | Coding agents, cheaply | EN | 36,000 to 12,000 Tokens: Trim Your Agent's Context A tiny-budget walkthrough for cutting coding-agent context: select files, limit logs, compact history, and check actual token charges. |
| 2026-10-28 | Coding agents, cheaply | EN | $1 Test Budget, 2 Variables: Claude Code on a Relay Connect Claude Code to CheapRelay with two environment variables, then run a small test and check token charges before spending more. |