Skip to main content

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.
The key is stored with an auto-generated 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

The ProviderConfigService manages automatic key rotation:
  1. On each request: Selects the active key with the lowest failure count
  2. On auth/rate-limit error: Marks key as failed, immediately rotates to next key
  3. On transient error: Rotates once, then throws if second key also fails
  4. Cooldown: Keys can be placed in cooldown until a specific timestamp
  5. Success reporting: Resets failure count on successful API call