{"openapi":"3.1.0","info":{"title":"OpenBot API","version":"v1","description":"Evaluation, data, and agent-ready APIs for embodied AI, robotics, and industrial vision teams.","contact":{"email":"contact@openbot.ai","url":"https://openbot.ai"}},"servers":[{"url":"https://api.openbot.ai","description":"Production"},{"url":"https://api.preview.openbot.ai","description":"Preview"}],"paths":{"/":{"get":{"summary":"Health check","description":"Check API health and version.","operationId":"health","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string"},"release":{"$ref":"#/components/schemas/ReleaseMetadata"},"environment":{"type":"string"},"timestamp":{"type":"number"}}}}}}}}},"/health":{"get":{"summary":"Detailed health status","description":"Returns overall status and per-dependency health (DB, KV).","operationId":"healthDetailed","responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Degraded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}},"/ready":{"get":{"summary":"Check deployment readiness","description":"Runs read-only probes against D1, KV, both private R2 buckets, and the Data processor service binding.","operationId":"readiness","responses":{"200":{"description":"API and Data plane are ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessStatus"}}}},"503":{"description":"One or more required bindings are unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessStatus"}}}}}}},"/v1/release":{"get":{"summary":"Get the active release identity","description":"Separates the stable API contract and product release from the immutable Cloudflare Worker deployment identity.","operationId":"getRelease","responses":{"200":{"description":"Active API, product, and deployment versions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseMetadata"}}}}}}},"/v1/catalog/models":{"get":{"summary":"List published model catalog entries","description":"Returns only human-reviewed current revisions with field-level evidence.","operationId":"listCatalogModels","parameters":[{"name":"query","in":"query","schema":{"type":"string"}},{"name":"task","in":"query","schema":{"type":"string"}},{"name":"embodiment","in":"query","schema":{"type":"string"}},{"name":"signal","in":"query","schema":{"type":"string"}},{"name":"family","in":"query","schema":{"type":"string"}},{"name":"openness","in":"query","schema":{"type":"string"}},{"name":"license","in":"query","schema":{"type":"string"}},{"name":"source_layer","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"artifact_role","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"collection_method","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"action_type","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"training_data_layer","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"modality","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"format","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"evidence_level","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"verified_after","in":"query","schema":{"type":"string"}},{"name":"dimension","in":"query","description":"Evaluation dimension key used with min_score/min_confidence.","schema":{"type":"string"}},{"name":"min_score","in":"query","schema":{"type":"number","minimum":0,"maximum":100}},{"name":"min_confidence","in":"query","schema":{"type":"number","minimum":0,"maximum":100}},{"name":"sort","in":"query","description":"Built-in sort or a CatalogEvaluationV1 dimension key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Published model entries"}}}},"/v1/catalog/models/{slug}":{"get":{"summary":"Get a published model catalog entry","operationId":"getCatalogModel","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Published model entry and audits"},"404":{"description":"Not found"}}}},"/v1/catalog/datasets":{"get":{"summary":"List published dataset catalog entries","description":"Returns only human-reviewed current revisions with field-level evidence.","operationId":"listCatalogDatasets","parameters":[{"name":"query","in":"query","schema":{"type":"string"}},{"name":"task","in":"query","schema":{"type":"string"}},{"name":"embodiment","in":"query","schema":{"type":"string"}},{"name":"signal","in":"query","schema":{"type":"string"}},{"name":"access","in":"query","schema":{"type":"string"}},{"name":"license","in":"query","schema":{"type":"string"}},{"name":"source_layer","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"artifact_role","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"collection_method","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"action_type","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"training_data_layer","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"modality","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"format","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"evidence_level","in":"query","description":"Comma-separated facet values (OR within this facet).","schema":{"type":"string"}},{"name":"verified_after","in":"query","schema":{"type":"string"}},{"name":"dimension","in":"query","description":"Evaluation dimension key used with min_score/min_confidence.","schema":{"type":"string"}},{"name":"min_score","in":"query","schema":{"type":"number","minimum":0,"maximum":100}},{"name":"min_confidence","in":"query","schema":{"type":"number","minimum":0,"maximum":100}},{"name":"sort","in":"query","description":"Built-in sort or a CatalogEvaluationV1 dimension key.","schema":{"type":"string"}}],"responses":{"200":{"description":"Published dataset entries"}}}},"/v1/catalog/datasets/{slug}":{"get":{"summary":"Get a published dataset catalog entry","operationId":"getCatalogDataset","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Published dataset entry and audits"},"404":{"description":"Not found"}}}},"/v1/catalog/console/candidates":{"get":{"summary":"List Catalog review candidates","description":"Catalog administrator endpoint. Returns private discovery and manual-submission candidates.","operationId":"listCatalogCandidates","security":[{"CookieAuth":[]}],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["needs_review","ignored","rejected","duplicate"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","description":"next_cursor from the previous page.","schema":{"type":"string"}},{"name":"offset","in":"query","description":"Offset alternative to cursor; do not send both.","schema":{"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"Review candidates"},"403":{"description":"Catalog admin required"}}},"post":{"summary":"Add a manual Catalog candidate","description":"Creates a private manual_submission candidate. It does not publish the entry.","operationId":"createManualCatalogCandidate","security":[{"CookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["entity_type","name","slug","description","official_url","availability"],"properties":{"entity_type":{"type":"string","enum":["model_series","dataset_series"]},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"official_url":{"type":"string","format":"uri"},"version":{"type":"string"},"license":{"type":"string"},"availability":{"type":"string","enum":["open","gated","preview","closed","unknown"]},"family_or_role":{"type":"string"},"code_url":{"type":"string","format":"uri"},"weights_or_data_url":{"type":"string","format":"uri"},"paper_url":{"type":"string","format":"uri"},"note":{"type":"string"}}}}}},"responses":{"201":{"description":"Manual candidate added to the review queue"},"409":{"description":"Identical candidate exists"}}}},"/v1/catalog/console/sources/{id}/snapshot":{"post":{"summary":"Upload a reviewed external Catalog snapshot","description":"Validates and stores a strict embodied-data-pyramid JSON snapshot, then queues the source for discovery. It never publishes candidates.","operationId":"uploadCatalogSourceSnapshot","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"openbot.embodied-data-pyramid.snapshot.v1 document"}}}},"responses":{"202":{"description":"Snapshot accepted and queued for discovery"},"400":{"description":"Snapshot validation failed"},"403":{"description":"Catalog admin required"},"409":{"description":"Source adapter does not accept snapshots"}}}},"/v1/catalog/console/candidates/{id}/claims":{"get":{"summary":"Compare provenance claims for a Catalog candidate","description":"Returns source values, revisions, locators, evidence levels, and conflict groups for human review.","operationId":"listCatalogCandidateClaims","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Candidate claims and conflict groups"},"403":{"description":"Catalog admin required"},"404":{"description":"Candidate not found"}}}},"/v1/catalog/console/candidates/{id}/publish":{"post":{"summary":"Publish a reviewed Catalog candidate","description":"Creates an immutable public revision. Source claims are required, at least one must match the reviewed record, active conflicts need an explicit acknowledgement and review note, and every relation must target another published Catalog entity.","operationId":"publishCatalogCandidate","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content_hash"],"properties":{"content_hash":{"type":"string","minLength":32},"slug":{"type":"string"},"content":{"type":"object"},"note":{"type":"string","maxLength":1000},"conflict_acknowledgement":{"type":"object","required":["acknowledged","note"],"properties":{"acknowledged":{"const":true},"note":{"type":"string","minLength":1,"maxLength":1000}}}}}}}},"responses":{"201":{"description":"Reviewed revision published"},"409":{"description":"Candidate changed, lacks a matching source claim, duplicates a published record, has invalid relation targets, or conflicts were not acknowledged"}}}},"/v1/catalog/console/candidates/import":{"post":{"summary":"Import curated CatalogRecordV1 candidates","description":"Creates private high-priority candidates. Every imported entry still requires human publication review.","operationId":"importCuratedCatalogCandidates","security":[{"CookieAuth":[]}],"responses":{"201":{"description":"Curated candidates imported"},"403":{"description":"Catalog admin required"}}}},"/v1/catalog/console/candidates/bulk-ignore":{"post":{"summary":"Ignore low-value Catalog candidates in bulk","operationId":"bulkIgnoreCatalogCandidates","security":[{"CookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","content_hash"],"properties":{"id":{"type":"string"},"content_hash":{"type":"string"}}}},"note":{"type":"string"}}}}}},"responses":{"200":{"description":"Candidates ignored"},"403":{"description":"Catalog admin required"},"409":{"description":"Candidate changed"}}}},"/v1/catalog/console/candidates/{id}/enrich":{"post":{"summary":"Refresh one Hugging Face candidate with repository README and file evidence","operationId":"enrichCatalogCandidate","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Candidate evidence and evaluation refreshed"},"403":{"description":"Catalog admin required"},"409":{"description":"Candidate changed"}}}},"/v1/catalog/console/candidates/retriage":{"post":{"summary":"Backfill and re-triage legacy Catalog candidates","operationId":"retriageCatalogCandidates","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Candidates normalized and re-prioritized"},"403":{"description":"Catalog admin required"}}}},"/v1/bench/rollouts":{"post":{"summary":"Create a rollout","description":"Start a policy evaluation. Returns immediately with a queued run ID. Poll the result URL or supply a webhook for completion notification.","operationId":"createRollout","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","description":"Idempotency key for deduplication","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["policy","embodiment","task"],"properties":{"policy":{"type":"string","description":"Policy name"},"policy_uri":{"type":"string","format":"uri"},"embodiment":{"type":"string","description":"Embodiment name"},"task":{"type":"string","description":"Task description"},"rollouts":{"type":"integer","default":200,"minimum":1,"maximum":10000},"seeds":{"type":"integer","default":10,"minimum":1,"maximum":100},"sim":{"type":"string","description":"Simulator to use"},"real_hw":{"type":"boolean","default":false},"edge_target":{"type":"string"},"webhook":{"type":"string","format":"uri"},"metadata":{"type":"object","description":"Arbitrary key/value metadata persisted with the run.","additionalProperties":true}}}}}},"responses":{"202":{"description":"Rollout queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolloutCreated"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict (key already used)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolloutCreated"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bench/rollouts/{id}":{"get":{"summary":"Get a rollout","description":"Get the status and results of a rollout.","operationId":"getRollout","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Rollout details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rollout"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bench/rollouts/{id}/report":{"get":{"summary":"Download a rollout report","description":"Stream the report from private object storage for the authenticated organization.","operationId":"downloadRolloutReport","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private report artifact","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bench/rollouts/{id}/failures":{"get":{"summary":"List rollout failure clusters","description":"Return clustered failure signals for Data hard-negative mining.","operationId":"listRolloutFailures","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Failure clusters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailureClusters"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/uploads":{"post":{"summary":"Create a direct Data upload","operationId":"createDataUpload","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","content_type","size_bytes","checksum_sha256"],"properties":{"dataset_id":{"type":"string"},"filename":{"type":"string","maxLength":255},"content_type":{"type":"string","const":"video/mp4"},"size_bytes":{"type":"integer","minimum":1,"maximum":262144000},"checksum_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}}}}}},"responses":{"200":{"description":"Existing idempotent upload"},"201":{"description":"Upload created"}}},"get":{"summary":"List Data uploads","operationId":"listDataUploads","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Cursor-paginated uploads"}}}},"/v1/data/uploads/{id}":{"get":{"summary":"Get a Data upload","operationId":"getDataUpload","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Upload state"},"404":{"description":"Not found"}}},"delete":{"summary":"Delete an unlinked Data upload","operationId":"deleteDataUpload","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"409":{"description":"Upload is in use"}}}},"/v1/data/uploads/{id}/parts":{"post":{"summary":"Sign multipart upload parts","operationId":"signDataUploadParts","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Short-lived part URLs"}}}},"/v1/data/uploads/{id}/complete":{"post":{"summary":"Complete and verify a Data upload","operationId":"completeDataUpload","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Upload accepted for verification"}}}},"/v1/data/datasets":{"get":{"summary":"List datasets","operationId":"listDatasets","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Cursor-paginated datasets"}}},"post":{"summary":"Register a dataset","description":"Create an org-scoped dataset record and attach an initial metadata profile.","operationId":"createDataset","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","format"],"properties":{"name":{"type":"string"},"source":{"type":"string"},"source_uri":{"type":"string"},"upload_id":{"type":"string"},"format":{"type":"string"},"embodiment":{"type":"string"},"description":{"type":"string"},"size_bytes":{"type":"integer"},"episode_count":{"type":"integer"},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"202":{"description":"Dataset registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncResourceCreated"}}}},"409":{"description":"Idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncResourceCreated"}}}}}}},"/v1/data/datasets/{id}":{"get":{"summary":"Get a dataset","operationId":"getDataset","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Dataset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/datasets/{id}/profile":{"get":{"summary":"Get a dataset profile","description":"Return loop signal coverage, recent Data jobs, and reviewable outputs for one dataset.","operationId":"getDatasetProfile","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Dataset profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetProfile"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/audits":{"post":{"summary":"Create a Data Audit","description":"Assess loop signal coverage and downstream readiness for policy learning, world models, WAM, and failure mining.","operationId":"createDataAudit","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dataset_id"],"properties":{"dataset_id":{"type":"string"},"goal":{"type":"string"},"focus":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"202":{"description":"Audit completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}}}}},"/v1/data/preprocess-jobs":{"post":{"summary":"Create a preprocessing job","description":"Prepare an automated preprocessing manifest for ego, teleop, or robot datasets, with reviewable outputs.","operationId":"createDataPreprocessJob","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dataset_id"],"properties":{"dataset_id":{"type":"string"},"target_format":{"type":"string","enum":["lerobot","rlds","hdf5","webdataset","parquet"]},"operations":{"type":"array","items":{"type":"string"}},"sample_rate_hz":{"type":"number"},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"202":{"description":"Preprocessing output ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}}}}},"/v1/data/annotation-jobs":{"post":{"summary":"Create a model-assisted annotation job","description":"Generate reviewable task-phase, intent, failure, correction, and contact labels for robot or ego datasets.","operationId":"createDataAnnotationJob","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dataset_id"],"properties":{"dataset_id":{"type":"string"},"label_set":{"type":"array","items":{"type":"string"}},"model":{"type":"string"},"confidence_threshold":{"type":"number","minimum":0,"maximum":1},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"202":{"description":"Annotation suggestions ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}}}}},"/v1/data/subtask-jobs":{"post":{"summary":"Generate a reviewable subtask timeline","description":"Queue real robot or egocentric video processing. The Data processor samples timestamped frames, calls a configured annotation provider, stores evidence artifacts, and creates a review output. Uncalibrated confidence remains null.","operationId":"createDataSubtaskJob","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","description":"Org-scoped key preventing duplicate Data jobs.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dataset_id","video_key","labeling"],"properties":{"dataset_id":{"type":"string"},"video_key":{"type":"string"},"video_url":{"type":"string","format":"uri"},"upload_id":{"type":"string"},"task_hint":{"type":"string"},"segmentation":{"type":"object","properties":{"strategy":{"type":"string","enum":["contact_sheet_vlm"]},"sample_fps":{"type":"number","minimum":0,"maximum":30},"max_frames":{"type":"integer","minimum":4,"maximum":64,"default":32},"contact_sheet":{"type":"object","properties":{"columns":{"type":"integer","minimum":2,"maximum":10},"timestamp_overlay":{"type":"boolean"}}}}},"labeling":{"type":"object","required":["taxonomy"],"properties":{"strategy":{"type":"string","enum":["vlm_with_before_after_context"]},"taxonomy":{"type":"array","minItems":1,"items":{"type":"string"}}}},"review":{"type":"object","properties":{"required":{"type":"boolean","const":true}}},"model":{"type":"string"},"prompt_version":{"type":"string"},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"202":{"description":"Subtask processing job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"409":{"description":"Idempotency key already belongs to a Data job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Data job queue unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/jobs":{"get":{"summary":"List Data jobs","operationId":"listDataJobs","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Cursor-paginated Data jobs"}}}},"/v1/data/jobs/{id}":{"get":{"summary":"Get a Data job","operationId":"getDataJob","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Data job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJob"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/jobs/{id}/cancel":{"post":{"summary":"Cancel a queued, running, or finalizing Data job","operationId":"cancelDataJob","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cancellation state"},"409":{"description":"Job already terminal"}}}},"/v1/data/jobs/{id}/artifacts":{"get":{"summary":"List private job artifacts","operationId":"listDataJobArtifacts","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private artifact metadata without storage keys"}}},"delete":{"summary":"Delete private job artifacts","operationId":"deleteDataJobArtifacts","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}}},"/v1/data/artifacts/{id}/content":{"get":{"summary":"Download a private Data artifact","operationId":"downloadDataArtifact","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Artifact content"},"206":{"description":"Byte range"}}},"head":{"summary":"Inspect a private Data artifact","operationId":"headDataArtifact","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Artifact headers"}}}},"/v1/data/jobs/{id}/artifact":{"get":{"summary":"Download the primary Data job artifact","description":"Stream the private artifact for an org-scoped Data job.","operationId":"downloadDataJobArtifact","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private Data artifact"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/jobs/{id}/artifacts/{index}":{"get":{"summary":"Download Data job evidence","description":"Stream one private evidence artifact for an org-scoped Data job.","operationId":"downloadDataJobEvidence","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Private evidence artifact"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/review-outputs/{id}":{"patch":{"summary":"Review a Data output","description":"Approve or request changes for machine-generated audit, preprocessing, or annotation outputs.","operationId":"reviewDataOutput","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["needs_review","approved","changes_requested","rejected"]},"notes":{"type":"string"},"decisions":{"type":"array","items":{"type":"object","additionalProperties":true}},"annotations":{"type":"object","description":"Optional complete edited annotation snapshot. Subtask timelines are validated for unique ids, positive boundaries, duration bounds, and non-overlap.","additionalProperties":true}}}}}},"responses":{"200":{"description":"Review output updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewOutput"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/review-outputs/{id}/exports":{"post":{"summary":"Export an approved subtask timeline","description":"Create a training metadata artifact after human approval.","operationId":"exportDataReviewOutput","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["format"],"properties":{"format":{"type":"string","enum":["jsonl","lerobot_sidecar","rlds_metadata"]}}}}}},"responses":{"201":{"description":"Export artifact ready"},"409":{"description":"Human approval is required before export"}}}},"/v1/data/exports/{id}/content":{"get":{"summary":"Download a Data export","description":"Stream an approved export from private object storage. Access is scoped to the authenticated organization.","operationId":"downloadDataExport","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Export artifact","content":{"application/json":{"schema":{"type":"string","format":"binary"}},"application/x-ndjson":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/data/exports/{id}":{"delete":{"summary":"Delete an approved Data export","operationId":"deleteDataExport","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}}},"/v1/data/datasets/{id}/curate":{"post":{"summary":"Run a curation pipeline","operationId":"curateDataset","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["steps"],"properties":{"steps":{"type":"array","items":{"type":"object","additionalProperties":true}},"tag":{"type":"string"},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"202":{"description":"Curation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJobResult"}}}}}}},"/v1/data/datasets/{id}/from_failures":{"post":{"summary":"Create hard negatives from Bench failures","operationId":"createDatasetFromFailures","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["bench_run"],"properties":{"bench_run":{"type":"string"},"failure_cluster_id":{"type":"string"},"max_episodes":{"type":"integer","default":200}}}}}},"responses":{"202":{"description":"Hard-negative dataset created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJobResult"}}}}}}},"/v1/data/datasets/{id}/exports":{"post":{"summary":"Export a dataset version","operationId":"exportDataset","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["format"],"properties":{"format":{"type":"string"}}}}}},"responses":{"202":{"description":"Export artifact ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportResult"}}}}}}},"/v1/data/datasets/{id}/exports/{stepId}/content":{"get":{"summary":"Download a dataset export","description":"Stream a private generated dataset export for the authenticated organization.","operationId":"downloadDatasetExport","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private dataset export artifact"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys":{"get":{"summary":"List API keys","description":"List API keys for the console user's org. Returns prefixes only, never the secret.","operationId":"listKeys","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Keys for the org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyList"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an API key","description":"Create a new API key. The plaintext key is returned exactly once.","operationId":"createKey","security":[{"CookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"},"default":["bench:*"]}}}}}},"responses":{"201":{"description":"Key created (plaintext shown once)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreated"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/secret":{"get":{"summary":"Get the organization webhook signing secret","description":"Return the tenant-scoped webhook secret derived from the deployment master secret.","operationId":"getWebhookSecret","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Organization-scoped signing secret"},"503":{"description":"Webhook signing is not configured"}}}},"/v1/keys/{id}":{"delete":{"summary":"Revoke an API key","description":"Soft-revoke an API key (org-scoped).","operationId":"revokeKey","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Key revoked"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/credits":{"get":{"summary":"Get credit balance","description":"Return the current organization's prepaid credit balance and recent ledger entries.","operationId":"getCredits","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Credit balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalance"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/bootstrap":{"post":{"summary":"Bootstrap free-tier credits","description":"Idempotently grant the current organization its one-time Free Beta credits. The authenticated console session determines the organization.","operationId":"bootstrapCredits","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Credit balance after the idempotent bootstrap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalance"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The session user is not an active member of its claimed organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/packages":{"get":{"summary":"List credit packages","description":"Available prepaid credit packages plus the server-authoritative monetization capability. Checkout is disabled for 0.0.x validation releases.","operationId":"getCreditPackages","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Package list","content":{"application/json":{"schema":{"type":"object","properties":{"monetization":{"$ref":"#/components/schemas/MonetizationStatus"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/CreditPackage"}}},"required":["monetization","packages"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/usage":{"get":{"summary":"List organization usage","description":"Return the current organization's latest usage records with safe API-key and credit-ledger references.","operationId":"getBillingUsage","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Organization-scoped usage records","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/UsageEvent"}}},"required":["events"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/checkout":{"post":{"summary":"Create Stripe Checkout Session","description":"Start a top-up checkout flow only when MONETIZATION_MODE=paid and Stripe is fully configured. Returns a Stripe Checkout URL.","operationId":"createCheckoutSession","security":[{"CookieAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["package_id"],"properties":{"package_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Checkout URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Paid monetization is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Paid mode is enabled but Stripe is not fully configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/console/runs":{"post":{"summary":"Create a console run","description":"Create a lightweight smoke/custom run from the web console. This uses the console session cookie and reuses the existing queue/status path.","operationId":"createConsoleRun","security":[{"CookieAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","description":"Idempotency key for deduplication","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["policy","embodiment","task"],"properties":{"run_kind":{"type":"string","enum":["smoke","custom"],"default":"smoke"},"policy":{"type":"string"},"policy_uri":{"type":"string","format":"uri"},"embodiment":{"type":"string"},"task":{"type":"string"},"rollouts":{"type":"integer","default":20,"minimum":1,"maximum":10000},"seeds":{"type":"integer","default":2,"minimum":1,"maximum":100},"sim":{"type":"string"},"real_hw":{"type":"boolean","default":false},"edge_target":{"type":"string"},"webhook":{"type":"string","format":"uri"},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"202":{"description":"Run queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolloutCreated"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolloutCreated"}}}}}},"get":{"summary":"List console runs","description":"List runs for the console session's organization.","operationId":"listConsoleRuns","security":[{"CookieAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Run list","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/EvalRun"}},"limit":{"type":"integer"},"offset":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/console/runs/{id}":{"get":{"summary":"Get eval run detail","description":"Return one evaluation run for the console session's organization.","operationId":"getConsoleRun","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Run detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRun"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"ob_live_..."},"CookieAuth":{"type":"apiKey","in":"cookie","name":"ob_session","description":"Console session cookie issued by https://openbot.ai login."}},"schemas":{"ReleaseMetadata":{"type":"object","properties":{"api_contract":{"type":"string","const":"v1"},"products":{"type":"object","properties":{"data":{"type":"string","description":"Hosted Data product release."}},"required":["data"]},"migration_head":{"type":"string"},"processor_schema":{"type":"string"},"openapi_sha256":{"type":"string","nullable":true},"compatibility":{"type":"object","properties":{"openbot_sdk_min":{"type":"string"},"openbot_data_min":{"type":"string"}},"required":["openbot_sdk_min","openbot_data_min"]},"production_smoke":{"type":"object","properties":{"passed":{"type":"boolean"},"deployment_id":{"type":"string","nullable":true}},"required":["passed","deployment_id"]},"deployment":{"type":"object","properties":{"id":{"type":"string","nullable":true},"tag":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true}},"required":["id","tag","created_at"]}},"required":["api_contract","products","migration_head","processor_schema","openapi_sha256","compatibility","production_smoke","deployment"]},"HealthStatus":{"type":"object","properties":{"service":{"type":"string"},"status":{"type":"string","enum":["healthy","degraded"]},"timestamp":{"type":"number"},"checks":{"type":"object","additionalProperties":{"type":"string","enum":["ok","error"]}}},"required":["service","status","timestamp","checks"]},"ReadinessStatus":{"type":"object","properties":{"service":{"type":"string"},"status":{"type":"string","enum":["ready","not_ready"]},"timestamp":{"type":"number"},"checks":{"type":"object","properties":{"db":{"type":"string","enum":["ok","error"]},"kv":{"type":"string","enum":["ok","error"]},"datasets":{"type":"string","enum":["ok","error"]},"reports":{"type":"string","enum":["ok","error"]},"data_processor":{"type":"string","enum":["ok","error"]}},"required":["db","kv","datasets","reports","data_processor"],"additionalProperties":false}},"required":["service","status","timestamp","checks"]},"RolloutCreated":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued"]},"created_at":{"type":"integer"},"result_url":{"type":"string"}},"required":["id","status","created_at","result_url"]},"AsyncResourceCreated":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"]},"created_at":{"type":"integer"},"result_url":{"type":"string"}},"required":["id","status","created_at","result_url"]},"FailureClusters":{"type":"object","properties":{"run_id":{"type":"string"},"status":{"type":"string"},"clusters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subtask":{"type":"string"},"root_cause":{"type":"string"},"severity":{"type":"string"},"estimated_episodes":{"type":"integer"},"suggested_action":{"type":"string"}}}}},"required":["run_id","status","clusters"]},"Dataset":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"format":{"type":"string"},"embodiment":{"type":"string","nullable":true},"source_uri":{"type":"string","nullable":true},"size_bytes":{"type":"integer","nullable":true},"episode_count":{"type":"integer","nullable":true},"parent_id":{"type":"string","nullable":true},"version_tag":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":true},"created_at":{"type":"integer"},"updated_at":{"type":"integer"}},"required":["id","name","format","metadata","created_at","updated_at"]},"DataJobResult":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"result_dataset_id":{"type":"string"},"result_url":{"type":"string"}},"required":["id","status","result_dataset_id","result_url"]},"DataReviewOutput":{"type":"object","properties":{"id":{"type":"string"},"dataset_id":{"type":"string"},"job_id":{"type":"string"},"output_type":{"type":"string"},"status":{"type":"string","enum":["needs_review","approved","changes_requested","rejected"]},"summary":{"type":"string","nullable":true},"annotations":{"type":"object","additionalProperties":true},"checks":{"type":"object","additionalProperties":true},"artifact_url":{"type":"string","nullable":true},"created_at":{"type":"integer"},"updated_at":{"type":"integer"},"reviewed_at":{"type":"integer","nullable":true},"reviewer_id":{"type":"string","nullable":true},"revision_id":{"type":"string","nullable":true}},"required":["id","dataset_id","job_id","output_type","status","annotations","checks"]},"DataJob":{"type":"object","properties":{"id":{"type":"string"},"dataset_id":{"type":"string"},"job_type":{"type":"string","enum":["audit","preprocess","annotation","subtask_annotation"]},"status":{"type":"string"},"stage":{"type":"string","nullable":true},"stage_updated_at":{"type":"integer","nullable":true},"attempt_count":{"type":"integer"},"cancel_requested":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"object"}},"error":{"type":"object","nullable":true,"additionalProperties":true},"config":{"type":"object","additionalProperties":true},"metrics":{"type":"object","nullable":true,"additionalProperties":true},"artifact_url":{"type":"string","nullable":true},"review_output_id":{"type":"string","nullable":true},"queued_at":{"type":"integer"},"started_at":{"type":"integer","nullable":true},"finished_at":{"type":"integer","nullable":true},"error_message":{"type":"string","nullable":true},"result_url":{"type":"string"},"review_output":{"anyOf":[{"$ref":"#/components/schemas/DataReviewOutput"},{"type":"null"}]}},"required":["id","dataset_id","job_type","status","config","queued_at"]},"DatasetProfile":{"type":"object","properties":{"dataset":{"$ref":"#/components/schemas/Dataset"},"profile":{"type":"object","properties":{"source_profile":{"type":"object","nullable":true,"additionalProperties":true},"loop_signal_coverage":{"type":"object","additionalProperties":true},"latest_audit":{"$ref":"#/components/schemas/DataReviewOutput"},"recent_jobs":{"type":"array","items":{"$ref":"#/components/schemas/DataJob"}},"review_outputs":{"type":"array","items":{"$ref":"#/components/schemas/DataReviewOutput"}}}}},"required":["dataset","profile"]},"ExportResult":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"artifact_url":{"type":"string"},"result_url":{"type":"string"}},"required":["id","status","artifact_url","result_url"]},"KeyList":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string","description":"Display-safe prefix, e.g. ob_live_abc12"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"integer"},"last_used_at":{"type":"integer","nullable":true},"revoked_at":{"type":"integer","nullable":true},"expires_at":{"type":"integer","nullable":true}}}}},"required":["keys"]},"KeyCreated":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"key":{"type":"string","description":"Full plaintext key — shown only here, never again."},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"integer"},"last_used_at":{"type":"integer","nullable":true},"revoked_at":{"type":"integer","nullable":true},"expires_at":{"type":"integer","nullable":true}},"required":["id","name","prefix","key","scopes","created_at","last_used_at","revoked_at","expires_at"]},"CreditBalance":{"type":"object","properties":{"org_id":{"type":"string"},"plan":{"type":"string"},"credits_balance":{"type":"integer","description":"Remaining balance in milli-credits."},"free_tier_used":{"type":"integer"},"ledger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"change_milli":{"type":"integer"},"balance_after":{"type":"integer"},"reason":{"type":"string"},"reference_id":{"type":"string","nullable":true},"created_at":{"type":"integer"}}}}},"required":["org_id","plan","credits_balance","free_tier_used","ledger"]},"CreditPackage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price_cents":{"type":"integer"},"credits_milli":{"type":"integer"}},"required":["id","name","price_cents","credits_milli"]},"MonetizationStatus":{"type":"object","properties":{"mode":{"type":"string","enum":["validation","paid"]},"checkout_enabled":{"type":"boolean"},"checkout_disabled_reason":{"type":["string","null"],"enum":["validation_mode","stripe_not_configured",null]}},"required":["mode","checkout_enabled","checkout_disabled_reason"]},"UsageEvent":{"type":"object","properties":{"id":{"type":"string"},"api_key_id":{"type":"string","nullable":true},"api_key_prefix":{"type":"string","nullable":true},"resource_type":{"type":"string"},"resource_id":{"type":"string"},"quantity":{"type":"integer"},"unit":{"type":"string"},"cost_cents":{"type":"integer"},"ledger_entry_id":{"type":"string","nullable":true},"ledger_change_milli":{"type":"integer","nullable":true},"balance_after":{"type":"integer","nullable":true},"created_at":{"type":"integer"}},"required":["id","resource_type","resource_id","quantity","unit","cost_cents","created_at"]},"EvalRun":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"policy":{"type":"string"},"policy_uri":{"type":"string","nullable":true},"embodiment":{"type":"string"},"task":{"type":"string"},"rollouts":{"type":"integer"},"seeds":{"type":"integer"},"sim":{"type":"string","nullable":true},"real_hw":{"type":"boolean"},"edge_target":{"type":"string","nullable":true},"created_at":{"type":"integer"},"started_at":{"type":"integer","nullable":true},"finished_at":{"type":"integer","nullable":true},"error_message":{"type":"string","nullable":true},"metrics":{"type":"object","nullable":true},"report_url":{"type":"string","nullable":true},"failures_url":{"type":"string","nullable":true}},"required":["id","status","policy","embodiment","task","rollouts","seeds","real_hw","created_at"]},"Rollout":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed","cancelled"]},"created_at":{"type":"integer"},"started_at":{"type":"integer","nullable":true},"finished_at":{"type":"integer","nullable":true},"metrics":{"type":"object","nullable":true},"report_url":{"type":"string","nullable":true},"failures_url":{"type":"string","nullable":true}},"required":["id","status","created_at"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["validation_error","authentication_error","authorization_error","not_found_error","conflict_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string","nullable":true},"details":{"description":"Additional structured detail (e.g. zod errors)."}},"required":["type","code","message"]}},"required":["error"]}}}}