Alfari API Reference
Overview
The Alfari API provides endpoints for managing LLM configurations and provider settings in the TKM AI Agency Platform.
Base URL
/api/alfariEndpoints
Get LLM Configurations
GET /llm-configsGet LLM configurations for an agent. Returns default config for free tier, custom config for business/enterprise.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| agent_name | string | Yes | Name of the agent to get configurations for |
Response
{
"llm_settings": {},
"agent_specific_settings": {}
}Update LLM Configuration
POST /update-llm-configUpdate LLM configuration for a specific agent. Only available for business/enterprise users.
Request Body
{
"agent_name": "string",
"config_json": {},
"organization_id": "string"
}Get Provider Configuration
GET /provider-config/{agent_name}Get provider configuration for an agent. Only accessible by administrators.
Response
{
"success": true,
"config": {}
}Update Provider Configuration
POST /update-provider-configUpdate provider configuration for an agent. Only available for system administrators.
Request Body
{
"agent_name": "string",
"config_json": {}
}Get Default Configuration
GET /default-configGet current default LLM configuration. Only accessible by system administrators.
Response
{
"config": "string"
}Update Default Configuration
POST /default-configUpdate default LLM configuration. Only accessible by system administrators.
Request Body
{
"config": "string"
}Get System Overview
GET /system-overviewGet complete system overview including all configurations and usage statistics. Only accessible by system administrators.
Response
{
"default_config": {},
"version_history": {},
"usage_statistics": {},
"system_status": {
"active_providers": ["string"],
"total_configurations": "number",
"system_health": "string"
}
}Error Responses
403 Forbidden
{
"detail": "Only administrators can access provider configurations"
}500 Internal Server Error
{
"detail": "Error message"
}