Back to Infisical

Create

docs/api-reference/endpoints/app-connections/openrouter/create.mdx

0.159.251.6 KB
Original Source
<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.

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

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": {}
  }
}