Start typing to search.

API Reference

Get AI assistant configuration status

View Markdown

Returns whether an Anthropic API key is configured and its source. Never returns the key itself.

GET /api/server/ai-config

Returns whether an Anthropic API key is configured and its source. Never returns the key itself.

Operation ID: getServerAiConfig

Authentication

Option 1

  • BearerAuth (http bearer) API key token. Create via POST /api/api-keys. Format: envoy_<hex>

Option 2

  • CookieAuth (apiKey) Session cookie set after login + TOTP verification

Success responses

200

AI configuration status

Content type: application/json

  • Type: object
  • Properties:
    • configured (boolean, required)
    • source (string | null, required)
      • Allowed values: settings, yaml, null
      • Nullable: yes
    • default_model (string | null)
      • Nullable: yes

Examples

cURL

curl --request GET \
  --url 'https://your-envoy.example.com/api/server/ai-config' \
  --header 'Authorization: Bearer $API_KEY'

JavaScript (fetch)

const response = await fetch('https://your-envoy.example.com/api/server/ai-config', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  },
});
 
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);