Skip to content

API schemas

Request and response bodies used by the endpoint reference. Generated from the OpenAPI document.

The answer to a request that is carried out later, by the worker.

Field Type Required Notes
status "accepted" yes

Typed messages, sent the same for every item (the item’s input is not used).

Field Type Required Notes
credential_id string (uuid) yes
kind "messages" yes
messages array of ChatMessageIn yes min items 1, max items 50
model string yes min length 1, max length 200
params Params no

One of "email" | "slack" | "webhook" | "pagerduty".

Field Type Required Notes
config object yes
created_at string (date-time) yes
has_secret boolean yes
id string (uuid) yes
kind AlertChannelKind yes
name string yes
org_id string (uuid) yes
updated_at string (date-time) yes
verified_at string (date-time) or null yes
Field Type Required Notes
config object yes
created_at string (date-time) yes
has_secret boolean yes
id string (uuid) yes
kind AlertChannelKind yes
name string yes
org_id string (uuid) yes
secret string or null yes
updated_at string (date-time) yes
verified_at string (date-time) or null yes
Field Type Required Notes
acknowledged_at string (date-time) or null yes
acknowledged_by UserOut or null yes
id string (uuid) yes
resolved_at string (date-time) or null yes
rule_id string (uuid) yes
rule_kind AlertRuleKind yes
rule_name string yes
started_at string (date-time) yes
state "firing" | "resolved" yes
threshold string or null yes
value string or null yes

One of "threshold" | "anomaly" | "budget".

Field Type Required Notes
baseline_windows integer or null yes
channel_ids array of string (uuid) yes
comparator Comparator yes
cooldown_minutes integer yes
created_at string (date-time) yes
created_by string (uuid) or null yes
enabled boolean yes
filters object yes
id string (uuid) yes
kind AlertRuleKind yes
metric Metric yes
muted_until string (date-time) or null yes
name string yes
project_id string (uuid) yes
sensitivity string or null yes
state AlertRuleStateOut or null no
threshold string or null yes
updated_at string (date-time) yes
window_minutes integer yes
Field Type Required Notes
last_evaluated_at string (date-time) or null yes
last_value string or null yes
since string (date-time) or null yes
state RuleStateName yes
Field Type Required Notes
datasets array of DatasetRefOut yes
trace_id string yes
Field Type Required Notes
expires_at string (date-time) or null no
name string yes min length 1, max length 100
scopes array of KeyScope no min items 1 Default ["ingest:write"].
Field Type Required Notes
created_at string (date-time) yes
created_by UserOut or null yes
expires_at string (date-time) or null yes
id string (uuid) yes
last_used_at string (date-time) or null yes
name string yes
prefix string yes
revoked_at string (date-time) or null yes
scopes array of KeyScope yes
secret string yes
Field Type Required Notes
created_at string (date-time) yes
created_by UserOut or null yes
expires_at string (date-time) or null yes
id string (uuid) yes
last_used_at string (date-time) or null yes
name string yes
prefix string yes
revoked_at string (date-time) or null yes
scopes array of KeyScope yes

The traces without the dimension (none) or, on the rollup path, the values folded past the daily cap of 1,000 per day and environment (other, with how many values folded_values stands for; None on none).

Field Type Required Notes
cost_usd string or null yes
errors integer yes
folded_values integer or null yes
input_tokens integer yes
llm_calls integer yes
output_tokens integer yes
retries integer or null yes
retry_cost_usd string or null yes
traces integer yes
unpriced_calls integer yes

The window of an attribution export (required, at most 90 days) and its environment.

Field Type Required Notes
environment string or null no max length 256
from string (date-time) yes
to string (date-time) yes

The attribution table of the window, one row per value plus the none and other buckets, as CSV only. key is required with group_by: metadata and refused otherwise; a window over 24 hours reads the rollups, so its key must be promoted.

Field Type Required Notes
filters AttributionExportFilters yes
format "csv" yes
group_by "metadata" | "trace_name" | "user" | "release" yes
key string or null no pattern ^[a-z0-9_.-]{1,64}$
kind "attribution" yes

A page of groups, with the none and other buckets and the totals on every page.

source is raw (a window of 24 hours or less, read live from the traces: exact, any metadata key, no other) or rollup (a longer window, read from the daily rollup rows of promoted keys: exact per day, up to updated_within_minutes behind). none and other are None when they hold no traces.

Field Type Required Notes
group_by "metadata" | "trace_name" | "user" | "release" yes
items array of AttributionRowOut yes
key string or null yes
next_cursor string or null yes
none AttributionBucketOut or null yes
other AttributionBucketOut or null yes
source "raw" | "rollup" yes
totals AttributionTotalsOut yes
updated_within_minutes integer yes
window AttributionWindowOut yes

One value of the dimension. share_of_cost is its cost over the window’s total, rounded to four places; None when either is unknown.

Field Type Required Notes
cost_usd string or null yes
errors integer yes
input_tokens integer yes
llm_calls integer yes
output_tokens integer yes
retries integer or null yes
retry_cost_usd string or null yes
share_of_cost number or null yes
traces integer yes
unpriced_calls integer yes
value string yes

The figures of every trace started in the window, whatever its group (the ledger the rows add up to).

traces counts the traces; llm_calls, errors (status error) and unpriced_calls (no price) count their LLM calls; the token and cost sums take every span of the trace. cost_usd is a lower bound while unpriced_calls is above 0 and None when nothing was priced.

Field Type Required Notes
cost_usd string or null yes
errors integer yes
input_tokens integer yes
llm_calls integer yes
output_tokens integer yes
retries integer or null yes
retry_cost_usd string or null yes
traces integer yes
unpriced_calls integer yes

The window the figures cover, in UTC: as requested on the raw path, widened to whole UTC days on the rollup path (from floored, to ceiled; to exclusive).

Field Type Required Notes
from string (date-time) yes
to string (date-time) yes
Field Type Required Notes
action string yes
actor UserOut or null yes
actor_email string or null yes
actor_type string or null yes
created_at string (date-time) yes
credential_id string (uuid) or null yes
hash string or null yes
id string (uuid) yes
ip string or null yes
metadata object yes
outcome "success" | "failure" yes
prev_hash string or null yes
project_id string (uuid) or null yes
reason string or null yes
request_id string or null yes
seq integer or null yes
target_id string yes
target_type string yes
user_agent string or null yes

GET /orgs/{id}/audit/integrity: the org’s hash chain, recomputed from the stored events.

Field Type Required Notes
checked integer yes
first_broken_seq integer or null yes
first_seq integer or null yes
head_hash string or null yes
head_seq integer or null yes
ok boolean yes
Field Type Required Notes
enabled boolean no Default true.
url string yes min length 1, max length 2048
Field Type Required Notes
consecutive_failures integer yes
created_at string (date-time) yes
delivered_seq integer yes
enabled boolean yes
head_seq integer yes
last_delivered_at string (date-time) or null yes
last_error string or null yes
last_error_at string (date-time) or null yes
updated_at string (date-time) yes
url string yes
Field Type Required Notes
secret string or null yes
stream AuditStreamOut yes
Field Type Required Notes
error string or null yes
ok boolean yes

401 invalid_api_key; takes no parameters.

One fetch from the provider, or one CSV upload. error is an HTTP status line or a fixed short phrase, never a provider’s response; requested_by is null for a scheduled fetch.

Field Type Required Notes
day_from string (date) yes
day_to string (date) yes
error string or null yes
finished_at string (date-time) or null yes
id string (uuid) yes
lines_upserted integer yes
pages integer yes
requested_by UserOut or null yes
started_at string (date-time) yes
status "running" | "ok" | "failed" yes
trigger "scheduled" | "manual" | "csv_upload" yes

provider is required for csv_upload and derived for the API kinds; admin_key is required for the API kinds and refused for csv_upload.

Field Type Required Notes
admin_key string (password) or null no max length 2048
kind "anthropic_admin_api" | "openai_costs_api" | "csv_upload" yes
name string yes min length 1, max length 128
project_ids array of string (uuid) no max items 500 Default [].
provider "anthropic" | "openai" | "google" or null no
provider_scope string or null no min length 1, max length 128

A billing source. Never the key: key_set says whether one is sealed.

Field Type Required Notes
created_at string (date-time) yes
created_by UserOut or null yes
enabled boolean yes
id string (uuid) yes
key_id string or null yes
key_set boolean yes
kind "anthropic_admin_api" | "openai_costs_api" | "csv_upload" yes
last_error string or null yes
last_fetched_at string (date-time) or null yes
last_success_at string (date-time) or null yes
name string yes
projects array of SourceProjectOut yes
provider "anthropic" | "openai" | "google" yes
provider_scope string or null yes
status "never_fetched" | "ok" | "failing" yes
updated_at string (date-time) yes
Field Type Required Notes
admin_key string (password) yes max length 2048

A partial edit: only the fields sent change. project_ids replaces the whole mapping; provider_scope: null clears the filter.

Field Type Required Notes
enabled boolean or null no
name string or null no min length 1, max length 128
project_ids array of string (uuid) or null no max items 500
provider_scope string or null no min length 1, max length 128

Body_upload_items_api_v1_projects__project_id__datasets__dataset_id__items_upload_post

Section titled “Body_upload_items_api_v1_projects__project_id__datasets__dataset_id__items_upload_post”
Field Type Required Notes
file string yes

What an exhausted budget does: notify its channels, or also block gateway calls.

One of "notify" | "block".

