DEVELOPERS

API reference

One gateway endpoint for model requests and configured tools.

Updated · Public beta

Authentication

When authentication is enabled, send your gateway key in the Authorization header. Provider credentials stay in the gateway.

Chat requestShell
curl http://localhost:8080/v1/chat/completions \
  -H "Authorization: Bearer $OMNISWITCH_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'

Model endpoints

Model API endpoints
MethodEndpointPurpose
POST/v1/chat/completionsChat completions and streaming
POST/v1/responsesDocumented OpenAI Responses subset
POST/v1/messagesDocumented Anthropic Messages subset
POST/v1/embeddingsEmbeddings from supported providers
POST/v1/rerankReranking from supported providers
POST/v1/moderationsLocal moderation checks
GET/v1/modelsConfigured models and aliases

Supported parameters depend on the provider and endpoint. Check the complete reference for request shapes and compatibility.

Full API reference

MCP & agent discovery

Use /mcp for configured MCP targets and policy-gated tool calls. The public Agent Card is available at /.well-known/agent-card.json; authenticated agent messages use /a2a.

Protocol configuration & scope

Operations

/healthz checks process health, /readyz checks readiness, and /metrics exposes configured Prometheus metrics.

Observability guide