Skip to main content

Management API: LLM Proxy Management

You're reading AI Gateway 2026.09.24. The newest release is 1.2.0. Go to the newest release

CRUD operations for LLM Proxy configurations

Create a new LLM proxy​

POST /llm-proxies

Code samples


curl -X POST http://localhost:9090/api/management/v1/llm-proxies \
-u {username}:{password} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Add a new LLM proxy to the Gateway. A proxy defines how to interact with an LLM service deployed in the Gateway, including authentication and policies.

Payload

{
"apiVersion": "gateway.api-platform.wso2.com/v1",
"kind": "LlmProxy",
"metadata": {
"name": "openai-proxy"
},
"spec": {
"displayName": "OpenAI Proxy",
"version": "v1.0",
"context": "/openai-proxy",
"provider": {
"id": "wso2-openai-provider"
},
"policies": []
}
}

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `developer`

Parameters​

NameInTypeRequiredDescription
bodybodyLLMProxyConfigurationRequesttrueLLM proxy in YAML or JSON format

Example responses

201 Response

{
"apiVersion": "gateway.api-platform.wso2.com/v1",
"kind": "LlmProxy",
"metadata": {
"name": "openai-proxy"
},
"spec": {
"displayName": "OpenAI Proxy",
"version": "v1.0",
"context": "/openai-proxy",
"provider": {
"id": "wso2-openai-provider"
},
"policies": []
},
"status": {
"id": "openai-proxy",
"state": "deployed",
"createdAt": "2026-04-24T07:21:13Z",
"updatedAt": "2026-04-24T07:21:13Z",
"deployedAt": "2026-04-24T07:21:13Z"
}
}

Responses​

StatusMeaningDescriptionSchema
201CreatedLLM proxy created and deployed successfullyLLMProxyConfiguration
400Bad RequestInvalid configuration (validation failed)ErrorResponse
409ConflictConflict - Proxy with same name and version already existsErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

List all LLM proxies​

GET /llm-proxies

Code samples


curl -X GET http://localhost:9090/api/management/v1/llm-proxies \
-u {username}:{password} \
-H 'Accept: application/json'

List LLM proxies registered in the Gateway, optionally filtered by name, version, context, status, or vhost.

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `developer`

Parameters​

NameInTypeRequiredDescription
displayNamequerystringfalseFilter by LLM proxy displayName
versionquerystringfalseFilter by LLM proxy version
contextquerystringfalseFilter by LLM proxy context/path
statusquerystringfalseFilter by deployment status
vhostquerystringfalseFilter by LLM proxy vhost

Enumerated Values​

ParameterValue
statusdeployed
statusundeployed

Example responses

200 Response

{
"status": "success",
"count": 2,
"proxies": [
{
"apiVersion": "gateway.api-platform.wso2.com/v1",
"kind": "LlmProxy",
"metadata": {
"name": "openai-proxy"
},
"spec": {
"displayName": "OpenAI Proxy",
"version": "v1.0",
"context": "/openai-proxy",
"provider": {
"id": "wso2-openai-provider"
},
"policies": []
},
"status": {
"id": "openai-proxy",
"state": "deployed",
"createdAt": "2026-04-24T07:21:13Z",
"updatedAt": "2026-04-24T07:21:13Z",
"deployedAt": "2026-04-24T07:21:13Z"
}
}
]
}

Responses​

StatusMeaningDescriptionSchema
200OKList of LLM proxiesInline
500Internal Server ErrorInternal server errorErrorResponse

Response Schema​

Status Code 200

NameTypeRequiredRestrictionsDescription
statusstringfalsenonenone
countintegerfalsenonenone
proxies[allOf]falsenonenone

allOf

