Skip to content

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

1.7 KB
Raw Blame
---
title: "Create"
openapi: "POST /api/v1/app-connections/open-router"
---

<Note>
    Check out the configuration docs for [OpenRouter Connections](/integrations/app-connections/openrouter) to learn how to obtain the required credentials.
</Note>

Creates an OpenRouter app connection using a Provisioning API key. The connection can then be used for [OpenRouter API Key secret rotations](/documentation/platform/secret-rotation/openrouter-api-key).

## Request body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | A unique name for the connection. |
| `method` | string | Yes | Must be `"api-key"`. |
| `projectId` | string (UUID) | Yes | The project ID to attach the connection to. |
| `credentials.apiKey` | string | Yes | Your OpenRouter [Provisioning API key](https://openrouter.ai/settings/provisioning-keys). |

## Sample request

```bash
curl --request POST \
  --url https://app.infisical.com/api/v1/app-connections/open-router \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <ACCESS_TOKEN>' \
  --data '{
    "name": "my-openrouter-connection",
    "method": "api-key",
    "projectId": "<project-id>",
    "credentials": {
      "apiKey": "<YOUR-PROVISIONING-API-KEY>"
    }
  }'
```

## Sample response

```json
{
  "appConnection": {
    "id": "<connection-id>",
    "name": "my-openrouter-connection",
    "projectId": "<project-id>",
    "description": null,
    "version": 1,
    "orgId": "<org-id>",
    "createdAt": "<ISO8601>",
    "updatedAt": "<ISO8601>",
    "isPlatformManagedCredentials": false,
    "credentialsHash": "...",
    "app": "openrouter",
    "method": "api-key",
    "credentials": {}
  }
}
```