Provider Integration
Expose model catalogs, uptime, and pricing for TheRouter.ai routing
If you are a model infrastructure provider, TheRouter.ai needs machine-readable model metadata, reliable health, and automated settlement options before listing traffic.
Overview
This page mirrors the OpenRouter workflow and adapts it for TheRouter.ai. Use TheRouter.ai as your OpenAI-compatible endpoint and keep model IDs in `provider/model` format.
Installation
Install the required SDKs and keep your TheRouter.ai key in environment variables.
install.sh
curl https://provider.example.com/v1/modelsConfiguration
Set TheRouter.ai base URL overrides and pass your API key. Add attribution headers when your app should appear in rankings.
TypeScript
const modelSchema = {
id: "provider/model-x",
context_length: 200000,
pricing: { prompt: "0.000002", completion: "0.00001" },
supported_features: ["tools", "structured_outputs"],
};Caveats
Integration note
Return deterministic pricing strings and stable model IDs; breaking identifiers causes downstream routing and billing errors.
For production rollouts, pin SDK versions and validate model compatibility in staging before broad rollout.