NameTypeRequiredRestrictionsDescription
anonymousLLMProxyConfigurationRequestfalsenonenone
apiVersionstringtruenoneProxy specification version
kindstringtruenoneProxy kind
metadataMetadatatruenonenone
namestringtruenoneUnique handle for the resource
labelsobjectfalsenoneLabels are key-value pairs for organizing and selecting APIs. Keys must not contain spaces.
additionalPropertiesstringfalsenonenone
annotationsobjectfalsenoneAnnotations are arbitrary non-identifying metadata. Use domain-prefixed keys.
additionalPropertiesstringfalsenonenone
specLLMProxyConfigDatatruenonenone
displayNamestringtruenoneHuman-readable LLM proxy name (must be URL-friendly - only letters, numbers, spaces, hyphens, underscores, and dots allowed)
versionstringtruenoneSemantic version of the LLM proxy
contextstringfalsenoneBase path for all API routes (must start with /, no trailing slash)
vhoststringfalsenoneVirtual host name used for routing. Supports standard domain names, subdomains, or wildcard domains. Must follow RFC-compliant hostname rules. Wildcards are only allowed in the left-most label (e.g., *.example.com).
providerLLMProxyProvidertruenonenone
idstringtruenoneUnique id of a deployed llm provider
authLLMUpstreamAuthfalsenonenone
typestringtruenonenone
headerstringfalsenonenone
valuestringfalsewrite-onlyUpstream credential. Write-only: accepted on create/update and never returned by the management API on a read, for any role. An update that omits it inherits the stored value; set type: none to remove auth.
globalPolicies[Policy]falsenoneGlobal (api-level) policies applied across ALL operations as one shared scope, evaluated before operation-level policies.
namestringtruenoneName of the policy
versionstringtruenoneVersion of the policy. Only major-only version is allowed (e.g., v0, v1). Full semantic version (e.g., v1.0.0) is not accepted and will be rejected. The Gateway Controller resolves the major version to the single matching full version installed in the gateway image.
executionConditionstringfalsenoneExpression controlling conditional execution of the policy
paramsobjectfalsenoneArbitrary parameters for the policy (free-form key/value structure)
operationPolicies[OperationPolicy]falsenoneOperation-level policies scoped to specific paths/methods, evaluated after global policies.
namestringtruenonenone
versionstringtruenonenone
executionConditionstringfalsenoneExpression controlling conditional execution of the policy
paths[OperationPolicyPath]truenonenone
pathstringtruenonenone
methods[string]truenonenone
paramsobjecttruenoneJSON Schema describing the parameters accepted by this policy. This itself is a JSON Schema document.
additionalProviders[LLMProxyAdditionalProvider]falsenoneOptional list of additional LLM providers attached to this proxy as selectable upstreams. Policies (e.g. an OpenAI translator) can route requests to any of these by setting the upstream name. The primary provider field above remains the default upstream and the FK target.
idstringtruenoneUnique id of a deployed llm provider
asstringfalsenoneLogical LLM Provider name used by policies to select this provider. Must be unique within the proxy. Defaults to id when omitted.
authLLMUpstreamAuthfalsenonenone
transformerLLMProxyTransformerfalsenoneRequest/response translator applied when this provider is the selected upstream. The proxy injects the translator as a conditional policy whose execution condition matches this provider, so it runs only when the provider is selected. The provider's as name (defaults to id) is passed to the translator as its target upstream.
typestringtruenoneTranslator policy name (for example openai-to-anthropic).
versionstringtruenoneMajor-only translator policy version (for example v1). The Gateway Controller resolves it to the installed full version.
paramsobjectfalsenoneTranslator-specific parameters (for example model, apiVersion).
policies[LLMPolicy]falsenoneDEPRECATED - use operationPolicies. Still honoured (treated identically to operationPolicies).
namestringtruenonenone
versionstringtruenonenone
paths[LLMPolicyPath]truenonenone
pathstringtruenonenone
methods[string]truenonenone
paramsobjecttruenoneJSON Schema describing the parameters accepted by this policy. This itself is a JSON Schema document.
deploymentStatestringfalsenoneDesired deployment state - 'deployed' (default) or 'undeployed'. When set to 'undeployed', the LLM Proxy is removed from router traffic but configuration and policies are preserved for potential redeployment.
resilienceResiliencefalsenoneBackend/route timeout configuration. Maps to Envoy RouteAction timeouts. Can be set at the API level (applies to all routes) and/or the operation level (applies to that operation's route). When set at both levels, the operation-level value takes precedence. When unset, the gateway's global route timeout defaults apply.
timeoutstringfalsenoneMaximum time for the entire route (request to upstream response). "0s" disables the timeout.
idleTimeoutstringfalsenonePer-route stream idle timeout (overrides the listener stream idle timeout for this route). "0s" disables the timeout.

and

NameTypeRequiredRestrictionsDescription
anonymousobjectfalsenonenone
statusResourceStatusfalseread-onlyServer-managed lifecycle fields. Populated on responses.
idstringfalsenoneUnique identifier assigned by the server (equal to metadata.name)
statestringfalsenoneDesired deployment state reported by the server
createdAtstring(date-time)falsenoneTimestamp when the resource was first created (UTC)
updatedAtstring(date-time)falsenoneTimestamp when the resource was last updated (UTC)
deployedAtstring(date-time)falsenoneTimestamp when the resource was last deployed (omitted when undeployed)

Enumerated Values​

PropertyValue
apiVersiongateway.api-platform.wso2.com/v1
kindLlmProxy
typeapi-key
typeother
typenone
deploymentStatedeployed
deploymentStateundeployed
statedeployed
stateundeployed

Get LLM proxy by unique identifier​

GET /llm-proxies/{id}

Code samples


curl -X GET http://localhost:9090/api/management/v1/llm-proxies/{id} \
-u {username}:{password} \
-H 'Accept: application/json'

Get an LLM proxy by its ID.

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `developer`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueUnique identifier of the LLM proxy

Example responses

200 Response

{
"apiVersion": "gateway.api-platform.wso2.com/v1",
"kind": "LlmProxy",
"metadata": {
"name": "openai-proxy"
},
"spec": {
"displayName": "OpenAI Proxy",
"version": "v1.0",
"context": "/openai-proxy",
"provider": {
"id": "wso2-openai-provider"
},
"policies": []
},
"status": {
"id": "openai-proxy",
"state": "deployed",
"createdAt": "2026-04-24T07:21:13Z",
"updatedAt": "2026-04-24T07:21:13Z",
"deployedAt": "2026-04-24T07:21:13Z"
}
}

Responses​

StatusMeaningDescriptionSchema
200OKLLM proxy detailsLLMProxyConfiguration
404Not FoundLLM proxy not foundErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Update an existing LLM proxy​

PUT /llm-proxies/{id}

Code samples


curl -X PUT http://localhost:9090/api/management/v1/llm-proxies/{id} \
-u {username}:{password} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Update an existing LLM proxy in the Gateway.

Payload

{
"apiVersion": "gateway.api-platform.wso2.com/v1",
"kind": "LlmProxy",
"metadata": {
"name": "openai-proxy"
},
"spec": {
"displayName": "OpenAI Proxy",
"version": "v1.0",
"context": "/openai-proxy",
"provider": {
"id": "wso2-openai-provider"
},
"policies": []
}
}

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `developer`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueUnique identifier of the LLM proxy
bodybodyLLMProxyConfigurationRequesttrueUpdated LLM proxy

Example responses

200 Response

{
"apiVersion": "gateway.api-platform.wso2.com/v1",
"kind": "LlmProxy",
"metadata": {
"name": "openai-proxy"
},
"spec": {
"displayName": "OpenAI Proxy",
"version": "v1.0",
"context": "/openai-proxy",
"provider": {
"id": "wso2-openai-provider"
},
"policies": []
},
"status": {
"id": "openai-proxy",
"state": "deployed",
"createdAt": "2026-04-24T07:21:13Z",
"updatedAt": "2026-04-24T07:21:13Z",
"deployedAt": "2026-04-24T07:21:13Z"
}
}

Responses​

StatusMeaningDescriptionSchema
200OKLLM proxy updated successfullyLLMProxyConfiguration
400Bad RequestInvalid configurationErrorResponse
404Not FoundLLM proxy not foundErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Delete an LLM proxy​

DELETE /llm-proxies/{id}

Code samples


curl -X DELETE http://localhost:9090/api/management/v1/llm-proxies/{id} \
-u {username}:{password} \
-H 'Accept: application/json'

Delete an LLM proxy from the Gateway.

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `developer`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueUnique identifier of the LLM proxy

Example responses

200 Response

{
"status": "success",
"message": "LLM proxy deleted successfully",
"id": "openai-proxy"
}

Responses​

StatusMeaningDescriptionSchema
200OKLLM proxy deleted successfullyInline
404Not FoundLLM proxy not foundErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Response Schema​

Status Code 200

NameTypeRequiredRestrictionsDescription
statusstringfalsenonenone
messagestringfalsenonenone
idstringfalsenonenone

Create a new API key for an LLM proxy​

POST /llm-proxies/{id}/api-keys

Code samples


curl -X POST http://localhost:9090/api/management/v1/llm-proxies/{id}/api-keys \
-u {username}:{password} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Generate a new API key for an LLM proxy in the Gateway.

Payload

{
"name": "my-production-key"
}

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `consumer`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueUnique handle of the LLM proxy to generate the key for
bodybodyAPIKeyCreationRequesttruenone

Example responses

201 Response

{
"status": "success",
"message": "API key generated successfully",
"remainingApiKeyQuota": 9,
"apiKey": {
"name": "my-production-key",
"displayName": "My Production Key",
"apiKey": "apip_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"apiId": "reading-list-api-v1.0",
"status": "active",
"createdAt": "2026-04-01T10:30:00Z",
"createdBy": "admin",
"expiresAt": null,
"source": "local"
}
}

Responses​

StatusMeaningDescriptionSchema
201CreatedAPI key created successfullyAPIKeyCreationResponse
400Bad RequestInvalid configuration (validation failed)ErrorResponse
404Not FoundLLM proxy not foundErrorResponse
409ConflictConflict (duplicate key or conflicting update)ErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Get the list of API keys for an LLM proxy​

GET /llm-proxies/{id}/api-keys

Code samples


curl -X GET http://localhost:9090/api/management/v1/llm-proxies/{id}/api-keys \
-u {username}:{password} \
-H 'Accept: application/json'

List all API keys for an LLM proxy in the Gateway.

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `consumer`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueUnique handle of the LLM proxy to retrieve keys for

Example responses

200 Response

{
"apiKeys": [
{
"name": "my-production-key",
"displayName": "My Production Key",
"apiKey": "apip_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"apiId": "reading-list-api-v1.0",
"status": "active",
"createdAt": "2026-04-01T10:30:00Z",
"createdBy": "admin",
"expiresAt": null,
"source": "local"
}
],
"totalCount": 3,
"status": "success"
}

Responses​

StatusMeaningDescriptionSchema
200OKList of API keysAPIKeyListResponse
404Not FoundLLM proxy not foundErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Regenerate API key for an LLM proxy​

POST /llm-proxies/{id}/api-keys/{apiKeyName}/regenerate

Code samples


curl -X POST http://localhost:9090/api/management/v1/llm-proxies/{id}/api-keys/{apiKeyName}/regenerate \
-u {username}:{password} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Regenerate an existing API key for an LLM proxy in the Gateway.

Payload

{}

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `consumer`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueUnique handle of the LLM proxy
apiKeyNamepathstringtrueName of the API key to regenerate
bodybodyAPIKeyRegenerationRequesttruenone

Example responses

200 Response

{
"status": "success",
"message": "API key generated successfully",
"remainingApiKeyQuota": 9,
"apiKey": {
"name": "my-production-key",
"displayName": "My Production Key",
"apiKey": "apip_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"apiId": "reading-list-api-v1.0",
"status": "active",
"createdAt": "2026-04-01T10:30:00Z",
"createdBy": "admin",
"expiresAt": null,
"source": "local"
}
}

Responses​

StatusMeaningDescriptionSchema
200OKAPI key rotated successfullyAPIKeyCreationResponse
400Bad RequestInvalid configuration (validation failed)ErrorResponse
404Not FoundLLM proxy or API key not foundErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Update an API key for an LLM proxy​

PUT /llm-proxies/{id}/api-keys/{apiKeyName}

Code samples


curl -X PUT http://localhost:9090/api/management/v1/llm-proxies/{id}/api-keys/{apiKeyName} \
-u {username}:{password} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Update an API key with a custom value instead of auto-generating one.

Payload

{
"name": "my-production-key"
}

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `consumer`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueUnique handle of the LLM proxy
apiKeyNamepathstringtrueName of the API key to update
bodybodyAPIKeyUpdateRequesttruenone

Example responses

200 Response

{
"status": "success",
"message": "API key generated successfully",
"remainingApiKeyQuota": 9,
"apiKey": {
"name": "my-production-key",
"displayName": "My Production Key",
"apiKey": "apip_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"apiId": "reading-list-api-v1.0",
"status": "active",
"createdAt": "2026-04-01T10:30:00Z",
"createdBy": "admin",
"expiresAt": null,
"source": "local"
}
}

Responses​

StatusMeaningDescriptionSchema
200OKAPI key updated successfullyAPIKeyCreationResponse
400Bad RequestInvalid request (validation failed)ErrorResponse
404Not FoundLLM proxy or API key not foundErrorResponse
409ConflictConflict (duplicate key or conflicting update)ErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Revoke an API key for an LLM proxy​

DELETE /llm-proxies/{id}/api-keys/{apiKeyName}

Code samples


curl -X DELETE http://localhost:9090/api/management/v1/llm-proxies/{id}/api-keys/{apiKeyName} \
-u {username}:{password} \
-H 'Accept: application/json'

Revoke an API key. Once revoked, it can no longer be used to authenticate requests.

Authentication​

This operation requires Basic Auth authentication. Required roles: `admin`, `consumer`

Parameters​

NameInTypeRequiredDescription
idpathstringtrueUnique handle of the LLM proxy
apiKeyNamepathstringtrueName of the API key to revoke

Example responses

200 Response

{
"status": "success",
"message": "API key revoked successfully"
}

Responses​

StatusMeaningDescriptionSchema
200OKAPI key revoked successfullyAPIKeyRevocationResponse
400Bad RequestInvalid configuration (validation failed)ErrorResponse
404Not FoundLLM proxy or API key not foundErrorResponse
500Internal Server ErrorInternal server errorErrorResponse

Was this page helpful?