Skip to main content
POST
/
api
/
v1
/
app-connections
/
open-router
cURL
curl --request POST \
  --url https://us.infisical.com/api/v1/app-connections/open-router \
  --header 'Content-Type: application/json' \
  --data '
{
  "method": "api-key",
  "credentials": {
    "apiKey": "<string>"
  },
  "name": "<string>",
  "description": "<string>",
  "projectId": "<string>",
  "isPlatformManagedCredentials": false,
  "gatewayId": "<unknown>"
}
'
{
  "appConnection": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "app": "open-router",
    "method": "api-key",
    "credentials": {},
    "description": "<string>",
    "version": 1,
    "isPlatformManagedCredentials": false,
    "gatewayId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "projectId": "<string>",
    "credentialsHash": "<string>",
    "project": {
      "name": "<string>",
      "id": "<string>",
      "type": "<string>",
      "slug": "<string>"
    }
  }
}
Check out the configuration docs for OpenRouter Connections to learn how to obtain the required credentials.
Creates an OpenRouter app connection using a Provisioning API key. The connection can then be used for OpenRouter API Key secret rotations.

Request body

FieldTypeRequiredDescription
namestringYesA unique name for the connection.
methodstringYesMust be "api-key".
projectIdstring (UUID)YesThe project ID to attach the connection to.
credentials.apiKeystringYesYour OpenRouter Provisioning API key.

Sample request

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-open-router-connection",
    "method": "api-key",
    "projectId": "<project-id>",
    "credentials": {
      "apiKey": "<YOUR-PROVISIONING-API-KEY>"
    }
  }'

Sample response

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

Body

application/json
method
enum<string>
required

The method used to authenticate with OpenRouter.

Available options:
api-key
credentials
object
required

The credentials used to connect with OpenRouter.

name
string
required

The name of the OpenRouter Connection to create. Must be slug-friendly.

Required string length: 1 - 64
description
string | null

An optional description for the OpenRouter Connection.

Maximum string length: 256
projectId
string

The ID of the project to create the OpenRouter Connection in.

isPlatformManagedCredentials
enum<boolean>

Not supported for OpenRouter Connections.

Available options:
true,
false
gatewayId

Not supported for OpenRouter Connections.

Response

Default Response

appConnection
OpenRouter (API Key) · object
required