Skip to main content

Platform API: LLM providers

LLM provider management operations

Create a new LLM provider​

POST /llm-providers

Code samples


curl -X POST https://localhost:9243/api/v0.9/llm-providers \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Deploy a new LLM provider configuration.

Payload

{
"id": "wso2-openai-provider",
"displayName": "WSO2 OpenAI Provider",
"description": "Primary OpenAI provider",
"version": "v1.0",
"context": "/openai",
"vhost": "api.openai.com",
"template": "openai",
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"modelProviders": [
{
"id": "claude",
"displayName": "Claude",
"models": [
{
"id": "claude-3-5-sonnet",
"displayName": "Claude 3.5 Sonnet",
"description": "High-quality reasoning model"
}
]
}
],
"upstream": {
"main": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
},
"sandbox": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
}
},
"accessControl": {
"mode": "deny_all",
"exceptions": [
{
"path": "/chat/completions",
"methods": [
"GET"
]
}
]
},
"rateLimiting": {
"providerLevel": {
"global": {
"request": {
"enabled": true,
"count": 1500,
"reset": {
"duration": 2,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 1000000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
"consumerLevel": {
"resourceWise": {
"default": {
"request": {
"enabled": true,
"count": 50,
"reset": {
"duration": 2,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 100,
"reset": {
"duration": 1,
"unit": "month"
}
}
},
"resources": [
{
"resource": "/models",
"limit": {
"request": {
"enabled": true,
"count": 200,
"reset": {
"duration": 1,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 100000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
{
"resource": "/chat/completions",
"limit": {
"request": {
"enabled": true,
"count": 25,
"reset": {
"duration": 1,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 10,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
}
]
}
}
},
"globalPolicies": [
{
"executionCondition": "request.header.x-custom == 'enabled'",
"name": "SET_HEADER",
"params": {
"key": "MyHeader",
"value": "MyValue"
},
"version": "v1"
}
],
"operationPolicies": [
{
"name": "token-based-ratelimit",
"version": "v1",
"executionCondition": "string",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"policies": [
{
"name": "budgetControl",
"version": "v1",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"security": {
"enabled": true,
"apiKey": {
"enabled": true,
"key": "X-API-Key",
"valuePrefix": "Bearer",
"in": "header"
}
},
"associatedGateways": [
{
"id": "prod-eu",
"configurations": {
"host": "prod-eu.platform-gw.local"
}
},
{
"id": "prod-us",
"configurations": {
"host": "prod-us.platform-gw.local"
}
}
]
}

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_provider:create`, `ap:llm_provider:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyLLMProvidertruenone

Example responses

201 Response

{
"id": "wso2-openai-provider",
"displayName": "WSO2 OpenAI Provider",
"description": "Primary OpenAI provider",
"createdBy": "john.doe",
"readOnly": false,
"updatedBy": "john.doe",
"version": "v1.0",
"context": "/openai",
"vhost": "api.openai.com",
"template": "openai",
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"modelProviders": [
{
"id": "claude",
"displayName": "Claude",
"models": [
{
"id": "claude-3-5-sonnet",
"displayName": "Claude 3.5 Sonnet",
"description": "High-quality reasoning model"
}
]
}
],
"upstream": {
"main": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
},
"sandbox": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
}
},
"accessControl": {
"mode": "deny_all",
"exceptions": [
{
"path": "/chat/completions",
"methods": [
"GET"
]
}
]
},
"rateLimiting": {
"providerLevel": {
"global": {
"request": {
"enabled": true,
"count": 1500,
"reset": {
"duration": 2,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 1000000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
"consumerLevel": {
"resourceWise": {
"default": {
"request": {
"enabled": true,
"count": 50,
"reset": {
"duration": 2,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 100,
"reset": {
"duration": 1,
"unit": "month"
}
}
},
"resources": [
{
"resource": "/models",
"limit": {
"request": {
"enabled": true,
"count": 200,
"reset": {
"duration": 1,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 100000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
{
"resource": "/chat/completions",
"limit": {
"request": {
"enabled": true,
"count": 25,
"reset": {
"duration": 1,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 10,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
}
]
}
}
},
"globalPolicies": [
{
"executionCondition": "request.header.x-custom == 'enabled'",
"name": "SET_HEADER",
"params": {
"key": "MyHeader",
"value": "MyValue"
},
"version": "v1"
}
],
"operationPolicies": [
{
"name": "token-based-ratelimit",
"version": "v1",
"executionCondition": "string",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"policies": [
{
"name": "budgetControl",
"version": "v1",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"security": {
"enabled": true,
"apiKey": {
"enabled": true,
"key": "X-API-Key",
"valuePrefix": "Bearer",
"in": "header"
}
},
"associatedGateways": [
{
"id": "prod-eu",
"configurations": {
"host": "prod-eu.platform-gw.local"
}
},
{
"id": "prod-us",
"configurations": {
"host": "prod-us.platform-gw.local"
}
}
],
"createdAt": "2023-10-12T10:30:00Z",
"updatedAt": "2023-10-12T10:30:00Z"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

409 Response

{
"status": "error",
"code": "CONFLICT",
"message": "The request conflicts with the current state of the resource."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
201CreatedLLM provider created successfullyLLMProvider
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
409ConflictConflict. The request conflicts with the current state of the resource.Error
500Internal Server ErrorInternal Server Error.Error

Response Headers​

StatusHeaderTypeFormatDescription
201LocationstringuriURL of the newly created resource.

List all LLM providers​

GET /llm-providers

Code samples


curl -X GET https://localhost:9243/api/v0.9/llm-providers \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieve a list of all LLM providers.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_provider:read`, `ap:llm_provider:manage`

Parameters​

NameInTypeRequiredDescription
limitqueryintegerfalseMaximum number of items to return per page.
offsetqueryintegerfalseZero-based index of the first item to return.

Example responses

200 Response

{
"count": 2,
"list": [
{
"id": "wso2-openai-provider",
"displayName": "WSO2 OpenAI Provider",
"description": "Primary OpenAI provider",
"createdBy": "john.doe",
"readOnly": false,
"version": "v1.0",
"template": "openai",
"status": "deployed",
"createdAt": "2025-11-25T10:30:00Z",
"updatedAt": "2025-11-25T10:30:00Z"
}
],
"pagination": {
"total": 10,
"offset": 0,
"limit": 10
}
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKList of LLM providersLLMProviderListResponse
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
500Internal Server ErrorInternal Server Error.Error

Get LLM provider by identifier​

GET /llm-providers/{llmProviderId}

Code samples


curl -X GET https://localhost:9243/api/v0.9/llm-providers/{llmProviderId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieve the complete configuration for a specific LLM provider.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_provider:read`, `ap:llm_provider:manage`

Parameters​

NameInTypeRequiredDescription
llmProviderIdpathstringtrueUnique identifier of the LLM provider

Example responses

200 Response

{
"id": "wso2-openai-provider",
"displayName": "WSO2 OpenAI Provider",
"description": "Primary OpenAI provider",
"createdBy": "john.doe",
"readOnly": false,
"updatedBy": "john.doe",
"version": "v1.0",
"context": "/openai",
"vhost": "api.openai.com",
"template": "openai",
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"modelProviders": [
{
"id": "claude",
"displayName": "Claude",
"models": [
{
"id": "claude-3-5-sonnet",
"displayName": "Claude 3.5 Sonnet",
"description": "High-quality reasoning model"
}
]
}
],
"upstream": {
"main": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
},
"sandbox": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
}
},
"accessControl": {
"mode": "deny_all",
"exceptions": [
{
"path": "/chat/completions",
"methods": [
"GET"
]
}
]
},
"rateLimiting": {
"providerLevel": {
"global": {
"request": {
"enabled": true,
"count": 1500,
"reset": {
"duration": 2,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 1000000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
"consumerLevel": {
"resourceWise": {
"default": {
"request": {
"enabled": true,
"count": 50,
"reset": {
"duration": 2,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 100,
"reset": {
"duration": 1,
"unit": "month"
}
}
},
"resources": [
{
"resource": "/models",
"limit": {
"request": {
"enabled": true,
"count": 200,
"reset": {
"duration": 1,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 100000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
{
"resource": "/chat/completions",
"limit": {
"request": {
"enabled": true,
"count": 25,
"reset": {
"duration": 1,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 10,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
}
]
}
}
},
"globalPolicies": [
{
"executionCondition": "request.header.x-custom == 'enabled'",
"name": "SET_HEADER",
"params": {
"key": "MyHeader",
"value": "MyValue"
},
"version": "v1"
}
],
"operationPolicies": [
{
"name": "token-based-ratelimit",
"version": "v1",
"executionCondition": "string",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"policies": [
{
"name": "budgetControl",
"version": "v1",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"security": {
"enabled": true,
"apiKey": {
"enabled": true,
"key": "X-API-Key",
"valuePrefix": "Bearer",
"in": "header"
}
},
"associatedGateways": [
{
"id": "prod-eu",
"configurations": {
"host": "prod-eu.platform-gw.local"
}
},
{
"id": "prod-us",
"configurations": {
"host": "prod-us.platform-gw.local"
}
}
],
"createdAt": "2023-10-12T10:30:00Z",
"updatedAt": "2023-10-12T10:30:00Z"
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKLLM provider detailsLLMProvider
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Update an existing LLM provider​

PUT /llm-providers/{llmProviderId}

Code samples


curl -X PUT https://localhost:9243/api/v0.9/llm-providers/{llmProviderId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Update the configuration of an existing LLM provider.

Payload

{
"id": "wso2-openai-provider",
"displayName": "WSO2 OpenAI Provider",
"description": "Primary OpenAI provider",
"version": "v1.0",
"context": "/openai",
"vhost": "api.openai.com",
"template": "openai",
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"modelProviders": [
{
"id": "claude",
"displayName": "Claude",
"models": [
{
"id": "claude-3-5-sonnet",
"displayName": "Claude 3.5 Sonnet",
"description": "High-quality reasoning model"
}
]
}
],
"upstream": {
"main": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
},
"sandbox": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
}
},
"accessControl": {
"mode": "deny_all",
"exceptions": [
{
"path": "/chat/completions",
"methods": [
"GET"
]
}
]
},
"rateLimiting": {
"providerLevel": {
"global": {
"request": {
"enabled": true,
"count": 1500,
"reset": {
"duration": 2,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 1000000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
"consumerLevel": {
"resourceWise": {
"default": {
"request": {
"enabled": true,
"count": 50,
"reset": {
"duration": 2,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 100,
"reset": {
"duration": 1,
"unit": "month"
}
}
},
"resources": [
{
"resource": "/models",
"limit": {
"request": {
"enabled": true,
"count": 200,
"reset": {
"duration": 1,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 100000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
{
"resource": "/chat/completions",
"limit": {
"request": {
"enabled": true,
"count": 25,
"reset": {
"duration": 1,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 10,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
}
]
}
}
},
"globalPolicies": [
{
"executionCondition": "request.header.x-custom == 'enabled'",
"name": "SET_HEADER",
"params": {
"key": "MyHeader",
"value": "MyValue"
},
"version": "v1"
}
],
"operationPolicies": [
{
"name": "token-based-ratelimit",
"version": "v1",
"executionCondition": "string",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"policies": [
{
"name": "budgetControl",
"version": "v1",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"security": {
"enabled": true,
"apiKey": {
"enabled": true,
"key": "X-API-Key",
"valuePrefix": "Bearer",
"in": "header"
}
},
"associatedGateways": [
{
"id": "prod-eu",
"configurations": {
"host": "prod-eu.platform-gw.local"
}
},
{
"id": "prod-us",
"configurations": {
"host": "prod-us.platform-gw.local"
}
}
]
}

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_provider:update`, `ap:llm_provider:manage`

Parameters​

NameInTypeRequiredDescription
llmProviderIdpathstringtrueUnique identifier of the LLM provider
bodybodyLLMProvidertruenone

Example responses

200 Response

{
"id": "wso2-openai-provider",
"displayName": "WSO2 OpenAI Provider",
"description": "Primary OpenAI provider",
"createdBy": "john.doe",
"readOnly": false,
"updatedBy": "john.doe",
"version": "v1.0",
"context": "/openai",
"vhost": "api.openai.com",
"template": "openai",
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"modelProviders": [
{
"id": "claude",
"displayName": "Claude",
"models": [
{
"id": "claude-3-5-sonnet",
"displayName": "Claude 3.5 Sonnet",
"description": "High-quality reasoning model"
}
]
}
],
"upstream": {
"main": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
},
"sandbox": {
"url": "http://prod-backend:5000/api/v2",
"auth": {
"type": "api-key",
"header": "X-API-Key",
"value": "my-api-key-value"
}
}
},
"accessControl": {
"mode": "deny_all",
"exceptions": [
{
"path": "/chat/completions",
"methods": [
"GET"
]
}
]
},
"rateLimiting": {
"providerLevel": {
"global": {
"request": {
"enabled": true,
"count": 1500,
"reset": {
"duration": 2,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 1000000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
"consumerLevel": {
"resourceWise": {
"default": {
"request": {
"enabled": true,
"count": 50,
"reset": {
"duration": 2,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 100,
"reset": {
"duration": 1,
"unit": "month"
}
}
},
"resources": [
{
"resource": "/models",
"limit": {
"request": {
"enabled": true,
"count": 200,
"reset": {
"duration": 1,
"unit": "week"
}
},
"token": {
"enabled": true,
"count": 100000,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
},
{
"resource": "/chat/completions",
"limit": {
"request": {
"enabled": true,
"count": 25,
"reset": {
"duration": 1,
"unit": "week"
}
},
"cost": {
"enabled": true,
"amount": 10,
"reset": {
"duration": 1,
"unit": "month"
}
}
}
}
]
}
}
},
"globalPolicies": [
{
"executionCondition": "request.header.x-custom == 'enabled'",
"name": "SET_HEADER",
"params": {
"key": "MyHeader",
"value": "MyValue"
},
"version": "v1"
}
],
"operationPolicies": [
{
"name": "token-based-ratelimit",
"version": "v1",
"executionCondition": "string",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"policies": [
{
"name": "budgetControl",
"version": "v1",
"paths": [
{
"path": "/chat/completions",
"methods": [
"GET"
],
"params": {}
}
]
}
],
"security": {
"enabled": true,
"apiKey": {
"enabled": true,
"key": "X-API-Key",
"valuePrefix": "Bearer",
"in": "header"
}
},
"associatedGateways": [
{
"id": "prod-eu",
"configurations": {
"host": "prod-eu.platform-gw.local"
}
},
{
"id": "prod-us",
"configurations": {
"host": "prod-us.platform-gw.local"
}
}
],
"createdAt": "2023-10-12T10:30:00Z",
"updatedAt": "2023-10-12T10:30:00Z"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKLLM provider updated successfullyLLMProvider
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Delete an LLM provider​

DELETE /llm-providers/{llmProviderId}

Code samples


curl -X DELETE https://localhost:9243/api/v0.9/llm-providers/{llmProviderId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Remove an LLM provider.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_provider:delete`, `ap:llm_provider:manage`

Parameters​

NameInTypeRequiredDescription
llmProviderIdpathstringtrueUnique identifier of the LLM provider

Example responses

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

403 Response

{
"status": "error",
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
204No ContentLLM provider deleted successfullyNone
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
403ForbiddenForbidden. The authenticated user does not have permission to access this resource.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

List LLM proxies by provider​

GET /llm-providers/{llmProviderId}/llm-proxies

Code samples


curl -X GET https://localhost:9243/api/v0.9/llm-providers/{llmProviderId}/llm-proxies \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Retrieve a list of LLM proxies that use the specified LLM provider.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_proxy:deployment:read`, `ap:llm_proxy:deployment:manage`, `ap:llm_proxy:manage`

Parameters​

NameInTypeRequiredDescription
llmProviderIdpathstringtrueUnique identifier of the LLM provider
limitqueryintegerfalseMaximum number of items to return per page.
offsetqueryintegerfalseZero-based index of the first item to return.

Example responses

200 Response

{
"count": 2,
"list": [
{
"id": "wso2-con-assistant",
"displayName": "WSO2 Con Assistant",
"description": "Customer support assistant",
"createdBy": "john.doe",
"context": "/wso2-con-assistant",
"version": "v1.0",
"projectId": "default-project",
"provider": "wso2-openai-provider",
"status": "deployed",
"createdAt": "2025-11-25T10:30:00Z",
"updatedAt": "2025-11-25T10:30:00Z",
"readOnly": false
}
],
"pagination": {
"total": 10,
"offset": 0,
"limit": 10
}
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKList of LLM proxiesLLMProxyListResponse
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Create a new API key for an LLM provider​

POST /llm-providers/{llmProviderId}/api-keys

Code samples


curl -X POST https://localhost:9243/api/v0.9/llm-providers/{llmProviderId}/api-keys \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json

Generates a new API key for the specified LLM provider. The generated key is broadcasted to all gateways in the organization and can be used to authenticate requests to the LLM provider when API key validation is enabled.

Payload

{
"id": "production-key",
"displayName": "Production Key",
"expiresAt": "2026-12-31T23:59:59Z",
"issuer": "api-platform-devportal",
"allowedTargets": "dev_gateway,test_gateway"
}

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_provider:api_key:create`, `ap:llm_provider:api_key:manage`, `ap:llm_provider:manage`, `ap:api_key:all:manage`

Parameters​

NameInTypeRequiredDescription
llmProviderIdpathstringtrueUnique identifier of the LLM provider
bodybodyCreateLLMProviderAPIKeyRequesttrueAPI key creation details

Example responses

201 Response

{
"status": "success",
"message": "API key created and broadcasted to gateways successfully",
"id": "production-key",
"apiKey": "REDACTED_API_KEY"
}

400 Response

{
"status": "error",
"code": "VALIDATION_FAILED",
"message": "The request failed validation.",
"errors": [
{
"field": "<name of the offending field>",
"message": "<reason this field failed validation>"
}
]
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

503 Response

{
"status": "error",
"code": "GATEWAY_CONNECTION_UNAVAILABLE",
"message": "No gateway connections are currently available.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
201CreatedAPI key created successfullyCreateLLMProviderAPIKeyResponse
400Bad RequestBad Request. Invalid request or validation error.Error
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error
503Service UnavailableService Unavailable. No gateway connections are currently available to service this request.Error

Response Headers​

StatusHeaderTypeFormatDescription
201LocationstringuriURL of the newly created resource.

List API keys for an LLM provider​

GET /llm-providers/{llmProviderId}/api-keys

Code samples


curl -X GET https://localhost:9243/api/v0.9/llm-providers/{llmProviderId}/api-keys \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Returns all API keys associated with the specified LLM provider. The plain key value is never returned.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_provider:api_key:read`, `ap:llm_provider:api_key:manage`, `ap:llm_provider:manage`, `ap:api_key:all:manage`

Parameters​

NameInTypeRequiredDescription
llmProviderIdpathstringtrueUnique identifier of the LLM provider
limitqueryintegerfalseMaximum number of items to return per page.
offsetqueryintegerfalseZero-based index of the first item to return.

Example responses

200 Response

{
"list": [
{
"id": "string",
"displayName": "string",
"maskedApiKey": "string",
"status": "active",
"createdAt": "2019-08-24T14:15:22Z",
"createdBy": "john.doe",
"updatedAt": "2019-08-24T14:15:22Z",
"expiresAt": "2019-08-24T14:15:22Z",
"issuer": "api-platform-devportal",
"allowedTargets": "string"
}
],
"count": 0,
"pagination": {
"total": 10,
"offset": 0,
"limit": 10
}
}

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
200OKList of API keys retrieved successfullyLLMProviderAPIKeyListResponse
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error

Delete an API key for an LLM provider​

DELETE /llm-providers/{llmProviderId}/api-keys/{apiKeyId}

Code samples


curl -X DELETE https://localhost:9243/api/v0.9/llm-providers/{llmProviderId}/api-keys/{apiKeyId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Deletes the key from the database and broadcasts a revoke event to the allowed gateways.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `ap:llm_provider:api_key:delete`, `ap:llm_provider:api_key:manage`, `ap:llm_provider:manage`, `ap:api_key:all:manage`

Parameters​

NameInTypeRequiredDescription
llmProviderIdpathstringtrueUnique identifier of the LLM provider
apiKeyIdpathstringtrueName of the API key to delete

Example responses

401 Response

{
"status": "error",
"code": "UNAUTHORIZED",
"message": "Authorization header is required, or the token is invalid or expired."
}

404 Response

{
"status": "error",
"code": "NOT_FOUND",
"message": "The specified resource does not exist."
}

500 Response

{
"status": "error",
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

503 Response

{
"status": "error",
"code": "GATEWAY_CONNECTION_UNAVAILABLE",
"message": "No gateway connections are currently available.",
"trackingId": "4f1c6f2e-8a4b-4c93-b1de-9f2f6f0c2a11"
}

Responses​

StatusMeaningDescriptionSchema
204No ContentAPI key deleted successfullyNone
401UnauthorizedUnauthorized. Authentication credentials are missing or invalid.Error
404Not FoundNot Found. The specified resource does not exist.Error
500Internal Server ErrorInternal Server Error.Error
503Service UnavailableService Unavailable. No gateway connections are currently available to service this request.Error

Was this page helpful?