Gateway API
The gateway is OpenAI-compatible. Point any OpenAI SDK at {ZEAGATE_PUBLIC_URL}/v1 with a zea- virtual key.
| Method | Path | Auth | Purpose |
|---|---|---|---|
POST | /v1/chat/completions | Bearer | Chat (streaming and non-streaming) |
POST | /chat/completions | Bearer | Alias |
POST | /v1/embeddings | Bearer | Embeddings (OpenAI / Azure only) |
POST | /embeddings | Bearer | Alias |
GET | /v1/models | Bearer | Model groups the key may use |
GET | /health | None | DB connectivity |
GET | /health/liveliness | None | Process up |
GET | /health/readiness | None | DB + Redis |
There are no other public HTTP routes. Cache invalidation is Redis pub/sub, not HTTP.
Request lifecycle (chat)
- Auth — hash lookup; blocked/expired keys rejected
- Model access — key allowlist
- Budgets — every level must pass
- Rate limits — RPM/TPM for key, team, application, customer
- Pre-request guardrails
- Routing — weighted pick, retries, fallbacks
- Stream or return the provider response
- Post-response guardrails
- Async spend log
Error envelope
Gateway-generated errors:
{
"error": {
"message": "human-readable message",
"type": "authentication_error",
"code": "invalid_api_key"
}
}
Upstream provider errors are passed through with the upstream status and body.
See Error codes, headers and SDK snippets.