Start typing to search.

API Reference

Set Anthropic API key

View Markdown
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 bearer·API key token (envoy_<hex>). Create keys from Settings → API Keys — see Using the API.

Request body

This request body is required.

Content typeapplication/json

requestobject
1 property
api_keystringrequired

Success response body

200Key saved

Key saved

Content typeapplication/json

responseobject
3 properties
configuredboolean
sourcestring
default_modelstring

Error 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.