Overview
Quickstart
This takes about five minutes — create a stack, generate a key, send your first request.
This takes about five minutes: create a stack, generate a key, send your first request.
1. Create a stack
From the dashboard, click New stack, give it a name, and pick a plan. The model that plan runs is assigned automatically — you don't need to pick one yourself unless you're on Enterprise.
Provisioning takes a few minutes. The stack's status moves from provisioning to running when it's ready to take traffic.
2. Generate an API key
Open the stack, go to API keys, and create one. The plaintext key is shown once, at creation — copy it now.
STAC_API_KEY=stac_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
STAC_BASE_URL=https://api.trystac.com/v1Keys are scoped to a single stack. Never commit one, never ship one to a browser bundle, and rotate it immediately if it leaks.
3. Send a request
The model field is ignored — your stack always serves its own model, so any
value works there.
curl "https://api.trystac.com/v1/chat/completions" \
-H "Authorization: Bearer $STAC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "Hello" }]
}'from openai import OpenAI
client = OpenAI(
api_key=os.environ["STAC_API_KEY"],
base_url=os.environ["STAC_BASE_URL"],
)
response = client.chat.completions.create(
model="", # ignored — your stack sets this
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.STAC_API_KEY,
baseURL: process.env.STAC_BASE_URL,
});
const response = await client.chat.completions.create({
model: "", // ignored — your stack sets this
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);4. Stream the response
Add "stream": true to get tokens as they're generated, as server-sent
events:
curl "https://api.trystac.com/v1/chat/completions" \
-H "Authorization: Bearer $STAC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "Hello" }],
"stream": true
}'See Streaming responses for how to consume the stream in Python and Node.
Using an Anthropic-style client
If your tooling speaks the Anthropic Messages API instead (Claude Code, for example), point it at Stac the same way:
ANTHROPIC_BASE_URL=https://api.trystac.com
ANTHROPIC_AUTH_TOKEN=$STAC_API_KEYRequests to /v1/messages work with the same key, no separate setup.
Next steps
- Core concepts — stacks, plans, API keys.
- Authentication — key format, expiration, errors.
- API reference — every request parameter.

