- AI Workspace
- next
- References
- Platform API
LLM Provider Templates¶
LLM provider template management operations
Create a new LLM provider template family¶
POST /llm-provider-templates
Code samples
curl -X POST https://localhost:9243/api/v0.9/llm-provider-templates \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json
Creates a new template family, starting at v1.0, with an
LLMProviderTemplate body. To add a new version to an existing family,
use POST /llm-provider-templates/copy instead. Organization is
identified via the JWT token.
Payload
{
"id": "openai",
"displayName": "OpenAI",
"managedBy": "wso2",
"description": "Default OpenAI template",
"version": "v1.0",
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"metadata": {
"endpointUrl": "https://api.openai.com",
"auth": {
"type": "bearer",
"header": "Authorization",
"valuePrefix": "Bearer "
},
"logoUrl": "https://cdn.example.com/logos/openai.svg",
"openapiSpecUrl": "https://api.openai.com/openapi.json"
},
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
},
"resourceMappings": {
"resources": [
{
"resource": "/responses",
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
}
}
]
}
}
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | LLMProviderTemplate | true | The template family to create (starts at v1.0). |
Example responses
201 Response
{
"id": "openai",
"groupId": "openai",
"displayName": "OpenAI",
"managedBy": "wso2",
"description": "Default OpenAI template",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"readOnly": false,
"version": "v1.0",
"isLatest": true,
"enabled": true,
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"metadata": {
"endpointUrl": "https://api.openai.com",
"auth": {
"type": "bearer",
"header": "Authorization",
"valuePrefix": "Bearer "
},
"logoUrl": "https://cdn.example.com/logos/openai.svg",
"openapiSpecUrl": "https://api.openai.com/openapi.json"
},
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
},
"resourceMappings": {
"resources": [
{
"resource": "/responses",
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
}
}
]
},
"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
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 template created successfully | LLMProviderTemplate |
| 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 |
| 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 templates, list a family's versions, or get a single version¶
GET /llm-provider-templates
Code samples
curl -X GET https://localhost:9243/api/v0.9/llm-provider-templates \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'
Retrieves LLM provider templates based on the query parameter:
- no query -> list all template versions
- query=latest:true -> list the latest version of each template
- query=groupId:<id> -> list all versions for the template
- query=groupId:<id>&version:<ver> -> retrieve a specific template version
All filters are provided via the URL-encoded query parameter (e.g.
?query=groupId%3Awso2-openai%26version%3Av2.0).
Returns a single LLMProviderTemplate only when both groupId and version are specified;
otherwise returns an LLMProviderTemplateListResponse.
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| query | query | string | false | URL-encoded search DSL. query=latest:true lists only the latest version of each family; query=groupId:<id> lists that family's versions; adding &version:<ver> returns the single full template for that version. Terms are &-separated key:value pairs and the whole value is percent-encoded (e.g. groupId%3Awso2-openai%26version%3Av2.0). |
| 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": 5,
"list": [
{
"id": "openai",
"groupId": "openai",
"displayName": "OpenAI",
"managedBy": "wso2",
"description": "Default OpenAI template",
"createdBy": "john.doe",
"version": "v1.0",
"isLatest": true,
"enabled": true,
"logoUrl": "https://cdn.example.com/logos/openai.svg",
"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
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 | Without a version term: a list response — either templates (all versions by default, or the latest of each family when query=latest:true) or a family's versions. With query=groupId:<id>&version:<ver>: the single full template for that version. |
Inline |
| 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 |
Response Schema
Enumerated Values
| Property | Value |
|---|---|
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
| location | payload |
| location | header |
| location | queryParam |
| location | pathParam |
Create a new version by copying an existing one¶
POST /llm-provider-templates/copy
Code samples
curl -X POST https://localhost:9243/api/v0.9/llm-provider-templates/copy?fromTemplateId=openai-v3-0&toVersion=v4.0 \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json
Creates a new version within a template family by cloning an existing
version (fromTemplateId) and applying optional field overrides from
the body. The new version lands in the same family as the source and
becomes the latest.
Versions start at v1.0 and only go higher — toVersion must match the
v<major>.<minor> pattern with a major of at least 1 (e.g. v2.0); v0.x
is rejected. toTemplateId, when supplied, must equal the handle
derived from the family and toVersion. Organization is identified via
the JWT token.
Built-in (WSO2-managed) template families are immutable: adding a version
to one is rejected with 403. To base a custom template on a built-in,
create a new template (POST /llm-provider-templates) instead — it gets
its own group_id and starts at v1.0.
Payload
{
"displayName": "OpenAI",
"version": "v2.0",
"managedBy": "organization",
"description": "Default OpenAI template",
"openapi": "string",
"metadata": {
"endpointUrl": "https://api.openai.com",
"auth": {
"type": "bearer",
"header": "Authorization",
"valuePrefix": "Bearer "
},
"logoUrl": "https://cdn.example.com/logos/openai.svg",
"openapiSpecUrl": "https://api.openai.com/openapi.json"
},
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
},
"resourceMappings": {
"resources": [
{
"resource": "/responses",
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
}
}
]
}
}
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| fromTemplateId | query | string | true | Handle (id) of the source version to copy from. |
| toTemplateId | query | string | false | Expected handle of the new version. Must equal the handle derived from the source family and toVersion; used to validate the target. |
| toVersion | query | string | true | New version identifier, e.g. v4.0. Must match v |
| body | body | CreateLLMProviderTemplateVersionRequest | false | Optional overrides applied on top of the copied config. Any field present replaces the value cloned from the source version. |
Example responses
New version created successfully
{
"id": "openai-v4-0",
"groupId": "openai",
"displayName": "OpenAI",
"managedBy": "organization",
"description": "Default OpenAI template",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"readOnly": false,
"version": "v4.0",
"isLatest": true,
"enabled": true
}
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
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 | New version created successfully | LLMProviderTemplate |
| 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 |
| 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. |
Get LLM provider template by id¶
GET /llm-provider-templates/{llmProviderTemplateId}
Code samples
curl -X GET https://localhost:9243/api/v0.9/llm-provider-templates/{llmProviderTemplateId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'
Retrieve the complete configuration for a specific LLM provider template.
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| llmProviderTemplateId | path | string | true | Unique handle of the template. |
Example responses
200 Response
{
"id": "openai",
"groupId": "openai",
"displayName": "OpenAI",
"managedBy": "wso2",
"description": "Default OpenAI template",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"readOnly": false,
"version": "v1.0",
"isLatest": true,
"enabled": true,
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"metadata": {
"endpointUrl": "https://api.openai.com",
"auth": {
"type": "bearer",
"header": "Authorization",
"valuePrefix": "Bearer "
},
"logoUrl": "https://cdn.example.com/logos/openai.svg",
"openapiSpecUrl": "https://api.openai.com/openapi.json"
},
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
},
"resourceMappings": {
"resources": [
{
"resource": "/responses",
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
}
}
]
},
"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
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 template details | LLMProviderTemplate |
| 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 template¶
PUT /llm-provider-templates/{llmProviderTemplateId}
Code samples
curl -X PUT https://localhost:9243/api/v0.9/llm-provider-templates/{llmProviderTemplateId} \
-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 template. The template is identified by its unique handle (id). This operation updates the latest version of the template.
Payload
{
"id": "openai",
"displayName": "OpenAI",
"managedBy": "wso2",
"description": "Default OpenAI template",
"version": "v1.0",
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"metadata": {
"endpointUrl": "https://api.openai.com",
"auth": {
"type": "bearer",
"header": "Authorization",
"valuePrefix": "Bearer "
},
"logoUrl": "https://cdn.example.com/logos/openai.svg",
"openapiSpecUrl": "https://api.openai.com/openapi.json"
},
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
},
"resourceMappings": {
"resources": [
{
"resource": "/responses",
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
}
}
]
}
}
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| llmProviderTemplateId | path | string | true | Unique identifier of the template to update |
| body | body | LLMProviderTemplate | true | none |
Example responses
200 Response
{
"id": "openai",
"groupId": "openai",
"displayName": "OpenAI",
"managedBy": "wso2",
"description": "Default OpenAI template",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"readOnly": false,
"version": "v1.0",
"isLatest": true,
"enabled": true,
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"metadata": {
"endpointUrl": "https://api.openai.com",
"auth": {
"type": "bearer",
"header": "Authorization",
"valuePrefix": "Bearer "
},
"logoUrl": "https://cdn.example.com/logos/openai.svg",
"openapiSpecUrl": "https://api.openai.com/openapi.json"
},
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
},
"resourceMappings": {
"resources": [
{
"resource": "/responses",
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
}
}
]
},
"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
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 template updated successfully | LLMProviderTemplate |
| 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 |
Enable or disable a template version¶
PATCH /llm-provider-templates/{llmProviderTemplateId}
Code samples
curl -X PATCH https://localhost:9243/api/v0.9/llm-provider-templates/{llmProviderTemplateId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d @payload.json
Enable or disable the single template version identified by its handle (id). Only built-in templates can be toggled; disabling a version in use by a provider is rejected (409).
Payload
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| llmProviderTemplateId | path | string | true | Unique handle of the template version. |
| body | body | object | true | none |
| enabled | body | boolean | true | Set to true to enable this template version, false to disable it. |
Example responses
200 Response
{
"id": "openai",
"groupId": "openai",
"displayName": "OpenAI",
"managedBy": "wso2",
"description": "Default OpenAI template",
"createdBy": "john.doe",
"updatedBy": "john.doe",
"readOnly": false,
"version": "v1.0",
"isLatest": true,
"enabled": true,
"openapi": "openapi: 3.0.3\ninfo:\n title: Provider API\n version: v1.0\npaths: {}\n",
"metadata": {
"endpointUrl": "https://api.openai.com",
"auth": {
"type": "bearer",
"header": "Authorization",
"valuePrefix": "Bearer "
},
"logoUrl": "https://cdn.example.com/logos/openai.svg",
"openapiSpecUrl": "https://api.openai.com/openapi.json"
},
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
},
"resourceMappings": {
"resources": [
{
"resource": "/responses",
"promptTokens": {
"location": "payload",
"identifier": "$.usage.inputTokens"
},
"completionTokens": {
"location": "payload",
"identifier": "$.usage.outputTokens"
},
"totalTokens": {
"location": "payload",
"identifier": "$.usage.totalTokens"
},
"remainingTokens": {
"location": "header",
"identifier": "x-ratelimit-remaining-tokens"
},
"requestModel": {
"location": "payload",
"identifier": "$.model"
},
"responseModel": {
"location": "payload",
"identifier": "$.model"
}
}
]
},
"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
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 |
|---|---|---|---|
| 200 | OK | Updated template version | LLMProviderTemplate |
| 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 |
| 409 | Conflict | Conflict. The request conflicts with the current state of the resource. | Error |
| 500 | Internal Server Error | Internal Server Error. | Error |
Delete a template version¶
DELETE /llm-provider-templates/{llmProviderTemplateId}
Code samples
curl -X DELETE https://localhost:9243/api/v0.9/llm-provider-templates/{llmProviderTemplateId} \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'
Delete the single template version identified by its handle (id). Built-in versions are read-only (403); a version still in use by a provider is blocked (409).
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| llmProviderTemplateId | path | string | true | Unique handle of the template version. |
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
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 |
|---|---|---|---|
| 204 | No Content | Version 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 |
| 409 | Conflict | Conflict. The request conflicts with the current state of the resource. | Error |
| 500 | Internal Server Error | Internal Server Error. | Error |