{"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, and the configured private R2 buckets.","operationId":"readiness","responses":{"200":{"description":"Platform API dependencies 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 deterministic mock failure clusters for integration testing.","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/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"},"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","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"]}},"required":["db","kv","datasets","reports"],"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"]},"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"]},"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"]}}}}