> For the complete documentation index, see [llms.txt](https://omnitool-ai.gitbook.io/omnitool/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://omnitool-ai.gitbook.io/omnitool/tutorial/blocks/openrouter.md).

# OpenRouter

The OpenRouter Block is a unified API that specializes in providing access to a diverse range of [supported Large Language Models (LLMs)](https://openrouter.ai/docs#models).&#x20;

## Prerequisites

Before you begin, ensure you have:

* **OpenRouter Account:** Register or sign in at [OpenRouter's website](https://openrouter.ai/).
* **API Key:** Obtain your [OpenRouter Key](https://openrouter.ai/keys).
* **Credits:** Ensure you have enough API credits. (You have a small usage allowance (< $1) before you need to pay).

## Setup

### Adding API Key

1. Access the API Key Manager in Omnitool's left panel.
2. Input your OpenRouter API key.

## Using the OpenRouter Block

1. Navigate to the "Add Block" collection within Omnitool.
2. Search for the `openrouter` namespace to locate its LLM block.
3. There are two distinct LLM blocks provided. One of these is the vision transformer LLM model block, which is designed to process image input.

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

## Additional Resources

For developers and users seeking more advanced configurations and troubleshooting resources for these blocks, refer to the OpenAPI and block specifications on the <https://github.com/omnitool-ai/omni-core-blocks/tree/main/server/apis/openrouter>.

***

For additional details on the OpenRouter API, refer to the [OpenRouter website](https://openrouter.ai/docs#quick-start).<br>


---

# 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://omnitool-ai.gitbook.io/omnitool/tutorial/blocks/openrouter.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.
