Skip to main content

Providers

Endpoints for managing AI service provider credentials and configurations.

GET /api/providers

List all AI providers configured for the tenant.

Authentication: permission.ai.manage

Response:

{
"_links": {
"self": { "href": "/api/providers" }
},
"_embedded": {
"inf:provider": [
{
"id": "anthropic-123",
"name": "Anthropic",
"type": "anthropic",
"managed": true,
"internal": false,
"credential": {
"type": "enterprise",
"configured": true
},
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
{
"id": "openai-456",
"name": "OpenAI",
"type": "openai",
"managed": false,
"internal": false,
"credential": {
"type": "api_key",
"configured": true
},
"createdAt": "2024-01-10T12:00:00Z",
"updatedAt": "2024-01-10T12:00:00Z"
}
]
},
"start": 0,
"count": 2,
"total": 2
}

Provider Properties:

FieldTypeDescription
idstringUnique provider ID
namestringDisplay name
typestringProvider type (e.g., anthropic, openai, google)
managedbooleanSystem-managed provider
internalbooleanInternal-only provider
credentialobjectCredential configuration (sensitive data redacted)
createdAtdateCreation timestamp
updatedAtdateLast update timestamp

POST /api/providers

Create a new AI provider with credentials.

Authentication: permission.ai.manage

Pre-blocks: permission.ai.manage

Request Body:

FieldTypeRequiredDescription
namestringYesProvider display name
typestringYesProvider type (see types endpoint)
credentialobjectYesProvider credentials (enterprise credential required)

Example Request:

{
"name": "Custom OpenAI",
"type": "openai",
"credential": {
"type": "api_key",
"apiKey": "sk-..."
}
}

Response:

{
"id": "custom-789",
"name": "Custom OpenAI",
"type": "openai",
"managed": false,
"internal": false,
"credential": {
"type": "api_key",
"configured": true
},
"createdAt": "2024-01-15T14:00:00Z"
}
Enterprise Credentials Required

Creating providers requires enterprise-level credentials. Contact your administrator to configure provider access.


GET /api/providers/{id}

Retrieve a specific provider's configuration.

Authentication: permission.ai.manage

Pre-blocks:

  • provider.lookup
  • permission.ai.manage

Response:

Provider object with full details (credentials redacted).


PUT /api/providers/{id}

Update a provider's configuration.

Authentication: permission.ai.manage

Pre-blocks:

  • provider.lookup
  • permission.ai.manage

Request Body:

FieldTypeDescription
namestringUpdate display name
credentialobjectUpdate credentials

Managed Provider Restrictions:

  • Internal and managed providers have limited update capabilities
  • Can update credentials (key rotation)
  • Cannot change provider type
  • Cannot delete

Example Request:

{
"credential": {
"type": "api_key",
"apiKey": "sk-new-key..."
}
}

Response:

Returns the updated provider object.


DELETE /api/providers/{id}

Delete a provider and all associated models.

Authentication: permission.ai.manage

Pre-blocks:

  • provider.lookup
  • permission.ai.manage

Response:

204 No Content

Restrictions:

  • Cannot delete managed providers
  • Cannot delete providers with models in active use
  • Cascades to delete all provider models
Cascade Deletion

Deleting a provider removes all associated models. Ensure models are not referenced by active chats before deletion.


GET /api/provider-types

Discover available provider types supported by the system.

Authentication: permission.ai.manage

Response:

{
"types": [
{
"id": "anthropic",
"name": "Anthropic",
"description": "Anthropic's Claude models",
"credentialTypes": ["api_key", "enterprise"],
"capabilities": ["chat", "attachments", "web"],
"documentationUrl": "https://docs.anthropic.com"
},
{
"id": "openai",
"name": "OpenAI",
"description": "OpenAI's GPT models",
"credentialTypes": ["api_key"],
"capabilities": ["chat", "generateImage", "createEmbeddings"],
"documentationUrl": "https://platform.openai.com/docs"
}
]
}

Type Properties:

FieldTypeDescription
idstringProvider type identifier
namestringDisplay name
descriptionstringProvider description
credentialTypesarraySupported credential types
capabilitiesarrayAvailable model capabilities
documentationUrlstringProvider documentation link

Use Cases:

  • Discover available providers before creating
  • Validate credential types
  • Display provider selection UI

GET /api/providers/{id}/models

List all models available from a provider.

Authentication: permission.ai.manage

Pre-blocks:

  • provider.lookup
  • permission.ai.manage

Response:

{
"_links": {
"self": { "href": "/api/providers/{id}/models" }
},
"_embedded": {
"inf:model": [
{
"id": "claude-opus-4",
"name": "Claude Opus 4",
"providerId": "anthropic-123",
"model": "claude-opus-4-20250514",
"chat": true,
"tier": "strategic"
}
]
},
"start": 0,
"count": 1,
"total": 1
}

POST /api/providers/{id}/models

Create a new model for a specific provider.

Authentication: permission.ai.manage

Pre-blocks:

  • provider.lookup
  • permission.ai.manage

Request Body:

Same as POST /api/models but providerId is automatically set from the URL.

Example Request:

{
"model": "gpt-4-turbo",
"name": "GPT-4 Turbo",
"slug": "gpt-4-turbo",
"chat": true,
"tier": "advanced",
"promptPpm": 10.0,
"completionPpm": 30.0
}

Response:

Returns the created model object.

Provider Discovery

Use the provider types endpoint to discover available providers before creating custom provider configurations.