API Overview
The Schatzi AI API lets you integrate Swiss-hosted AI directly into your applications. It follows the OpenAI API specification, so any tool or SDK that speaks OpenAI format works with Schatzi AI — just change the base URL.
All requests are processed on Swiss infrastructure with the same data sovereignty guarantees as the chat interface. You need an active subscription (Lite or Basic plan) to use the API.
Base URL
https://backend.schatziai.ch
All API paths are relative to this base URL. HTTPS is required — HTTP requests are rejected.
For example, the full URL for chat completions is:
https://backend.schatziai.ch/v1/chat/completions
Quick Start
Send your first API request in 30 seconds:
curl https://backend.schatziai.ch/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"messages": [{"role": "user", "content": "Hello, what can you do?"}],
"max_tokens": 200
}'
Replace YOUR_API_KEY with a key from your dashboard. Replace MODEL_ID with any model from the Model Comparison page.
Available Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions | POST | Send messages, get AI responses (streaming supported) |
/v1/completions | POST | Text completion from a prompt |
/v1/models | GET | List all available models |
/v1/models/{model} | GET | Get details for a specific model |
/v1/embeddings | POST | Generate text embeddings |
These endpoints follow the OpenAI API specification. If you have existing code that calls the OpenAI API, you can switch to Schatzi AI by changing the base URL and API key.
What You Need
- A Schatzi AI account with an active subscription
- An API key (generated from your dashboard or via the API)
- Any HTTP client, or an OpenAI-compatible SDK
Next Steps
- Authentication — generate and manage API keys
- Endpoint Reference — full parameter and response documentation
- Code Examples — working examples in Python, JavaScript, and curl