docs/api-reference/endpoints/app-connections/litellm/create.mdx
Creates a LiteLLM app connection using a management-capable API key. The connection can then be used for LiteLLM API Key secret rotations.
| 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 | A management-capable LiteLLM API key (the proxy master key or an admin/management key). |
credentials.instanceUrl | string | Yes | The base URL of your LiteLLM instance (e.g. https://litellm.example.com). |
curl --request POST \
--url https://app.infisical.com/api/v1/app-connections/litellm \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data '{
"name": "my-litellm-connection",
"method": "api-key",
"projectId": "<project-id>",
"credentials": {
"apiKey": "<YOUR-LITELLM-MANAGEMENT-API-KEY>",
"instanceUrl": "https://litellm.example.com"
}
}'
{
"appConnection": {
"id": "<connection-id>",
"name": "my-litellm-connection",
"projectId": "<project-id>",
"description": null,
"version": 1,
"orgId": "<org-id>",
"createdAt": "<ISO8601>",
"updatedAt": "<ISO8601>",
"isPlatformManagedCredentials": false,
"credentialsHash": "...",
"app": "litellm",
"method": "api-key",
"credentials": {
"instanceUrl": "https://litellm.example.com"
}
}
}