Telemetry

The prompt capture switch, reading captured requests, and exporting calls to Langfuse.

The prompt capture switch

capture_prompt_content is one flag per organization covering stored prompts, responses and Responses continuations. It is on for new organizations; admins (or the org's own key) can read and set it. Turning it off needs Pro (or a grandfathered org), else 403 needs_subscription; turning it back on is refused with 409 capture_cleanup_pending while an earlier erasure is unfinished. Every flip is audit-logged (telemetry.capture_enabled / _disabled).

With capture offEffect
New prompts, responses, continuationsNot stored
previous_response_id400 previous_response_not_found: send the full conversation each turn
Request log bodiesEmpty for new requests
Usage ledger (tokens, cost, latency, provider)Always kept

ZDR-routed requests are never captured even with capture on. A prompt whose response never arrived is removed after two hours. BYOK and connected-plan requests follow the same switch and are kept for your org only.

GET/api/orgs/{org_id}/telemetry-settingsPUT/api/orgs/{org_id}/telemetry-settings
curl https://api.experientiallabs.ai/api/orgs/ORG_ID/telemetry-settings \
  -H "Authorization: Bearer YOUR_API_KEY"

Read captured bodies

With capture on, the request log returns the captured prompt and response. Any key of your org can read them.

GET/api/orgs/{org_id}/usage/requests/{request_id}/prompt
curl https://api.experientiallabs.ai/api/orgs/ORG_ID/usage/requests/REQUEST_ID/prompt \
  -H "Authorization: Bearer YOUR_API_KEY"
# 404 when nothing was captured

Export calls to Langfuse

Send every gateway call (input, output, model, provider, tokens, cost, time to first token, errors) to your Langfuse project as OpenTelemetry spans. Omit langfuse to toggle an existing connection; DELETE turns export off. Delivery is best effort and never affects your calls. include_content: false, an org that requires ZDR, or a ZDR-routed request exports metadata only.

Request headerEffect
traceparentNests the call under your span
X-Explabs-Trace-NameTrace name
X-Explabs-Session-IdLangfuse session id (stored only as a hash)
X-Explabs-User-IdLangfuse user id
X-Explabs-Observation-NameObservation name
X-Explabs-TagsRecorded as metadata
PUT/api/orgs/{org_id}/observation-exportDELETE/api/orgs/{org_id}/observation-export
curl -X PUT https://api.experientiallabs.ai/api/orgs/ORG_ID/observation-export \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "langfuse": {"public_key": "pk-lf-...", "secret_key": "sk-lf-...",
       "host": "https://us.cloud.langfuse.com"}}'