docs/api-reference/endpoints/app-connections/openai/create.mdx
Creates an OpenAI app connection using an Admin API key. The connection can then be used for OpenAI Service Account secret rotations.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A unique name for the connection. |
method | string | Yes | Must be "api-key". |
credentials.apiKey | string | Yes | Your OpenAI Admin API key. |
curl --request POST \
--url https://app.infisical.com/api/v1/app-connections/openai \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data '{
"name": "my-openai-connection",
"method": "api-key",
"credentials": {
"apiKey": "<YOUR-ADMIN-API-KEY>"
}
}'
{
"appConnection": {
"id": "<connection-id>",
"name": "my-openai-connection",
"description": null,
"version": 1,
"orgId": "<org-id>",
"createdAt": "<ISO8601>",
"updatedAt": "<ISO8601>",
"isPlatformManagedCredentials": false,
"app": "openai",
"method": "api-key",
"credentials": {}
}
}