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
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /v1/chat/completions | Chat completions and streaming |
| POST | /v1/responses | Documented OpenAI Responses subset |
| POST | /v1/messages | Documented Anthropic Messages subset |
| POST | /v1/embeddings | Embeddings from supported providers |
| POST | /v1/rerank | Reranking from supported providers |
| POST | /v1/moderations | Local moderation checks |
| GET | /v1/models | Configured models and aliases |
Supported parameters depend on the provider and endpoint. Check the complete reference for request shapes and compatibility.
Full API referenceMCP & 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.
Operations
/healthz checks process health, /readyz checks readiness, and /metrics exposes configured Prometheus metrics.