Field Type Required Notes
action BudgetAction yes
amount_usd string yes
channel_ids array of string (uuid) yes
created_at string (date-time) yes
created_by string (uuid) or null yes
enabled boolean yes
id string (uuid) yes
name string yes
period BudgetPeriod yes
project_id string (uuid) yes
scope BudgetScope yes
scope_id string or null yes
state BudgetStateOut or null no
updated_at string (date-time) yes

A partial edit: the fields sent replace the budget’s. Send scope_id with scope.

Field Type Required Notes
action BudgetAction or null no
amount_usd number or string or null no pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,10}
channel_ids array of string (uuid) or null no max items 10
enabled boolean or null no
name string or null no min length 1, max length 80
period BudgetPeriod or null no
scope BudgetScope or null no
scope_id string or null no min length 1, max length 400

The UTC calendar period a budget’s spend is summed over before it starts again.

One of "daily" | "monthly".

Whose spend a budget caps. Every scope but project names one value in scope_id.

One of "project" | "gateway_key" | "user" | "model" | "metadata" | "trace_name".

A whole budget: the body of a create.

Field Type Required Notes
action BudgetAction yes
amount_usd number or string yes pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,10}
channel_ids array of string (uuid) no max items 10
enabled boolean no Default true.
name string yes min length 1, max length 80
period BudgetPeriod yes
scope BudgetScope yes
scope_id string or null no min length 1, max length 400

Where the budget stands in the current period (by the server’s clock).

Until the first evaluation of a new period, the previous period’s figures no longer apply: the state shows the current period with spent_usd null and state ok (a firing alert from a past period ends on that evaluation and never blocks).

Field Type Required Notes
last_evaluated_at string (date-time) yes
period_start string (date-time) yes
resets_at string (date-time) yes
spent_usd string or null yes
state RuleStateName yes

count of reviewed traces as a rate at 4 places, with its Wilson 95 % bounds.

Field Type Required Notes
ci_high string yes
ci_low string yes
count integer yes
rate string yes

A new channel. config and secret are validated for the kind sent with them.

Slack and PagerDuty need secret (the incoming-webhook URL, the routing key); email and webhook channels refuse it. An omitted config is the kind’s default, which only Slack and PagerDuty have. Errors come out under config.<field> and secret.

Field Type Required Notes
config EmailConfig or SlackConfig or WebhookConfig or PagerDutyConfig no
kind AlertChannelKind yes
name string yes min length 1, max length 80
secret string (password) or null no max length 4096
Field Type Required Notes
delivery_id string (uuid) yes
error string or null yes
status "sent" | "failed" | "pending" yes

A partial edit: only the fields sent change. A channel’s kind never changes.

config is validated against the channel’s kind (parse_config), so it is taken as an object here. secret replaces a Slack URL or PagerDuty routing key; rotate_secret generates a new webhook signing secret, returned once.

Field Type Required Notes
config object or null no
name string or null no min length 1, max length 80
rotate_secret boolean no Default false.
secret string (password) or null no max length 4096
Field Type Required Notes
content string yes max length 65536
role "system" | "user" | "assistant" yes
Field Type Required Notes
kind "chat" yes
messages array of ChatMessageIn yes min items 1, max items 50

One of "gt" | "gte" | "lt" | "lte".

Field Type Required Notes
cost_usd string or null yes
error string or null yes
latency_ms number or null yes
output object or null yes
scores object yes
trace_id string or null yes
Field Type Required Notes
a ReleaseStats yes
b ReleaseStats yes
deltas object of Delta or null yes
error_classes array of ErrorClassChange yes
model_mix array of ModelShare yes
new_errors array of NewError yes
Field Type Required Notes
aggregate object of ScoreDeltaOut yes
changed_items integer yes
cost_delta_usd string or null yes
items array of ItemDeltaOut yes
latency_p95_delta_ms number or null yes

One score a reviewer gives; exactly one of value and string_value.

Field Type Required Notes
comment string or null no max length 2000
name string yes min length 1, max length 64
string_value string or null no min length 1, max length 200
value boolean or number or string or null no pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Field Type Required Notes
completeness string or null yes stored / (stored + every loss), to four places rounded down; null when nothing was stored and nothing lost, 0 when only losses were counted.
losses array of LossOut yes
lower_bound boolean yes Both SDK failed and ingest rejections were counted: a span the server rejected may be in both, so the ratio may be lower than the truth.
stored_spans integer yes Clamped to 9007199254740991 (2^53 - 1).

The body of a complete: one score per config of the queue.

Field Type Required Notes
scores array of CompletedScore yes min items 1, max items 20
Field Type Required Notes
case_sensitive boolean no Default false.
needle string yes min length 1, max length 500
rule "contains" yes
target "output" | "input" no Default "output".
Field Type Required Notes
lines array of CostLineOut yes
message string or null yes
model string or null yes
original_usage OriginalUsageOut or null yes
output_breakdown OutputBreakdownOut or null yes
price CostPriceOut or null yes
provider string or null yes
provider_canonical string or null yes
recomputed_usd string or null yes
service_tier "standard" | "batch" | "priority" | "flex" or null yes
span_id string yes
status "ok" | "mismatch" | "no_usage" | "no_price" | "price_version_missing" | "override_deleted" | "cache_hit" | "usage_rollup" yes
stored_fee_usd string or null yes
stored_usd string or null yes
tier_multiplier string yes
tier_note "commitment_billed" | "unmodelled" or null yes
trace_id string yes
usage CostUsageOut yes
Field Type Required Notes
kind "uncached_input" | "cache_read" | "cache_write_5m" | "cache_write_1h" | "output" | "web_search" yes
multiplier string yes
quantity integer yes
rate string yes
rate_unit "usd_per_mtok" | "usd_per_1k_requests" yes
unit "tokens" | "requests" yes
usd string yes

The price row that produced the stored cost, found by the span’s pricing_version.

Field Type Required Notes
effective_from string (date-time) yes
min_prompt_tokens integer yes
model_pattern string yes
override_id string (uuid) or null yes
source "seed" | "override" yes
version string yes

The span’s usage as stored; null where it was not reported.

Field Type Required Notes
cache_write_1h_tokens integer or null yes
cache_write_tokens integer or null yes
cached_tokens integer or null yes
input_tokens integer or null yes
output_tokens integer or null yes
reasoning_tokens integer or null yes
unreported_reason string or null yes
web_search_requests integer or null yes
Field Type Required Notes
checked_at string (date-time) yes
error string or null yes
status "ok" | "error" yes

A new provider credential. base_url is only for openai_compatible, which needs it.

Field Type Required Notes
api_key string (password) yes max length 2048
base_url string or null no max length 2048
name string yes min length 1, max length 100
provider ProviderKind yes
Field Type Required Notes
base_url string or null yes
created_at string (date-time) yes
created_by UserOut or null yes
id string (uuid) yes
last_checked_at string (date-time) or null yes
last_error string or null yes
last_used_at string (date-time) or null yes
name string yes
provider ProviderKind yes
rotated_at string (date-time) or null yes
Field Type Required Notes
api_key string (password) yes max length 2048

A CSV upload stored as one run: how many lines it wrote, and the UTC days they cover.

Field Type Required Notes
days array of string (date) yes
lines_upserted integer yes
run_id string (uuid) yes

One item to store. input is required and may be any JSON except null.

Field Type Required Notes
expected_output any or null no
input any yes
metadata object no
source_span_id string or null no max length 200
source_trace_id string or null no max length 200
Field Type Required Notes
created_at string (date-time) yes
description string or null yes
id string (uuid) yes
item_count integer yes
locked_at string (date-time) or null yes
name string yes
updated_at string (date-time) yes

The body that edits a dataset; only the description changes. null clears it.

Field Type Required Notes
description string or null no max length 1000
Field Type Required Notes
id string (uuid) yes
name string yes

The body that creates a dataset.

Field Type Required Notes
description string or null no max length 1000
name string yes min length 1, max length 100

One UTC day of one user. A day without traces is all zeros with a cost_usd of 0; a day with calls but none priced has cost_usd None.

Field Type Required Notes
cost_usd string or null yes
day string (date) yes
errors integer yes
llm_calls integer yes
tokens integer yes
traces integer yes
unpriced_calls integer yes
Field Type Required Notes
attempts integer yes
created_at string (date-time) yes
id string (uuid) yes
kind string yes
last_error string or null yes
next_attempt_at string (date-time) yes
status "pending" | "sent" | "failed" yes
summary DeliverySummaryOut or null yes
Field Type Required Notes
event string yes
event_id string (uuid) or null no
insight_id string (uuid) or null no
project_id string (uuid) or null no
rule_id string (uuid) or null no
rule_name string or null no
title string or null no

b - a, and that as a fraction of a (None when a is 0).

Field Type Required Notes
absolute string yes
relative string or null yes

One run of one detector. findings is None when the run failed (error is set).

Field Type Required Notes
detector string yes
duration_ms integer yes
error string or null yes
findings integer or null yes
id string (uuid) yes
ran_at string (date-time) yes
truncated boolean yes
window_end string (date-time) yes
window_start string (date-time) yes

Who gets the email: 1 to 10 addresses, stored lower-cased and without repeats.

Field Type Required Notes
to array of string (email) yes min items 1, max items 10
Field Type Required Notes
token string yes min length 1, max length 512
Field Type Required Notes
approximate boolean yes The bucket holds an hour read from the hourly rollup.
bucket_start string (date-time) yes
by_class object of integer yes Failed llm calls per class; zero classes absent.

