Scalattice is still OpenAI-compatible chat. What changed is how you set routing policy: geography, how many times we check the output, and security tier.
Those knobs used to live mainly in X-Scalattice-* headers, or as saved “default API rules” on the developers dashboard. Headers are awkward in the OpenAI SDK. Dashboard defaults were easy to forget, and they broke streaming when someone had multi-replica vetting saved and then set stream: true.
The supported shape is a scalattice object on the JSON body. Same idea as requirements: a Scalattice field next to the OpenAI fields. In the Python SDK you pass it through extra_body.
The object
All fields are optional. Omitting them uses the platform defaults: region auto, vetReplicas: 1, security: "tier1". Streaming works with those defaults without any extra policy.
region:auto,us,eu,ap- which geography may serve the jobvetReplicas:1–3- independent output checks before returnsecurity:tier1ortier2.5- standard vs enhanced split routingmodel: optional catalog id override of the top-levelmodel
Dashboard routing defaults are gone. Key abuse caps (RPM / TPM / daily spend) stay on the key. Allowlists still exist where you set them.
curl
curl https://api.scalattice.cloud/v1/chat/completions \
-H "Authorization: Bearer slt_..." \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-3-8b",
"messages": [{"role": "user", "content": "Say hello in one sentence."}],
"scalattice": {
"region": "eu",
"vetReplicas": 2,
"security": "tier1"
}
}'
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://api.scalattice.cloud/v1",
api_key="slt_...",
)
response = client.chat.completions.create(
model="qwen-3-8b",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
extra_body={
"scalattice": {
"region": "eu",
"vetReplicas": 2,
"security": "tier1",
}
},
)
print(response.choices[0].message.content)
TypeScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.scalattice.cloud/v1",
apiKey: "slt_...",
});
const response = await client.chat.completions.create({
model: "qwen-3-8b",
messages: [{ role: "user", content: "Say hello in one sentence." }],
extra_body: {
scalattice: {
region: "eu",
vetReplicas: 2,
security: "tier1",
},
},
} as never);
console.log(response.choices[0]?.message?.content);
Streaming
Streaming still requires vetReplicas: 1 and security: "tier1". That is now the default when you omit scalattice, so a plain stream: true request from Open WebUI or LiteLLM no longer fights a forgotten dashboard default of vet 2.
If you set multi-replica vetting or tier2.5 in the body (or via legacy headers) and also set stream: true, you still get 400 with invalid_request_stream_incompatible. Use stream: false for those policies.
Legacy headers
X-Scalattice-Region, X-Scalattice-Vet-Replicas, X-Scalattice-Security, and X-Scalattice-Model still work when the matching body field is omitted. Body wins when both are present. Prefer scalattice in new code. Admin-only controls stay header-only.
What did not change
- Base URL:
https://api.scalattice.cloud/v1 - Auth:
Authorization: Bearer slt_... - Chat, images, and speech keep their OpenAI-shaped routes
requirementsis still its own body field (see requirements)
Full field table: Cloud docs, Routing. First setup: OpenAI SDK drop-in.