API Reference
Set Anthropic API key
PUT
/api/server/ai-config
Validates the key with Anthropic, then stores it encrypted as a Settings override (takes precedence over yaml).
Operation IDputServerAiConfig
Authentication
- BearerAuth
http bearerAPI key token (envoy_<hex>). Create keys from Settings → API Keys — see Using the API.
Request body
This request body is required.
Content typeapplication/json
requestobject1 property
api_keystringrequiredSuccess response body
200Key saved
Key saved
Content typeapplication/json
responseobject3 properties
configuredbooleansourcestringdefault_modelstringError responses
400Missing api_key (VALIDATION_ERROR) or key rejected by Anthropic (INVALID_KEY)
Missing api_key (VALIDATION_ERROR) or key rejected by Anthropic (INVALID_KEY)
No response content schema is documented.
403Requires admin or superadmin
Requires admin or superadmin
No response content schema is documented.
502Anthropic unreachable — key not validated or persisted (ANTHROPIC_UNREACHABLE)
Anthropic unreachable — key not validated or persisted (ANTHROPIC_UNREACHABLE)
No response content schema is documented.