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

Support statusOpenAI-compatible setup supported
Recommended endpoint/v1/chat/completions
Recommended modelsClaude, GPT, Qwen, DeepSeek, Gemini
StreamingAvailable for text routes when the selected tool and model support SSE
Tool callingChoose text models with tool-calling or structured-output signals
Image inputSend images only to models marked for vision or multimodal input
Configuration fields

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/models

Test 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.

Review pricing, minimum balance, and request reserve rules

Setup steps

  1. Set the API base URL to https://api.metisrouter.com/v1.
  2. Paste a MetisRouter API key from the console.
  3. Copy the exact model ID from /models or /docs/models.
  4. Send a short test prompt and verify the request in Usage Logs.