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/v1

Create 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/models

Errors

All errors use the OpenAI error envelope.

StatusCodeMeaning
401invalid_api_keyMissing, invalid, revoked, or expired key
402insufficient_creditsPrepaid balance can't cover the request
404model_not_foundUnknown model (only snowlex-legal is available)
429rate_limit_exceededPer-key rate limit hit (see Retry-After)
502backend_errorUpstream 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="")