Start typing to search.

API Reference

Check if AI is configured

View Markdown

Check if AI is configured

GET /api/ai/status

Check if AI is configured

Operation ID: getAiStatus

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. When enabled, includes the selectable model catalog and the configured default model.

Content type: application/json

  • Type: object
  • Properties:
    • enabled (boolean)
    • models (array<object>) — Selectable models (only present when enabled)
      • Description: Selectable models (only present when enabled)
      • Items:
        • Type: object
        • Properties:
          • id (string)
          • label (string)
          • description (string)
    • default_model (string) — Model used when the chat request has no model override (only present when enabled)
    • context_window (integer) — Model context window in tokens, used by the UI context meter (only present when enabled)

Examples

cURL

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

JavaScript (fetch)

const response = await fetch('https://your-envoy.example.com/api/ai/status', {
  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);