One of "auth" | "rate_limit" | "timeout" | "context_length" | "content_filter" | "provider_5xx" | "network" | "client" | "unknown" | "gateway".

Field Type Required Notes
a_count integer yes
b_count integer yes
error_class string or null yes
Field Type Required Notes
count integer yes
error_class string yes
Field Type Required Notes
attempts integer or null yes Gateway attempts behind the call; null elsewhere.
error_class string yes
model string or null yes
provider_error_code string or null yes
provider_error_type string or null yes
rate_limit_kind string or null yes
request_id string or null yes
retry_after_s number or null yes
span_id string yes
started_at string (date-time) yes
status_message string or null yes
trace_id string yes

What the evaluator would score; nothing is stored. cost_usd is the call’s real cost.

Field Type Required Notes
cost_usd string yes
reasoning string or null yes
scores array of EvalScoreOut yes
Field Type Required Notes
comment string or null yes
name string yes
span_id string or null yes
string_value string or null yes
value number or null yes

A judge’s budget and its UTC calendar month so far; reserved_usd is held by running calls.

Field Type Required Notes
monthly_budget_usd string yes
reserved_usd string yes
spent_usd string yes

The month so far (UTC calendar month). remaining_usd counts reservations as spent.

Field Type Required Notes
month_start string (date-time) yes
monthly_budget_usd string or null yes
remaining_usd string or null yes
reserved_usd string yes
spent_usd string yes

Which traces online sampling considers. Empty lists match everything.

Field Type Required Notes
environments array of string no max items 50
min_duration_ms integer or null no min 0
models array of string no max items 50
tags array of string no max items 50
trace_names array of string no max items 50

An evaluator. budget is null for an evaluator without a monthly budget.

Field Type Required Notes
budget EvaluatorBudgetOut or null yes
config HeuristicEvaluatorConfig or JudgeConfig or WebhookEvaluatorConfig yes
created_at string (date-time) yes
created_by string (uuid) or null yes
enabled boolean yes
filters EvaluatorFilters yes
id string (uuid) yes
kind string yes
monthly_budget_usd string or null yes
name string yes
sampling_rate string yes pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
updated_at string (date-time) yes

The members to change; absent ones stay. config holds only the config fields to change and may not change kind; a judge’s judge_template replaces its prompt_version_id. monthly_budget_usd: null clears the budget (refused for judges).

Field Type Required Notes
config object or null no
enabled boolean or null no
filters EvaluatorFilters or null no
monthly_budget_usd number or string or null no pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,8}
name string or null no pattern ^[a-z0-9][a-z0-9_.-]{0,63}$
sampling_rate number or string or null no min 0, max 1, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,1}

One evaluation. source is why it ran (online, test or experiment); cost_usd is what the run is charged (zero until it settles); reserved_usd what a running judge call holds against the budget; scores the scores it wrote (empty until it is done).

Field Type Required Notes
cost_usd string yes
error string or null yes
finished_at string (date-time) or null yes
heartbeat_at string (date-time) or null yes
id string (uuid) yes
reserved_usd string yes
scores array of RunScoreOut yes
source string yes
span_id string or null yes
started_at string (date-time) yes
status string yes
trace_id string yes

A whole evaluator: the body of a create.

Field Type Required Notes
config HeuristicEvaluatorConfig or JudgeConfigIn or WebhookEvaluatorConfig yes
enabled boolean no Default true.
filters EvaluatorFilters no
monthly_budget_usd number or string or null no pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,8}
name string yes pattern ^[a-z0-9][a-z0-9_.-]{0,63}$
sampling_rate number or string no min 0, max 1, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,1}
Field Type Required Notes
trace_id string yes

The traces and numbers behind an insight; decimals are strings, unknown values None.

Field Type Required Notes
metrics object of string or integer or null yes
trace_ids array of string yes
window EvidenceWindowOut yes
Field Type Required Notes
end string (date-time) yes
start string (date-time) yes
Field Type Required Notes
case_sensitive boolean no Default true.
normalize_whitespace boolean no Default true.
rule "exact_match" yes
Field Type Required Notes
max_cost_usd number or string no max 1000, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,4}0*$ Default "5".
max_items integer no min 1 Default 1000.
target PromptVersionTarget or AdHocTarget yes
Field Type Required Notes
max_cost_usd string no pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,4}0*$ Default "5".
max_items integer no min 1 Default 1000.
target PromptVersionTarget or AdHocTarget yes
Field Type Required Notes
cost_usd string or null yes
created_at string (date-time) yes
dataset_item_id string (uuid) yes
error string or null yes
evaluator_error string or null yes
expected_output any or null yes
input any or null yes
item_metadata any or null yes
latency_ms number or null yes
output object or null yes
position integer yes
scores object yes
trace_id string or null yes
Field Type Required Notes
config ExperimentConfig-Output yes
created_at string (date-time) yes
created_by string (uuid) or null yes
dataset_id string (uuid) yes
evaluator_ids array of string (uuid) yes
id string (uuid) yes
last_run LastRunOut or null yes
name string yes
run_count integer yes
Field Type Required Notes
error string or null yes
experiment_id string (uuid) yes
finished_at string (date-time) or null yes
heartbeat_at string (date-time) or null yes
id string (uuid) yes
number integer yes
started_at string (date-time) yes
started_by string (uuid) or null yes
status string yes
target PromptVersionTarget or AdHocTarget yes
totals TotalsOut or null no

The body that creates an experiment.

Field Type Required Notes
config ExperimentConfig-Input yes
dataset_id string (uuid) yes
evaluator_ids array of string (uuid) no max items 20
name string yes min length 1, max length 200

One known cause of a gap; usd is null when the cause has no computable amount.

Field Type Required Notes
count integer or null yes
kind "batch_spend" | "server_tool_fees" | "unpriced_spans" | "usage_not_reported" | "untraced_traffic" | "priority_commitment" | "unmodelled_modifiers" | "beyond_retention" yes
note string yes
tokens integer or null yes
usd string or null yes

Claude’s explanation of an insight: plain text, advisory, and what the call cost.

cost_usd is the call’s cost from its token usage (the reserved worst case when the answer reported no usage).

Field Type Required Notes
cost_usd string or null yes
created_at string (date-time) yes
created_by string (uuid) or null yes
id string (uuid) yes
model string yes
text string yes

The trace-list filters. from and to are required and at most 90 days apart.

Field Type Required Notes
environment string or null no max length 256
error_class ErrorClass or null no
from string (date-time) yes
metadata_key string or null no pattern ^[a-z0-9_.-]{1,64}$
metadata_value string or null no max length 256
model string or null no max length 256
q string or null no max length 256
release string or null no max length 256
session_id string or null no max length 256
status "ok" | "error" or null no
tag string or null no max length 256
to string (date-time) yes
user_id string or null no max length 256

One of "jsonl" | "csv".

One of "traces" | "attribution".

Field Type Required Notes
completed_at string (date-time) or null yes
created_at string (date-time) yes
download_url string or null yes
error_code string or null yes
expires_at string (date-time) or null yes
filters ExportFilters or AttributionExportFilters yes
format ExportFormat yes
group_by "metadata" | "trace_name" | "user" | "release" or null yes
id string (uuid) yes
key string or null yes
kind ExportKind yes
row_count integer or null yes
size_bytes integer or null yes
status ExportStatus yes

One of "queued" | "running" | "done" | "failed" | "expired".

The categories of a new failure-category config, in the order the dashboard shows them.

Field Type Required Notes
categories array of string yes min items 2, max items 30

categories is the config’s list in its order; a label outside it still appears in rates after the configured ones.

Field Type Required Notes
categories array of string yes
releases array of ReleaseRatesOut yes
score_name string yes

A failure after which the gateway moves on to the route’s next target.

One of "status_5xx" | "rate_limited" | "timeout" | "connection_error" | "auth_error".

The failures after which the gateway tries the next target. Empty means never.

Field Type Required Notes
on array of FallbackCondition no

A new fault profile. Omitted params are the scenario’s defaults.

Field Type Required Notes
enabled boolean no Default true.
expires_at string (date-time) or null no
name string yes min length 1, max length 100
params AuthExpiredParams or ScopeDeniedParams or RateLimitedParams or UnsupportedParameterParams or Provider5xxParams or MalformedJsonParams or TruncatedStreamParams or SlowResponseParams or TimeoutParams no Default {}.
probability number no min 0, max 1 Default 1.
scenario FaultScenario yes
Field Type Required Notes
active boolean yes
attached_key_ids array of string (uuid) yes
created_at string (date-time) yes
created_by UserOut or null yes
enabled boolean yes
expires_at string (date-time) or null yes
id string (uuid) yes
name string yes
params AuthExpiredParams or ScopeDeniedParams or RateLimitedParams or UnsupportedParameterParams or Provider5xxParams or MalformedJsonParams or TruncatedStreamParams or SlowResponseParams or TimeoutParams yes
probability number yes
scenario FaultScenario yes
updated_at string (date-time) yes

A partial edit: only the fields sent change.

params must be sent with scenario (they are only meaningful together); a scenario sent without params resets the params to that scenario’s defaults. expires_at is cleared by sending null; every other field must have a value when it is sent. changes() tells an absent field from one sent as null.

