{"openapi":"3.1.0","info":{"title":"Prime Traces","description":"Upload, query and delete training, evaluation and inference traces.\n\nAuthenticate with a Prime Intellect API key that has the **Prime Traces**\npermission, sent as `Authorization: Bearer <api key>`. Send `X-Prime-Team-ID`\nto act on a team's traces instead of your personal ones.\n\nErrors share one envelope, `{\"error\": {\"code\", \"message\", \"details?\"}}`, where\n`code` is stable and safe to branch on.\n","version":"0"},"servers":[{"url":"https://api.primeintellect.ai"}],"paths":{"/api/v1/traces":{"get":{"tags":["Traces"],"summary":"List traces","description":"Trace summaries for the authenticated owner, newest first by default.\n\nNarrow the list with the query parameters below; an unknown parameter is rejected with `invalid_filter` rather than ignored. `created_after` and `created_before` are the cheapest filters. `sort` is one of `created_at`, `reward`, `duration_ms` or `run_step`.\n\n`upload_id` is the ID in an upload receipt, so it returns the traces one upload stored.\n\nIf a trace was uploaded more than once, the newest copy is returned. Copies with different `created_at` values can still appear on two different pages.\n\nPages are cursor-paginated: pass `next_cursor` back as `cursor` with the same filters.","operationId":"list_traces_api_v1_traces_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":256,"pattern":"\\S"},{"type":"null"}],"title":"Query"}},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Run Id"}},{"name":"run_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RunType"}},{"type":"null"}],"title":"Run Type"}},{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Id"}},{"name":"model_provider","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Model Provider"}},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Model Id"}},{"name":"task_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Task Id"}},{"name":"task_key","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Task Key"}},{"name":"task_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Task Hash"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Outcome"}},{"name":"upload_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Upload Id"}},{"name":"run_step","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Run Step"}},{"name":"step_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Min"}},{"name":"step_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Max"}},{"name":"has_error","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Error"}},{"name":"is_truncated","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Truncated"}},{"name":"reward_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reward Min"}},{"name":"reward_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reward Max"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"created_by","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Created By"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracePage"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"An unknown query parameter or invalid filter value (`invalid_filter`), or a cursor issued for different filters (`invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete a run's traces","description":"Delete every trace in a run. `run_id` is required.\n\nOnly traces are deleted; episodes in the run are kept. The delete covers the traces stored when it looks up the run: an upload that finishes while the request is in progress may or may not be deleted, and one that finishes after it returns is not affected.\n\nReturns `202` once the traces are no longer readable. A run with no traces returns `404`, including a repeat of a delete that already succeeded.","operationId":"delete_run_api_v1_traces_delete","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"`run_id` is missing (`invalid_filter`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The run holds no traces (`run_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Ingestion"],"summary":"Upload traces","description":"Upload traces as a `multipart/form-data` request with two parts:\n\n* `metadata` (`application/json`): `{\"schema_version\": 1, \"context\": {...}}`. `context` is an optional flat string map stored on every trace in the upload.\n* `traces` (`application/x-ndjson`): one complete trace per line, one complete episode per line with `X-Prime-Line-Format: episode`, or one Prime Agent session per line with `X-Prime-Line-Format: prime_agent` (a JSON array of the session file's lines, header first). The part may be sent with `Content-Encoding: gzip`.\n\n`Idempotency-Key` is `sha256:<64 lowercase hex>` of the uncompressed `traces` bytes, newlines included, and is also the upload ID. A request can be up to 1100 MiB and a single line up to 1 GiB, both measured uncompressed.\n\n`201` means every line was stored; there is no partial success. `400` means the content was rejected and nothing was stored. `408` means the body did not finish arriving in time. `409` means the same bytes were already uploaded with a different line format. `429` and `503` are safe to retry with the same bytes after `Retry-After`.","operationId":"upload_traces_api_v1_traces_post","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"x-prime-line-format","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`trace` (the default), `episode` or `prime_agent`.","title":"X-Prime-Line-Format"},"description":"`trace` (the default), `episode` or `prime_agent`."},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."},{"name":"Idempotency-Key","in":"header","required":true,"description":"`sha256:<64 lowercase hex>` of the uncompressed `traces` part; it is also the upload ID.","schema":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAccepted"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The upload would cross the retained-storage cap, the API key lacks the `traces` write permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Ingest capacity or storage is temporarily unavailable. Retry with the same bytes after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Malformed upload content. Nothing was stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"The request body did not finish arriving within the service's deadline (`upload_timeout`). Nothing was stored; split the upload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"These bytes conflict with an earlier upload of the same content (`line_format_conflict`, `source_conflict`, `upload_attribution_conflict`). Retrying will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Another attempt at this upload is already in flight. Retry with the same bytes after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["metadata","traces"],"properties":{"metadata":{"additionalProperties":false,"description":"The `metadata` part: `{ schema_version, context? }`.\n\nThe digest is not restated here — it is the `Idempotency-Key`, and it is\nalso the upload ID.","properties":{"schema_version":{"examples":[1],"title":"Schema Version","type":"integer"},"context":{"additionalProperties":{"type":"string"},"examples":[{"source":"my-eval"}],"title":"Context","type":"object"}},"required":["schema_version"],"title":"UploadMetadata","type":"object"},"traces":{"type":"string","format":"binary","description":"JSONL: one trace per line, one episode per line under `X-Prime-Line-Format: episode`, or one Prime Agent session per line under `X-Prime-Line-Format: prime_agent`. May be gzip-encoded."}}},"encoding":{"metadata":{"contentType":"application/json"},"traces":{"contentType":"application/x-ndjson"}}}}}}},"/api/v1/traces/{trace_id}":{"get":{"tags":["Traces"],"summary":"Get a trace","description":"A trace's summary, or with `raw=true` the stored trace document as uploaded, with recognized credentials replaced by `<REDACTED BY PRIME TRACES>`.\n\nThe raw document can be large, up to the 1 GiB line limit, so fetch the summary first when you only need its fields. `size_bytes` on the summary tells you how large the raw document is.","operationId":"get_trace_api_v1_traces__trace_id__get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"raw","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Raw"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceSummary"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No stored copy of this trace (`trace_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Traces"],"summary":"Delete a trace","description":"Delete every stored copy of a trace.\n\nReturns `202` once the trace is no longer readable; storage is reclaimed in the background. `created_at` is an optional hint used only to check that the trace exists: a hint that matches no stored copy returns `404`. Deleting a trace that is already gone also returns `404`.","operationId":"delete_trace_api_v1_traces__trace_id__delete","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"created_at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No stored copy of this trace (`trace_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/traces/{trace_id}/metadata":{"get":{"tags":["Traces"],"summary":"Get a trace's metadata","description":"A trace's document-level fields without its nodes or calls: `info`, per-key `rewards`, `metrics`, `timing`, agent and task identity, completion flags, the episode's rollout group, and token usage summed over every model call.\n\nRead from the stored trace document, so it serves every trace as soon as it is uploaded, without waiting for the node and call index. An `info` object over 1 MB is left out and named in `omitted`.","operationId":"get_trace_metadata_api_v1_traces__trace_id__metadata_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceMetadata"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No stored copy of this trace (`trace_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/traces/{trace_id}/nodes":{"get":{"tags":["Traces"],"summary":"List trace nodes","description":"A trace's message nodes in step order, without downloading the whole trace. Use this to render a trace page by page.\n\nNodes come from an index built shortly after upload. Until it is ready the request returns `409` with `trace_not_indexed`; retry, or read the trace with `raw=true`. For very large traces the index stops at a per-trace cap, and `partial_index: true` on the page means the rest is only available with `raw=true`.\n\nIf the trace is re-uploaded while you are paging, the cursor is rejected rather than mixing the two versions.","operationId":"list_trace_nodes_api_v1_traces__trace_id__nodes_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Role"}},{"name":"sampled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sampled"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"After"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceNodePage"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"An unknown query parameter or invalid filter value (`invalid_filter`), or a cursor issued for different filters (`invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No stored copy of this trace (`trace_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The trace's node and call index is not built yet (`trace_not_indexed`). Retry, or read the trace with `raw=true`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/traces/{trace_id}/calls":{"get":{"tags":["Traces"],"summary":"List trace model calls","description":"A trace's model calls in order, for timelines: spans, models and finish reasons.\n\nIndexing, `409 trace_not_indexed`, cursor rules and `partial_index` work as for trace nodes. A call's start and end times are omitted if either is missing or the end precedes the start. `node_idx` is null when the call recorded no valid node reference.","operationId":"list_trace_calls_api_v1_traces__trace_id__calls_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Model"}},{"name":"finish_reason","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Finish Reason"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceCallPage"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"An unknown query parameter or invalid filter value (`invalid_filter`), or a cursor issued for different filters (`invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No stored copy of this trace (`trace_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The trace's node and call index is not built yet (`trace_not_indexed`). Retry, or read the trace with `raw=true`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/traces/{trace_id}/timeline":{"get":{"tags":["Traces"],"summary":"Get a trace's timeline","description":"Everything a timeline needs in one request: every node's position, parent, timestamp, role, trainability and tool-call ids and names, every model call with its token usage, the trace's activity counts, and its lifecycle: phase timing, outcome flags, stop condition, error count and agent. Message content is not included; read it page by page from the trace's nodes.\n\n`lifecycle`, call `usage` and node `trainable` are read from the trace's stored copy and are null for formats other than Verifiers.\n\nIndexing, `409 trace_not_indexed` and `partial_index` work as for trace nodes. The response is not paginated.\n\nThe response carries an `ETag`. Send it back as `If-None-Match` to get `304` when the trace has not changed since.","operationId":"get_trace_timeline_api_v1_traces__trace_id__timeline_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTimeline"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"304":{"description":"The body for this `ETag` is unchanged."},"400":{"description":"An unknown query parameter or invalid filter value (`invalid_filter`), or a cursor issued for different filters (`invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No stored copy of this trace (`trace_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The trace's node and call index is not built yet (`trace_not_indexed`). Retry, or read the trace with `raw=true`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/episodes":{"get":{"tags":["Episodes"],"summary":"List episodes","description":"Episode summaries for the authenticated owner, newest first. Cursor-paginated like the trace list. `upload_id` is the ID in an upload receipt, so it returns the episodes one upload stored.\n\n`context.<key>=<value>` matches the context map supplied at upload. Episodes store no context of their own, so it is matched on member traces: an episode with no traces never matches.\n\n`trace_outcome` matches episodes with at least one current member trace whose outcome is one of the given values. `outcome` matches the episode's own outcome.","operationId":"list_episodes_api_v1_episodes_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Run Id"}},{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Id"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Outcome"}},{"name":"upload_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Upload Id"}},{"name":"run_step","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Run Step"}},{"name":"step_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Min"}},{"name":"step_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Max"}},{"name":"has_error","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Error"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"created_by","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Created By"}},{"name":"trace_outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Trace Outcome"}},{"name":"trace_run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Run Id"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodePage"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"An unknown query parameter or invalid filter value (`invalid_filter`), or a cursor issued for different filters (`invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/episodes/{episode_id}":{"get":{"tags":["Episodes"],"summary":"Get an episode","description":"An episode's own fields plus totals computed from its traces: tokens, agent time, participating agents and whether any trace failed.\n\n`has_error` reports an error on the episode itself, and `any_trace_error` reports one on any member trace, so an episode-level failure stays visible even when every trace succeeded. An episode with no traces is valid and returns empty totals.\n\nWith `raw=true`, returns the stored episode document, with `traces` listing the member trace IDs.","operationId":"get_episode_api_v1_episodes__episode_id__get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"episode_id","in":"path","required":true,"schema":{"type":"string","title":"Episode Id"}},{"name":"raw","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Raw"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeDetail"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No episode with this ID (`episode_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/episodes/{episode_id}/traces":{"get":{"tags":["Episodes"],"summary":"List episode traces","description":"Summaries of the traces in an episode, cursor-paginated.\n\nAn episode that does not exist returns `404`, so an empty page always means an existing episode with no matching traces.","operationId":"list_episode_traces_api_v1_episodes__episode_id__traces_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"episode_id","in":"path","required":true,"schema":{"type":"string","title":"Episode Id"}},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Run Id"}},{"name":"environment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Environment Id"}},{"name":"model_provider","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Model Provider"}},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Model Id"}},{"name":"task_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Task Id"}},{"name":"task_key","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Task Key"}},{"name":"task_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Task Hash"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Outcome"}},{"name":"run_step","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"title":"Run Step"}},{"name":"step_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Min"}},{"name":"step_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Max"}},{"name":"has_error","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Error"}},{"name":"is_truncated","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Truncated"}},{"name":"reward_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reward Min"}},{"name":"reward_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reward Max"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracePage"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"An unknown query parameter or invalid filter value (`invalid_filter`), or a cursor issued for different filters (`invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No episode with this ID (`episode_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs":{"get":{"tags":["Runs"],"summary":"List runs","description":"Runs for the authenticated owner, with totals over their traces: trace and episode counts, average reward, step range, and the environments and models used. Cursor-paginated.","operationId":"list_runs_api_v1_runs_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"run_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/RunType"}},{"type":"null"}],"title":"Run Type"}},{"name":"created_by","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Created By"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunPage"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"An unknown query parameter or invalid filter value (`invalid_filter`), or a cursor issued for different filters (`invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}":{"get":{"tags":["Runs"],"summary":"Get a run","description":"One run's totals over its traces, plus per-value trace counts (`facets`) for the trace listing's filters. A run with no traces returns `404`.","operationId":"get_run_api_v1_runs__run_id__get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDetail"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The run holds no traces (`run_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/steps":{"get":{"tags":["Runs"],"summary":"List run steps","description":"The distinct `run_step` values recorded in a run, with each step's trace count, episode count and average reward.","operationId":"get_run_steps_api_v1_runs__run_id__steps_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunStepList"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/search":{"get":{"tags":["Runs"],"summary":"Search a run","description":"Case-sensitive literal search over the content of a run's traces. The query needs at least three characters.\n\nReturns one match per node, with Unicode offsets and an excerpt. Choose what to search with `field` (`content`, `reasoning_content` or `tool_calls`) and narrow with the other filters. Continue with `next_cursor` and the same filters until it is null.\n\nOnly indexed traces are searched. The first page's `coverage` reports traces that were not yet searchable. A search that reads more than the server allows returns `400` with `search_limit_exceeded`; retrying unchanged will not help, so make the query more specific or add filters.","operationId":"search_api_v1_runs__run_id__search_get","security":[{"PrimeApiKey":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":256,"title":"Query"}},{"name":"field","in":"query","required":false,"schema":{"enum":["content","reasoning_content","tool_calls"],"type":"string","default":"content","title":"Field"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Role"}},{"name":"run_step","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Run Step"}},{"name":"has_error","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Error"}},{"name":"reward_min","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reward Min"}},{"name":"reward_max","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reward Max"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Cursor"}},{"name":"x-prime-team-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Act on this team's traces instead of your personal ones. You must be a member of the team.","title":"X-Prime-Team-Id"},"description":"Act on this team's traces instead of your personal ones. You must be a member of the team."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceSearchPage"}}}},"401":{"description":"Missing or malformed `Authorization: Bearer <api key>` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The API key lacks the required `traces` permission (`forbidden`), or Prime Traces is not enabled for this account (`service_not_enabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Storage or authentication is temporarily unavailable. Retry after the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"An invalid filter, cursor, blank query or inverted reward range (`invalid_filter`, `invalid_cursor`), or a search that reads more than the server allows (`search_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BooleanFacet":{"properties":{"true":{"type":"integer","title":"True"},"false":{"type":"integer","title":"False"}},"type":"object","required":["true","false"],"title":"BooleanFacet"},"EpisodeDetail":{"properties":{"episode_id":{"type":"string","title":"Episode Id"},"upload_id":{"type":"string","title":"Upload Id"},"schema_version":{"type":"integer","title":"Schema Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"ingested_at":{"type":"string","format":"date-time","title":"Ingested At"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"environment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Id"},"environment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Name"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"has_error":{"type":"boolean","title":"Has Error"},"error":{"$ref":"#/components/schemas/EpisodeError"},"traces":{"$ref":"#/components/schemas/EpisodeTraceAggregate"}},"type":"object","required":["episode_id","upload_id","schema_version","created_at","ingested_at","run_id","environment_id","outcome","has_error","error","traces"],"title":"EpisodeDetail"},"EpisodeError":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["type","message"],"title":"EpisodeError"},"EpisodePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EpisodeSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"EpisodePage"},"EpisodeSummary":{"properties":{"episode_id":{"type":"string","title":"Episode Id"},"upload_id":{"type":"string","title":"Upload Id"},"schema_version":{"type":"integer","title":"Schema Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"ingested_at":{"type":"string","format":"date-time","title":"Ingested At"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"environment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Id"},"environment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Name"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"has_error":{"type":"boolean","title":"Has Error"},"error":{"$ref":"#/components/schemas/EpisodeError"}},"type":"object","required":["episode_id","upload_id","schema_version","created_at","ingested_at","run_id","environment_id","outcome","has_error","error"],"title":"EpisodeSummary"},"EpisodeTraceAggregate":{"properties":{"trace_count":{"type":"integer","title":"Trace Count"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_duration_ms":{"type":"integer","title":"Total Duration Ms"},"any_trace_error":{"type":"boolean","title":"Any Trace Error"},"agent_names":{"items":{"type":"string"},"type":"array","title":"Agent Names"}},"type":"object","required":["trace_count","total_tokens","total_duration_ms","any_trace_error","agent_names"],"title":"EpisodeTraceAggregate","description":"Read-time rollup over deduplicated member traces.\n\nA zero-trace episode is a legitimate terminal state — a failure before any\ntrace was minted still leaves its errors on the episode — so an empty\naggregate is not an error."},"ErrorBody":{"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["code","message"],"title":"ErrorBody"},"ErrorCode":{"type":"string","enum":["upload_too_large","upload_timeout","trace_too_large","too_many_traces_in_episode","episode_id_too_long","environment_id_too_long","trace_id_too_long","run_id_too_long","too_many_traces_in_upload","duplicate_trace_id","duplicate_episode_id","digest_mismatch","line_format_mismatch","malformed_encoding","invalid_trace","invalid_metadata","created_at_out_of_window","unsupported_schema_version","unknown_episode_reference","line_format_conflict","source_conflict","upload_attribution_conflict","billing_intent_required","invalid_idempotency_key","invalid_cursor","invalid_filter","search_limit_exceeded","unauthenticated","forbidden","service_not_enabled","source_forbidden","auth_unavailable","trace_not_found","trace_not_indexed","run_not_found","episode_not_found","export_job_not_found","task_already_running","invalid_schedule_time","snapshot_not_due","statement_production_incomplete","statement_production_failed","rate_limited","writer_pool_saturated","ingest_capacity_exceeded","ingest_unavailable","storage_unavailable","index_task_queue_unavailable","index_capacity_exceeded","internal_error"],"title":"ErrorCode"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ErrorResponse"},"FacetValue":{"properties":{"value":{"type":"string","title":"Value"},"trace_count":{"type":"integer","title":"Trace Count"}},"type":"object","required":["value","trace_count"],"title":"FacetValue"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NodeMessage":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"content":{"title":"Content"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content"},"tool_calls":{"title":"Tool Calls"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"}},"type":"object","required":["role","content","reasoning_content","tool_calls","tool_call_id","name","tool_name"],"title":"NodeMessage"},"RewardFacet":{"properties":{"unscored":{"type":"integer","title":"Unscored"},"negative":{"type":"integer","title":"Negative"},"zero":{"type":"integer","title":"Zero"},"partial":{"type":"integer","title":"Partial"},"one":{"type":"integer","title":"One"},"above_one":{"type":"integer","title":"Above One"}},"type":"object","required":["unscored","negative","zero","partial","one","above_one"],"title":"RewardFacet","description":"Traces per reward band; the bands partition the run's traces."},"RunDetail":{"properties":{"run_id":{"type":"string","title":"Run Id"},"first_trace_created_at":{"type":"string","format":"date-time","title":"First Trace Created At"},"last_trace_created_at":{"type":"string","format":"date-time","title":"Last Trace Created At"},"last_trace_ingested_at":{"type":"string","format":"date-time","title":"Last Trace Ingested At"},"trace_count":{"type":"integer","title":"Trace Count"},"episode_count":{"type":"integer","title":"Episode Count"},"avg_reward":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Reward"},"step_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Min"},"step_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Max"},"step_count":{"type":"integer","title":"Step Count"},"has_error":{"type":"boolean","title":"Has Error"},"first_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First User Id"},"environment_ids":{"items":{"type":"string"},"type":"array","title":"Environment Ids"},"model_ids":{"items":{"type":"string"},"type":"array","title":"Model Ids"},"context":{"additionalProperties":{"type":"string"},"type":"object","title":"Context"},"facets":{"$ref":"#/components/schemas/RunFacets"}},"type":"object","required":["run_id","first_trace_created_at","last_trace_created_at","last_trace_ingested_at","trace_count","episode_count","avg_reward","step_min","step_max","step_count","has_error","first_user_id","environment_ids","model_ids","context","facets"],"title":"RunDetail","description":"A single run's summary plus its facets. The listing stays a\n`RunSummary`: facets are computed only when one run is read."},"RunFacets":{"properties":{"environment_id":{"$ref":"#/components/schemas/ValueFacet"},"outcome":{"$ref":"#/components/schemas/ValueFacet"},"model_id":{"$ref":"#/components/schemas/ValueFacet"},"agent_name":{"$ref":"#/components/schemas/ValueFacet"},"task_id":{"$ref":"#/components/schemas/ValueFacet"},"created_by":{"$ref":"#/components/schemas/ValueFacet"},"has_error":{"$ref":"#/components/schemas/BooleanFacet"},"is_truncated":{"$ref":"#/components/schemas/BooleanFacet"},"reward":{"$ref":"#/components/schemas/RewardFacet"}},"type":"object","required":["environment_id","outcome","model_id","agent_name","task_id","created_by","has_error","is_truncated","reward"],"title":"RunFacets","description":"Per-value trace counts over the run's current trace versions, for\nfilter controls. Keyed by the trace listing's filter parameter names, so\na value maps to the filter that selects it."},"RunPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"RunPage"},"RunStepList":{"properties":{"step_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Min"},"step_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Max"},"step_count":{"type":"integer","title":"Step Count"},"items":{"items":{"$ref":"#/components/schemas/RunStepSummary"},"type":"array","title":"Items"}},"type":"object","required":["step_min","step_max","step_count","items"],"title":"RunStepList"},"RunStepSummary":{"properties":{"step":{"type":"integer","title":"Step"},"trace_count":{"type":"integer","title":"Trace Count"},"episode_count":{"type":"integer","title":"Episode Count"},"avg_reward":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Reward"}},"type":"object","required":["step","trace_count","episode_count","avg_reward"],"title":"RunStepSummary"},"RunSummary":{"properties":{"run_id":{"type":"string","title":"Run Id"},"first_trace_created_at":{"type":"string","format":"date-time","title":"First Trace Created At"},"last_trace_created_at":{"type":"string","format":"date-time","title":"Last Trace Created At"},"last_trace_ingested_at":{"type":"string","format":"date-time","title":"Last Trace Ingested At"},"trace_count":{"type":"integer","title":"Trace Count"},"episode_count":{"type":"integer","title":"Episode Count"},"avg_reward":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Reward"},"step_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Min"},"step_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Max"},"step_count":{"type":"integer","title":"Step Count"},"has_error":{"type":"boolean","title":"Has Error"},"first_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First User Id"},"environment_ids":{"items":{"type":"string"},"type":"array","title":"Environment Ids"},"model_ids":{"items":{"type":"string"},"type":"array","title":"Model Ids"},"context":{"additionalProperties":{"type":"string"},"type":"object","title":"Context"}},"type":"object","required":["run_id","first_trace_created_at","last_trace_created_at","last_trace_ingested_at","trace_count","episode_count","avg_reward","step_min","step_max","step_count","has_error","first_user_id","environment_ids","model_ids","context"],"title":"RunSummary"},"RunType":{"type":"string","enum":["eval","inference","train","unknown"],"title":"RunType","description":"Canonical dashboard classification derived from a run's context."},"TimelineAgent":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","required":["name","model"],"title":"TimelineAgent"},"TimelineAgentSpan":{"properties":{"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End"},"model":{"$ref":"#/components/schemas/TimelineSplit"},"harness":{"$ref":"#/components/schemas/TimelineSplit"}},"type":"object","required":["start","end","model","harness"],"title":"TimelineAgentSpan"},"TimelineCall":{"properties":{"call_idx":{"type":"integer","title":"Call Idx"},"node_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Idx"},"time_start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time Start"},"time_end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time End"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"}},"type":"object","required":["call_idx","node_idx","time_start","time_end","model","endpoint","finish_reason","usage"],"title":"TimelineCall"},"TimelineLifecycle":{"properties":{"timing":{"$ref":"#/components/schemas/TimelineTiming"},"ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ok"},"is_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Completed"},"is_timeout":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Timeout"},"stop_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Condition"},"error_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Error Count"},"agent":{"$ref":"#/components/schemas/TimelineAgent"}},"type":"object","required":["timing","ok","is_completed","is_timeout","stop_condition","error_count","agent"],"title":"TimelineLifecycle"},"TimelineNode":{"properties":{"node_idx":{"type":"integer","title":"Node Idx"},"parent_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Idx"},"timestamp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"sampled":{"type":"boolean","title":"Sampled"},"trainable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trainable"},"tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/TimelineToolCall"},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"}},"type":"object","required":["node_idx","parent_idx","timestamp","role","sampled","trainable","tool_calls","tool_call_id","name","tool_name"],"title":"TimelineNode","description":"A node's geometry and tool correlation, without its content."},"TimelineSpan":{"properties":{"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End"}},"type":"object","required":["start","end"],"title":"TimelineSpan"},"TimelineSplit":{"properties":{"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration"}},"type":"object","required":["duration"],"title":"TimelineSplit"},"TimelineTiming":{"properties":{"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"boot":{"$ref":"#/components/schemas/TimelineSpan"},"setup":{"$ref":"#/components/schemas/TimelineSpan"},"agent":{"$ref":"#/components/schemas/TimelineAgentSpan"},"finalize":{"$ref":"#/components/schemas/TimelineSpan"},"scoring":{"$ref":"#/components/schemas/TimelineSpan"}},"type":"object","required":["start","boot","setup","agent","finalize","scoring"],"title":"TimelineTiming","description":"Verifiers' `timing`: back-to-back lifecycle phases, epoch seconds."},"TimelineToolCall":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","name"],"title":"TimelineToolCall"},"TraceActivity":{"properties":{"total_entries":{"type":"integer","title":"Total Entries"},"user_messages":{"type":"integer","title":"User Messages"},"model_turns":{"type":"integer","title":"Model Turns"},"model_calls":{"type":"integer","title":"Model Calls"},"tool_calls":{"type":"integer","title":"Tool Calls"},"tool_results":{"type":"integer","title":"Tool Results"},"steps_per_branch":{"items":{"type":"integer"},"type":"array","title":"Steps Per Branch"}},"type":"object","required":["total_entries","user_messages","model_turns","model_calls","tool_calls","tool_results","steps_per_branch"],"title":"TraceActivity"},"TraceCall":{"properties":{"call_idx":{"type":"integer","title":"Call Idx"},"node_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Idx"},"time_start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time Start"},"time_end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time End"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason"}},"type":"object","required":["call_idx","node_idx","time_start","time_end","model","endpoint","finish_reason"],"title":"TraceCall"},"TraceCallPage":{"properties":{"revision":{"anyOf":[{"$ref":"#/components/schemas/TraceRevision"},{"type":"null"}]},"indexed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Indexed Count"},"items":{"items":{"$ref":"#/components/schemas/TraceCall"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"partial_index":{"type":"boolean","title":"Partial Index"}},"type":"object","required":["items","next_cursor","partial_index"],"title":"TraceCallPage"},"TraceExecution":{"properties":{"has_error":{"type":"boolean","title":"Has Error"},"is_truncated":{"type":"boolean","title":"Is Truncated"}},"type":"object","required":["has_error","is_truncated"],"title":"TraceExecution"},"TraceMetadata":{"properties":{"revision":{"$ref":"#/components/schemas/TraceRevision"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"run_step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Run Step"},"trace_id":{"type":"string","title":"Trace Id"},"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episode Id"},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id"},"raw_format":{"type":"string","title":"Raw Format"},"info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Info"},"errors":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Errors"},"rewards":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rewards"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"timing":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Timing"},"agent":{"$ref":"#/components/schemas/TraceMetadataAgent"},"task":{"$ref":"#/components/schemas/TraceMetadataTask"},"stop_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stop Condition"},"ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ok"},"is_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Completed"},"is_timeout":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Timeout"},"has_error":{"type":"boolean","title":"Has Error"},"is_truncated":{"type":"boolean","title":"Is Truncated"},"usage":{"anyOf":[{"$ref":"#/components/schemas/TraceUsage"},{"type":"null"}]},"omitted":{"items":{"type":"string"},"type":"array","title":"Omitted"}},"type":"object","required":["revision","run_id","run_step","trace_id","episode_id","group_id","raw_format","info","rewards","metrics","timing","agent","task","stop_condition","ok","is_completed","is_timeout","has_error","is_truncated","usage","omitted"],"title":"TraceMetadata"},"TraceMetadataAgent":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"trainable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Trainable"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"runtime_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime Id"},"harness_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Harness Id"}},"type":"object","required":["name","trainable","model","runtime_id","harness_id"],"title":"TraceMetadataAgent"},"TraceMetadataTask":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hash"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["id","key","hash","type"],"title":"TraceMetadataTask"},"TraceModelInfo":{"properties":{"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["provider","id"],"title":"TraceModelInfo"},"TraceNode":{"properties":{"node_idx":{"type":"integer","title":"Node Idx"},"parent_idx":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Idx"},"timestamp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"},"sampled":{"type":"boolean","title":"Sampled"},"message":{"$ref":"#/components/schemas/NodeMessage"}},"type":"object","required":["node_idx","parent_idx","timestamp","sampled","message"],"title":"TraceNode"},"TraceNodePage":{"properties":{"revision":{"anyOf":[{"$ref":"#/components/schemas/TraceRevision"},{"type":"null"}]},"indexed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Indexed Count"},"items":{"items":{"$ref":"#/components/schemas/TraceNode"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"partial_index":{"type":"boolean","title":"Partial Index"}},"type":"object","required":["items","next_cursor","partial_index"],"title":"TraceNodePage"},"TracePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TraceSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"TracePage"},"TraceRevision":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"generation":{"type":"string","title":"Generation"}},"type":"object","required":["upload_id","generation"],"title":"TraceRevision"},"TraceScore":{"properties":{"reward":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reward"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},"type":"object","required":["reward","outcome"],"title":"TraceScore"},"TraceSearchCoverage":{"properties":{"examined_traces":{"type":"integer","title":"Examined Traces"},"unindexed_trace_ids":{"items":{"type":"string"},"type":"array","title":"Unindexed Trace Ids"},"partial_index":{"type":"boolean","title":"Partial Index"}},"type":"object","required":["examined_traces","unindexed_trace_ids","partial_index"],"title":"TraceSearchCoverage"},"TraceSearchMatch":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"upload_id":{"type":"string","title":"Upload Id"},"generation":{"type":"integer","title":"Generation"},"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episode Id"},"node_idx":{"type":"integer","title":"Node Idx"},"role":{"type":"string","title":"Role"},"field":{"type":"string","enum":["content","reasoning_content","tool_calls"],"title":"Field"},"representation":{"type":"string","enum":["text","json"],"title":"Representation"},"match_start":{"type":"integer","title":"Match Start"},"match_end":{"type":"integer","title":"Match End"},"excerpt":{"type":"string","title":"Excerpt"},"excerpt_start":{"type":"integer","title":"Excerpt Start"}},"type":"object","required":["trace_id","upload_id","generation","episode_id","node_idx","role","field","representation","match_start","match_end","excerpt","excerpt_start"],"title":"TraceSearchMatch"},"TraceSearchPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TraceSearchMatch"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"coverage":{"anyOf":[{"$ref":"#/components/schemas/TraceSearchCoverage"},{"type":"null"}]}},"type":"object","required":["items","next_cursor","coverage"],"title":"TraceSearchPage"},"TraceSummary":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"upload_id":{"type":"string","title":"Upload Id"},"generation":{"type":"string","title":"Generation"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"episode_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episode Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"ingested_at":{"type":"string","format":"date-time","title":"Ingested At"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"run_step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Run Step"},"environment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Id"},"model":{"$ref":"#/components/schemas/TraceModelInfo"},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id"},"task_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Key"},"task_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Hash"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"score":{"$ref":"#/components/schemas/TraceScore"},"execution":{"$ref":"#/components/schemas/TraceExecution"},"duration_ms":{"type":"integer","title":"Duration Ms"},"total_tokens":{"type":"integer","title":"Total Tokens"},"size_bytes":{"type":"integer","title":"Size Bytes"},"raw_format":{"type":"string","title":"Raw Format"},"context":{"additionalProperties":{"type":"string"},"type":"object","title":"Context"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"activity":{"anyOf":[{"$ref":"#/components/schemas/TraceActivity"},{"type":"null"}]},"tool_definitions":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tool Definitions"}},"type":"object","required":["trace_id","upload_id","generation","user_id","episode_id","created_at","ingested_at","run_id","run_step","environment_id","model","task_id","task_key","task_hash","agent_name","score","execution","duration_ms","total_tokens","size_bytes","raw_format","context","metrics","activity","tool_definitions"],"title":"TraceSummary"},"TraceTimeline":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"revision":{"$ref":"#/components/schemas/TraceRevision"},"nodes":{"items":{"$ref":"#/components/schemas/TimelineNode"},"type":"array","title":"Nodes"},"calls":{"items":{"$ref":"#/components/schemas/TimelineCall"},"type":"array","title":"Calls"},"activity":{"anyOf":[{"$ref":"#/components/schemas/TraceActivity"},{"type":"null"}]},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/TimelineLifecycle"},{"type":"null"}]},"indexed_count":{"type":"integer","title":"Indexed Count"},"partial_index":{"type":"boolean","title":"Partial Index"}},"type":"object","required":["trace_id","revision","nodes","calls","activity","lifecycle","indexed_count","partial_index"],"title":"TraceTimeline"},"TraceUsage":{"properties":{"call_count":{"type":"integer","title":"Call Count"},"calls_with_usage":{"type":"integer","title":"Calls With Usage"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"cached_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cached Input Tokens"},"reasoning_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reasoning Tokens"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"},"max_context_tokens":{"type":"integer","title":"Max Context Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["call_count","calls_with_usage","prompt_tokens","completion_tokens","cached_input_tokens","reasoning_tokens","cost","max_context_tokens","total_tokens"],"title":"TraceUsage"},"UploadAccepted":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"status":{"$ref":"#/components/schemas/UploadStatus","default":"committed"}},"type":"object","required":["upload_id"],"title":"UploadAccepted","description":"201 body. `status` is always `committed`: there is no partial success."},"UploadStatus":{"type":"string","enum":["received","committed","indexed","invalidated","index_requeued","index_skipped"],"title":"UploadStatus","description":"States an upload can hold in `upload_events`.\n\nContent addressing bounds an upload at two events: `received`, then one\nterminal state. A refused upload appends nothing — the rejection is raised\nat the first bad line, before the digest that would prove the upload was\nthis upload — so the upload simply stays `received` and the next attempt is\nread again."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValueFacet":{"properties":{"values":{"items":{"$ref":"#/components/schemas/FacetValue"},"type":"array","title":"Values"},"other_count":{"type":"integer","title":"Other Count"},"missing_count":{"type":"integer","title":"Missing Count"}},"type":"object","required":["values","other_count","missing_count"],"title":"ValueFacet","description":"One column's distinct values in a run, most traces first.\n\nEvery trace lands in exactly one of `values`, `other_count` and\n`missing_count`, so the three always sum to the run's `trace_count`."}},"securitySchemes":{"PrimeApiKey":{"type":"http","description":"A Prime Intellect API key with the Prime Traces permission.","scheme":"bearer"}}}}