anoman
Sign InGet API Key
Documentation home

Live Feed

A real-time SSE stream of everything happening on the gateway — requests, blocks, anomalies, batch jobs, provider issues — plus per-provider health and rolling latency.

Gateway activity as it happens

Open GET /anoman/v1/events/stream with API-key auth to receive a Server-Sent-Events stream of gateway activity. Event types include:

  • requests — each completion as it finishes, with model, status and latency;
  • guardrail blocks — a request stopped by injection / PII / content / policy;
  • anomalies — a detected token spike, request burst, guardrail storm, or cost outlier;
  • batch-job state changes — enqueued, completed, failed, escalated;
  • provider issues — an upstream provider degradation or failure.

cURL

# Open the SSE stream and print events as they happen
curl -N "https://api.anoman.io/anoman/v1/events/stream" \
  -H "Authorization: Bearer anm-sk-..."

Events

event: request
data: {"model":"claude-sonnet-4-20250514","status":"success","latency_ms":842}

event: blocked
data: {"guardrail":"injection","score":0.97,"api_key":"anm-sk-ab"}

event: anomaly
data: {"rule":"token_spike","severity":"high","id":"anom_7f3a"}

event: batch_completed
data: {"job_id":"job_a8f3c2b1d9","savings_usd":0.0042}

JavaScript

// Browser / Node EventSource-style consumption
const res = await fetch("https://api.anoman.io/anoman/v1/events/stream", {
  headers: { Authorization: "Bearer anm-sk-..." },
});
const reader = res.body.getReader();
const decoder = new TextDecoder();
for (;;) {
  const { value, done } = await reader.read();
  if (done) break;
  process.stdout.write(decoder.decode(value)); // parse "event:" / "data:" lines
}

This is a distinct stream from completion streaming — see Streaming for token-by-token response output.

Per-provider status + p50 latency

Call GET /anoman/v1/providers/health for each provider's current status and rolling p50 latency over a 5-minute window — the same signal that drives latency-based routing.

Health

# Per-provider status + rolling p50 latency
curl "https://api.anoman.io/anoman/v1/providers/health" \
  -H "Authorization: Bearer anm-sk-..."

Wall-boards and real-time reactions

Drive a live wall-board for your ops team, or subscribe programmatically to react to blocks and anomalies the moment they occur.

Related: Anomaly events on the feed are raised by the anomaly detection engines.

Watch it live

Open the Live Feed and see the gateway in real time.

On this page