Field Type Required Notes
enabled boolean or null no
expires_at string (date-time) or null no
name string or null no min length 1, max length 100
params AuthExpiredParams or ScopeDeniedParams or RateLimitedParams or UnsupportedParameterParams or Provider5xxParams or MalformedJsonParams or TruncatedStreamParams or SlowResponseParams or TimeoutParams or null no
probability number or null no min 0, max 1
scenario FaultScenario or null no

A failure the gateway can inject (the Integration Lab); each has its own params.

One of "auth_expired" | "scope_denied" | "rate_limited" | "unsupported_parameter" | "provider_5xx" | "malformed_json" | "truncated_stream" | "slow_response" | "timeout".

Field Type Required Notes
count integer yes
scenario FaultScenario yes
Field Type Required Notes
note string or null no max length 500
verdict "right" | "wrong" yes

The caller’s own vote. updated_at is when it was last given (the “on 14 Oct” line).

Field Type Required Notes
note string or null yes
updated_at string (date-time) yes
verdict "right" | "wrong" yes

The caller’s vote as stored. updated_at moves on every vote.

Field Type Required Notes
note string or null yes
updated_at string (date-time) yes
verdict "right" | "wrong" yes

The caller’s own vote (null when they have not voted) and every member’s counts.

Field Type Required Notes
mine FeedbackMineOut or null yes
right integer yes
wrong integer yes
Field Type Required Notes
environments array of string yes
metadata_keys array of string yes
models array of string yes
releases array of string yes
score_names array of string yes
tags array of string yes
trace_names array of string yes
Field Type Required Notes
hit_rate number or null yes
hits integer yes
misses integer yes

A new gateway key. Without route_id it uses the project’s default route.

A None limit means no limit; a None cache_ttl_seconds leaves the cache off.

Field Type Required Notes
allowed_models array of string no max items 100
cache_ttl_seconds integer or null no min 1, max 86400
default_tags array of string no max items 20
environment string yes min length 1, max length 64
name string yes min length 1, max length 100
route_id string (uuid) or null no
rpm_limit integer or null no min 1, max 100000
tpm_limit integer or null no min 1, max 100000000
Field Type Required Notes
allowed_models array of string yes
cache_ttl_seconds integer or null yes
created_at string (date-time) yes
created_by UserOut or null yes
default_tags array of string yes
environment string yes
fault_profile_id string (uuid) or null yes
id string (uuid) yes
last_used_at string (date-time) or null yes
name string yes
prefix string yes
revoked_at string (date-time) or null yes
route_id string (uuid) or null yes
rpm_limit integer or null yes
secret string yes
tpm_limit integer or null yes
Field Type Required Notes
allowed_models array of string yes
cache_ttl_seconds integer or null yes
created_at string (date-time) yes
created_by UserOut or null yes
default_tags array of string yes
environment string yes
fault_profile_id string (uuid) or null yes
id string (uuid) yes
last_used_at string (date-time) or null yes
name string yes
prefix string yes
revoked_at string (date-time) or null yes
route_id string (uuid) or null yes
rpm_limit integer or null yes
tpm_limit integer or null yes

A partial edit: only the fields sent change.

The four nullable settings (rpm_limit, tpm_limit, cache_ttl_seconds, fault_profile_id) are cleared by sending null; every other field must have a value when it is sent. changes() tells an absent field from one sent as null.

Field Type Required Notes
allowed_models array of string or null no max items 100
cache_ttl_seconds integer or null no min 1, max 86400
default_tags array of string or null no max items 20
environment string or null no min length 1, max length 64
fault_profile_id string (uuid) or null no
name string or null no min length 1, max length 100
route_id string (uuid) or null no
rpm_limit integer or null no min 1, max 100000
tpm_limit integer or null no min 1, max 100000000
Field Type Required Notes
cost_usd string or null yes
environment string yes
errors integer yes
key_id string (uuid) yes
name string yes
requests integer yes

Gateway traffic of a window of at most 7 days.

errors includes calls failed on purpose by Lab faults; faults says how many of the requests carried one. fallbacks and retries are event counts, not request counts: the switches to another target, and the repeated tries on one target, summed over all requests. A latency is null when no request measured it.

Field Type Required Notes
by_key array of GatewayKeyUsageOut yes
by_target array of GatewayTargetUsageOut yes
cache GatewayCacheOut yes
error_rate number or null yes
errors integer yes
fallbacks integer yes
faults array of FaultScenarioCountOut yes
p95_overhead_ms number or null yes
p95_ttft_ms number or null yes
requests integer yes
retries integer yes
Field Type Required Notes
credential_id string (uuid) or null yes
credential_name string yes
errors integer yes
p95_ms number or null yes
provider ProviderKind or null yes
requests integer yes
Field Type Required Notes
detail array of ValidationError no

One source of penalty. observed and baseline are decimal strings, None when unknown (or when the component has no baseline: findings and errors).

Field Type Required Notes
baseline string or null yes
name string yes
observed string or null yes
penalty integer yes

The health score over the window; value is None (never 0) when it had no LLM calls.

approximate is true when a percentile behind the score was estimated from rollup histograms.

Field Type Required Notes
approximate boolean yes
components array of HealthComponentOut yes
open_critical integer yes
open_warning integer yes
value integer or null yes
window EvidenceWindowOut yes
Field Type Required Notes
approximate boolean yes Whole hours were read from the hourly rollups, as of their last run.
providers array of ProviderHealthOut yes Busiest first.
retry_cost_note string yes
window WindowOut yes
Field Type Required Notes
check RegexRule or JsonValidRule or LengthRule or ContainsRule or ExactMatchRule or LevenshteinRule yes
kind "heuristic" yes
Field Type Required Notes
items array of IncidentOut yes
next_cursor string or null yes
polling "enabled" | "disabled" yes
sources array of StatusSourceOut yes
Field Type Required Notes
api_affected boolean yes
components array of string yes
id string (uuid) yes
impact string yes
latest_update string or null yes
provider string yes
resolved_at string (date-time) or null yes
started_at string (date-time) yes
status string yes
title string yes
url string yes

A provider status page incident that overlapped the window and touched the API.

Field Type Required Notes
id string (uuid) yes
impact string yes
resolved_at string (date-time) or null yes
started_at string (date-time) yes
status string yes
title string yes
url string yes
Field Type Required Notes
accepted integer yes
rejected array of RejectedSpan yes

The insight, its completed explanations (newest first) and the “Was this right?” votes.

Field Type Required Notes
acknowledged_at string (date-time) or null yes
certainty string yes
evidence EvidenceOut yes
explanations array of ExplanationOut yes
failure_layer string yes
feedback FeedbackSummaryOut yes
first_seen_at string (date-time) yes
id string (uuid) yes
kind string yes
label string yes
last_seen_at string (date-time) yes
mute_reason string or null yes
muted_until string (date-time) or null yes
occurrences integer yes
resolved_at string (date-time) or null yes
severity Severity yes
status InsightStatus yes
suggested_fix string yes
summary string yes
title string yes
verification string yes
Field Type Required Notes
acknowledged_at string (date-time) or null yes
certainty string yes
evidence EvidenceOut yes
failure_layer string yes
first_seen_at string (date-time) yes
id string (uuid) yes
kind string yes
label string yes
last_seen_at string (date-time) yes
mute_reason string or null yes
muted_until string (date-time) or null yes
occurrences integer yes
resolved_at string (date-time) or null yes
severity Severity yes
status InsightStatus yes
suggested_fix string yes
summary string yes
title string yes
verification string yes

One of "open" | "acknowledged" | "resolved" | "muted".

Counts of the insights that still need a person: open and acknowledged ones.

Field Type Required Notes
open_critical integer yes
open_info integer yes
open_warning integer yes
Field Type Required Notes
high string yes
low string yes
Field Type Required Notes
token string yes min length 1, max length 128
Field Type Required Notes
email string (email) or null no
role MembershipRole yes
Field Type Required Notes
email string or null yes
expires_at string (date-time) yes
id string (uuid) yes
role MembershipRole yes
url string yes
Field Type Required Notes
id string (uuid) yes
name string yes
slug string yes
Field Type Required Notes
created_at string (date-time) yes
email string or null yes
expires_at string (date-time) yes
id string (uuid) yes
role MembershipRole yes

What an invite grants, shown to the signed-in invitee before they accept.

Field Type Required Notes
expires_at string (date-time) yes
org InviteOrgOut yes
role MembershipRole yes
Field Type Required Notes
items array of DatasetItemIn yes min items 1, max items 1000
Field Type Required Notes
accepted integer yes
Field Type Required Notes
a CompareItemOut or null yes
b CompareItemOut or null yes
changed boolean or null yes
dataset_item_id string (uuid) yes
deltas object of number or null yes
expected_output any or null yes
input any or null yes
position integer yes
Field Type Required Notes
span_id string or null no min length 1, max length 200
trace_ids array of string yes min items 1, max items 200
Field Type Required Notes
created_at string (date-time) yes
expected_output any or null yes
id string (uuid) yes
input any yes
metadata object yes
source_span_id string or null yes
source_trace_id string or null yes

The body that edits an item: the fields sent change, null clears expected_output.

Field Type Required Notes
expected_output any or null no
metadata object or null no
Field Type Required Notes
added integer yes
skipped_duplicates integer yes

Traces to queue; span_id queues that span of each trace instead of the whole trace.

Field Type Required Notes
span_id string or null no min length 1, max length 64
trace_ids array of string yes min items 1, max items 200
Field Type Required Notes
rule "json_valid" yes
target "output" | "input" no Default "output".
Field Type Required Notes
credential_id string (uuid) yes
kind "llm_judge" yes
max_tokens integer no min 1, max 4096 Default 1024.
model string yes min length 1, max length 200
prompt_version_id string (uuid) yes
temperature string or null no pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$

