OpenAI-Compatible API Integration

Drop-in integration

SAIG exposes an OpenAI-compatible /v1/chat/completions endpoint. Integrate by changing only the base URL and API key — no SDK changes, no code rewrite.

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 quarter's results."}],
)

print(response.choices[0].message.content)

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 quarter's results." }],
});

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 quarter results."}]
  }'

Model aliases

SAIG provides model aliases that decouple your application from provider-specific model names. Switch providers without code changes.

AliasPurpose
saig-defaultBalanced quality and cost for general use
saig-fastLow latency for interactive applications
saig-sensitive-dataRoutes to EU-resident providers with stricter sovereignty
saig-low-costCost-optimized for batch and background tasks

Governance metadata

Every response includes X-SAIG-* headers with request ID, policy decision, risk signals, and audit references. Optionally, governance metadata can be included in the response body.