Skip to main content
GET
/
api
/
settings
Get Settings
curl --request GET \
  --url https://api.example.com/api/settings
{
  "has_anthropic": true,
  "has_openai": true,
  "has_ollama": true,
  "default_model": "<string>"
}

Overview

Returns the current AI provider configuration, indicating which providers have API keys configured and the default model. This endpoint does not expose any secret values.

Authentication

Requires authentication via session cookie or bearer token.

Response

has_anthropic
boolean
Whether an Anthropic API key is configured (from environment or database)
has_openai
boolean
Whether an OpenAI API key is configured
has_ollama
boolean
Whether an Ollama URL is configured
default_model
string
The default AI model identifier (e.g., claude-sonnet-4-20250514, gpt-4o-mini)

Example

curl -X GET https://api.heimdall.dev/api/settings \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Example

{
  "status": "ok",
  "data": {
    "has_anthropic": true,
    "has_openai": false,
    "has_ollama": true,
    "default_model": "claude-sonnet-4-20250514"
  }
}

Implementation Reference

See src/routes/settings.rs:228 for the endpoint implementation.

Build docs developers (and LLMs) love