Providers

Lists configured AI providers and returns details for one provider. Provider path tokens use the display name rules described on the AI Web API overview.

GET /api/ai/providers

Returns all configured providers as a JSON array.

RESPONSE Field Value Type Description
providerId string Provider identifier. Same value as the configured display name.
displayName string Configured display name.
providerType string Provider type key from the configuration.
providerTypeDisplayName string Display name of the provider type, or the type key if unresolved.
defaultProvider boolean true for the first configured provider.
uploadSupported boolean true if the provider supports resource upload.

Example Request

# Request
GET /api/ai/providers HTTP/1.1
Host: helpdesk.example.com
Authorization: Bearer <access_token>
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
[
  {
    "providerId": "Primary Provider",
    "displayName": "Primary Provider",
    "providerType": "openai",
    "providerTypeDisplayName": "OpenAI",
    "defaultProvider": true,
    "uploadSupported": true
  }
]

GET /api/ai/providers/default

Returns the default provider. Returns 404 if no provider is configured.

Example Request

# Request
GET /api/ai/providers/default HTTP/1.1
Host: helpdesk.example.com
Authorization: Bearer <access_token>
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
  "providerId": "Primary Provider",
  "displayName": "Primary Provider",
  "providerType": "openai",
  "providerTypeDisplayName": "OpenAI",
  "defaultProvider": true,
  "uploadSupported": true
}

GET /api/ai/providers/<providerName>

Returns one provider by name token. The token may be the exact display name or the hyphenized form. Returns 404 for an unknown provider or for nested paths with more than one token. Other HTTP methods return 405.

Example Request

# Request
# "Primary Provider" can also be addressed as Primary-Provider
GET /api/ai/providers/Primary-Provider HTTP/1.1
Host: helpdesk.example.com
Authorization: Bearer <access_token>
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
  "providerId": "Primary Provider",
  "displayName": "Primary Provider",
  "providerType": "openai",
  "providerTypeDisplayName": "OpenAI",
  "defaultProvider": true,
  "uploadSupported": true
}