Getting Started
Authentication
All Satryx API requests are authenticated with an API key passed in the Authorization header.
API keys
Create and manage keys from Account → API keys. Each key is tied to your account and inherits your account's permissions.
Key format
text
satryx_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ123456
│ │ └─ 32 url-safe random chars (token)
│ └─ environment: live | test
└─ brand prefixThe first 14 characters (satryx_live_ab) are stored as the key prefix and shown in the dashboard. The full key is hashed on our side and never stored in plaintext — it's shown only once at creation.
Environments
| Parameter | Type | Description |
|---|---|---|
| satryx_live_… | live | Production environment. Free to create; calls are metered and appear in usage. Access to each product (e.g. VocaBusta) requires that product. |
| satryx_test_… | test | Sandbox. Same API shape with sandbox metering for CI/CD and local development. |
Use test keys in CI/CD and local dev so you get accurate model responses without inflating production usage numbers.
Making authenticated requests
Pass your key in the Authorization header using the Bearer scheme:
bash
curl https://api.satryx.ai/v1/chat/completions \
-H "Authorization: Bearer satryx_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"llama-3.1-70b","messages":[{"role":"user","content":"Hi"}]}'Using environment variables
bash
# .env (never commit this file)
SATRYX_API_KEY=satryx_live_aBcDeFgH…python
import os
from satryx import Satryx
# The SDK reads SATRYX_API_KEY automatically if api_key is not passed
client = Satryx() # picks up os.environ["SATRYX_API_KEY"]typescript
// The SDK reads process.env.SATRYX_API_KEY automatically
import Satryx from "@satryx/sdk";
import { useSeo } from "../../seo/useSeo";
import { DOCS_BY_PATH } from "../../seo/routes";
const client = new Satryx();Key rotation
To rotate a key without downtime:
- Create a new key in the dashboard.
- Update your application's
SATRYX_API_KEYenv var to the new key. - Deploy and verify requests succeed.
- Revoke the old key from the dashboard.
Warning:Revocation takes effect immediately. In-flight requests using the old key will get a 401 — finish the deployment before revoking.
401 errors
If your key is invalid, missing, or revoked you'll receive:
json
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API key. Check your key and try again.",
"param": null
}
}See Error handling for the full error taxonomy.