Skip to main content

Management API: LLM Proxy Management

You're reading API Gateway 1.0.0. 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/v0.9/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/v1alpha1",
"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/v1alpha1",
"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/v0.9/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/v1alpha1",
"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
valuestringfalsenonenone
policies[LLMPolicy]falsenoneList of policies applied only to this operation (overrides or adds to API-level policies)
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.

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/v1alpha1
kindLlmProxy
typeapi-key
deploymentStatedeployed
deploymentStateundeployed
statedeployed
stateundeployed

Get LLM proxy by unique identifier​

GET /llm-proxies/{id}

Code samples


curl -X GET http://localhost:9090/api/management/v0.9/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/v1alpha1",
"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/v0.9/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/v1alpha1",
"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/v1alpha1",
"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/v0.9/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/v0.9/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/v0.9/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/v0.9/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/v0.9/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/v0.9/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?