> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter connection

> Learn how to configure an OpenRouter (LLM router) connection for Infisical.

[OpenRouter](https://openrouter.ai/) is a unified LLM router that gives you access to hundreds of large language models through a single API. Infisical supports connecting to OpenRouter using an **API Key** (Provisioning API key). This connection is used to manage and rotate OpenRouter API keys via [Secret Rotation](https://infisical.com/docs/documentation/platform/secret-rotation/openrouter-api-key.md).

## Prerequisites

You need a **Provisioning API key** from OpenRouter. Provisioning keys are used only for key management (create, list, delete keys)—they can't be used for model completion requests.

## Create an OpenRouter provisioning API key

**1. Navigate to Provisioning Keys**

In [OpenRouter Settings](https://openrouter.ai/settings/provisioning-keys), go to **Provisioning API Keys** and select **Create New Key**.

![OpenRouter Provisioning Keys](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/openrouter/step-1.png)

**2. Create and Copy Key**

Complete the key creation flow and copy the generated Provisioning API key. Store it securely—you will use it when creating the Infisical connection.

![OpenRouter Key Created](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/openrouter/step-2.png)

> [!TIP]
>
> For more details on Provisioning API keys and key management, see [OpenRouter's documentation](https://openrouter.ai/docs/guides/overview/auth/provisioning-api-keys).

## Create OpenRouter connection in Infisical

> [tab] Infisical UI
>
> **1. Navigate to App Connections**
>
> In your Infisical dashboard, go to **Integrations** → **App Connections**, either in your organization or in a project.
>
> ![App Connections Tab](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/general/add-connection.png)
>
> **2. Select OpenRouter Connection**
>
> Click **Add Connection** and choose **OpenRouter** from the list of available connections.
>
> ![Select OpenRouter Connection](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/openrouter/openrouter-app-connection-option.png)
>
> **3. Fill out Connection Form**
>
> Complete the form with:
>
> * A **name** for the connection (e.g. `openrouter-prod`)
> * An optional **description**
> * Your **OpenRouter Provisioning API Key** (from the steps above)
>
>   ![OpenRouter Connection Form](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/openrouter/openrouter-app-connection-form.png)
>
> **4. Connection Created**
>
> After clicking **Create**, Infisical validates the key against OpenRouter's API. Your **OpenRouter Connection** is then ready to use for [OpenRouter API Key Secret Rotation](https://infisical.com/docs/documentation/platform/secret-rotation/openrouter-api-key.md).
>
> ![OpenRouter Connection Created](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/openrouter/openrouter-app-connection-created.png)

> [tab] API
>
> Create an OpenRouter connection via the [Create OpenRouter Connection](https://infisical.com/docs/api-reference/endpoints/app-connections/openrouter/create.md) API endpoint.
>
> ### Sample request
>
> ```bash Request theme={"dark"}
> curl --request POST \
>   --url https://app.infisical.com/api/v1/app-connections/open-router \
>   --header 'Content-Type: application/json' \
>   --data '{
>     "name": "my-openrouter-connection",
>     "method": "api-key",
>     "projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
>     "credentials": {
>       "apiKey": "<YOUR-PROVISIONING-API-KEY>"
>     }
>   }'
> ```
>
> ### Sample response
>
> ```bash Response theme={"dark"}
> {
>   "appConnection": {
>     "id": "e5d18aca-86f7-4026-a95e-efb8aeb0d8e6",
>     "name": "my-openrouter-connection",
>     "projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
>     "description": null,
>     "version": 1,
>     "orgId": "6f03caa1-a5de-43ce-b127-95a145d3464c",
>     "createdAt": "2025-04-23T19:46:34.831Z",
>     "updatedAt": "2025-04-23T19:46:34.831Z",
>     "isPlatformManagedCredentials": false,
>     "credentialsHash": "...",
>     "app": "open-router",
>     "method": "api-key",
>     "credentials": {}
>   }
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.