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

# Routing through Openrouter

Under the hood of our framework is a smart router capable of redirecting traffic to different endpoints.  Given this capability, we can naturally route traffic to other endpoints and services.  Here, we offer the ability for you to utilize your own API Keys at different providers (like Openrouter) and access any of their language models.

You must have your own Openrouter API key in order to utilize this service. &#x20;

When creating a new API Key, enter the name of your key and if you want to associate this key with your Openrouter API key, you can enter it in the "Associate a 3rd Party API key" field, see below.

<figure><img src="/files/Oh6bdarHjdWY815iT4Ol" alt="" width="563"><figcaption></figcaption></figure>

Don't worry, the API keys are encrypted, and never stored in plain text.  Not even we can decrypt that key.  The only way it can be used is if you also provide your Block Entropy API key as the secret (which is shown only once at creation, and again encrypted so no one except. yourself can decrypt it).  Thus, keep your API key safe. &#x20;

Then to utilize Openrouter models, you can just prefix the openrouter model name with the `openrouter-` prefix.  For example, to utilize the Meta Lllama 3.1 405B parameter model, you would use,

model: `openrouter-meta-llama/llama-3.1-405b-instruct`

You would still use the blockentropy api endpoint, `https://api.blockentropy.ai/v1`, and your BE API key (ensure it is the one associatd with your OR API key).


---

# 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:

```
GET https://docs.blockentropy.ai/models/routing-through-openrouter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
