API Reference
The snowLEX API is OpenAI-compatible. Any OpenAI SDK or HTTP client works — just set the base URL and your snowLEX API key.
Authentication
Pass your key as a bearer token. Create and manage keys in your snowLEX account under Settings → API Keys. Keys are shown once — store them securely.
Authorization: Bearer sk-snlx-...Base URL
https://staging.platform.snowlex.eu/v1Create a chat completion
POST /v1/chat/completions — model is always snowlex-legal. Supports streaming (stream: true, OpenAI SSE) and non-streaming. The response always includes a usage object.
curl https://staging.platform.snowlex.eu/v1/chat/completions \
-H "Authorization: Bearer sk-snlx-..." \
-H "Content-Type: application/json" \
-d '{
"model": "snowlex-legal",
"messages": [{"role": "user", "content": "Summarize GDPR Article 17."}],
"stream": false
}'List models
GET /v1/modelsErrors
All errors use the OpenAI error envelope.
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Missing, invalid, revoked, or expired key |
| 402 | insufficient_credits | Prepaid balance can't cover the request |
| 404 | model_not_found | Unknown model (only snowlex-legal is available) |
| 429 | rate_limit_exceeded | Per-key rate limit hit (see Retry-After) |
| 502 | backend_error | Upstream model error |
OpenAI SDK example
from openai import OpenAI
client = OpenAI(base_url="https://staging.platform.snowlex.eu/v1", api_key="sk-snlx-...")
stream = client.chat.completions.create(
model="snowlex-legal",
messages=[{"role": "user", "content": "Explain the EU AI Act risk tiers."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")