ObservabilityBeta
Query your usage with your API key. List and sort requests, open one with its attempts and cost, roll up by model, key, label or time, and export.
Beta: this feature is supported, but may change.
Who can query
Every organization, on every plan. Any xpl_ key of your organization reads these routes for its own org: get the org_id from GET /api/whoami. The request log includes captured prompts and responses, so treat every key as able to read them. Key reads are limited per organization to about 10 per second (bursts of 30) and 4 in flight; over that, 429 with Retry-After.
| Read | Route |
|---|---|
| List requests | GET /api/orgs/{org_id}/usage/requests |
| One request, its attempts, its captured content | .../usage/requests/{request_id}, /attempts, /prompt |
| Over time, by provider, by end user, latency | .../usage/timeseries, /by-provider, /by-label, /latency |
| Daily or per-model totals | GET /api/gateway/usage/daily |
| Per key | .../usage/by-key (provisioning key) |
| A whole window as a file | POST /api/v1/usage/exports |
/api/whoamicurl https://api.experientiallabs.ai/api/whoami \
-H "Authorization: Bearer <YOUR_API_KEY>"
# {"org_id": "3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10", "org_slug": "acme", ...}List requests
Newest first, 50 per page by default. Every filter applies before pagination. While next_cursor is not null, resend the same query with its fields as cursor_ts, cursor_id, cursor_after (plus cursor_value, cursor_before on a sorted page).
| Parameter | Values |
|---|---|
window or start, end | 24h, 7d (default), 30d, or an exact ISO range (start inclusive, end exclusive) |
status | error (anything not completed), completed, failed, cancelled, incomplete, expired_before_dispatch, unknown_after_crash |
model, api_key_id, lane | A model slug, a key id, platform or byok |
attribution_label | One end user (see Tag requests) |
failure_class, conversation, cache_hits_only | One error class, one conversation handle, only requests with cached input |
sort | time (default), oldest, or largest first by cost, latency, tokens |
limit | 1 to 200 |
Under Partial zero data retention, a row a provider without zero data retention served carries non_zdr_provider (that provider's public name; null otherwise), shown in the app as a Non-ZDR provider badge. See Data controls.
sort does not combine with failure_class or conversation. A filtered sort too broad to read answers 422 sort_too_broad: shorten the window or sort by time.
/api/orgs/{org_id}/usage/requestscurl "https://api.experientiallabs.ai/api/orgs/ORG_ID/usage/requests?window=24h&status=error&limit=50" \
-H "Authorization: Bearer <YOUR_API_KEY>"One request: attempts and cost
The detail has the same fields as a list row. Add include_body=true to inline the captured prompt and response as body (null when nothing was captured). /attempts lists every provider dispatch in order (at most 256, with truncated: true past that): provider, platform or byok, outcome, failure class, timing and tokens. A request the gateway answered before any dispatch has no attempts.
| Field | Meaning |
|---|---|
real_cost_usd | Charged credits plus BYOK pass-through. With pricing_known: false, 0 means unpriced, not free |
cost_usd, free_usd, estimated_cost_usd | Charged, free (list value), BYOK estimate |
latency_ms, ttft_ms | Total time and time to first token |
input_tokens, output_tokens, cached_input_tokens, reasoning_tokens | Tokens |
attempt_count, failure_class, error_message | How it ran and why it failed |
prompt_group, conversation_group | Short handles: same system prompt and tools; same system prompt, tools and first user message (one conversation) |
Captured content exists only while prompt capture is on, for requests not routed under zero data retention, and while retained; otherwise /prompt answers 404. See Data controls.
/api/orgs/{org_id}/usage/requests/{request_id}GET/api/orgs/{org_id}/usage/requests/{request_id}/attemptsGET/api/orgs/{org_id}/usage/requests/{request_id}/prompt# The id is the x-request-id header of the response
curl "https://api.experientiallabs.ai/api/orgs/ORG_ID/usage/requests/REQUEST_ID?include_body=true" \
-H "Authorization: Bearer <YOUR_API_KEY>"
curl https://api.experientiallabs.ai/api/orgs/ORG_ID/usage/requests/REQUEST_ID/attempts \
-H "Authorization: Bearer <YOUR_API_KEY>"
# {"attempts": [{"ordinal": 0, "state": "failed", "failure_class": "throttled", ...},
# {"ordinal": 1, "state": "completed", ...}], "truncated": false}Roll up usage
The rollups take window (24h buckets hourly, 7d and 30d daily) and, where listed, model, api_key_id and lane. Request counts include errors and requests refused before dispatch.
| Route | Groups by | Notes |
|---|---|---|
.../usage/timeseries | Bucket, model, lane | compare=true adds the previous period's totals |
.../usage/latency | Whole window | p50 and p95 latency and time to first token |
.../usage/by-provider | Provider | provider: null is requests never dispatched |
.../usage/by-label | End user | Only labeled requests |
/api/gateway/usage/daily | day, day_model, model, member, hour, hour_model | Keys pass scope=org; hourly needs from, to at most 7 days apart; money in nano-USD |
.../usage/by-key | API key, then model | Provisioning key only |
/api/orgs/{org_id}/usage/timeseriesGET/api/orgs/{org_id}/usage/latencyGET/api/orgs/{org_id}/usage/by-providerGET/api/orgs/{org_id}/usage/by-labelGET/api/gateway/usage/dailyGET/api/orgs/{org_id}/usage/by-keycurl "https://api.experientiallabs.ai/api/orgs/ORG_ID/usage/timeseries?window=24h&compare=true" \
-H "Authorization: Bearer <YOUR_API_KEY>"Export
For more than a few pages, export instead of paging the log. The export is a gzip JSONL file of every settled request for one key, within the past 30 days: create it with an Idempotency-Key, poll it, then /download returns a signed URL valid up to 15 minutes. One export runs per organization at a time (429 otherwise). In the app, the request log's CSV button downloads the newest 5,000 rows under the current filters.
/api/v1/usage/exportsGET/api/v1/usage/exports/{export_id}GET/api/v1/usage/exports/{export_id}/downloadcurl -X POST https://api.experientiallabs.ai/api/v1/usage/exports \
-H "Authorization: Bearer <YOUR_API_KEY>" -H "Content-Type: application/json" \
-H "Idempotency-Key: 8d0f3c1e-export-nov" \
-d '{"api_key_id": "KEY_ID", "start_at": "2026-11-01T00:00:00Z", "end_at": "2026-11-08T00:00:00Z"}'
# 202 {"id": "EXPORT_ID", "status": "queued", ...} then poll, then /downloadTag requests
Two things on the inference call make the log easier to cut. Neither is required.
| Send | Becomes | Use it for |
|---|---|---|
safety_identifier (or user) in the body | attribution_label | Filtering the log and by-label per end user |
X-Explabs-Tags header, a JSON object of strings | tags on the request | Grouping and filtering spend by tag |
Tags work on POST Chat Completions, Responses and Messages: at most 16 pairs within 8 KiB; other routes refuse the header. The gateway strips the header before the provider. Never put secrets, prompts or personal data in tags.
import json
from openai import OpenAI
client = OpenAI(base_url="https://api.experientiallabs.ai/v1", api_key="<YOUR_API_KEY>")
client.chat.completions.create(
model="gpt-6-luna",
messages=[{"role": "user", "content": "Summarize ticket 4471"}],
safety_identifier="customer-42",
extra_headers={
"X-Explabs-Tags": json.dumps({"team": "support", "env": "prod"}),
},
)In the app
The same data, in two places in the dashboard.
| Page | Shows |
|---|---|
| Usage | Spend, tokens, cache hit rate and latency for the range, a chart over time, top models, and a breakdown by member, model, API key, tag and more. Ask usage questions opens a chat that answers from these totals |
| Observability > Requests | The request log: status, model, key, tokens, cost, credits and latency per row; sortable columns; filters by model, key, funding, end user, status, error and cache hits; search by request id; CSV. A row opens the request: its conversation, attempts, details and JSON |
| Plan | Windows | Usage page |
|---|---|---|
| Free | 24 hours, 7 days | Totals and breakdowns from the rollups |
| Pro | Adds 30 days | Any range, every view, filters, tags and CSV: the whole workspace for admins, their own usage for members |
The API routes on this page are not plan-gated: a key reads 30 days on every plan.
https://platform.experientiallabs.ai/observability/requests?requestId=REQUEST_ID