Use MetisRouter with LangChain
Configure LangChain clients with MetisRouter's base URL and model IDs for automation and agent workflows.
Last verified: 2026-06-05
Base URLhttps://api.metisrouter.com/v1
API keyMETISROUTER_API_KEY
Model IDsCopy exact IDs from /models or /docs/models
Best for
Route the tool's model requests through MetisRouter and verify requests, usage, and cost in the console.
Limitations
Do not force unsupported image, video, audio, or embedding models through a text chat endpoint.
Copy-ready example
Copy configuration: paste these values into the tool's OpenAI-compatible or custom provider settings.
Base URL: https://api.metisrouter.com/v1
API key: METISROUTER_API_KEY
Model IDs: Copy exact IDs from /models or /docs/modelsTest prompt
Send a short request and verify request id, latency, usage, and cost in Usage Logs.
Ask the tool to return a short JSON object with status and model.Expected response
The test should return short text or JSON and create one Usage Logs entry.
{
"status": "ok",
"model": "Copy exact IDs from /models or /docs/models",
"usage_log": "request id, latency, usage, charged_usd"
}Usage Logs verification
After the first request, open Usage Logs and confirm request id, model id, endpoint, first-byte latency, total duration, token or asset usage, and charged USD.
- If no log appears, check API key, base URL, and whether the tool sent the request.
- If a failed log appears, contact support@metisrouter.com with the request id.
- For high-volume usage planning, email hello@metisrouter.com.
Setup steps
- Set the API base URL to https://api.metisrouter.com/v1.
- Paste a MetisRouter API key from the console.
- Copy the exact model ID from /models or /docs/models.
- Send a short test prompt and verify the request in Usage Logs.