Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: adding docs for open router rotation

IgorHortaf7c3e8787378
diff --git a/docs/docs.json b/docs/docs.json
index a63ebb8ce6..1811a50a40 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -141,6 +141,7 @@
"integrations/app-connections/oci",
"integrations/app-connections/octopus-deploy",
"integrations/app-connections/okta",
+ "integrations/app-connections/open-router",
"integrations/app-connections/oracledb",
"integrations/app-connections/postgres",
"integrations/app-connections/railway",
@@ -458,7 +459,8 @@
"documentation/platform/secret-rotation/okta-client-secret",
"documentation/platform/secret-rotation/oracledb-credentials",
"documentation/platform/secret-rotation/postgres-credentials",
- "documentation/platform/secret-rotation/redis-credentials"
+ "documentation/platform/secret-rotation/redis-credentials",
+ "documentation/platform/secret-rotation/open-router-api-key"
]
},
{
diff --git a/docs/documentation/platform/secret-rotation/open-router-api-key.mdx b/docs/documentation/platform/secret-rotation/open-router-api-key.mdx
new file mode 100644
index 0000000000..345a2174d3
--- /dev/null
+++ b/docs/documentation/platform/secret-rotation/open-router-api-key.mdx
@@ -0,0 +1,133 @@
+---
+title: "OpenRouter API Key"
+description: "Learn how to automatically rotate OpenRouter API keys."
+---
+
+## Prerequisites
+
+- Create an [OpenRouter Connection](/integrations/app-connections/open-router) using a **Provisioning API key**. That connection is used to create and delete API keys on your behalf during rotation.
+
+## Create an OpenRouter API Key Rotation in Infisical
+
+<Tabs>
+ <Tab title="Infisical UI">
+ 1. Navigate to your Secret Manager Project's Dashboard and select **Add Secret Rotation** from the actions dropdown.
+
+ ![Secret Manager Dashboard](/images/secret-rotations-v2/generic/add-secret-rotation.png)
+
+ 2. Select the **OpenRouter API Key** option.
+
+ ![Select OpenRouter API Key](/images/secret-rotations-v2/open-router-api-key/select-open-router-api-key.png)
+
+ 3. Configure the rotation behavior, then click **Next**.
+
+ ![Rotation Configuration](/images/secret-rotations-v2/open-router-api-key/configuration.png)
+
+ - **OpenRouter Connection** – The connection (with a Provisioning API key) that will create and delete API keys during rotation.
+ - **Rotation Interval** – The interval, in days, after which a rotation is triggered.
+ - **Rotate At** – The local time of day when rotation runs once the interval has elapsed.
+ - **Auto-Rotation Enabled** – Whether to rotate automatically on the interval. Turn off to rotate only manually or pause rotation.
+
+ 4. Set the OpenRouter API key parameters, then click **Next**.
+
+ ![Rotation Parameters](/images/secret-rotations-v2/open-router-api-key/parameters.png)
+
+ - **Key name** – Display name for the key in OpenRouter (required).
+ - **Limit** (optional) – Spending limit in USD for this key.
+ - **Limit reset** (optional) – How often the limit resets: daily, weekly, or monthly.
+
+ 5. Specify the secret name that the rotated API key will be mapped to. Then click **Next**.
+
+ ![Rotation Secrets Mapping](/images/secret-rotations-v2/open-router-api-key/secrets-mapping.png)
+
+ - **API Key** – The name of the secret in Infisical where the rotated API key value will be stored.
+
+ 6. Give your rotation a name and description (optional). Then click **Next**.
+
+ ![Rotation Details](/images/secret-rotations-v2/open-router-api-key/details.png)
+
+ - **Name** – A slug-friendly name for this rotation configuration.
+ - **Description** (optional) – Notes about this rotation.
+
+ 7. Review your configuration, then click **Create Secret Rotation**.
+
+ ![Rotation Review](/images/secret-rotations-v2/open-router-api-key/review.png)
+
+ 8. Your **OpenRouter API Key** rotation is created. The current API key is available as a secret at the mapped path. Rotations will create a new key, switch the active secret to it, then revoke the previous key for zero-downtime rotation.
+
+ ![Rotation Created](/images/secret-rotations-v2/open-router-api-key/created.png)
+ </Tab>
+ <Tab title="API">
+ To create an OpenRouter API Key rotation, call the [Create OpenRouter API Key Rotation](/api-reference/endpoints/secret-rotations/open-router-api-key/create) API endpoint.
+
+ ### Sample request
+
+ ```bash Request
+ curl --request POST \
+ --url https://us.infisical.com/api/v2/secret-rotations/open-router-api-key \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "my-open-router-rotation",
+ "projectId": "<project-id>",
+ "description": "OpenRouter API key rotation",
+ "connectionId": "<open-router-connection-id>",
+ "environment": "dev",
+ "secretPath": "/",
+ "isAutoRotationEnabled": true,
+ "rotationInterval": 30,
+ "rotateAtUtc": {
+ "hours": 0,
+ "minutes": 0
+ },
+ "parameters": {
+ "name": "my-app-key",
+ "limit": 100,
+ "limitReset": "monthly"
+ },
+ "secretsMapping": {
+ "apiKey": "OPEN_ROUTER_API_KEY"
+ }
+ }'
+ ```
+
+ ### Sample response
+
+ ```bash Response
+ {
+ "secretRotation": {
+ "id": "<rotation-id>",
+ "name": "my-open-router-rotation",
+ "description": "OpenRouter API key rotation",
+ "secretsMapping": {
+ "apiKey": "OPEN_ROUTER_API_KEY"
+ },
+ "isAutoRotationEnabled": true,
+ "activeIndex": 0,
+ "connectionId": "<open-router-connection-id>",
+ "rotationInterval": 30,
+ "rotateAtUtc": { "hours": 0, "minutes": 0 },
+ "type": "open-router-api-key",
+ "parameters": {
+ "name": "my-app-key",
+ "limit": 100,
+ "limitReset": "monthly"
+ }
+ }
+ }
+ ```
+ </Tab>
+</Tabs>
+
+## How It Works
+
+Infisical uses OpenRouter’s [Provisioning API](https://openrouter.ai/docs/guides/overview/auth/provisioning-api-keys) to:
+
+1. **Create** new API keys with the name, optional spending limit, and limit reset schedule you configure.
+2. **Store** the new key in Infisical as the active secret at your mapped path.
+3. **Revoke** the previous key after the new one is active, so existing clients can finish using the old key during the overlap period.
+
+This follows the same [credential lifecycle](/documentation/platform/secret-rotation/overview#how-rotation-works) as other Infisical rotations: active → inactive → revoked, with zero-downtime rotation.
+
+<Tip>
+ For more on OpenRouter key management and limits, see [OpenRouter’s API key documentation](https://openrouter.ai/docs/api-reference/api-keys/create-keys).
+</Tip>
diff --git a/docs/documentation/platform/secret-rotation/overview.mdx b/docs/documentation/platform/secret-rotation/overview.mdx
index d2e5755c41..3ed7274568 100644
--- a/docs/documentation/platform/secret-rotation/overview.mdx
+++ b/docs/documentation/platform/secret-rotation/overview.mdx
@@ -100,6 +100,7 @@ Using a __30-Day__ rotation interval as an example, here's how the process unfol
- [PostgreSQL Credentials](./postgres-credentials)
- [Microsoft SQL Server Credentials](./mssql-credentials)
+- [OpenRouter API Key](./open-router-api-key)
## FAQ
diff --git a/docs/images/app-connections/open-router/open-router-app-connection-created.png b/docs/images/app-connections/open-router/open-router-app-connection-created.png
new file mode 100644
index 0000000000..4d3e527495
Binary files /dev/null and b/docs/images/app-connections/open-router/open-router-app-connection-created.png differ
diff --git a/docs/images/app-connections/open-router/open-router-app-connection-form.png b/docs/images/app-connections/open-router/open-router-app-connection-form.png
new file mode 100644
index 0000000000..d91938f091
Binary files /dev/null and b/docs/images/app-connections/open-router/open-router-app-connection-form.png differ
diff --git a/docs/images/app-connections/open-router/open-router-app-connection-option.png b/docs/images/app-connections/open-router/open-router-app-connection-option.png
new file mode 100644
index 0000000000..474b672a85
Binary files /dev/null and b/docs/images/app-connections/open-router/open-router-app-connection-option.png differ
diff --git a/docs/images/app-connections/open-router/step-1.png b/docs/images/app-connections/open-router/step-1.png
new file mode 100644
index 0000000000..7db885a457
Binary files /dev/null and b/docs/images/app-connections/open-router/step-1.png differ
diff --git a/docs/images/app-connections/open-router/step-2.png b/docs/images/app-connections/open-router/step-2.png
new file mode 100644
index 0000000000..1a4af7eecd
Binary files /dev/null and b/docs/images/app-connections/open-router/step-2.png differ
diff --git a/docs/images/secret-rotations-v2/open-router-api-key/configuration.png b/docs/images/secret-rotations-v2/open-router-api-key/configuration.png
new file mode 100644
index 0000000000..c1c0f61f77
Binary files /dev/null and b/docs/images/secret-rotations-v2/open-router-api-key/configuration.png differ
diff --git a/docs/images/secret-rotations-v2/open-router-api-key/created.png b/docs/images/secret-rotations-v2/open-router-api-key/created.png
new file mode 100644
index 0000000000..1f689ac164
Binary files /dev/null and b/docs/images/secret-rotations-v2/open-router-api-key/created.png differ
diff --git a/docs/images/secret-rotations-v2/open-router-api-key/details.png b/docs/images/secret-rotations-v2/open-router-api-key/details.png
new file mode 100644
index 0000000000..52a9df1409
Binary files /dev/null and b/docs/images/secret-rotations-v2/open-router-api-key/details.png differ
diff --git a/docs/images/secret-rotations-v2/open-router-api-key/parameters.png b/docs/images/secret-rotations-v2/open-router-api-key/parameters.png
new file mode 100644
index 0000000000..e9594c9356
Binary files /dev/null and b/docs/images/secret-rotations-v2/open-router-api-key/parameters.png differ
diff --git a/docs/images/secret-rotations-v2/open-router-api-key/review.png b/docs/images/secret-rotations-v2/open-router-api-key/review.png
new file mode 100644
index 0000000000..a8b7b510cf
Binary files /dev/null and b/docs/images/secret-rotations-v2/open-router-api-key/review.png differ
diff --git a/docs/images/secret-rotations-v2/open-router-api-key/secrets-mapping.png b/docs/images/secret-rotations-v2/open-router-api-key/secrets-mapping.png
new file mode 100644
index 0000000000..eba310826b
Binary files /dev/null and b/docs/images/secret-rotations-v2/open-router-api-key/secrets-mapping.png differ
diff --git a/docs/images/secret-rotations-v2/open-router-api-key/select-open-router-api-key.png b/docs/images/secret-rotations-v2/open-router-api-key/select-open-router-api-key.png
new file mode 100644
index 0000000000..48f6da568e
Binary files /dev/null and b/docs/images/secret-rotations-v2/open-router-api-key/select-open-router-api-key.png differ
diff --git a/docs/integrations/app-connections/open-router.mdx b/docs/integrations/app-connections/open-router.mdx
new file mode 100644
index 0000000000..7af652c105
--- /dev/null
+++ b/docs/integrations/app-connections/open-router.mdx
@@ -0,0 +1,106 @@
+---
+title: "OpenRouter Connection"
+description: "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](/documentation/platform/secret-rotation/open-router-api-key).
+
+## Prerequisites
+
+You need a **Provisioning API key** from OpenRouter. Provisioning keys are used only for key management (create, list, delete keys)—they cannot be used for model completion requests.
+
+## Create an OpenRouter Provisioning API Key
+
+<Steps>
+ <Step title="Navigate to Provisioning Keys">
+ In [OpenRouter Settings](https://openrouter.ai/settings/provisioning-keys), go to **Provisioning API Keys** and click **Create New Key**.
+
+ ![OpenRouter Provisioning Keys](/images/app-connections/open-router/step-1.png)
+ </Step>
+ <Step title="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](/images/app-connections/open-router/step-2.png)
+ </Step>
+</Steps>
+
+<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).
+</Tip>
+
+## Create OpenRouter Connection in Infisical
+
+<Tabs>
+ <Tab title="Infisical UI">
+ <Steps>
+ <Step title="Navigate to App Connections">
+ In your Infisical dashboard, go to **Organization Settings** → **App Connections** (or the **App Connections** page in your project).
+
+ ![App Connections Tab](/images/app-connections/general/add-connection.png)
+ </Step>
+ <Step title="Select OpenRouter Connection">
+ Click **Add Connection** and choose **OpenRouter** from the list of available connections.
+
+ ![Select OpenRouter Connection](/images/app-connections/open-router/open-router-app-connection-option.png)
+ </Step>
+ <Step title="Fill out Connection Form">
+ Complete the form with:
+ - A **name** for the connection (e.g. `open-router-prod`)
+ - An optional **description**
+ - Your **OpenRouter Provisioning API Key** (from the steps above)
+
+ ![OpenRouter Connection Form](/images/app-connections/open-router/open-router-app-connection-form.png)
+ </Step>
+ <Step title="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](/documentation/platform/secret-rotation/open-router-api-key).
+
+ ![OpenRouter Connection Created](/images/app-connections/open-router/open-router-app-connection-created.png)
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Create an OpenRouter connection via the [Create OpenRouter Connection](/api-reference/endpoints/app-connections/open-router/create) API endpoint.
+
+ ### Sample request
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/app-connections/open-router \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "my-open-router-connection",
+ "method": "api-key",
+ "projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
+ "credentials": {
+ "apiKey": "<YOUR-PROVISIONING-API-KEY>"
+ }
+ }'
+ ```
+
+ ### Sample response
+
+ ```bash Response
+ {
+ "appConnection": {
+ "id": "e5d18aca-86f7-4026-a95e-efb8aeb0d8e6",
+ "name": "my-open-router-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": {}
+ }
+ }
+ ```
+ </Tab>
+</Tabs>
+
+## Use Cases
+
+- **OpenRouter API Key Secret Rotation**: Use this connection as the credential source for [automatically rotating OpenRouter API keys](/documentation/platform/secret-rotation/open-router-api-key), so your LLM-backed applications always use up-to-date keys with optional spending limits and reset schedules.
diff --git a/docs/snippets/AppConnectionsBrowser.jsx b/docs/snippets/AppConnectionsBrowser.jsx
index 0314b5ebfd..777a45ed73 100644
--- a/docs/snippets/AppConnectionsBrowser.jsx
+++ b/docs/snippets/AppConnectionsBrowser.jsx
@@ -6,6 +6,7 @@ export const AppConnectionsBrowser = () => {
const categories = [
"All",
+ "AI & LLM",
"Cloud Providers",
"Databases",
"CI/CD",
@@ -345,6 +346,14 @@ export const AppConnectionsBrowser = () => {
"Learn how to connect your Okta to pull secrets from Infisical.",
category: "Identity & Auth",
},
+ {
+ name: "OpenRouter",
+ slug: "open-router",
+ path: "/integrations/app-connections/open-router",
+ description:
+ "Learn how to connect OpenRouter (unified LLM router) to manage and rotate API keys with Infisical.",
+ category: "AI & LLM",
+ },
{
name: "Laravel Forge",
slug: "laravel-forge",
diff --git a/docs/snippets/RotationsBrowser.jsx b/docs/snippets/RotationsBrowser.jsx
index 6ef9082cfd..db8ad0bfc5 100644
--- a/docs/snippets/RotationsBrowser.jsx
+++ b/docs/snippets/RotationsBrowser.jsx
@@ -105,6 +105,14 @@ export const RotationsBrowser = () => {
description: "Learn how to automatically rotate MongoDB credentials.",
category: "Databases",
},
+ {
+ name: "OpenRouter API Key",
+ slug: "open-router-api-key",
+ path: "/documentation/platform/secret-rotation/open-router-api-key",
+ description:
+ "Learn how to automatically rotate OpenRouter API keys.",
+ category: "Identity & Auth",
+ },
].sort(function (a, b) {
return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
});