Documentation
Coding agents
Step-by-step guides for connecting Claude Code, Codex CLI, Cursor, OpenCode, Cline and other coding agents to RealRelay.ai, with the base URL, key and model each one needs.
Before you start
Every agent on these pages needs the same three things. What differs is where you enter them and which of the two base URL forms the agent takes.
An API key. Create one on the API keys page of the console. The guides read it from an environment variable named
REALRELAY_API_KEYwhere the agent supports that; never paste it into a file you commit.A base URL. Agents that speak an OpenAI protocol take the address ending in
/v1. Claude Code speaks the Anthropic protocol and takes the address without it, because it appends/v1/messagesitself. Each guide states which one it needs.A model ID. Use it exactly as
GET /v1/modelsor the catalog lists it, including the prefix, for exampleanthropic/claude-sonnet-4-6. See Model IDs.
https://www.realrelay.ai/v1https://www.realrelay.aiEach guide was checked against the tool's own documentation in the month it shows. These tools change quickly; if a setting is not where a guide says, follow the tool's documentation. Guides marked Experimental have not been run end to end against RealRelay.ai yet.
Choose your agent
Terminal agents
- Claude CodeAnthropic Messages
Anthropic's coding agent for the terminal and IDEs, connected through the Anthropic Messages endpoint.
- Codex CLIExperimentalOpenAI Responses
OpenAI's terminal agent. Responses only, so it works with the few models served on that endpoint.
- GitHub Copilot CLIOpenAI Chat Completions · Anthropic Messages
GitHub's terminal agent, configured with its bring-your-own-key environment variables.
- OpenCodeOpenAI Chat Completions · OpenAI Responses
Open-source terminal agent. Add RealRelay.ai as a custom provider in opencode.json.
- CrushOpenAI Chat Completions
Charm's terminal agent. Register RealRelay.ai and its models in crushrc.
- Qwen CodeOpenAI Chat Completions · OpenAI Responses
Qwen's terminal agent, with RealRelay.ai as an OpenAI-compatible model entry in settings.json.
- Factory DroidOpenAI Chat Completions · Anthropic Messages · OpenAI Responses
Factory's Droid agent, with custom models in settings.json for any of the three protocols.
- CodeBuddy CodeExperimentalOpenAI Chat Completions
Tencent's terminal agent, with a custom model in models.json.
- Hermes AgentOpenAI Chat Completions
Nous Research's agent, with RealRelay.ai as a named custom endpoint in config.yaml.
- PiOpenAI Chat Completions
Minimal, extensible terminal agent. Add a custom provider in models.json.
- Oh My PiExperimentalOpenAI Chat Completions
Feature-rich terminal agent (omp), with a custom provider in models.yml.
Editors and IDE extensions
- CursorExperimentalOpenAI Chat Completions
AI code editor. Chat and Agent use RealRelay.ai through the OpenAI base URL override.
- ClineOpenAI Chat Completions
Coding agent for VS Code and JetBrains, using its OpenAI Compatible provider.
- Kilo CodeExperimentalOpenAI Chat Completions · OpenAI Responses
Coding agent for VS Code and the terminal, with RealRelay.ai as a custom provider.
Assistants and agent platforms
- OpenClawExperimentalOpenAI Chat Completions
Self-hosted assistant gateway, with RealRelay.ai as a custom provider in openclaw.json.
- nanobotOpenAI Chat Completions
Lightweight self-hosted personal agent, with a custom provider and model preset.
- AionUiExperimentalOpenAI Chat Completions · Anthropic Messages
Open-source desktop agent app, connected through its New API platform.
- Cherry StudioExperimentalOpenAI Chat Completions
Desktop AI chat client. Import the key from the console, or add an OpenAI-type provider.
Choosing a model
The protocol an agent speaks decides which models it can use well.
Anthropic Messages (Claude Code). These Claude models are served natively on
/v1/messages:anthropic/claude-opus-5-5anthropic/claude-opus-5anthropic/claude-sonnet-5anthropic/claude-fable-5anthropic/claude-opus-4-8anthropic/claude-opus-4-7anthropic/claude-sonnet-4-6anthropic/claude-opus-4-6anthropic/claude-haiku-5-5anthropic/claude-sonnet-5-5anthropic/claude-fable-5-1anthropic/claude-opus-4-5-20251101anthropic/claude-haiku-4-5-20251001anthropic/claude-sonnet-4-5-20250929
Other models are reachable through protocol translation, but tool use and extended thinking on them are best effort.
OpenAI Responses (Codex CLI). Only models served on
/v1/responseswork:openai/gpt-5.5-proopenai/gpt-5.4-proopenai/gpt-5.3-codexopenai/gpt-5.2-proopenai/gpt-5-proopenai/o1-pro
OpenAI Chat Completions (most other agents). Any text model in the catalog. Agents edit files through tool calls, so pick a model that supports tools, with a context window of at least 64K tokens.
Troubleshooting
Each guide has its own troubleshooting section. These causes are common to all of them.
401. The key is in the wrong field or variable, or the variable it refers to is empty in the process that runs the agent. Desktop apps and background services do not see variables exported only in a terminal.
404. The base URL has a doubled or a missing
/v1.Model not found. Copy the ID from
GET /v1/models, including its prefix.Replies arrive all at once. A proxy between you and the API is buffering the stream. See Streaming.
The agent describes edits but makes none. The model does not support tool calling, or not through the protocol the agent speaks. Choose another model.
Context errors or early compaction. Set the agent's context window to the model's real limit, shown on the model's catalog page.
Still stuck?
Check the request in the console's usage logs, or contact support with the agent, its version and the error message.
