LLM Configurations
Configure LLM provider API keys for your platform. Each provider key is encrypted with AES-256-GCM before storage and decrypted at runtime by the inference service.
How Provider Routing Works
When an end user requests a model (e.g. gpt-4o), the inference service:
- Looks up all enabled
model_provider_configsfor that model slug - Finds your platform's active provider key for the matching provider
- Decrypts the API key
- Routes the request to the provider
Providers and models are managed by the system admin via /v1/admin/providers and /v1/admin/models. Platform owners only need to add their own provider API keys.
/v1/platforms/{platformId}/llm-configsLists provider key configurations for the platform. API keys are never returned.
Auth: Platform key.
curl https://api.assistiv.ai/v1/platforms/{platformId}/llm-configs \
-H "Authorization: Bearer sk-plat_your_key"{
"data": [
{
"id": "uuid",
"platform_id": "uuid",
"provider_id": "uuid",
"is_default": true,
"is_active": true,
"created_at": "2025-01-15T10:30:00Z"}
],
"total": 1, "page": 1, "limit": 20
}/v1/platforms/{platformId}/llm-configsAdds a provider API key. The key is encrypted before storage.
Auth: Platform key.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| provider_id | string | Required | UUID of the provider (OpenAI, Anthropic, etc.). |
| api_key | string | Required | Your provider API key. Encrypted with AES-256-GCM before storage. |
| is_default | boolean | Optional | Set as the default key for this provider on your platform.Default: false |
⚠Security
Provider API keys are encrypted at rest and never returned in API responses. Only the metadata (provider, default status, active status) is visible.
curl -X POST https://api.assistiv.ai/v1/platforms/{platformId}/llm-configs \
-H "Authorization: Bearer sk-plat_your_key" \
-H "Content-Type: application/json" \
-d '{
"provider_id": "provider-uuid-for-openai",
"api_key": "sk-openai-your-key-here",
"is_default": true
}'/v1/platforms/{platformId}/llm-configs/{configId}Updates a provider key configuration. Triggers cache invalidation.
Auth: Platform key.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| api_key | string | Optional | New provider API key (will be re-encrypted). |
| is_default | boolean | Optional | Update default status. |
| is_active | boolean | Optional | Enable or disable this key. |
curl -X PATCH https://api.assistiv.ai/v1/platforms/{platformId}/llm-configs/{configId} \
-H "Authorization: Bearer sk-plat_your_key" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-openai-new-key",
"is_default": true,
"is_active": true
}'/v1/platforms/{platformId}/llm-configs/{configId}Deletes a provider key configuration. Triggers cache invalidation.
Auth: Platform key. Returns 204 No Content.
curl -X DELETE https://api.assistiv.ai/v1/platforms/{platformId}/llm-configs/{configId} \
-H "Authorization: Bearer sk-plat_your_key"