Frameworks and Integrations

Community ecosystem overview

TheRouter.ai works with OpenAI-compatible clients, framework adapters, and observability tooling across web, backend, and agent runtimes.

Overview

Use the TheRouter API endpoint and a model ID from the current model catalog. Framework capabilities and configuration differ; test your integration before production.

Installation

Install the required SDKs and keep your TheRouter.ai key in environment variables.

install.sh
npm install openai ai @ai-sdk/openai-compatible @langchain/openai

Configuration

Configure the TheRouter API base URL and keep your API key on a trusted server.

TypeScript
const endpoint = "https://api.therouter.ai/v1";
const models = ["openai/gpt-4o", "anthropic/claude-sonnet-4.5", "google/gemini-2.5-pro"];

Caveats

Integration note
Different frameworks expose provider options differently; validate fallback and tool-calling behavior before migrating production code.

For production rollouts, pin SDK versions and validate model compatibility in staging before broad rollout.

Help & contact