Chat completions
POST /v1/chat/completions — streaming and non-streaming.
Fully OpenAI-compatible chat completions endpoint. Supports tools, JSON mode, and streaming.
Streaming reliability
- SSE streams emit `: keepalive` comments every 15 seconds during upstream silence.
- If your client disconnects, the gateway aborts the upstream provider request and finalises billing for tokens received so far.
- Connection resume (`Last-Event-ID`) is not supported in v1 — open a new request with a fresh `request_id`.
Error responses follow the gateway contract: 402 insufficient_balance, 403 policy_violation, 429 rate_limited.