A judge config as a request sends it: a prompt version of the project, or one of the built-in judge templates (app.evals.judge_templates), exactly one of them. The service turns a template into the project’s prompt judges/<name> version 1 and stores the version id, so a stored judge always names a prompt version (JudgeConfig).

Field Type Required Notes
credential_id string (uuid) yes
judge_template "relevance" | "faithfulness" | "toxicity" | "format_compliance" or null no
kind "llm_judge" yes
max_tokens integer no min 1, max 4096 Default 1024.
model string yes min length 1, max length 200
prompt_version_id string (uuid) or null no
temperature number or string or null no min 0, max 2, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$

One of "ingest:write" | "traces:read" | "scores:write" | "prompts:read".

Field Type Required Notes
cost_usd string or null yes
error_rate number or null yes
input_tokens integer yes
llm_calls integer yes
output_tokens integer yes
p50_ms number or null yes
p95_ms number or null yes
traces integer yes
unpriced_calls integer yes
Field Type Required Notes
label string yes
version integer yes
Field Type Required Notes
version integer yes min 1

An experiment’s latest run, for its list row.

Field Type Required Notes
finished_at string (date-time) or null yes
id string (uuid) yes
number integer yes
started_at string (date-time) yes
status string yes
totals TotalsOut or null yes
Field Type Required Notes
rule "length" yes
target "output" | "input" no Default "output".
unit "chars" | "words" no Default "chars".
Field Type Required Notes
rule "levenshtein" yes

A credit or a charge Spanlight cannot see: listed apart, never in the comparison.

Field Type Required Notes
description string yes
usd string yes
Field Type Required Notes
email string (email) yes
password string yes min length 1, max length 256

The password (or the second step) was enough: the session cookies are set.

Field Type Required Notes
status "signed_in" yes
user UserOut yes

The password was right but the account has two-factor authentication: no cookies yet.

Send challenge with a code to POST /auth/totp/verify before expires_at.

Field Type Required Notes
challenge string yes
expires_at string (date-time) yes
status "totp_required" yes
Field Type Required Notes
count integer yes Clamped to 9007199254740991 (2^53 - 1).
reason string yes
source string yes

A 200 whose body is cut to keep_fraction of its length; non-streaming calls only.

Field Type Required Notes
keep_fraction number no min 0.1, max 0.9 Default 0.6.
Field Type Required Notes
email_verification_required boolean yes
has_password boolean yes
memberships array of MembershipOut yes
totp_enabled boolean yes
user UserOut yes
Field Type Required Notes
created_at string (date-time) yes
role MembershipRole yes
user UserOut yes
Field Type Required Notes
role MembershipRole yes
Field Type Required Notes
org OrgOut yes
role MembershipRole yes

One of "owner" | "admin" | "member" | "viewer".

Messages typed in the playground, sent as they are.

Field Type Required Notes
messages array of ChatMessageIn yes min items 1, max items 50

One of "error_rate" | "p95_ms" | "ttft_p95_ms" | "cost_usd" | "llm_calls" | "tokens" | "spend" | "error_calls".

Free-form advice for clients on how to run the prompt; the server never uses it.

Field Type Required Notes
max_tokens integer or null no min 1, max 10000000
model string or null no min length 1, max length 200
temperature number or null no min 0, max 2
top_p number or null no min 0, max 1
Field Type Required Notes
approximate boolean yes
calls integer yes
cost_usd string or null yes
errors integer yes
input_tokens integer yes
model string or null yes
output_tokens integer yes
p50_ms number or null yes
p95_ms number or null yes
provider string or null yes

A model’s share of each release’s LLM calls (None: that release made no calls).

Field Type Required Notes
a_share number or null yes
b_share number or null yes
model string or null yes
Field Type Required Notes
reason string yes max length 2000
until string (date-time) yes
Field Type Required Notes
until string (date-time) or null yes

A normalised failure message that spans of b have and spans of a do not.

Field Type Required Notes
count integer yes
example_trace_id string yes
message string yes

One of "pending" | "sent" | "failed".

A sign-in provider account linked to the caller.

Field Type Required Notes
created_at string (date-time) yes
email string or null yes
last_used_at string (date-time) yes
provider "github" | "google" yes
Field Type Required Notes
provider "github" | "google" yes
Field Type Required Notes
first_trace_at string (date-time) or null yes
has_traces boolean yes
Field Type Required Notes
name string yes min length 1, max length 100
Field Type Required Notes
confirm string yes max length 200
Field Type Required Notes
id string (uuid) yes
is_demo boolean yes
name string yes
require_2fa boolean yes
slug string yes

A change to the organization: any of its fields, and at least one.

A field that is left out is left alone; null is not a way to say that, so it is refused. Strict about unknown fields, so a client that sends one this route does not handle is told instead of being answered 200 with nothing changed.

Field Type Required Notes
name string or null no min length 1, max length 100
require_2fa boolean or null no
Field Type Required Notes
id string (uuid) yes
is_demo boolean yes
name string yes
require_2fa boolean yes
role MembershipRole yes
slug string yes

What the call billed when it filled the gateway cache (spanlight.cache.original_usage).

Field Type Required Notes
cache_write_1h_tokens integer or null yes
cache_write_tokens integer or null yes
cached_tokens integer or null yes
input_tokens integer or null yes
output_tokens integer or null yes

Reasoning tokens are part of output_tokens; never a line of their own.

Field Type Required Notes
other integer yes
reasoning integer yes
Field Type Required Notes
approximate boolean yes
current KpisOut yes
previous KpisOut yes
Field Type Required Notes
items array of AlertEventOut yes
next_cursor string or null yes
Field Type Required Notes
items array of AuditEventOut yes
next_cursor string or null yes
Field Type Required Notes
items array of BillingRunOut yes
next_cursor string or null yes
Field Type Required Notes
items array of DatasetOut yes
next_cursor string or null yes
Field Type Required Notes
items array of DeliveryOut yes
next_cursor string or null yes
Field Type Required Notes
items array of EvaluatorOut yes
next_cursor string or null yes
Field Type Required Notes
items array of EvaluatorRunOut yes
next_cursor string or null yes
Field Type Required Notes
items array of ExperimentItemOut yes
next_cursor string or null yes
Field Type Required Notes
items array of ExperimentOut yes
next_cursor string or null yes
Field Type Required Notes
items array of ExperimentRunOut yes
next_cursor string or null yes
Field Type Required Notes
items array of ExportOut yes
next_cursor string or null yes
Field Type Required Notes
items array of InsightOut yes
next_cursor string or null yes
Field Type Required Notes
items array of ItemOut yes
next_cursor string or null yes
Field Type Required Notes
items array of PromptListItemOut yes
next_cursor string or null yes
Field Type Required Notes
items array of QueueItemOut yes
next_cursor string or null yes
Field Type Required Notes
items array of QueueOut yes
next_cursor string or null yes
Field Type Required Notes
items array of ReplaySummaryOut yes
next_cursor string or null yes
Field Type Required Notes
items array of SelectionOut yes
next_cursor string or null yes
Field Type Required Notes
items array of SessionSummaryOut yes
next_cursor string or null yes
Field Type Required Notes
items array of TraceSummaryOut yes
next_cursor string or null yes
Field Type Required Notes
items array of VersionOut yes
next_cursor string or null yes

The severity PagerDuty shows on events from this channel.

Field Type Required Notes
severity "critical" | "error" | "warning" | "info" no Default "error".
Field Type Required Notes
improved integer yes
kind string yes
n integer yes
p_value string yes
regressed integer yes
significant boolean yes
unchanged integer yes

Sampling parameters; an unset one is left to the provider’s default.

Field Type Required Notes
max_tokens integer or null no min 1, max 4096
temperature number or null no min 0, max 2
top_p number or null no min 0, max 1
Field Type Required Notes
email string (email) yes
Field Type Required Notes
password string yes min length 10, max length 256
token string yes min length 1, max length 512
Field Type Required Notes
expires_at string (date-time) or null no
name string yes min length 1, max length 100
scope TokenScope yes
Field Type Required Notes
created_at string (date-time) yes
expires_at string (date-time) or null yes
id string (uuid) yes
last_used_at string (date-time) or null yes
name string yes
prefix string yes
scope TokenScope yes
token string yes
Field Type Required Notes
created_at string (date-time) yes
expires_at string (date-time) or null yes
id string (uuid) yes
last_used_at string (date-time) or null yes
name string yes
prefix string yes
scope TokenScope yes

One run: a credential of the organization, a model, parameters and what to send.

Field Type Required Notes
credential_id string (uuid) yes
model string yes min length 1, max length 200
params Params no
source PromptSource or MessagesSource yes

One configuration’s run, in the order of the request. error set means no output.

Field Type Required Notes
cost_usd string or null yes
error string or null yes
latency_ms number or null yes
output string or null yes
span_id string or null yes
trace_id string or null yes
ttft_ms number or null yes
usage UsageOut or null yes

The body of POST /playground/runs.

Field Type Required Notes
configs array of PlaygroundConfig yes min items 1, max items 3
Field Type Required Notes
results array of PlaygroundResultOut yes

One detector kind’s votes. The ratios are decimal strings to four places, null when the kind has no votes (n is 0).

