This document describes the API endpoints for the LLM service.
https://llmbackend.local:7890
/api/admin/login/api/auth/tokenAll API requests must include:
Content-Type: application/json
Accept: application/json
X-API-Version: 1.0
X-Client-ID: your-client-id
Simple test endpoint to verify API connectivity.
Exchange auth token for an access token.
{
"auth_token": "64-character-auth-token"
}
{
"success": true,
"data": {
"access_token": "generated-access-token",
"expires_in": 3600
}
}
Make a request to the LLM service.
Authorization: Bearer {access_token}
{
"prompt": "Your prompt text here",
"max_tokens": 100,
"temperature": 0.7,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
}
{
"success": true,
"data": {
"response": "LLM generated response"
}
}
{
"email": "your-email",
"password": "your-password"
}
{
"success": true,
"data": {
"token": "admin-bearer-token",
"admin": {
"id": 1,
"email": "your-email"
}
}
}
Authorization: Bearer {admin_token}
Authorization: Bearer {admin_token}
{
"current_password": "current-password",
"new_password": "new-password",
"new_password_confirmation": "new-password"
}
Authorization: Bearer {admin_token}
{
"success": true,
"data": {
"items": [
{
"id": 1,
"name": "Client Name",
"llm_provider_id": 1,
"created_at": "2024-12-05T00:00:00Z"
}
]
}
}
Authorization: Bearer {admin_token}
{
"name": "New Client Name",
"llm_provider_id": 1
}
Authorization: Bearer {admin_token}
Authorization: Bearer {admin_token}
{
"name": "Updated Client Name",
"llm_provider_id": 1
}
Authorization: Bearer {admin_token}
Authorization: Bearer {admin_token}
{
"success": true,
"data": {
"client_id": 1,
"auth_token": "generated-auth-token",
"created_at": "2024-12-05T00:00:00Z"
}
}
Authorization: Bearer {admin_token}
{
"success": true,
"data": {
"items": [
{
"id": 1,
"name": "OpenAI",
"service_name": "openai",
"api_url": "https://api.openai.com/v1",
"status": "active",
"created_at": "2024-12-05T00:00:00Z"
}
]
}
}
Authorization: Bearer {admin_token}
{
"name": "OpenAI",
"service_name": "openai",
"api_url": "https://api.openai.com/v1",
"api_token": "your-api-token",
"status": "active"
}
Authorization: Bearer {admin_token}
Authorization: Bearer {admin_token}
{
"name": "Updated OpenAI",
"service_name": "openai",
"api_url": "https://api.openai.com/v1",
"api_token": "your-api-token",
"status": "active"
}
Authorization: Bearer {admin_token}
All endpoints return standardized error responses:
{
"success": false,
"error": "error_code",
"message": "Error message",
"errors": {
"field": ["Error details"]
}
}
All successful responses follow the format:
{
"success": true,
"data": {
// Response data
}
}