Update LLM Provider Definition
Endpoint
PUT /apiops/projects/{projectName}/llm-provider-definitions/{definitionName}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| definitionName | string | Yes | Provider catalog definition name (the definition must already exist and must not be built-in) |
Query Parameters
None
Request Body
The body is an LlmProviderDefinition object — a plain entity, not a polymorphic type, so no _class discriminator is required or accepted.
Full JSON Body Example
{
"name": "internal-llm-gateway",
"code": "internal-llm-gateway",
"displayName": "Internal LLM Gateway (v2 rollout)",
"defaultEndpoint": "https://llm-gateway-v2.internal.example.com/v1",
"defaultApiVersion": "v1",
"defaultAuthScheme": "API_KEY_HEADER",
"defaultAuthHeaderName": "x-api-key",
"iconUrl": "https://cdn.example.com/icons/internal-llm.svg",
"docsUrl": "https://wiki.internal.example.com/llm-gateway"
}
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | No | code value, then path value | Definition name; if blank, falls back to code, then to definitionName. Must match definitionName in the path (case-insensitive) once resolved |
| code | string | No | - | Provider type code |
| displayName | string | No | - | UI label |
| defaultEndpoint | string | No | - | Default base API URL |
| defaultApiVersion | string | No | - | Default API version |
| defaultAuthScheme | string | No | - | Default auth scheme enum constant (BEARER, API_KEY_HEADER, BASIC, AWS_SIGV4, OAUTH2, NONE, CUSTOM) |
| defaultAuthHeaderName | string | No | - | Default credential header name |
| iconUrl | string | No | - | Provider icon URL |
| docsUrl | string | No | - | Vendor documentation deep link |
| builtIn | boolean | No | forced false | Ignored on write and always persisted as false. Sending "builtIn": true is rejected outright (see below) |
| id, projectId, lastUpdatedAt | — | No | server-assigned | Any value sent for these fields is ignored — id is resolved from the existing row, projectId is the path project, lastUpdatedAt is always set to the current time |
Notes
namemust matchdefinitionNamein the path (case-insensitive) once resolved, otherwise a400 Bad Requestis returned- The definition named
definitionNamemust already exist in the caller's visible scope, otherwise a400 Bad Request("was not found") is returned - If the existing definition is built-in, or the incoming body sets
"builtIn": true, the update is rejected with a400 Bad Request("Built-in provider definitions are read-only.") - No
_classdiscriminator — this is a plain entity body
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}
EnumStatus
SUCCESS- Operation successfulFAILURE- Operation failed
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Provider definition (name: internal-llm-gateway) was not found!"
}
or
{
"status": "FAILURE",
"resultMessage": "Built-in provider definitions are read-only."
}
or
{
"status": "FAILURE",
"resultMessage": "Provider definition name in path (internal-llm-gateway) does not match name in body (other-name)!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/llm-provider-definitions/internal-llm-gateway/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "internal-llm-gateway",
"code": "internal-llm-gateway",
"displayName": "Internal LLM Gateway (v2 rollout)",
"defaultEndpoint": "https://llm-gateway-v2.internal.example.com/v1",
"defaultAuthScheme": "API_KEY_HEADER",
"defaultAuthHeaderName": "x-api-key"
}'
Permissions
- User must have
AI_DEVELOPMENT+MANAGEpermission in the project
Notes and Warnings
- Definition Must Exist:
PUTfails with "was not found" if no definition with that name exists in the caller's visible scope — use Create LLM Provider Definition (upsert) to create one
- Built-in Is Read-Only:
- Both the target row and the incoming body are checked; updating an already-built-in definition, or sending
"builtIn": true, is rejected the same way
- Both the target row and the incoming body are checked; updating an already-built-in definition, or sending
- No
_classDiscriminator:- Unlike
ConnectionConfigLlm(LLM Provider) bodies, this entity is not polymorphic
- Unlike
- No Secrets, No Deploy:
- The entity carries no credential fields, and updating a definition never triggers an AI Gateway worker deploy
Related Documentation
- Create LLM Provider Definition - Create or upsert a custom definition
- Get LLM Provider Definition - Retrieve a definition by name
- Delete LLM Provider Definition - Delete a custom definition
- LLM Provider Definitions API - Resource overview, permissions and the LlmProviderDefinition vs. LLM Provider distinction