Admin LLM Providers
Admin LLM Providers API
The admin-llm-providers domain in the Aimable Platform API (v0.1.0) enables platform administrators to manage and inspect available Large Language Model (LLM) providers and their supported models. This is essential for configuring AI capabilities across the platform, ensuring compatibility, monitoring performance, and enabling new AI integrations.
This API is designed for internal administrative use—typical consumers include platform operators or DevOps engineers who need visibility into LLM provider configurations and model availability.
Key Concepts
- LLM Provider: A third-party service (e.g., OpenAI, Anthropic, Google) that offers language models via API.
- Identified by
id,name, andslug. - May include optional metadata like
icon_urlandfavicon_urlfor UI display.
- Identified by
- LLM Model: A specific model offered by a provider (e.g.,
gpt-4,claude-3-opus).- Belongs to one provider via
provider_id. - Has a
model_name,provider_model_id, andstatus(e.g., active, deprecated).
- Belongs to one provider via
These endpoints are read-only and used to list providers and their associated models.
How to Use the Endpoints
1. List All LLM Providers
Retrieve all configured LLM providers in the system.
Endpoint:
GET /api-proxy/v1/admin/llm-providers
Example Request:
curl -X GET "https://platform.example.com/api-proxy/v1/admin/llm-providers" \
-H "X-API-Key: your-secret-api-key"Example Response (200 OK):
{
"data": [
{
"id": "a1b2c3d4-1234-5678-90ab-bf1a88f8c7e3",
"name": "OpenAI",
"slug": "openai",
"provider_type": "openai",
"icon_url": "https://cdn.example.com/icons/openai.svg",
"favicon_url": "https://cdn.example.com/favicons/openai.png",
"created_at": "2024-01-10T12:00:00Z",
"updated_at": "2or-10T12:00:00Z"
},
{
"id": "e5f6g7h8-3456-7890-abcd-d92b77a9f0d1",
"name": "Anthropic",
"slug": "anthropic",
"provider_type": "anthropic",
"icon_url": "https://cdn.example.com/icons/anthropic.svg",
"created_at": "2024-01-11T08:30:00Z",
"updated_at": "2024-01-11T08:30:00Z"
}
]
}2. List Models for a Specific Provider
Fetch all models available from a given LLM provider using its provider_id.
Endpoint:
GET /api-proxy/v1/admin/llm-providers/{provider_id}/models
Example Request:
curl -X GET "https://platform.example.com/api-proxy/v1/admin/llm-providers/a1b2c3d4-1234-5678-90ab-bf1a88f8c7e3/models" \
-H "X-API-Key: your-secret-api-key"Example Response (200 OK):
{
"data": [
{
"id": "m001",
"provider_id": "a1b2c3d4-1234-5678-90ab-bf1a88f8c7e3",
"model_name": "GPT-4 Turbo",
"provider_model_id": "gpt-4-turbo-2024-04-09",
"status": "active",
"capabilities_json": {
"vision": true,
"function_calling": true,
"max_tokens": 128000
},
"provider_slug": "openai",
"provider_icon_url": "https://cdn.example.com/icons/openai.svg",
"created_at": "2024-02-01T10:00:00Z",
"updated_at": "2024-02-01T10:00:00Z"
},
{
"id": "m002",
"provider_id": "a1b2c3d4-1234-5678-90ab-bf1a88f8c7e3",
"model_name": "GPT-3.5 Turbo",
"provider_model_id": "gpt-3.5-turbo-1106",
"status": "active",
"capabilities_json": {
"vision": false,
"function_calling": true,
"max_tokens": 16385
},
"created_at": "2023-11-06T09:00:00Z",
"updated_at": "2023-11-06T09:00:00Z"
}
]
}Common Workflow
A typical administrative workflow might involve:
-
Discover Available Providers
CallGET /v1/admin/llm-providersto get a list of all integrated LLM providers. -
Inspect Models of a Provider
Use theidfrom a provider (e.g., OpenAI) to list all its models:GET /v1/admin/llm-providers/a1b2c3d4-.../models -
Evaluate Model Capabilities
Use thecapabilities_jsonfield to determine which models support features like vision, function calling, or long contexts.
This flow helps in making decisions about which models to expose to end users or use in backend pipelines.
Authentication & Error Handling
Authentication
All requests require authentication via the X-API-Key header:
X-API-Key: your-secret-api-keyWithout a valid key:
- 401 Unauthorized: Missing or invalid credentials.
- 403 Forbidden: Key exists but lacks required permissions.
Validation Errors
If a request is malformed (e.g., invalid UUID), the API returns:
- 422 Unprocessable Entity with a
detailarray explaining the issue.
Example:
{
"detail": [
{
"loc": ["path", "provider_id"],
"msg": "value is not a valid uuid",
"type": "value_error.uuid"
}
]
}Ensure all provider_id values are valid UUIDs when making requests.
Use these endpoints to maintain up-to-date knowledge of your AI infrastructure and support dynamic model routing and feature flagging across your applications.
Related Endpoints
- GET
/v1/admin/llm-providers— List Llm Providers - GET
/v1/admin/llm-providers/{provider_id}/models— List Llm Provider Models