Field Type Required Notes
kind string yes
label string yes
meets_target boolean yes precision >= 0.8, Wilson 95 % lower bound >= 0.6 and n >= 20.
n integer yes
precision string or null yes
right integer yes
wilson_high string or null yes
wilson_low string or null yes
wrong integer yes
Field Type Required Notes
kinds array of PrecisionKindOut yes
Field Type Required Notes
cache_write_1h_per_mtok string or null yes
cache_write_5m_per_mtok string or null yes
cached_input_per_mtok string or null yes
effective_from string (date-time) yes
input_per_mtok string yes
min_prompt_tokens integer yes
model_pattern string yes
output_per_mtok string yes
provider string yes
version string yes
Field Type Required Notes
cache_write_1h_per_mtok number or string or null no min 0, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,6}
cache_write_5m_per_mtok number or string or null no min 0, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,6}
cached_input_per_mtok number or string or null no min 0, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,6}
effective_from string (date-time) or null no
input_per_mtok number or string yes min 0, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,6}
min_prompt_tokens integer no min 0 Default 0.
model_pattern string yes min length 1, max length 200
output_per_mtok number or string yes min 0, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,6}
provider string yes min length 1, max length 100
Field Type Required Notes
cache_write_1h_per_mtok string or null yes
cache_write_5m_per_mtok string or null yes
cached_input_per_mtok string or null yes
created_at string (date-time) yes
created_by UserOut or null yes
effective_from string (date-time) yes
id string (uuid) yes
input_per_mtok string yes
min_prompt_tokens integer yes
model_pattern string yes
output_per_mtok string yes
provider string yes
Field Type Required Notes
name string yes min length 1, max length 100
Field Type Required Notes
confirm string yes max length 200
Field Type Required Notes
capture_payloads boolean yes
created_at string (date-time) yes
id string (uuid) yes
insight_channel_ids array of string (uuid) yes
name string yes
org_id string (uuid) yes
promoted_metadata_keys array of string yes
retention_days integer yes
slug string yes
weekly_digest_enabled boolean yes
Field Type Required Notes
capture_payloads boolean or null no
insight_channel_ids array of string (uuid) or null no max items 10
name string or null no min length 1, max length 100
promoted_metadata_keys array of string or null no
retention_days integer or null no min 1, max 90
weekly_digest_enabled boolean or null no

The body of POST /prompts: the prompt and its version 1.

Field Type Required Notes
commit_message string or null no max length 500
description string or null no max length 1000
kind "text" | "chat" yes
model_config ModelAdvice no
name string yes max length 128, pattern ^[A-Za-z0-9][A-Za-z0-9_.-]*(/[A-Za-z0-9][A-Za-z0-9_.-]*)*$
template TextTemplateIn or ChatTemplateIn yes

One of "text" | "chat".

Field Type Required Notes
description string or null yes
id string (uuid) yes
kind PromptKind yes
labels array of LabelOut yes
latest_version integer yes
name string yes
updated_at string (date-time) yes
Field Type Required Notes
created_at string (date-time) yes
description string or null yes
id string (uuid) yes
kind PromptKind yes
labels array of LabelOut yes
latest VersionOut yes
name string yes
updated_at string (date-time) yes
Field Type Required Notes
kind PromptKind yes
labels array of string yes
model_config object yes
name string yes
template object yes
variables array of string yes
version integer yes
version_id string (uuid) yes

A stored prompt version with the values of its variables.

Field Type Required Notes
prompt_version_id string (uuid) yes
variables object of string no

The version with its prompt’s name. The model advice is model_config on the wire and advice in code, because pydantic reserves the name.

Field Type Required Notes
created_at string (date-time) yes
kind PromptKind yes
model_config object yes
prompt_name string yes
template object yes
variables array of string yes
version integer yes

A stored prompt version; each item’s input fills its variables.

Field Type Required Notes
credential_id string (uuid) yes
kind "prompt_version" yes
model string yes min length 1, max length 200
params Params no
prompt_version_id string (uuid) yes

The provider’s error at status.

Field Type Required Notes
status 500 | 502 | 503 | 529 no Default 500.
Field Type Required Notes
by_class array of ErrorClassCountOut yes Classes with failures, in the page’s fixed order.
error_rate string or null yes errors / llm_calls; null without calls.
errors integer yes Failed llm calls, gateway lab fault injections left out.
incidents array of IncidentRefOut yes
llm_calls integer yes
provider string or null yes Null for llm calls whose provider is unknown.
rate_limit_kinds array of RateLimitKindCountOut yes
retry_calls integer or null yes Retried calls; null when any trace’s count is unknown (stored before retries were tracked).
retry_cost_unknown boolean yes
retry_cost_usd string or null yes Null when any trace’s retry cost is unknown (retry_cost_unknown).

One of "openai" | "anthropic" | "openai_compatible".

Field Type Required Notes
assigned_at string (date-time) or null yes
assigned_to string (uuid) or null yes
completed_at string (date-time) or null yes
completed_by string (uuid) or null yes
created_at string (date-time) yes
id string (uuid) yes
reason string yes
reason_detail object or null yes
span_id string or null yes
status string yes
trace_id string yes

One of "pending" | "done" | "skipped".

Field Type Required Notes
created_at string (date-time) yes
id string (uuid) yes
instructions string or null yes
name string yes
progress QueueProgressOut yes
score_config_ids array of string (uuid) yes

Counts over the whole queue, then per reason; every reason is present, zeros included.

Field Type Required Notes
by_reason object of ReasonProgressOut yes
done integer yes
pending integer yes
skipped integer yes

The body of a queue create.

Field Type Required Notes
instructions string or null no max length 4000
name string yes min length 1, max length 100
score_config_ids array of string (uuid) yes min items 1, max items 20

One of "requests" | "tokens" | "spend_cap" | "acceleration" | "overloaded" | "gateway" | "unknown".

Field Type Required Notes
count integer yes
kind string yes
with_retry_after integer yes How many of these refusals carried a retry-after: the provider’s, or for the gateway kind the one the gateway’s key limit told the client.

429 with Retry-After: retry_after_s.

Field Type Required Notes
retry_after_s integer no min 1, max 3600 Default 2.
Field Type Required Notes
done integer yes
pending integer yes
skipped integer yes
Field Type Required Notes
days array of ReportDayOut yes
projects array of ReportProjectOut yes
source ReportSourceOut yes
summary ReportSummaryOut yes
window ReportWindowOut yes

A manual refresh was queued; run_id is the run it opened, listed under /runs.

Field Type Required Notes
run_id string (uuid) yes
Field Type Required Notes
code string yes
detail string yes
Field Type Required Notes
ignore_case boolean no Default false.
pattern string yes min length 1, max length 500
rule "regex" yes
target "output" | "input" no Default "output".
Field Type Required Notes
index integer yes
reason string yes
Field Type Required Notes
index integer yes
reason string yes
span_id string or null yes

One release’s reviewed traces (release: None is the traces without a release) and the rate of each failure category among them; rates is empty when nothing was reviewed.

Field Type Required Notes
rates object of CategoryRateOut yes
release string or null yes
reviewed integer yes

One release over a window. Unknown values are None, never 0.

cost_usd is the sum of the priced spans: None only when nothing was priced, and a lower bound while unpriced_calls is above 0.

Field Type Required Notes
cost_usd string or null yes
error_rate number or null yes
first_seen_at string (date-time) yes
input_tokens integer yes
last_seen_at string (date-time) yes
llm_calls integer yes
output_tokens integer yes
p50_ms number or null yes
p95_ms number or null yes
release string yes
traces integer yes
unpriced_calls integer yes

The project’s replay budget for the current UTC month.

Field Type Required Notes
month_start string (date-time) yes
monthly_budget_usd string yes
remaining_usd string yes
reserved_usd string yes
spent_usd string yes

The body of POST /playground/replays: which span, which credential, and what to change.

edited_body replaces the stored request as a whole; its size (256 KB) is checked by the service with the replay’s other refusals (REPLAY_BODY_TOO_LARGE), not here.

Field Type Required Notes
credential_id string (uuid) yes
edited_body object or null no
max_tokens integer or null no min 1, max 4096
model string or null no min length 1, max length 200
span_id string yes min length 1, max length 64
trace_id string yes

One finished replay. error set means no output; cost_usd, usage, latency_ms and ttft_ms follow the playground’s result.

Field Type Required Notes
changed array of string yes
cost_usd string or null yes
error string or null yes
fidelity string yes
latency_ms number or null yes
output string or null yes
replay_id string (uuid) yes
same_request_hash boolean or null yes
source ReplaySourceRefOut yes
span_id string or null yes
trace_id string or null yes
ttft_ms number or null yes
usage UsageOut or null yes

What a replay of the span would send, or why it is refused (then the first four fields are null), and the span’s last replays.

Field Type Required Notes
body object or null yes
fidelity string or null yes
provider_kind string or null yes
refusal RefusalOut or null yes
replays array of ReplaySummaryOut yes
surface string or null yes
Field Type Required Notes
output_text string or null yes
span_id string yes
trace_id string yes

One row of the replay ledger.

Field Type Required Notes
cost_usd string yes
error string or null yes
fidelity string yes
finished_at string (date-time) or null yes
model string yes
replay_id string (uuid) yes
requested_by string (uuid) or null yes
result_span_id string or null yes
result_trace_id string or null yes
started_at string (date-time) yes
status string yes
Field Type Required Notes
credits array of ListedChargeOut yes
credits_usd string or null yes
day string (date) yes
explained_usd string or null yes
fetched_at string (date-time) or null yes
groups array of ReportGroupOut yes
incomplete boolean yes
note string or null yes
other array of ListedChargeOut yes
other_usd string or null yes
provider_usd string or null yes
provisional boolean yes
residual_usd string or null yes
spanlight_usd string or null yes
unattributed_calls integer yes
variance_ratio string or null yes

