Connect RedRouter to an existing SDK, framework, or coding agent through its configurable API endpoint. Pick the protocol the client actually sends, then use an explicit model ID from Models.
Choose a starting point
| Task | Guide | Protocol |
|---|---|---|
| Write a Python script or service | Python | Chat Completions |
| Stream from Node.js or TypeScript | Node.js | Chat Completions |
| Use Claude Code | Claude Code | Messages |
| Use Codex CLI | Codex | Responses |
| Configure OpenCode | OpenCode | Chat Completions |
| Add RedRouter to a LiteLLM application | LiteLLM | Chat Completions |
| Build a LangChain pipeline | LangChain | Chat Completions |
| Generate or stream with the Vercel AI SDK | Vercel AI SDK | Chat Completions |
| Use LlamaIndex for grounded answers | LlamaIndex | Chat Completions |
| Call from a Cloudflare Worker | Cloudflare Workers | HTTP/SSE |
| Write a resumable synthetic-data job | Dataset generation | Chat Completions |
| Review recorded security-agent compatibility checks | Security agents | Client-dependent |
These are custom endpoint configurations. A recipe does not mean a tool ships a native RedRouter provider or that every feature of its original provider is available. New recipes are documentation examples, not live-tested integration claims. The security-agent guide identifies its dated test evidence separately.
Set credentials and URLs
Create an API key and fund the account before making API requests. Export the same secret for every recipe:
export REDROUTER_API_KEY="your-redrouter-api-key"
| Client setting | Value | Client appends |
|---|---|---|
OpenAI SDK base_url / baseURL | https://redrouter.org/v1 | /chat/completions or /responses |
| Anthropic SDK / Claude Code base URL | https://redrouter.org | /v1/messages |
| Raw HTTP URL | Full endpoint, for example https://redrouter.org/v1/chat/completions | Nothing |
Keep credentials in a server environment or secret manager. A browser UI should call your authenticated backend; never ship a RedRouter secret in JavaScript sent to visitors.
Match features to the model
red-cyber-1 supports text, tool calling, and structured output. It is text-only. A compatible SDK does not add image input, embeddings, hosted tools, persistent Responses, or other missing capabilities. Check model selection, compatibility, and images before changing a framework's defaults.
Set an explicit output limit. Keep complete conversation and tool history on the client, validate generated tool arguments before execution, and treat truncation as an incomplete result. Use production guidance for retries, concurrency, and budgets, or troubleshooting when a framework sends an unsupported parameter.