SAIG Public API Reference
SAIG is OpenAI-compatible for chat completions. Advanced governance metadata is exposed through X-SAIG-* headers and optional response body metadata. This reference covers customer-facing endpoints only.
Authentication
All endpoints except /health require an OIDC Bearer token:
Authorization: Bearer <your-token>
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /v1/chat/completions | Governed chat completion (OpenAI-compatible) |
GET | /v1/models | List available model aliases |
GET | /v1/capabilities | Machine-readable capability matrix |
GET | /version | Version and build information |
GET | /health | Health check (no auth required) |
POST /v1/chat/completions
OpenAI-compatible chat completions with governance. Every request passes through PII detection, policy evaluation, anonymization, provider routing, and audit evidence creation.
Model aliases
| Alias | Purpose |
|---|---|
saig-default | Balanced quality and cost |
saig-fast | Low latency for interactive use |
saig-sensitive-data | Routes to EU-resident providers with stricter sovereignty |
saig-low-cost | Cost-optimized for batch and background tasks |
Python example
from openai import OpenAI
client = OpenAI(
base_url="https://api.your-domain.eu/v1",
api_key="your-saig-api-key",
)
response = client.chat.completions.create(
model="saig-default",
messages=[{"role": "user", "content": "Summarize this report."}],
)
print(response.choices[0].message.content)
# Governance metadata in response headers (httpx transport):
# X-SAIG-Request-Id, X-SAIG-Policy-Action, X-SAIG-Risk-Level,
# X-SAIG-Provider, X-SAIG-Model-Alias, X-SAIG-Audit-Receipt-Id
TypeScript example
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.your-domain.eu/v1",
apiKey: "your-saig-api-key",
});
const response = await client.chat.completions.create({
model: "saig-default",
messages: [{ role: "user", content: "Summarize this report." }],
});
console.log(response.choices[0].message.content);
cURL example
curl https://api.your-domain.eu/v1/chat/completions \
-H "Authorization: Bearer your-saig-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "saig-default",
"messages": [{"role": "user", "content": "Summarize this report."}]
}'
Governance response headers
Every response includes X-SAIG-* headers with governance metadata:
| Header | Description | Example |
|---|---|---|
X-SAIG-Request-Id | Unique governance request identifier | req_7h2k9abc |
X-SAIG-Policy-Action | Governance decision | ANONYMIZE |
X-SAIG-Risk-Level | Risk assessment | MEDIUM |
X-SAIG-Provider | LLM provider that served the request | azure-openai-eu |
X-SAIG-Model-Alias | SAIG model alias used | saig-default |
X-SAIG-Audit-Receipt-Id | Audit trail receipt reference | rec_abc123 |
Error responses
| Status | Meaning |
|---|---|
401 | Missing or invalid Bearer token |
403 | Request denied by governance policy (check X-SAIG-Policy-Action) |
429 | Rate limit exceeded |
503 | All providers unavailable (circuit breaker open) |
Discovery endpoints
GET /v1/models
Returns available model aliases. Useful for client auto-discovery.
curl https://api.your-domain.eu/v1/models \
-H "Authorization: Bearer your-token"
GET /v1/capabilities
Machine-readable capability matrix with platform version, API version, and feature availability flags.
curl https://api.your-domain.eu/v1/capabilities \
-H "Authorization: Bearer your-token"
GET /version
Product version, API version, build metadata, and component versions.
curl https://api.your-domain.eu/version \
-H "Authorization: Bearer your-token"
GET /health
Health check. No authentication required.
curl https://api.your-domain.eu/health