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.

Download OpenAPI 3.1 spec (JSON)

Authentication

All endpoints except /health require an OIDC Bearer token:

Authorization: Bearer <your-token>

Endpoints

MethodPathDescription
POST/v1/chat/completionsGoverned chat completion (OpenAI-compatible)
GET/v1/modelsList available model aliases
GET/v1/capabilitiesMachine-readable capability matrix
GET/versionVersion and build information
GET/healthHealth 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

AliasPurpose
saig-defaultBalanced quality and cost
saig-fastLow latency for interactive use
saig-sensitive-dataRoutes to EU-resident providers with stricter sovereignty
saig-low-costCost-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:

HeaderDescriptionExample
X-SAIG-Request-IdUnique governance request identifierreq_7h2k9abc
X-SAIG-Policy-ActionGovernance decisionANONYMIZE
X-SAIG-Risk-LevelRisk assessmentMEDIUM
X-SAIG-ProviderLLM provider that served the requestazure-openai-eu
X-SAIG-Model-AliasSAIG model alias usedsaig-default
X-SAIG-Audit-Receipt-IdAudit trail receipt referencerec_abc123

Error responses

StatusMeaning
401Missing or invalid Bearer token
403Request denied by governance policy (check X-SAIG-Policy-Action)
429Rate limit exceeded
503All 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

Related resources