Docs
Roo Code setup: OpenAI Compatible provider configuration
Point Roo Code's OpenAI Compatible provider at our gateway with a base URL, API key and model id. Also covers the extension's end of development.
On this page
https://api.oneaiapikey.com/v1Roo Code is a VS Code agent with modes such as Code, Architect, Ask and Debug. Like the tool it was forked from, it can talk to any OpenAI-compatible service, so it works with our gateway using one key for every model.
Heads up: Roo Code is no longer developed. Its maintainers shut the extension down on May 15, 2026. The final release keeps working, and the setup below still applies to it, but it won’t receive fixes or new features. If you’re starting fresh, consider Cline or Kilo Code, which configure the same way and are actively maintained.
What you need
- VS Code with the final Roo Code release installed.
- A funded account: any balance above $0, the sign-up credit included, pays for every model; when it runs out, add $1 or more (sign up).
- An API key from the console. Keys start with
sk-.
Step 1: open the provider settings
Open the Roo Code panel from the activity bar and click the settings (gear) icon. The provider section is where Roo stores its API configuration. Roo supports multiple named configuration profiles, so you can create a dedicated profile for the gateway and keep any existing one untouched.
Step 2: select OpenAI Compatible
Set API Provider to OpenAI Compatible and fill in the fields:
API Provider: OpenAI Compatible
Base URL: https://api.oneaiapikey.com/v1
API Key: sk-your-key-here
Model: claude-sonnet-5-5- Base URL must include
/v1; Roo appends/chat/completionsto it. - API Key is your
sk-key. - Model is an exact id from our catalogue (see below).
Save the settings. You can assign different profiles to different modes, which is a handy way to run Architect on a flagship model and Code on a cheaper one.
Step 3: optional model information
Roo exposes a few per-model fields: Max Output Tokens, Context Window, Image Support, Computer Use and input/output prices. They tell Roo how to manage context and estimate cost; they don’t change what the gateway does. Leave the defaults if you’re unsure, and copy prices from the table below if you want Roo’s cost estimates to line up with your console.
Recommended models
Roo Code relies on native tool calling, so the model must support OpenAI-style tool calls. The models below all do. Prices are USD per 1M tokens:
| Model id | Good for | Input | Output |
|---|---|---|---|
claude-sonnet-5-5 | Daily coding, Coding agents, Code review | $1.40 | $7 |
claude-opus-5-5 | Agentic coding, Large refactors, Complex reasoning | $2.80 | $14 |
gpt-6.1-sol | Codex CLI, Tool calling, Long context | $0.70 | $3.50 |
glm-5.3-flash | Quick answers, Drafting, Sub-agents | $0.07 | $0.21 |
Because you type the model id yourself, newer models we add to the catalogue work in Roo too, even though the extension itself no longer updates.
Step 4: verify it works
Start a new task in Ask mode with a simple question about the open project. A normal reply means the provider is configured correctly, and the request appears in your console’s usage log within a few seconds.
To rule out the editor entirely, list the models your key can access:
curl -sS https://api.oneaiapikey.com/v1/models -H "Authorization: Bearer sk-your-key-here"Troubleshooting
401 or “invalid API key”. Re-copy the key from the console, check it’s enabled, and make sure your balance is above zero.
404 Not Found. The Base URL is wrong. Use https://api.oneaiapikey.com/v1, with /v1 and without an endpoint path or trailing slash.
“Model not found” or “no available channel”. The Model field doesn’t match a catalogue id exactly. Ids are lowercase, with no provider prefix.
Tool calls fail or the model replies with plain text instead of acting. The chosen model isn’t handling native tool calls well. Switch to claude-sonnet-5-5 or gpt-6.1-sol.
Timeouts on long tasks. Roo streams responses, which keeps long generations alive. If you also call the API from your own code, use "stream": true for long outputs, because proxies cut idle non-streaming requests at about 100 seconds.
Something broke after a VS Code update. Since Roo Code no longer receives fixes, editor updates may eventually cause issues we can’t fix on our side. Moving to Cline or Kilo Code takes a couple of minutes with the same key and base URL.
Next steps
Browse all tool guides, read the quickstart for direct API usage, or check the pricing page for current per-model rates.