Quickstart
Your first ScaiGrid chat completion in five minutes. Assumes you already have a ScaiGrid instance (managed or self-hosted) and a user account.
1. Get an API key#
From the admin UI: Access → API Keys → Create. Name it something meaningful (my-first-integration). Copy the key — it starts with sgk_ and is shown exactly once.
If you don't have admin UI access, ask your tenant admin to create one for you.
2. Pick a model#
List the models available to you:
bash
1 2 | |
You'll get a response like:
json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
Pick a slug you like. For this quickstart we'll use scailabs/poolnoodle-omni.
3. Send a chat completion#
Request#
bash
1 2 3 4 5 6 7 8 9 10 | |
python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
typescript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Response#
json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
That's it. You just made a ScaiGrid chat completion.
4. Stream responses#
For long completions, stream tokens as they arrive:
python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
typescript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
See Chat Completions for the full streaming protocol, error handling, and tool calls.
What's next#
- Authentication — API keys vs JWTs, when to use which.
- Your First Integration — a complete walk-through with error handling, retries, and accounting.
- Chat Completions — the full chat API reference.