Connect Cline to Claude, GPT and GLM models
Cline is an open-source coding agent for VS Code and other editors. Its OpenAI Compatible provider accepts a custom base URL, so one relay.fast key gives it Claude, GPT, GLM, Kimi and DeepSeek models.
Manual setup
- Create a relay.fast account and an API key for this machine.
- Open the Cline settings and choose the OpenAI Compatible API provider.
- Set Base URL to
https://relay.fast/v1and paste the key into API Key. - Enter the Model ID exactly as the catalog lists it, for example
claude-sonnet-5-5orglm-5.3. - Run a small task in a test repository and check its usage in the dashboard.
One-command setup
The script configures Cline for relay.fast. It adds an OpenAI Compatible provider with a model your key can use. It asks for the API key inside the script, so the key never appears in the command or shell history. Every downloaded file is checked against a published SHA-256 checksum, and running it again can restore the previous settings.
Windows (PowerShell):
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://relay.fast/downloads/setup/install-cline-en.ps1 | iex"macOS and Linux:
curl -fsSL https://relay.fast/downloads/setup/install-cline-en.sh | bashYou can read the script before running it by opening the same URL in a browser.
Keep agent costs under control
A coding agent sends the conversation, file contents and tool results with every step, so input tokens make up most of the bill. Use a mid-priced model for routine edits and a frontier model for hard tasks, prefer models with a cache-read price for long sessions, and keep auto-approve limits low until you know what a typical task costs. Current prices are in the live pricing catalog.
Troubleshooting
- 401 or invalid key: the key is wrong, revoked, or pasted with spaces. Create a new key and paste it again.
- 404 or model not found: the base URL must end with
/v1and the model ID must match the catalog exactly. - Context length errors: the task is larger than the model's context window. Start a new task or pick a model with a larger window.
Current prices of models for coding agents
Prices checked from the live catalog. "From" is the lowest price among the relay.fast sources that currently serve the model. The price you pay depends on the source your request uses and can change on any day. The pricing page always shows current values.
| Model | Model ID | Official input / output per 1M tokens | relay.fast from, input / output | Cache read from | Context |
|---|---|---|---|---|---|
| Claude Sonnet 5.5 | claude-sonnet-5-5 | $2 / $10 | $0.238 / $1.19 (−88%) | $0.0238 | 1M |
| Claude Opus 5.5 | claude-opus-5-5 | $4 / $20 | $0.111 / $0.556 (−97%) | $0.00556 | 1M |
| GPT-6.1 Sol requests above 272K input tokens cost more | gpt-6.1-sol | $2 / $10 | $0.03 / $0.15 (−98%) | $0.0015 | 1.05M |
| GLM-5.3 | glm-5.3 | $1.4 / $4.4 | $0.035 / $0.11 (−97%) | $0.0065 | 1M |
| Kimi K3 | kimi-k3 | $3 / $15 | $0.15 / $0.75 (−95%) | $0.015 | 1.05M |
| DeepSeek V4.1 Flash price depends on the time of day; the peak-hours price is shown | deepseek-v4.1-flash | $0.3 / $1.2 | $0.03 / $0.12 (−90%) | $0.0006 | 1M |
Frequently asked questions
Which Cline provider should I choose?
OpenAI Compatible, with the base URL https://relay.fast/v1, a relay.fast API key and a model ID from the catalog.
Can Cline use Claude models through relay.fast?
Yes. Claude models are served through the same OpenAI-compatible endpoint. Enter the Claude model ID, for example claude-sonnet-5-5.
Where does Cline keep the API key?
In its own providers.json settings file, as it does for every provider. Use a separate key per machine and revoke it when the machine is no longer yours.