To use OpenRouter, a great way to add AI models and control spend, you’ll need an OpenRouter API key.

Here’s how to get one:

  1. Visit OpenRouter’s API Key Settings

  2. Create an account or sign in if you already have one

  3. Click “Create API Key”

  4. Give your key a name (e.g., “Alex Sidebar”) and optionally set a credit spend limit

  5. Copy the API key - make sure to save it somewhere secure as you won’t be able to see it again

  6. In Alex Sidebar:

    • Open Settings (⚙️)
    • Select “Models and API Keys” under the “Tools & Features” section
    • Paste your OpenRouter API key in the OpenRouter key text field under the OpenRouter Models

Keep your API key secure and never share it publicly. If you suspect your key has been compromised, you should immediately rotate it in your OpenRouter settings.

Usage & Billing

  • OpenRouter is a unified API for all the major LLMs on the market, along with several minor ones. It allows users to aggregate their billing in one place and make use of several nice features such as analytics and fallbacks.
  • OpenRouter is not an AI model. It is a platform in which you can connect to various models with various pricing and various limitations.

You should familiarize yourself with their platform and documentation before proceeding, if you haven’t already.