Skip to content

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

Parameters

Name In Type Required Description
body body LLMProvider true none

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

Status Meaning Description Schema
201 Created LLM provider created successfully LLMProvider
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
409 Conflict Conflict. The request conflicts with the current state of the resource. Error
500 Internal Server Error Internal Server Error. Error

Response Headers

Status Header Type Format Description
201 Location string uri URL 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

Parameters

Name In Type Required Description
limit query integer false Maximum number of items to return per page.
offset query integer false Zero-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

Status Meaning Description Schema
200 OK List of LLM providers LLMProviderListResponse
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
500 Internal Server Error Internal 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

Parameters

Name In Type Required Description
llmProviderId path string true Unique 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

Status Meaning Description Schema
200 OK LLM provider details LLMProvider
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal 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

Parameters

Name In Type Required Description
llmProviderId path string true Unique identifier of the LLM provider
body body LLMProvider true none

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

Status Meaning Description Schema
200 OK LLM provider updated successfully LLMProvider
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal 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

Parameters

Name In Type Required Description
llmProviderId path string true Unique 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

Status Meaning Description Schema
204 No Content LLM provider deleted successfully None
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
403 Forbidden Forbidden. The authenticated user does not have permission to access this resource. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal 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

Parameters

Name In Type Required Description
llmProviderId path string true Unique identifier of the LLM provider
limit query integer false Maximum number of items to return per page.
offset query integer false Zero-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

Status Meaning Description Schema
200 OK List of LLM proxies LLMProxyListResponse
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal 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

Parameters

Name In Type Required Description
llmProviderId path string true Unique identifier of the LLM provider
body body CreateLLMProviderAPIKeyRequest true API 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

Status Meaning Description Schema
201 Created API key created successfully CreateLLMProviderAPIKeyResponse
400 Bad Request Bad Request. Invalid request or validation error. Error
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal Server Error. Error
503 Service Unavailable Service Unavailable. No gateway connections are currently available to service this request. Error

Response Headers

Status Header Type Format Description
201 Location string uri URL 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

Parameters

Name In Type Required Description
llmProviderId path string true Unique identifier of the LLM provider
limit query integer false Maximum number of items to return per page.
offset query integer false Zero-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

Status Meaning Description Schema
200 OK List of API keys retrieved successfully LLMProviderAPIKeyListResponse
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal 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

Parameters

Name In Type Required Description
llmProviderId path string true Unique identifier of the LLM provider
apiKeyId path string true Name 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

Status Meaning Description Schema
204 No Content API key deleted successfully None
401 Unauthorized Unauthorized. Authentication credentials are missing or invalid. Error
404 Not Found Not Found. The specified resource does not exist. Error
500 Internal Server Error Internal Server Error. Error
503 Service Unavailable Service Unavailable. No gateway connections are currently available to service this request. Error