For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to Connect OpenRouter to Unsloth: API Key & Model Setup

This guide explains how to connect OpenRouter to Unsloth so you can access hosted AI models from providers like OpenAI, Anthropic, and Google through an open-source local UI chat interface. You’ll learn how to create an OpenRouter API key, add OpenRouter as a provider in Unsloth, load or manually enter model IDs, and enable external models for chat.

Once a single API key is connected, OpenRouter models in Unsloth can provide advanced features such as thinking, web search, tool calling, code execution, and customizable generation settings directly from the chat page.

Setup

1

Create an OpenRouter API key

Sign in to your OpenRouter account. Create an API key from the OpenRouter dashboard:

Copy the key. You will paste it into Unsloth in the next step.

When creating the key, you can optionally set a credit limit or expiration date.

2

Connect OpenRouter to Unsloth

Open Settings → Connections, then click Add Connected.

Select OpenRouter, then enter your connection details.

Enter your OpenRouter details:

  • API key: paste your OpenRouter API key

  • Model IDs: click Load Models, or enter model IDs manually

Finally, click Add Connection.

3

Ready to Chat

After saving the connection, select an OpenRouter model under Connected in the model dropdown.

OpenRouter models can expose different controls depending on the upstream model, including web search, thinking, tool-calling, and generation settings.

Model Selection

OpenRouter provides access to many models from different providers. If Load Models does not return the models you want to select, enter the model IDs you want enabled.

Example model IDs:

Troubleshooting

If OpenRouter fails to connect, check that the API key is valid and belongs to the correct OpenRouter account.

If a model does not appear after clicking Load Models, it may not be available for your account or region. You can enter the model ID manually or choose another model.

Last updated

Was this helpful?