Connect clientsGuide
Connect other clients
Use any OpenAI-compatible tool, SDK, or script against this gateway.
By the end: Any client that accepts a custom base URL returns model replies through RouteForge.
Before you start
- You have created an API key
- The client lets you set a base URL
Any client that accepts a custom base URL can use RouteForge. This page gives the values, a request you can paste, and the mistakes that account for most setup failures.
Common values
| Field | Value | Notes |
|---|---|---|
| OpenAI-compatible base URL | http://localhost:3000/v1 | For editors, CLI agents, LangChain, and OpenAI SDKs. |
| Anthropic-compatible base URL | http://localhost:3000 | For tools that take an Anthropic endpoint. |
| API key | sk_live_... | From the dashboard. No spaces or line breaks. |
| Model | Exact catalog ID | Case-sensitive. Find it on the models page. |
Request
cURL
curl http://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer $ROUTEFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"messages": [{ "role": "user", "content": "Reply in one sentence that RouteForge is connected." }]
}'Python
import os
from openai import OpenAI
client = OpenAI(base_url="http://localhost:3000/v1", api_key=os.environ["ROUTEFORGE_API_KEY"])
res = client.chat.completions.create(
model="gpt-5.6-sol",
messages=[{"role": "user", "content": "Reply in one sentence that RouteForge is connected."}],
)
print(res.choices[0].message.content)Common mistakes
- The base URL ends up as
/v1/v1/chat/completions. The value already includes/v1, so a client that appends its own path must be given the root instead. - The
Authorizationheader is missingBearer, or the tool expects only the raw key. - The model name came from another platform. Use an ID from this gateway's list.
- A tool that only speaks one protocol is given a model from another family. Check protocol compatibility.
Client guides
Dedicated setup pages exist for Claude Code, Codex, Cursor and TRAE, OpenCode, and other tools.