API Reference
Backoffice APIs
Alfari

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/alfari

Endpoints

Get LLM Configurations

GET /llm-configs

Get LLM configurations for an agent. Returns default config for free tier, custom config for business/enterprise.

Query Parameters

ParameterTypeRequiredDescription
agent_namestringYesName of the agent to get configurations for

Response

{
    "llm_settings": {},
    "agent_specific_settings": {}
}

Update LLM Configuration

POST /update-llm-config

Update 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-config

Update provider configuration for an agent. Only available for system administrators.

Request Body

{
    "agent_name": "string",
    "config_json": {}
}

Get Default Configuration

GET /default-config

Get current default LLM configuration. Only accessible by system administrators.

Response

{
    "config": "string"
}

Update Default Configuration

POST /default-config

Update default LLM configuration. Only accessible by system administrators.

Request Body

{
    "config": "string"
}

Get System Overview

GET /system-overview

Get 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"
}