Platform Sovereign AI For GPU Operators Hosted AI (waitlist)
Compare
vs OpenAI vs Claude vs Gemini vs Hugging Face vs Private Cloud GPU
Solutions
Law firms Clinics Accountants Government Media
Resources
Docs Security whitepaper Architecture Compliance mapping Model benchmarks Hardware matrix ISED Canada Roadmap Pricing About Contact Contact us →
⚖ AI Sovereign Inference OS
Your AI. Your hardware. Your rules.
Docs

API Reference

SovrinOS exposes an OpenAI-compatible REST API on port 3000. Drop-in replacement for the OpenAI SDK — just change baseUrl. Your data never leaves your hardware.

Base URL
http://<your-node-ip>:3000/v1
No authentication required on local network. API key optional via SOVRIN_API_KEY env var.
OpenAI SDK — drop-in swap
// Before (OpenAI cloud)
const client = new OpenAI({ apiKey: "sk-..." });

// After (SovrinOS — sovereign, on-premise)
const client = new OpenAI({
  baseURL: "http://192.168.1.100:3000/v1",
  apiKey:  "sovrin-local", // any non-empty string
});
POST /v1/chat/completions OpenAI-compatible

Chat completion — streaming and non-streaming. Compatible with all OpenAI SDK versions.

Request body
{ "model": "gemma4:26b-a4b-it-q4_K_M", "messages": [{"role":"user","content":"Hello"}], "stream": true }
Response
{ "id": "chatcmpl-...", "object": "chat.completion", "choices": [{ "message": { "role": "assistant", "content": "Hello! How can I help?" } }] }
POST /v1/completions OpenAI-compatible

Legacy text completion endpoint. Compatible with older OpenAI integrations.

Request body
{ "model": "gemma4:26b-a4b-it-q4_K_M", "prompt": "Once upon a time", "max_tokens": 200 }
Response
{ "choices": [{ "text": "...continued text..." }] }
POST /v1/embeddings OpenAI-compatible

Generate embeddings via Qwen3-Embedding 0.6B. Use for RAG pipelines and semantic search.

Request body
{ "model": "qwen3-embedding:0.6b", "input": "Your text here" }
Response
{ "data": [{ "embedding": [0.123, -0.456, ...], "index": 0 }] }
GET /v1/models OpenAI-compatible

List all models currently loaded in VRAM on this node.

Response
{ "data": [{ "id": "gemma-4-26b-a4b", "object": "model" }, ...] }
POST /sovrin/v1/models/activate SovrinOS

Activate a model — load into VRAM from local cache or pull from CDN.

Request body
{ "model": "qwen3.8-27b" }
Response
{ "status": "loading", "model": "qwen3.8-27b", "vram_estimate": "21 GB (estimate)", "cards": 1 }
GET /sovrin/v1/health SovrinOS

Node health — VRAM usage, active models, GPU temperature, uptime.

Response
{ "status": "ok", "vram_used": "18.4 GB", "vram_total": "24 GB", "models_active": ["gemma-4-26b-a4b"], "uptime_s": 86400 }
GET /sovrin/v1/audit SovrinOS

Export BLAKE3-hashed audit trail for the last N requests. Used for Loi 25 / GDPR compliance reporting.

Response
{ "records": [{ "ts": "2026-04-25T14:32:01Z", "model": "gemma-4-26b-a4b", "tokens_in": 142, "tokens_out": 87, "session_hash": "blake3:a7f3c9..." }] }
Authentication

On a local network, no authentication is required. To enable an API key, set SOVRIN_API_KEY=your-secret in /etc/sovrin/node.env. Pass it as Authorization: Bearer your-secret in requests.