One model group of one day: the seed or override pattern, or unmapped:<name>.

Field Type Required Notes
explained array of ExplainedLineOut yes
explained_usd string or null yes
group string yes
model_pattern string or null yes
note string or null yes
provider_models array of string yes
provider_tokens ReportTokensOut yes
provider_usd string or null yes
residual_usd string or null yes
spanlight_models array of string yes
spanlight_tokens ReportTokensOut yes
spanlight_usd string or null yes
variance_ratio string or null yes
Field Type Required Notes
id string (uuid) yes
name string yes
Field Type Required Notes
id string (uuid) yes
kind "anthropic_admin_api" | "openai_costs_api" | "csv_upload" yes
provider "anthropic" | "openai" | "google" yes

settled_days are the days no longer provisional; days_within_2pct and max_abs_variance_ratio read only settled, complete days (the ratio over groups the provider billed at least $0.01).

Field Type Required Notes
days integer yes
days_within_2pct integer yes
max_abs_variance_ratio string or null yes
settled_days integer yes

Tokens by billing class; null when a count is unknown on that side.

Field Type Required Notes
cache_read integer or null yes
cache_write_1h integer or null yes
cache_write_5m integer or null yes
output integer or null yes
uncached_input integer or null yes

Whole UTC days: start is the first day’s midnight, end the midnight after the last.

Field Type Required Notes
end string (date-time) yes
start string (date-time) yes

How often a target is tried, the first try included, and how long to wait in between.

The wait before retry n is min(backoff_ms * 2 ** (n - 1), max_backoff_ms), replaced by a provider’s Retry-After when honour_retry_after is set.

Field Type Required Notes
backoff_ms integer no min 0, max 10000 Default 200.
honour_retry_after boolean no Default true.
max_attempts integer no min 1, max 5 Default 2.
max_backoff_ms integer no min 0, max 30000 Default 2000.
on_statuses array of integer no max items 16

The body of PUT /review-policy; omitted fields take the defaults.

Field Type Required Notes
daily_cap integer no min 1, max 500 Default 50.
enabled boolean no Default true.
environments array of string no max items 20
include_cost_outliers boolean no Default true.
include_doctor_findings boolean no Default true.
include_errors boolean no Default true.
queue_id string (uuid) yes
random_rate number or string no min 0, max 0.05, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,4}0*$ Default "0.01".
Field Type Required Notes
created_at string (date-time) yes
daily_cap integer yes
enabled boolean yes
environments array of string yes
id string (uuid) yes
include_cost_outliers boolean yes
include_doctor_findings boolean yes
include_errors boolean yes
last_selection SelectionOut or null yes
next_run_at string (date-time) or null yes
queue_id string (uuid) yes
queue_name string yes
random_rate string yes
updated_at string (date-time) yes

Why an item was queued: by hand, or by the review policy’s nightly selection.

One of "manual" | "doctor_finding" | "error" | "cost_outlier" | "random".

Which credentials serve the route’s calls, in fallback order, and how failures are handled.

timeout_ms is the whole budget for every attempt, wait and fallback of one call; for a stream it bounds the time to the first byte.

Field Type Required Notes
fallback FallbackPolicy yes
retry RetryPolicy yes
targets array of Target yes min items 1, max items 8
timeout_ms integer no min 1000, max 600000 Default 60000.
Field Type Required Notes
config RouteConfig yes
name string yes min length 1, max length 100
Field Type Required Notes
config RouteConfig yes
id string (uuid) yes
is_default boolean yes
name string yes
updated_at string (date-time) yes
updated_by UserOut or null yes
version integer yes
Field Type Required Notes
version integer yes min 1

A new config, and the version the client last read, which must still be the current one.

Field Type Required Notes
config RouteConfig yes
expected_version integer yes min 1
Field Type Required Notes
config RouteConfig yes
created_at string (date-time) yes
updated_by UserOut or null yes
version integer yes

What a rule measures and when it breaches. The preview’s body.

Field Type Required Notes
baseline_windows integer or null no min 3, max 30
comparator Comparator yes
cooldown_minutes integer no min 0, max 1440 Default 15.
enabled boolean no Default true.
filters object of string no
kind "threshold" | "anomaly" yes
metric Metric yes
sensitivity number or string or null no min 0.5, max 5, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
threshold number or string or null no min 0, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,15}
window_minutes integer yes min 5, max 1440
Field Type Required Notes
approximate boolean yes
points array of RulePreviewPoint yes
Field Type Required Notes
threshold string or null yes
value string or null yes
window_end string (date-time) yes

A whole rule as a person writes it: the body of a create and of an edit.

An edit sends the whole rule again and replaces it; the rule’s kind may change.

