API reference
The gateway exposes one internal endpoint group. All requests are HTTP/2 with a JSON body or none at all.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/v2/health | Liveness 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/stats | Counters since process start. |
Response shape
{
"ok": true,
"uptime_s": 10422,
"inflight": 3,
"bytes_in": 918273645,
"bytes_out": 77364512
}
Error codes
| Status | Meaning |
|---|---|
| 400 | Malformed request line or missing path segment. |
| 404 | Unknown path. The stream handler returns this for a bare GET. |
| 429 | Per-IP connection budget exhausted. |
| 503 | Backend 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.