> For the complete documentation index, see [llms.txt](https://ei-docs.keywordrush.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ei-docs.keywordrush.com/ai/openrouter-api.md).

# OpenRouter API

{% hint style="warning" %}
Our default prompts are tested with OpenAI GPT and Claude models. If you use other models via OpenRouter, the results may be unpredictable. In such cases, we recommend using custom prompts.
{% endhint %}

### **How to Obtain an OpenRouter API Key**

1. Create an [OpenRouter](https://openrouter.ai/) account or sign in.
2. Go to the **API Keys** page.
3. Click **"Create key"**, enter a name for the key, and save it.

### **How to Set OpenRouter Models**

{% hint style="warning" %}
By default, if no model is set, **'openrouter/auto'** will be used.
{% endhint %}

{% hint style="warning" %}
**Free limit**: If you are using a free model variant (with an ID ending in `:free`), then you will be limited to 20 requests per minute and 200 requests per day.
{% endhint %}

OpenRouter acts as a proxy and unified interface for 300+ paid and free LLMs, each with its own pricing and rate limits. [**Click here**](https://openrouter.ai/models) to view all available models.

1. Click **"Copy model ID"** for your chosen model.
2. Add the model ID in the **"OpenRouter Models"** field in the plugin settings.
3. You can set multiple model IDs, separated by commas. The plugin will prioritize them in order, using the first model first and others as fallbacks.

<figure><img src="/files/2lPLCs6XEcvjGP7I0w9E" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ufIeHMlzEc0aCOqEF56N" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ei-docs.keywordrush.com/ai/openrouter-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