Field Type Required Notes
baseline_windows integer or null no min 3, max 30
channel_ids array of string (uuid) no max items 10
comparator Comparator yes
cooldown_minutes integer no min 0, max 1440 Default 15.
enabled boolean no Default true.
filters object of string no
kind "threshold" | "anomaly" yes
metric Metric yes
name string yes min length 1, max length 80
sensitivity number or string or null no min 0.5, max 5, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
threshold number or string or null no min 0, pattern `^(?!^[-+.]$)[+-]?0(?:\d{0,15}
window_minutes integer yes min 5, max 1440

One of "ok" | "firing".

The body of POST /review-policy/runs: the UTC day to select.

Field Type Required Notes
day string (date) yes
Field Type Required Notes
day string (date) yes
job_id integer yes

A score a run wrote: value for numeric and boolean (1/0) scores, string_value for categorical ones.

Field Type Required Notes
name string yes
string_value string or null yes
value number or null yes

The optional body that starts a run.

Field Type Required Notes
target_override TargetOverride or null no
Field Type Required Notes
clamped boolean yes The window was longer than 24 h and cut to its last 24 h.
items array of ErrorSampleOut yes
next_cursor string or null yes

403 insufficient_permissions; takes no parameters.

Field Type Required Notes
categories array of string yes
created_at string (date-time) yes
data_type ScoreDataType yes
description string or null yes
id string (uuid) yes
implicit boolean yes
max_value number or null yes
min_value number or null yes
name string yes
updated_at string (date-time) yes

A partial edit: the fields sent replace the config’s. The name cannot change; the type can only while no score uses the name.

Field Type Required Notes
categories array of string or null no max items 100
data_type ScoreDataType or null no
description string or null no max length 500
max_value number or string or null no min -1000000000, max 1000000000, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,4}0*$
min_value number or string or null no min -1000000000, max 1000000000, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,4}0*$

A whole score config: the body of a create.

Field Type Required Notes
categories array of string no max items 100
data_type ScoreDataType yes
description string or null no max length 500
max_value number or string or null no min -1000000000, max 1000000000, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,4}0*$
min_value number or string or null no min -1000000000, max 1000000000, pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,4}0*$
name string yes pattern ^[a-z0-9][a-z0-9_.-]{0,63}$

A score a person adds to a trace on the dashboard. Send exactly one of value (a number, or true/false) and string_value. id makes a retry idempotent.

Field Type Required Notes
comment string or null no max length 2000
id string (uuid) or null no
name string yes min length 1, max length 64
span_id string or null no min length 1, max length 64
string_value string or null no min length 1, max length 200
value boolean or number or string or null no pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

What a score’s value is: a number, one of a list of strings, or yes/no stored as 1/0.

One of "numeric" | "categorical" | "boolean".

Field Type Required Notes
ci_a IntervalOut or null yes
ci_b IntervalOut or null yes
delta number or null yes
improved integer yes
mean_a number or null yes
mean_b number or null yes
regressed integer yes
test PairedTestOut or null yes
unchanged integer yes
Field Type Required Notes
accepted integer yes
rejected array of RejectedScoreOut yes
Field Type Required Notes
author_name string or null yes
author_user_id string (uuid) or null yes
comment string or null yes
created_at string (date-time) yes
data_type ScoreDataType yes
evaluator_run_id string (uuid) or null yes
id string (uuid) yes
name string yes
source ScoreSource yes
span_id string or null yes
string_value string or null yes
trace_id string yes
value number or null yes

Who wrote a score: an API key, a person in the dashboard, or an evaluator.

One of "api" | "human" | "eval".

Field Type Required Notes
categories object of integer or null yes
ci_high string or null no
ci_low string or null no
count integer yes
mean number or null yes
passed integer or null no

A trace’s latest score of one name, as the trace list shows it.

Field Type Required Notes
name string yes
string_value string or null yes
value number or null yes
Field Type Required Notes
candidates object of integer yes
cap_hit boolean yes
day string (date) yes
duration_ms integer or null yes
queue_id string (uuid) or null yes
queued object of integer yes
ran_at string (date-time) yes
skipped_duplicates integer yes
Field Type Required Notes
created_at string (date-time) yes
current boolean yes
id string (uuid) yes
ip string or null yes
last_seen_at string (date-time) yes
user_agent string or null yes
Field Type Required Notes
cost_usd string or null yes
error_count integer yes
first_at string (date-time) yes
has_unpriced boolean yes
last_at string (date-time) yes
session_id string yes
trace_count integer yes

One of "info" | "warning" | "critical".

Field Type Required Notes
email string (email) yes
name string yes min length 1, max length 100
password string yes min length 10, max length 256

Nothing to configure: the incoming-webhook URL is the channel’s secret.

The first byte of the response delayed by delay_ms.

Field Type Required Notes
delay_ms integer no min 100, max 60000 Default 5000.
Field Type Required Notes
id string (uuid) yes
name string yes
slug string yes

One of "llm" | "tool" | "retrieval" | "chain" | "agent" | "http" | "other".

Field Type Required Notes
attributes object yes
cache_write_1h_tokens integer or null yes
cache_write_tokens integer or null yes
cached_tokens integer or null yes
cost_usd string or null yes
duration_ms number yes
ended_at string (date-time) yes
error_class ErrorClass or null yes
fee_usd string or null yes
finish_reason string or null yes
input any yes
input_tokens integer or null yes
kind SpanKind yes
model string or null yes
name string yes
output any yes
output_tokens integer or null yes
parent_span_id string or null yes
payload_omitted boolean no Default false.
pricing_version string or null yes
prompt_version_id string (uuid) or null yes
provider string or null yes
provider_error_code string or null yes
provider_error_type string or null yes
rate_limit_kind RateLimitKind or null yes
service_tier "standard" | "batch" | "priority" | "flex" or null yes
span_id string yes
started_at string (date-time) yes
status SpanStatus yes
status_message string or null yes
time_to_first_token_ms number or null yes
truncated boolean yes
usage_rollup boolean yes
usage_state UsageState yes Why the span has or lacks a cost, derived from the stored columns on every read.
web_search_requests integer or null yes

One of "ok" | "error" | "unset".

The window the figures cover: the requested one widened to whole UTC days.

Field Type Required Notes
end string (date-time) yes
start string (date-time) yes
Field Type Required Notes
consecutive_failures integer yes
last_outcome string or null yes
last_polled_at string (date-time) or null yes
last_success_at string (date-time) or null yes
provider string yes

A span of trace A and its counterpart in trace B, paired by name and occurrence.

Field Type Required Notes
a StepSpanOut or null yes
b StepSpanOut or null yes
cost_usd string or null yes
duration_ms number or null yes
input_changed boolean or null yes
input_tokens integer or null yes
name string yes
occurrence integer yes
output_changed boolean or null yes
output_tokens integer or null yes

One side of a compared step: the span’s stored values, nulls as stored.

Field Type Required Notes
cost_usd string or null yes
duration_ms number yes
input_tokens integer or null yes
kind SpanKind yes
model string or null yes
output_tokens integer or null yes
span_id string yes
status SpanStatus yes

One provider credential the route can send a call to.

Field Type Required Notes
credential_id string (uuid) yes
model_aliases object no
weight integer no min 1, max 100 Default 1.

Run a prompt-version experiment with another version of the same prompt; the credential and model stay the experiment’s.

Field Type Required Notes
prompt_version_id string (uuid) yes
Field Type Required Notes
kind "text" yes
text string yes max length 65536

The call held for hold_ms, or what is left of the route’s budget, then timed out.

Field Type Required Notes
hold_ms integer no min 1000, max 120000 Default 30000.
Field Type Required Notes
approximate boolean yes
bucket_start string (date-time) yes
cost_usd string or null yes
errors integer yes
llm_calls integer yes
p95_ms number or null yes
tokens integer yes

One of "read" | "write".

Field Type Required Notes
cost_usd string or null yes
errors integer yes
has_unpriced boolean yes
items integer yes
latency_p50_ms number or null yes
latency_p95_ms number or null yes
scores object of ScoreStatOut yes
Field Type Required Notes
code string yes min length 1, max length 64

The recovery codes, in clear text this once: the server keeps only their hashes.

Field Type Required Notes
recovery_codes array of string yes
Field Type Required Notes
password string or null no min length 1, max length 256

What to add to an authenticator app. Returned once; the secret is never shown again.

Field Type Required Notes
otpauth_url string yes
secret string yes
Field Type Required Notes
enabled boolean yes
enabled_at string (date-time) or null yes
recovery_codes_remaining integer yes
Field Type Required Notes
challenge string yes max length 1024
code string yes min length 1, max length 64
Field Type Required Notes
accepted integer yes
also_in array of AlsoInOut yes
item_ids array of string (uuid) yes
rejected array of TraceRejectedOut yes
Field Type Required Notes
a TraceSummaryOut yes
b TraceSummaryOut yes
steps array of StepOut yes
totals TraceTotalsDeltaOut yes
truncated boolean yes
Field Type Required Notes
cost_usd string or null yes
duration_ms number yes
ended_at string (date-time) yes
environment string or null yes
error_class ErrorClass or null yes
error_count integer yes
error_message string or null yes
external_user_id string or null yes
has_scores boolean yes
has_unpriced boolean yes
input_tokens integer yes
metadata object of string yes
models array of string yes
name string or null yes
output_tokens integer yes
release string or null yes
retry_calls integer or null yes
retry_cost_usd string or null yes
scores array of ScoreSummaryOut yes
session_id string or null yes
span_count integer yes
spans array of SpanOut yes
started_at string (date-time) yes
tags array of string yes
trace_id string yes

One row per trace matching filters, as CSV or JSONL.

Field Type Required Notes
filters ExportFilters yes
format ExportFormat yes
kind "traces" no Default "traces".
Field Type Required Notes
reason string yes
trace_id string yes
Field Type Required Notes
cost_usd string or null yes
duration_ms number yes
ended_at string (date-time) yes
environment string or null yes
error_class ErrorClass or null yes
error_count integer yes
error_message string or null yes
external_user_id string or null yes
has_scores boolean yes
has_unpriced boolean yes
input_tokens integer yes
metadata object of string yes
models array of string yes
name string or null yes
output_tokens integer yes
release string or null yes
retry_calls integer or null yes
retry_cost_usd string or null yes
scores array of ScoreSummaryOut yes
session_id string or null yes
span_count integer yes
started_at string (date-time) yes
tags array of string yes
trace_id string yes

Trace B minus trace A.

Field Type Required Notes
cost_usd string or null yes
duration_ms number yes
error_count integer yes
input_tokens integer yes
output_tokens integer yes
span_count integer yes

A stream closed after after_chunks frames, without its end marker.

Field Type Required Notes
after_chunks integer no min 1, max 100 Default 3.
Field Type Required Notes
input_tokens integer yes
llm_calls integer yes
model string yes
output_tokens integer yes
provider string or null yes

400 naming param as unsupported by the model.

Field Type Required Notes
param string no min length 1, max length 64, pattern ^[a-z_][a-z0-9_.]*$ Default "temperature".
Field Type Required Notes
accepted integer yes
rejected array of UploadRejectedOut yes
Field Type Required Notes
line integer yes
reason string yes
Field Type Required Notes
cache_write_1h_tokens integer or null yes
cache_write_tokens integer or null yes
cached_tokens integer or null yes
input_tokens integer yes
output_tokens integer or null yes

One of "priced" | "rollup" | "usage_not_reported" | "partial_usage" | "model_unknown" | "no_price" | "not_applicable".

computed_at is when the user’s figures were last recomputed (the latest of the days summed).

Field Type Required Notes
computed_at string (date-time) or null yes
daily array of DayStats yes
recent_sessions array of SessionSummaryOut yes
user UserStats yes
window StatsWindow yes

computed_at is when the figures of the window were last recomputed (the latest of the days summed), None when no day of the window has been computed yet.

Field Type Required Notes
computed_at string (date-time) or null yes
items array of UserStats yes
next_cursor string or null yes
window StatsWindow yes
Field Type Required Notes
created_at string (date-time) yes
email string yes
email_verified boolean yes
id string (uuid) yes
name string yes

One end user over the days of the window that have any activity.

cost_usd is the sum of the priced calls: None when calls were made and none was priced, and a lower bound while unpriced_calls (the calls without a price) is above 0. first_seen_day and last_seen_day are the first and last of those days. errors counts failed LLM calls; the error_count of a session counts failed spans of every kind.

Field Type Required Notes
cost_usd string or null yes
errors integer yes
external_user_id string yes
first_seen_day string (date) yes
last_seen_day string (date) yes
llm_calls integer yes
tokens integer yes
traces integer yes
unpriced_calls integer yes
Field Type Required Notes
ctx object no
input any no
loc array of string or integer yes
msg string yes
type string yes

The body of POST /prompts/{name}/versions.

Field Type Required Notes
commit_message string or null no max length 500
model_config ModelAdvice no
template TextTemplateIn or ChatTemplateIn yes
Field Type Required Notes
commit_message string or null yes
created_at string (date-time) yes
created_by string (uuid) or null yes
id string (uuid) yes
kind PromptKind yes
model_config object yes
template object yes
variables array of string yes
version integer yes

Over the last 7 days. cost_usd and p95_ms are null when unknown, never 0.

cost_usd sums the calls that have a cost; when has_unpriced is true some LLM calls had none (unknown model or missing usage), so it is a lower bound.

Field Type Required Notes
cost_usd string or null yes
has_unpriced boolean yes
llm_calls integer yes
p95_ms number or null yes
traces integer yes

Where the signed POST goes. The URL rules that need settings or DNS are in urls.py.

Field Type Required Notes
url string yes min length 1, max length 2048
Field Type Required Notes
channel_id string (uuid) yes
kind "webhook" yes
Field Type Required Notes
end string (date-time) yes
start string (date-time) yes