Providers
GET /api/admin/providers
List all AI providers with key counts.Response
POST /api/admin/providers
Create a new provider.PUT /api/admin/providers/
Update a provider by name.API keys
GET /api/admin/providers//keys
Get all API keys for a provider (includes full key for admin).Response
POST /api/admin/providers//keys
Add a new API key to a provider.display_mask (last 4 characters).
PUT /api/admin/keys//status
Toggle a key’s active status.DELETE /api/admin/keys/
Delete an API key by UUID.Key rotation behavior
TheProviderConfigService manages automatic key rotation:
- On each request: Selects the active key with the lowest failure count
- On auth/rate-limit error: Marks key as failed, immediately rotates to next key
- On transient error: Rotates once, then throws if second key also fails
- Cooldown: Keys can be placed in cooldown until a specific timestamp
- Success reporting: Resets failure count on successful API call