API reference

The gateway exposes one internal endpoint group. All requests are HTTP/2 with a JSON body or none at all.

Endpoints

MethodPathDescription
GET/api/v2/healthLiveness probe. Returns {"ok":true} in under 2 ms.
GET/api/v2/media/{id}Streamed media channel. Duplex, no compression.
POST/api/v2/media/{id}Upstream write on the same channel.
GET/api/v2/statsCounters since process start.

Response shape

{
  "ok": true,
  "uptime_s": 10422,
  "inflight": 3,
  "bytes_in": 918273645,
  "bytes_out": 77364512
}

Error codes

StatusMeaning
400Malformed request line or missing path segment.
404Unknown path. The stream handler returns this for a bare GET.
429Per-IP connection budget exhausted.
503Backend socket refused; the edge keeps the TLS session open for 30 s.

Rate limits

Each source IP gets 64 concurrent streams and a token bucket of 200 requests per second. Limits are per front-end instance and reset on reload.