Skip to main content

OpenRouter

OpenRouter is a unified gateway that routes requests to hundreds of LLMs from many providers behind a single API key.

Getting started with OpenRouter

  1. Sign up for an OpenRouter account.
  2. Create an API key from openrouter.ai/keys.
  3. Pick a model slug from openrouter.ai/models (for example openai/gpt-4o, anthropic/claude-3.5-sonnet).

Setting up OpenRouter in Unstract

  • Sign in to the Unstract Platform.
  • From the side navigation menu, choose Settings 🞂 LLMs.
  • Click on the New LLM Profile button.
  • From the list of LLMs, choose OpenRouter.
  • Name — a unique name for this adapter instance.
  • API Key — the key created at openrouter.ai/keys.
  • Model — the model slug from openrouter.ai/models.
  • API Base — pre-filled with https://openrouter.ai/api/v1; change only if OpenRouter moves the base URL.
  • Maximum Output Tokens — defaults to 4096. Leave empty to use the provider default.
  • Enable Reasoning — toggle on for reasoning models to send reasoning_effort. See the OpenRouter reasoning docs. Reveals a Reasoning Effort field (low/medium/high).
  • Leave Max Retries and Timeout at their defaults.
  • Click on Test Connection and ensure it succeeds, then click Submit.