# TruLayer ## Docs - [Get a single anomaly by ID](https://docs.trulayer.ai/api-reference/anomaly/get-a-single-anomaly-by-id.md) - [List detected anomalies for the tenant](https://docs.trulayer.ai/api-reference/anomaly/list-detected-anomalies-for-the-tenant.md): Returns anomalies for the authenticated tenant ordered by `detected_at DESC, id DESC`. Pagination is cursor-based (TRU-403): callers pass the `next_cursor` value from the previous page as the `cursor` query param to fetch the next page. The legacy `offset` param is still accepted for backward compat… - [Create an API key (owner or member; requires Clerk auth)](https://docs.trulayer.ai/api-reference/apikeys/create-an-api-key-owner-or-member;-requires-clerk-auth.md) - [List API keys for the tenant](https://docs.trulayer.ai/api-reference/apikeys/list-api-keys-for-the-tenant.md) - [Revoke an API key (owner only; requires Clerk auth)](https://docs.trulayer.ai/api-reference/apikeys/revoke-an-api-key-owner-only;-requires-clerk-auth.md) - [Rotate an API key (owner or member; requires Clerk auth)](https://docs.trulayer.ai/api-reference/apikeys/rotate-an-api-key-owner-or-member;-requires-clerk-auth.md): Generates a fresh plaintext key for the same `api_keys` row, returning the new key exactly once. The previous plaintext is invalidated immediately — callers must update any clients that authenticated with the old key. Dashboard-only; not reachable via API-key auth. - [Verify a daily audit-log head-hash anchor (TRU-163)](https://docs.trulayer.ai/api-reference/audit/verify-a-daily-audit-log-head-hash-anchor-tru-163.md): Returns the recorded daily head-hash checkpoint for `(tenant_id, date)` as written by the anchoring job. The manifest itself is stored in S3 Object Lock (WORM) and is signed with an Ed25519 key; this endpoint returns the mirror stored in Postgres. Third-party auditors can cross-check the `head_hash`… - [Create a Stripe Billing Portal session](https://docs.trulayer.ai/api-reference/billing/create-a-stripe-billing-portal-session.md): Creates a Stripe Customer Portal session so the owner can manage their subscription. Returns 422 if there is no active subscription for the tenant. - [Create a Stripe Checkout session for a plan upgrade](https://docs.trulayer.ai/api-reference/billing/create-a-stripe-checkout-session-for-a-plan-upgrade.md): Creates a Stripe Checkout session for the specified paid plan. Owner-only. Starter is rejected — free plans never require a checkout session. - [List recent Stripe invoices for the tenant](https://docs.trulayer.ai/api-reference/billing/list-recent-stripe-invoices-for-the-tenant.md): Returns up to 24 recent Stripe invoices for the authenticated tenant's Stripe customer, newest first. Tenants on Starter (no Stripe customer yet) receive an empty list rather than a 404. - [Evaluate an eval run against a CI policy](https://docs.trulayer.ai/api-reference/ci/evaluate-an-eval-run-against-a-ci-policy.md) - [Public sub-processor registry (TRU-52)](https://docs.trulayer.ai/api-reference/compliance/public-sub-processor-registry-tru-52.md): Returns TruLayer's current list of sub-processors as required by GDPR Art. 28(2). Public — no authentication. Content is negotiated via the `Accept` header: - [Subscribe an email to sub-processor change notifications (TRU-52)](https://docs.trulayer.ai/api-reference/compliance/subscribe-an-email-to-sub-processor-change-notifications-tru-52.md): Customer DPOs subscribe their email to receive 30-day advance notice when a sub-processor is added or changed. Idempotent — a 200 response does not reveal whether the address was already subscribed. - [Unsubscribe an email from sub-processor change notifications (TRU-52)](https://docs.trulayer.ai/api-reference/compliance/unsubscribe-an-email-from-sub-processor-change-notifications-tru-52.md): Idempotent — always returns 200 even when the email was never subscribed, so the endpoint cannot be used to enumerate subscribers. - [Approve a pending_approval control action (owner-only)](https://docs.trulayer.ai/api-reference/control/approve-a-pending_approval-control-action-owner-only.md): Re-queues the action for execution. The executor runs synchronously; the returned action reflects the post-execution status. TRU-68. - [Disable the control-loop kill-switch (owner-only)](https://docs.trulayer.ai/api-reference/control/disable-the-control-loop-kill-switch-owner-only.md): Flips the kill-switch off for the tenant. Control actions resume execution normally. TRU-68. - [Enable the control-loop kill-switch (owner-only)](https://docs.trulayer.ai/api-reference/control/enable-the-control-loop-kill-switch-owner-only.md): Flips the kill-switch on for the tenant. Subsequent calls to `POST /v1/control/execute` are refused with HTTP 503 until the switch is disabled. TRU-68. - [Execute a control action (retry, fallback model, or prompt modification)](https://docs.trulayer.ai/api-reference/control/execute-a-control-action-retry-fallback-model-or-prompt-modification.md) - [Get the per-trace remediation diff for a control action](https://docs.trulayer.ai/api-reference/control/get-the-per-trace-remediation-diff-for-a-control-action.md): Returns a comparison of the original LLM span against the remediated span produced by a `retry` control action — token length delta, latency delta, Claude-rated similarity, and per-rule eval score deltas. Lazy-computed on first GET and cached for subsequent requests. TRU-363. - [Get the tenant's control-loop kill-switch state](https://docs.trulayer.ai/api-reference/control/get-the-tenants-control-loop-kill-switch-state.md): Returns whether the emergency kill-switch is active. While active, `POST /v1/control/execute` returns 503 with `error.kill_switch_active`. Readable by any dashboard role (viewer and above). TRU-68. - [List control actions for the tenant](https://docs.trulayer.ai/api-reference/control/list-control-actions-for-the-tenant.md) - [List control actions parked for human approval (owner-only)](https://docs.trulayer.ai/api-reference/control/list-control-actions-parked-for-human-approval-owner-only.md): Returns control actions in the `pending_approval` status. Owner-only; API-key callers are refused by the auth middleware. See TRU-68. - [Reject a pending_approval control action (owner-only)](https://docs.trulayer.ai/api-reference/control/reject-a-pending_approval-control-action-owner-only.md): Marks the action as failed with an optional short reason code. The executor is NOT invoked. TRU-68. - [Add an item to a dataset](https://docs.trulayer.ai/api-reference/datasets/add-an-item-to-a-dataset.md) - [Create a new dataset](https://docs.trulayer.ai/api-reference/datasets/create-a-new-dataset.md) - [Delete a dataset and its items](https://docs.trulayer.ai/api-reference/datasets/delete-a-dataset-and-its-items.md) - [Get a single dataset by ID](https://docs.trulayer.ai/api-reference/datasets/get-a-single-dataset-by-id.md) - [List datasets for the authenticated tenant](https://docs.trulayer.ai/api-reference/datasets/list-datasets-for-the-authenticated-tenant.md) - [List items for a dataset with cursor-based pagination](https://docs.trulayer.ai/api-reference/datasets/list-items-for-a-dataset-with-cursor-based-pagination.md): Returns items in a dataset ordered newest-first. Supports opaque cursor pagination (`cursor`, `limit`) and optional filtering by review label (`label`). Omitting `label` returns every item regardless of label; passing `unlabeled` returns only items whose label has never been set or was cleared back… - [Stream dataset items as CSV or JSONL (sync export)](https://docs.trulayer.ai/api-reference/datasets/stream-dataset-items-as-csv-or-jsonl-sync-export.md): Cursor-streamed synchronous export of items in the named dataset. Rows are written directly to the response body — never buffered — and capped per plan (Starter: 100, Pro/Team/Business: 5000, Enterprise: unlimited). Hitting the cap sets `X-TruLayer-Truncated: true`; the payload is complete up to tha… - [Update a dataset item's label](https://docs.trulayer.ai/api-reference/datasets/update-a-dataset-items-label.md): Updates the `label` on a single dataset item. Used by the dashboard to toggle inline labels while reviewing a dataset. Pass `null` (or omit the field) to clear the label back to unlabeled. - [List currently deprecated v1 fields and endpoints](https://docs.trulayer.ai/api-reference/deprecations/list-currently-deprecated-v1-fields-and-endpoints.md): Machine-readable index of fields and endpoints under `/v1` that have been marked deprecated and are scheduled for removal. Empty array means no deprecations are active. - [Fetch a single DSR request (TRU-57)](https://docs.trulayer.ai/api-reference/dsr/fetch-a-single-dsr-request-tru-57.md): Dashboard-only. Returns 404 when the row is not in the caller's tenant. - [List Data Subject Requests for the authenticated tenant (TRU-57)](https://docs.trulayer.ai/api-reference/dsr/list-data-subject-requests-for-the-authenticated-tenant-tru-57.md): Returns DSR requests newest-first with opaque cursor pagination. Dashboard-only. - [Submit a Data Subject Request (TRU-57)](https://docs.trulayer.ai/api-reference/dsr/submit-a-data-subject-request-tru-57.md): Self-serve GDPR/CCPA intake. Creates a pending DSR row that a background worker fulfils asynchronously. Dashboard-only — the route requires a Clerk session and the `owner` or `member` role. API keys cannot reach this endpoint. - [Create or replace the BYOK key for a provider](https://docs.trulayer.ai/api-reference/eval-keys/create-or-replace-the-byok-key-for-a-provider.md): Stores an encrypted copy of the provider API key. If a key for the same provider already exists it is revoked atomically so there is never more than one active key per (tenant, provider). - [List active BYOK keys for premium eval models](https://docs.trulayer.ai/api-reference/eval-keys/list-active-byok-keys-for-premium-eval-models.md): Returns the active (non-revoked) provider keys for the tenant. The raw key material is never returned — only provider and creation metadata. - [Revoke the BYOK key for a provider](https://docs.trulayer.ai/api-reference/eval-keys/revoke-the-byok-key-for-a-provider.md) - [Create an eval rule](https://docs.trulayer.ai/api-reference/eval-rules/create-an-eval-rule.md) - [Delete an eval rule](https://docs.trulayer.ai/api-reference/eval-rules/delete-an-eval-rule.md) - [List eval rules for the tenant](https://docs.trulayer.ai/api-reference/eval-rules/list-eval-rules-for-the-tenant.md) - [Update an eval rule (partial update)](https://docs.trulayer.ai/api-reference/eval-rules/update-an-eval-rule-partial-update.md) - [Create an eval version for a dataset](https://docs.trulayer.ai/api-reference/eval-runs/create-an-eval-version-for-a-dataset.md) - [Export eval run results](https://docs.trulayer.ai/api-reference/eval-runs/export-eval-run-results.md): Returns the eval run metadata plus the full array of evaluation items (one per scored trace) as a downloadable JSON document. The `Content-Disposition` header is set to `attachment` so browsers offer a file save dialog. Tenant-scoped — cross-tenant access returns 404. - [Get eval run status and progress](https://docs.trulayer.ai/api-reference/eval-runs/get-eval-run-status-and-progress.md) - [List eval runs for a dataset](https://docs.trulayer.ai/api-reference/eval-runs/list-eval-runs-for-a-dataset.md) - [List eval versions for a dataset](https://docs.trulayer.ai/api-reference/eval-runs/list-eval-versions-for-a-dataset.md) - [Schedule an eval run against a dataset version](https://docs.trulayer.ai/api-reference/eval-runs/schedule-an-eval-run-against-a-dataset-version.md) - [Score diff between two eval runs](https://docs.trulayer.ai/api-reference/eval-runs/score-diff-between-two-eval-runs.md) - [List pre-built LLM evaluators available for use](https://docs.trulayer.ai/api-reference/eval/list-pre-built-llm-evaluators-available-for-use.md): Returns the static catalog of TruLayer's pre-built LLM-judge evaluators. This endpoint is public (no auth required) so SDKs and dashboards can render a picker before a session is established. The response is safe to cache aggressively. Use a catalog entry by passing its name as `config.preset` when… - [Compare eval metrics between two time windows](https://docs.trulayer.ai/api-reference/evals/compare-eval-metrics-between-two-time-windows.md) - [Get evaluation result](https://docs.trulayer.ai/api-reference/evals/get-evaluation-result.md) - [Get score distribution histogram for a metric](https://docs.trulayer.ai/api-reference/evals/get-score-distribution-histogram-for-a-metric.md) - [Get time-bucketed eval score averages per metric](https://docs.trulayer.ai/api-reference/evals/get-time-bucketed-eval-score-averages-per-metric.md) - [List evaluations](https://docs.trulayer.ai/api-reference/evals/list-evaluations.md): List evaluations for the authenticated tenant, optionally filtered. All filters are optional and combine with AND semantics. Invalid values return 400 with an i18n error key. - [Stream evaluations as CSV or JSONL (sync export)](https://docs.trulayer.ai/api-reference/evals/stream-evaluations-as-csv-or-jsonl-sync-export.md): Cursor-streamed synchronous export of evaluations. Rows are written directly to the response body — never buffered — and capped per plan (Starter: 100, Pro/Team/Business: 5000, Enterprise: unlimited). - [Trigger an evaluation run](https://docs.trulayer.ai/api-reference/evals/trigger-an-evaluation-run.md) - [Create a failure detection rule](https://docs.trulayer.ai/api-reference/failure-rules/create-a-failure-detection-rule.md) - [Delete a failure detection rule](https://docs.trulayer.ai/api-reference/failure-rules/delete-a-failure-detection-rule.md) - [Get a single failure detection rule](https://docs.trulayer.ai/api-reference/failure-rules/get-a-single-failure-detection-rule.md) - [List failure detection rules for the tenant](https://docs.trulayer.ai/api-reference/failure-rules/list-failure-detection-rules-for-the-tenant.md) - [Update a failure detection rule (partial update)](https://docs.trulayer.ai/api-reference/failure-rules/update-a-failure-detection-rule-partial-update.md) - [Group error traces by message prefix and return failure clusters](https://docs.trulayer.ai/api-reference/failures/group-error-traces-by-message-prefix-and-return-failure-clusters.md): Groups traces that have `error=true` by their top-level error message prefix, returning a ranked list of failure clusters with count, first/last seen timestamps, and a sample of trace IDs from each cluster. Used by the dashboard Failure clustering view. - [List feedback for the tenant with cursor-based pagination](https://docs.trulayer.ai/api-reference/feedback/list-feedback-for-the-tenant-with-cursor-based-pagination.md) - [Submit user feedback on a trace](https://docs.trulayer.ai/api-reference/feedback/submit-user-feedback-on-a-trace.md) - [Liveness check](https://docs.trulayer.ai/api-reference/health/liveness-check.md) - [Ingest a batch of traces (max 100)](https://docs.trulayer.ai/api-reference/ingest/ingest-a-batch-of-traces-max-100.md) - [Ingest a single trace](https://docs.trulayer.ai/api-reference/ingest/ingest-a-single-trace.md) - [Introduction](https://docs.trulayer.ai/api-reference/introduction.md): The TruLayer HTTP API — base URL, authentication, errors, versioning. - [Count active API keys created by a member](https://docs.trulayer.ai/api-reference/members/count-active-api-keys-created-by-a-member.md): Returns the number of non-revoked API keys the target member created within the caller's tenant (TRU-207). The dashboard calls this from the "remove member" confirmation flow to warn owners that deleting the user will orphan the "created by" attribution on the listed keys (the keys themselves surviv… - [Remove the authenticated user from the current organization](https://docs.trulayer.ai/api-reference/members/remove-the-authenticated-user-from-the-current-organization.md): Self-removal (TRU-206). The calling user leaves the tenant resolved from their Clerk session. Reachable by every authenticated role (viewer through owner). If the caller is the sole owner, the request is rejected with 422 `at_least_one_owner_required` so the tenant is never left without an owner. On… - [Aggregate metrics (error rate, latency percentiles, cost)](https://docs.trulayer.ai/api-reference/metrics/aggregate-metrics-error-rate-latency-percentiles-cost.md) - [Customer-facing ingestion pipeline health (TRU-167)](https://docs.trulayer.ai/api-reference/metrics/customer-facing-ingestion-pipeline-health-tru-167.md): Returns ingest reliability signals (success/error rate, top error categories, DLQ depth, ingest lag percentiles, last-span timestamp, redaction match count) scoped to the authenticated tenant so customers can self-diagnose pipeline issues. - [Create a model route](https://docs.trulayer.ai/api-reference/model-routes/create-a-model-route.md) - [Delete a model route](https://docs.trulayer.ai/api-reference/model-routes/delete-a-model-route.md) - [List model routes for the tenant](https://docs.trulayer.ai/api-reference/model-routes/list-model-routes-for-the-tenant.md) - [Update a model route (partial update)](https://docs.trulayer.ai/api-reference/model-routes/update-a-model-route-partial-update.md) - [Export traces in OTLP/HTTP JSON format](https://docs.trulayer.ai/api-reference/otlp/export-traces-in-otlphttp-json-format.md): Streams traces in OTLP `TracesData` JSON format so existing OTel tooling (Datadog, Honeycomb, Tempo, Jaeger) can ingest without a TruLayer-specific adapter. Dashboard-only (Clerk session auth). Capped at 10,000 spans per response; use the `cursor` query parameter returned in the `X-Next-Cursor` resp… - [OTLP/HTTP ingest endpoint (OTel GenAI semconv v1.29.0)](https://docs.trulayer.ai/api-reference/otlp/otlphttp-ingest-endpoint-otel-genai-semconv-v1290.md): Accepts an OpenTelemetry `ExportTraceServiceRequest` payload, either as protobuf (`application/x-protobuf`) or JSON (`application/json`). Maps OTel GenAI semantic convention attributes onto TruLayer's span model and routes each span through the standard ingestion pipeline (Kafka → processor → Timesc… - [Archive a policy (TRU-67 Phase 1)](https://docs.trulayer.ai/api-reference/policies/archive-a-policy-tru-67-phase-1.md): Soft-delete — sets status=archived. Owner-only. Phase 2 control_actions rows link back to policies so we never hard delete. - [Create a Control Loop Policy (TRU-67 Phase 1)](https://docs.trulayer.ai/api-reference/policies/create-a-control-loop-policy-tru-67-phase-1.md): Creates a named YAML-DSL policy in `draft` status. Dashboard-only (Clerk session + member role required). Phase 2 (follow-up issue) adds the automated evaluator that applies active policies to eval events; Phase 1 is CRUD only. - [Fetch a single policy (TRU-67 Phase 1)](https://docs.trulayer.ai/api-reference/policies/fetch-a-single-policy-tru-67-phase-1.md): Dashboard-only. Returns 404 when the row is not in the caller's tenant. - [List Control Loop Policies (TRU-67 Phase 1)](https://docs.trulayer.ai/api-reference/policies/list-control-loop-policies-tru-67-phase-1.md): Dashboard-only. Supports optional status filter + pagination. - [Update a policy (TRU-67 Phase 1)](https://docs.trulayer.ai/api-reference/policies/update-a-policy-tru-67-phase-1.md): PATCH semantics. Dashboard-only. Requires member+. - [Archive a project (owner only; requires Clerk auth)](https://docs.trulayer.ai/api-reference/projects/archive-a-project-owner-only;-requires-clerk-auth.md): Soft-deletes the project by setting `archived_at`. Dashboard-only — not reachable via API key. Requires the owner role. - [Create a new project (owner or member; requires Clerk auth)](https://docs.trulayer.ai/api-reference/projects/create-a-new-project-owner-or-member;-requires-clerk-auth.md): Creates a new project inside the caller's tenant. Dashboard-only — not reachable via API key. Requires owner or member role. - [List projects for the authenticated tenant](https://docs.trulayer.ai/api-reference/projects/list-projects-for-the-authenticated-tenant.md): Reachable via **Clerk session auth** (dashboard) and via **API key auth** carrying the `query` scope (MCP server, SDK clients). Only returns projects that belong to the caller's tenant — tenant isolation is enforced server-side. - [Read a single project-scoped metric (TRU-362)](https://docs.trulayer.ai/api-reference/projects/read-a-single-project-scoped-metric-tru-362.md): Returns a project-scoped scalar metric over a fixed window. Currently supports the `retry_cap_hit` metric (count of `control_actions` rows whose escalation reason is `retry_threshold_exceeded` within the requested window). Returns `0` (not null) when no rows match. - [Unarchive a previously-archived project (owner only; requires Clerk auth)](https://docs.trulayer.ai/api-reference/projects/unarchive-a-previously-archived-project-owner-only;-requires-clerk-auth.md): Clears `archived_at` on a previously archived project. Dashboard-only — not reachable via API key. Requires the owner role. - [Update a project (rename or adjust retention override)](https://docs.trulayer.ai/api-reference/projects/update-a-project-rename-or-adjust-retention-override.md): Partial update — supply only the fields you want to change. Current supported fields are `name` (human-readable project name; also drives the slug) and `retention_days_override` (per-project retention window; TRU-170). - [Approve a prompt deployment for ship (owner-only)](https://docs.trulayer.ai/api-reference/prompts/approve-a-prompt-deployment-for-ship-owner-only.md): Transitions an `ab_passed` (or `proposed`) deployment to `shipped` and stamps `shipped_at` + `approved_by`. TRU-369. - [Get a single prompt deployment by ID](https://docs.trulayer.ai/api-reference/prompts/get-a-single-prompt-deployment-by-id.md) - [List closed-loop prompt-improvement deployments](https://docs.trulayer.ai/api-reference/prompts/list-closed-loop-prompt-improvement-deployments.md): Returns the tenant's prompt deployments — proposed, A/B-tested, shipped, monitoring, regressed, or rolled-back. Dashboard-only; Team+ plan. TRU-369. - [Reject a non-terminal prompt deployment (owner-only)](https://docs.trulayer.ai/api-reference/prompts/reject-a-non-terminal-prompt-deployment-owner-only.md) - [Roll a shipped or monitoring/regressed prompt deployment back (owner-only)](https://docs.trulayer.ai/api-reference/prompts/roll-a-shipped-or-monitoringregressed-prompt-deployment-back-owner-only.md) - [Create a saved filter (TRU-216)](https://docs.trulayer.ai/api-reference/saved-filters/create-a-saved-filter-tru-216.md): Creates a team-shared saved filter. Dashboard-only. Requires member+. The `filters` payload is opaque JSON owned by the dashboard — the server only enforces it is a JSON object. - [Delete a saved filter (TRU-216)](https://docs.trulayer.ai/api-reference/saved-filters/delete-a-saved-filter-tru-216.md): Hard-deletes the row. Dashboard-only. Requires owner. - [List team-shared saved filters (TRU-216)](https://docs.trulayer.ai/api-reference/saved-filters/list-team-shared-saved-filters-tru-216.md): Returns saved filters for the given project. Dashboard-only (Clerk session). Filters are shared across the tenant — every team member sees the same list. - [Update a saved filter (TRU-216)](https://docs.trulayer.ai/api-reference/saved-filters/update-a-saved-filter-tru-216.md): PATCH semantics. Dashboard-only. Requires member+. - [Find spans semantically similar to a query vector](https://docs.trulayer.ai/api-reference/search/find-spans-semantically-similar-to-a-query-vector.md) - [Free-text semantic search over span embeddings (server-side embed)](https://docs.trulayer.ai/api-reference/search/free-text-semantic-search-over-span-embeddings-server-side-embed.md): Embeds the `q` query server-side using the tenant's configured BYOK embedding key (OpenAI preferred, Anthropic fallback), then runs pgvector similarity search over span embeddings. Designed for MCP agents and other callers that cannot produce a 1536-dim vector directly. - [Get the remediation chain for a trace](https://docs.trulayer.ai/api-reference/traces/get-the-remediation-chain-for-a-trace.md): Returns the chain of control actions for the trace ordered oldest-first. For `retry` actions the per-action TRU-363 diff is inlined under `diff`. For other action types (`fallback_model`, `prompt_modification`, `escalate`) `diff` is null because no remediated span is materialised on the trace. `inte… - [Get trace detail with spans and events](https://docs.trulayer.ai/api-reference/traces/get-trace-detail-with-spans-and-events.md) - [List traces with cursor-based pagination](https://docs.trulayer.ai/api-reference/traces/list-traces-with-cursor-based-pagination.md) - [Server-Sent Events stream of live trace events](https://docs.trulayer.ai/api-reference/traces/server-sent-events-stream-of-live-trace-events.md): Opens a Server-Sent Events (SSE) stream. The server subscribes to a Redis pub/sub channel for the authenticated tenant and forwards each new trace event as a `data:` frame whose payload is a JSON-encoded `LiveTraceEvent`. The stream stays open until the client disconnects. The client does not send a… - [Stream traces as CSV or JSONL (sync export)](https://docs.trulayer.ai/api-reference/traces/stream-traces-as-csv-or-jsonl-sync-export.md): Cursor-streamed synchronous export of traces matching the same filters as `GET /v1/traces`. Rows are written directly to the response body — never buffered — and capped per plan (Starter: 100, Pro/Team/Business: 5000, Enterprise: unlimited). Hitting the cap sets `X-TruLayer-Truncated: true`; the pay… - [Create a webhook](https://docs.trulayer.ai/api-reference/webhooks/create-a-webhook.md) - [Delete a webhook (owner only)](https://docs.trulayer.ai/api-reference/webhooks/delete-a-webhook-owner-only.md) - [List webhooks for the tenant](https://docs.trulayer.ai/api-reference/webhooks/list-webhooks-for-the-tenant.md) - [Send a synthetic ping event to verify a webhook endpoint](https://docs.trulayer.ai/api-reference/webhooks/send-a-synthetic-ping-event-to-verify-a-webhook-endpoint.md): Sends a `{type: "ping", webhook_id, sent_at}` payload to the webhook's configured endpoint, signed with the same HMAC-SHA256 scheme used for live deliveries. Returns the destination's HTTP status and (truncated) response body. The delivery is ephemeral and is not written to the delivery log. Same RB… - [Best practices](https://docs.trulayer.ai/best-practices/overview.md): Patterns for production-grade tracing on TruLayer. - [Evaluations](https://docs.trulayer.ai/concepts/evals.md): Automated scoring of traces by an evaluator. - [Feedback](https://docs.trulayer.ai/concepts/feedback.md): Human labels attached to traces. - [Metrics](https://docs.trulayer.ai/concepts/metrics.md): Aggregated views across traces. - [Overview](https://docs.trulayer.ai/concepts/overview.md): The TruLayer data model in one page. - [Sessions](https://docs.trulayer.ai/concepts/sessions.md): Group traces that belong to the same conversation or workflow. - [Traces and spans](https://docs.trulayer.ai/concepts/traces-and-spans.md): The core unit of observability in TruLayer. - [Control Loop v0.1 migration notes](https://docs.trulayer.ai/control-loop/migration-notes.md): What defaults apply when you haven't set max_cascade_depth or prompt_autoship_enabled, and what changed in Control Loop v0.1. - [Control loop quickstart](https://docs.trulayer.ai/control-loop/quickstart.md): Set up closed-loop prompt improvement in six steps: detect failures, cluster them, propose a prompt diff, run an A/B replay, ship the winner, and roll back automatically if it regresses. - [Control](https://docs.trulayer.ai/dashboard/control.md): Automated actions, policies, HITL approvals, and the kill-switch. - [Evals](https://docs.trulayer.ai/dashboard/evals.md): Run, view, and compare evaluation results. - [Failures](https://docs.trulayer.ai/dashboard/failures.md): Clustered failures, root-cause analysis, and alert rules. - [Feedback](https://docs.trulayer.ai/dashboard/feedback.md): Capture, review, and triage end-user feedback on every trace. - [Ingestion health](https://docs.trulayer.ai/dashboard/ingestion-health.md): Self-diagnose ingest issues — success rate, latency, DLQ depth, and top errors — without opening a support ticket. - [Metrics](https://docs.trulayer.ai/dashboard/metrics.md): Aggregate views over traces — latency, errors, cost, feedback. - [Dashboard overview](https://docs.trulayer.ai/dashboard/overview.md): What's in the TruLayer dashboard and where to find it. - [Projects](https://docs.trulayer.ai/dashboard/projects.md): Create, list, and archive projects from the dashboard. - [Prompt Improvements](https://docs.trulayer.ai/dashboard/prompt-improvements.md): Closed-loop prompt improvement: review model-proposed prompt diffs, ship them after an A/B replay passes, and roll back automatically when a shipped prompt regresses. - [Settings — API keys](https://docs.trulayer.ai/dashboard/settings-api-keys.md): Create, scope, rotate, and revoke TruLayer API keys. - [Settings — Appearance](https://docs.trulayer.ai/dashboard/settings-appearance.md): Switch the TruLayer dashboard between light, dark, and system themes. - [Settings — Audit Log](https://docs.trulayer.ai/dashboard/settings-audit-log.md): Review the append-only, hash-chained audit trail for your workspace. - [Settings — Billing](https://docs.trulayer.ai/dashboard/settings-billing.md): Manage your plan, payment method, and invoices. - [Settings — Team](https://docs.trulayer.ai/dashboard/settings-team.md): Invite members, manage roles, and configure SSO. - [Settings — Usage](https://docs.trulayer.ai/dashboard/settings-usage.md): Track spans, evaluations, seats, and retention against your plan. - [Traces](https://docs.trulayer.ai/dashboard/traces.md): Browse and inspect every trace your app has sent. - [Contributing to docs](https://docs.trulayer.ai/development.md): How to edit these docs locally and how they get deployed. - [Glossary](https://docs.trulayer.ai/glossary.md): Every TruLayer term, defined once. - [Scoped API keys](https://docs.trulayer.ai/guides/api-key-scopes.md): Limit what a TruLayer API key can do — issue read-only query keys for MCP servers and AI agents. - [Verifying the audit-log chain](https://docs.trulayer.ai/guides/audit-verify.md): Cross-check TruLayer's tamper-evident audit log against the Ed25519-signed daily manifest. - [Changelog](https://docs.trulayer.ai/guides/changelog.md): Recent API and SDK changes. - [CI eval gate](https://docs.trulayer.ai/guides/ci-eval-gate.md): Fail a pull request when the eval score drops below your policy — or warn without blocking. - [MCP server and skills](https://docs.trulayer.ai/guides/mcp.md): Install the TruLayer MCP server to give AI agents and IDEs direct access to your traces, evals, and metrics. - [Model routing](https://docs.trulayer.ai/guides/model-routing.md): Tenant-scoped rules that map logical model names to concrete provider models, with fallback. - [OTLP ingest and export](https://docs.trulayer.ai/guides/otlp.md): Dual-ship traces from an OTel Collector into TruLayer, and export back out in OTLP JSON for Datadog, Honeycomb, Tempo, or Jaeger. - [Project lifecycle](https://docs.trulayer.ai/guides/projects.md): How to archive and unarchive projects, what archiving does to active API keys, and the one-active-project constraint. - [Remediation diffs](https://docs.trulayer.ai/guides/remediation-diffs.md): Compare original and remediated span outputs after a control-loop action. - [Semantic search over spans](https://docs.trulayer.ai/guides/semantic-search.md): Find spans by meaning, not just exact match — powered by pgvector and your BYOK embedding key. - [Webhooks](https://docs.trulayer.ai/guides/webhooks.md): Receive real-time event notifications from TruLayer by registering an HTTPS endpoint. - [TruLayer Documentation](https://docs.trulayer.ai/index.md): The truth layer for AI systems — observability, evaluation, debugging, feedback, and control for LLM applications. - [Anthropic](https://docs.trulayer.ai/integrations/anthropic.md): Trace every Claude API call with one function. - [AutoGen](https://docs.trulayer.ai/integrations/autogen.md): Trace every AutoGen ConversableAgent chat and reply. - [CrewAI](https://docs.trulayer.ai/integrations/crewai.md): Trace every CrewAI crew kickoff, agent task, and tool call. - [DSPy](https://docs.trulayer.ai/integrations/dspy.md): Trace every DSPy Predict and module call. - [Haystack](https://docs.trulayer.ai/integrations/haystack.md): Trace every Haystack v2 pipeline run and component execution. - [LangChain](https://docs.trulayer.ai/integrations/langchain.md): Trace every LangChain chain, agent, and tool call with one function. - [LlamaIndex](https://docs.trulayer.ai/integrations/llamaindex.md): Trace LlamaIndex query engines, agents, and retrievers with one function. - [Mastra](https://docs.trulayer.ai/integrations/mastra.md): Trace Mastra agents, workflows, and tools with the TruLayer TypeScript SDK. - [OpenAI](https://docs.trulayer.ai/integrations/openai.md): Trace every OpenAI call with one function. - [Framework integrations](https://docs.trulayer.ai/integrations/overview.md): Supported LLM frameworks and SDKs — one function to instrument, zero code changes per call. - [PydanticAI](https://docs.trulayer.ai/integrations/pydanticai.md): Trace every PydanticAI agent run with one function. - [Vercel AI SDK](https://docs.trulayer.ai/integrations/vercel-ai-sdk.md): Trace every streamText, generateText, and generateObject call. - [Quickstart](https://docs.trulayer.ai/quickstart.md): Install a TruLayer SDK and see your first trace in the dashboard. - [Go SDK auto-instrumentation](https://docs.trulayer.ai/sdks/go/instruments.md): InstrumentOpenAI and InstrumentAnthropic — automatic span recording for OpenAI and Anthropic Go clients. - [Go SDK overview](https://docs.trulayer.ai/sdks/go/overview.md): The github.com/trulayer/client-go module — install, authenticate, instrument. - [Go SDK reference](https://docs.trulayer.ai/sdks/go/reference.md): Every public export in github.com/trulayer/client-go. - [Go SDK tutorial](https://docs.trulayer.ai/sdks/go/tutorial.md): A step-by-step walkthrough from installation to a production-ready instrumented Go app. - [Python SDK configuration](https://docs.trulayer.ai/sdks/python/configuration.md): Every option you can pass to trulayer.init(). - [Python SDK examples](https://docs.trulayer.ai/sdks/python/examples.md): Runnable, end-to-end Python demos that exercise the trulayer SDK against real (or mocked) LLM providers. - [Failure behavior](https://docs.trulayer.ai/sdks/python/fail-mode.md): What happens when the TruLayer ingest API is unreachable, and how to opt in to blocking semantics. - [Python SDK overview](https://docs.trulayer.ai/sdks/python/overview.md): The trulayer Python package — install, authenticate, instrument. - [Python SDK reference](https://docs.trulayer.ai/sdks/python/reference.md): Every public export in the trulayer package. - [Testing with the Python SDK](https://docs.trulayer.ai/sdks/python/testing.md): Framework-agnostic helpers for asserting on captured traces without hitting the network. - [Python SDK tutorial](https://docs.trulayer.ai/sdks/python/tutorial.md): A step-by-step walkthrough from manual tracing to production-ready instrumentation. - [Redaction](https://docs.trulayer.ai/sdks/redaction.md): Scrub PII, secrets, and PHI before data leaves your network. - [TypeScript SDK configuration](https://docs.trulayer.ai/sdks/typescript/configuration.md): Every option you can pass to the TruLayer constructor. - [TypeScript SDK examples](https://docs.trulayer.ai/sdks/typescript/examples.md): Runnable, end-to-end TypeScript demos that exercise @trulayer/sdk against real (or mocked) LLM providers. - [Failure behavior](https://docs.trulayer.ai/sdks/typescript/fail-mode.md): What happens when the TruLayer ingest API is unreachable, and how to opt in to blocking semantics. - [TypeScript SDK](https://docs.trulayer.ai/sdks/typescript/overview.md): The @trulayer/sdk npm package — zero runtime dependencies, works anywhere Node.js fetch does. - [TypeScript SDK reference](https://docs.trulayer.ai/sdks/typescript/reference.md): Every public export of @trulayer/sdk. - [Testing with the TypeScript SDK](https://docs.trulayer.ai/sdks/typescript/testing.md): Framework-agnostic helpers for asserting on captured traces without hitting the network. - [TypeScript SDK tutorial](https://docs.trulayer.ai/sdks/typescript/tutorial.md): Step-by-step: instrument a Node, Edge, or Bun app with @trulayer/sdk. - [Service Level Agreement](https://docs.trulayer.ai/sla.md): TruLayer's uptime commitment, service credits, and per-component fail-mode behaviour. ## OpenAPI Specs - [openapi](https://docs.trulayer.ai/api-reference/openapi.yaml) ## Optional - [Dashboard](https://app.trulayer.ai) - [Status](https://status.trulayer.ai) - [GitHub](https://github.com/trulayer)