Datacenter in the EU · EU jurisdiction · OpenAI-compatible API
GRUNDEN.AIbeta
Patterns

Guides

Advanced patterns: streaming, tool-calling, async jobs, RAG, idempotency.

§ 01

Async & webhooks

Send an async request by setting tier: "async" and a public webhook_url. The endpoint returns 202 with a job id; when the model is done (within 12h) we POST the result to your URL.

bash
curl https://api.grunden.ai/v1/chat/completions \
  -H "Authorization: Bearer $GRUNDEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5.2","tier":"async","webhook_url":"https://din-app.example.com/hook","messages":[{"role":"user","content":"..."}]}'
§ 02

Knowledge Bases (RAG)

Upload your own documents for the AI to search during chat or via API. Documents are automatically chunked, embedded and indexed.

§ 03

Idempotency-Key

Send a unique Idempotency-Key header (UUID or ULID, max 128 characters, [A-Za-z0-9_-]) for safe retries. The same key within 24 hours returns the cached response without re-billing — important for network errors between client retry and POST request.