Skip to content

Notebook Settings

Each notebook has its own settings record controlling inference provider/model, retrieval strategy, system prompts, feature flags, and more. Updates use deep-merge semantics -- only provided fields are overwritten.

Base path: /api/notebooks/{notebook_id}/settings

Embedding Model Immutability

The embedding_model field is set at notebook creation and cannot be changed afterwards. Any embedding_model value in update requests is silently stripped.


GET /api/notebooks/{notebook_id}/settings/

Get notebook settings merged with defaults. Missing fields are filled with default values. The response also includes default_system_prompts for the frontend to display as placeholder text.

Auth: Admin

Headers:

Header Value
Authorization Bearer <token>

Status: 200 OK

{
  "success": true,
  "data": {
    "notebook_id": "a1b2c3d4-...",
    "db_type": "cloud",
    "storage_provider": "supabase",
    "embedding_model": "openai/text-embedding-3-small",
    "system_prompt_retrieval": "",
    "inference_provider": "openrouter",
    "inference_model": "openai/gpt-4o-mini",
    "inference_temperature": 0.4,
    "active_strategy_id": "advanced-multipath",
    "strategies_config": {},
    "ingestion_timeout_minutes": 10,
    "max_conversation_messages": 50,
    "enable_multimodal_processing": false,
    "enable_ai_synthesis": false,
    "judge_enabled": true,
    "language_mode": null,
    "default_persona": null,
    "default_language": null,
    "enhancement_concurrency": null,
    "smart_router_enabled": false,
    "default_system_prompts": {
      "system_prompt_retrieval": "You are an AI assistant..."
    }
  }
}
Code Cause
401 Invalid or missing token
403 Non-admin user
404 Settings not found for notebook
curl http://localhost:8000/api/notebooks/a1b2c3d4-e5f6-7890-abcd-ef1234567890/settings/ \
  -H "Authorization: Bearer $TOKEN"
import httpx

notebook_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = httpx.get(
    f"http://localhost:8000/api/notebooks/{notebook_id}/settings/",
    headers={"Authorization": f"Bearer {token}"},
)
settings = response.json()["data"]
print(f"Model: {settings['inference_provider']}/{settings['inference_model']}")

PUT /api/notebooks/{notebook_id}/settings/

Update notebook settings with deep-merge semantics. Only provided fields are changed. Dict fields merge recursively. The embedding_model field is always stripped from the update.

Auth: Admin

Headers:

Header Value
Authorization Bearer <token>
Content-Type application/json

Body:

{
  "inference_provider": "openrouter",
  "inference_model": "anthropic/claude-sonnet-4",
  "inference_temperature": 0.7,
  "judge_enabled": false,
  "language_mode": "manual",
  "default_language": "de"
}
Field Type Required Default Description
inference_provider string No -- "openrouter", "openai", or "ollama"
inference_model string No -- Model ID (e.g. "openai/gpt-4o-mini")
inference_temperature float No -- 0.0 to 2.0
system_prompt_retrieval string No -- Custom RAG system prompt
active_strategy_id string No -- Default retrieval strategy
judge_enabled boolean No -- Enable/disable LLM judge
language_mode string No -- "auto" or "manual"
default_language string No -- Language code (e.g. "en", "de")
default_persona string No -- Default persona ID
enhancement_concurrency integer No -- 1-20, parallel enhancement workers
smart_router_enabled boolean No -- Enable smart query router
enable_multimodal_processing boolean No -- Enable image description during ingestion

Status: 200 OK

{
  "success": true,
  "data": {
    "notebook_id": "a1b2c3d4-...",
    "inference_provider": "openrouter",
    "inference_model": "anthropic/claude-sonnet-4",
    "inference_temperature": 0.7,
    "judge_enabled": false
  }
}
Code Cause
401 Invalid or missing token
403 Non-admin user
curl -X PUT http://localhost:8000/api/notebooks/a1b2c3d4-e5f6-7890-abcd-ef1234567890/settings/ \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inference_provider": "openrouter",
    "inference_model": "anthropic/claude-sonnet-4",
    "inference_temperature": 0.7
  }'
import httpx

notebook_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = httpx.put(
    f"http://localhost:8000/api/notebooks/{notebook_id}/settings/",
    headers={"Authorization": f"Bearer {token}"},
    json={
        "inference_provider": "openrouter",
        "inference_model": "anthropic/claude-sonnet-4",
        "inference_temperature": 0.7,
    },
)
print(response.json()["data"])

GET /api/notebooks/{notebook_id}/settings/defaults

Get the built-in default system prompts. These are the prompts used when no custom override is saved.

Auth: Admin

Headers:

Header Value
Authorization Bearer <token>

Status: 200 OK

{
  "success": true,
  "data": {
    "system_prompt_retrieval": "You are an AI assistant that answers questions based on the provided context..."
  }
}
Code Cause
401 Invalid or missing token
403 Non-admin user
curl http://localhost:8000/api/notebooks/a1b2c3d4-e5f6-7890-abcd-ef1234567890/settings/defaults \
  -H "Authorization: Bearer $TOKEN"
import httpx

notebook_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = httpx.get(
    f"http://localhost:8000/api/notebooks/{notebook_id}/settings/defaults",
    headers={"Authorization": f"Bearer {token}"},
)
defaults = response.json()["data"]
print(defaults["system_prompt_retrieval"][:100])