API Reference
LLM Service API
API reference for managing language models
The LLM Service provides endpoints for managing language model configurations, including adding, listing, and configuring models for use in conversations and other AI-powered features.
Authentication
All endpoints require a valid Bearer token in the Authorization header.
Base URL
Endpoints
Add Model
Add a new language model configuration.
Endpoint: POST /api/llm/add
Request Body:
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | Display name for the model |
provider | string | Yes | Model provider (e.g., “openai”, “anthropic”) |
version | string | Yes | Model version identifier |
is_active | boolean | No | Whether the model is active and available for use (default: true) |
config | object | No | Model-specific configuration settings |
Response:
Field | Type | Description |
---|---|---|
id | string (UUID) | Model ID |
name | string | Model display name |
provider | string | Model provider |
version | string | Model version |
is_active | boolean | Active status |
config | object | Configuration settings |
created_at | string (datetime) | Creation timestamp |
updated_at | string (datetime) | Last update timestamp |
List Models
Retrieve all language models configured for an organization.
Endpoint: GET /api/llm/list
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Error Responses
Status Code | Description |
---|---|
400 | Bad Request - Invalid input or validation error |
401 | Unauthorized - Invalid or missing token |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn’t exist |
500 | Internal Server Error - Server-side error |
Implementation Notes
- The LLM Service supports multiple providers, including OpenAI and Anthropic
- Models can be enabled or disabled using the
is_active
flag - Custom configurations can be provided for each model
- Model configurations are organization-specific
- The service handles the underlying API integrations with model providers
Was this page helpful?