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

FieldValueNotes
OpenAI-compatible base URLhttp://localhost:3000/v1For editors, CLI agents, LangChain, and OpenAI SDKs.
Anthropic-compatible base URLhttp://localhost:3000For tools that take an Anthropic endpoint.
API keysk_live_...From the dashboard. No spaces or line breaks.
ModelExact catalog IDCase-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

Client guides

Dedicated setup pages exist for Claude Code, Codex, Cursor and TRAE, OpenCode, and other tools.