Skip to content
OfferSign up and get $10 of credit for any model in Chat and the API. Top up from $1, with no processing fees. See free models →·Some free models are at the daily cap — refills 05:30 IST; requests auto-route to a live backup. Status →
One AI API Key
DocsMetrics

Reference

Metrics

A Prometheus endpoint for platform teams: aggregate request, token and spend numbers for the last 24 hours, with no prompts, model ids or account details.

Updated View .md
On this page

GET /metrics returns the gateway’s last 24 hours in the Prometheus text format, so a platform team can graph it next to its own services.

The endpoint is off unless the operator sets a token, so no deployment publishes spend by accident. Ask support if you need it on your account’s deployment.

Traces (OTLP)

When the operator sets OTEL_EXPORTER_OTLP_ENDPOINT, the gateway exports one OpenTelemetry span per relayed request to POST <endpoint>/v1/traces using OTLP/HTTP JSON:

  • Attributes are the HTTP method, the path without its query string, the response status, the requested model and whether the reply streamed. Nothing from the prompt, reply, headers or credential is exported.
  • Spans are batched up to 100 and flushed every five seconds. A failed export is logged and dropped; it never affects a request.
  • OTEL_EXPORTER_OTLP_HEADERS sends collector headers (k=v,k2=v2), and OTEL_SERVICE_NAME sets the resource service name.
  • The endpoint must be https; plain http is accepted only on loopback for a local collector.

This is separate from the Prometheus metrics above and stays off until a collector is configured.

↑ ↓ moveEnter openEsc close