{"openapi":"3.1.0","info":{"title":"OpenBot API","version":"v1","description":"API-key authenticated OpenBot platform control plane and released API operations.","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/ReleaseManifest"}}}}}}},"/v1/catalog/models":{"get":{"summary":"List published model catalog entries","description":"Returns the canonical deduplicated view of published current revisions produced by human review or explicitly approved source automation. Each entry includes publication_readiness so consumers can distinguish decision-ready records from historical records that still need verification without losing public visibility. Duplicate legacy slugs remain available through their detail routes for link compatibility.","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"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","description":"Opaque generation-bound keyset next_cursor from the previous page; only valid with the original filters and sort.","schema":{"type":"string"}}],"responses":{"200":{"description":"Bounded page of published model entries with readiness and next_cursor metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPublicList"}}}},"400":{"description":"Invalid pagination or filter parameters"},"410":{"description":"The cursor generation is outside the seven-day retention window"}}}},"/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, decision-readiness metadata, and audits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPublicEntity"}}}},"404":{"description":"Not found"}}}},"/v1/catalog/datasets":{"get":{"summary":"List published dataset catalog entries","description":"Returns the canonical deduplicated view of published current revisions produced by human review or explicitly approved source automation. Each entry includes publication_readiness so consumers can distinguish decision-ready records from historical records that still need verification without losing public visibility. Duplicate legacy slugs remain available through their detail routes for link compatibility.","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"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","description":"Opaque generation-bound keyset next_cursor from the previous page; only valid with the original filters and sort.","schema":{"type":"string"}}],"responses":{"200":{"description":"Bounded page of published dataset entries with readiness and next_cursor metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPublicList"}}}},"400":{"description":"Invalid pagination or filter parameters"},"410":{"description":"The cursor generation is outside the seven-day retention window"}}}},"/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, decision-readiness metadata, and audits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPublicEntity"}}}},"404":{"description":"Not found"}}}},"/v1/catalog/explore":{"get":{"summary":"Search and filter published Catalog records","description":"Returns one server-composed, generation-stable keyset page across datasets and models. Search, facets, and sorting run against the indexed public projection; clients never need to download the complete Catalog index.","operationId":"exploreCatalog","parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":240}},{"name":"kind","in":"query","schema":{"type":"string","enum":["all","dataset","model"],"default":"all"}},{"name":"access","in":"query","schema":{"type":"string","enum":["all","open","gated","restricted"],"default":"all"}},{"name":"focus","in":"query","schema":{"type":"string","maxLength":160}},{"name":"signal","in":"query","schema":{"type":"string"}},{"name":"readiness","in":"query","schema":{"type":"string","enum":["all","strong","scored","unscored"],"default":"all"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["relevance","readiness","newest","downloads","name"],"default":"relevance"}},{"name":"release","in":"query","description":"Set to 1 to return only records with a source-backed release date.","schema":{"type":"string","enum":["1"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":48,"default":24}},{"name":"cursor","in":"query","description":"Opaque generation- and query-bound keyset next_cursor from the previous page. Offset pagination is not supported.","schema":{"type":"string"}}],"responses":{"200":{"description":"Bounded Catalog Explorer page; the first page also includes compact counts and facets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogExplorerList"}}}},"400":{"description":"Invalid filters, sort, or cursor"},"410":{"description":"The cursor generation is outside the seven-day retention window"}}}},"/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","needs_changes","ignored","rejected","duplicate"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","description":"Opaque query- and sort-bound keyset next_cursor from the previous page. Offset pagination is not supported.","schema":{"type":"string"}}],"responses":{"200":{"description":"Review candidates"},"400":{"description":"Invalid cursor or pagination parameters"},"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":{"get":{"summary":"List Catalog discovery sources","operationId":"listCatalogSources","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Configured private Catalog sources"},"403":{"description":"Catalog admin required"}}}},"/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, conflict groups, and a stable claims_etag 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}":{"patch":{"summary":"Record or reopen a Catalog review decision","description":"Moves a candidate between needs_review, needs_changes, ignored, rejected, and duplicate review states using optimistic content_hash concurrency.","operationId":"reviewCatalogCandidate","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action","content_hash"],"properties":{"action":{"type":"string","enum":["reject","duplicate","needs_changes","ignore","restore"]},"content_hash":{"type":"string","minLength":32},"note":{"type":"string","maxLength":1000},"duplicate_of":{"type":"string"}}}}}},"responses":{"200":{"description":"Candidate review state updated"},"409":{"description":"Candidate changed or is not reviewable"},"429":{"description":"Console mutation rate limit exceeded"},"503":{"description":"Atomic rate-limit service unavailable"}}}},"/v1/catalog/console/candidates/{id}/content":{"patch":{"summary":"Edit a reviewable Catalog candidate","operationId":"editCatalogCandidate","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Candidate content updated with a new content_hash"},"409":{"description":"Candidate changed or is not reviewable"},"429":{"description":"Console mutation rate limit exceeded"},"503":{"description":"Atomic rate-limit service unavailable"}}}},"/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 claims_etag-bound structured decisions and a 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","claims_etag","decisions"],"properties":{"acknowledged":{"const":true},"note":{"type":"string","minLength":1,"maxLength":1000},"claims_etag":{"type":"string","pattern":"^[a-f0-9]{64}$"},"decisions":{"type":"array","maxItems":200,"items":{"type":"object","required":["fact_key","claim_id"],"properties":{"fact_key":{"type":"string","minLength":1,"maxLength":240},"claim_id":{"type":"string","minLength":1,"maxLength":240}}}}}}}}}}},"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/evidence-import":{"post":{"summary":"Import source-backed openbot-data evidence","description":"Attaches catalog-evidence-v1 to a reviewable candidate or creates a private review candidate. It never publishes directly.","operationId":"importCatalogEvidence","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Evidence attached to an existing candidate"},"201":{"description":"Evidence-backed candidate created"},"409":{"description":"Candidate changed or already exists"},"429":{"description":"Console mutation rate limit exceeded"},"503":{"description":"Atomic rate-limit service unavailable"}}}},"/v1/catalog/console/media-candidates":{"post":{"summary":"Propose reviewed media for a published Catalog entity","description":"Creates a private metadata-change candidate; the public revision is unchanged until publication review.","operationId":"createCatalogMediaCandidate","security":[{"CookieAuth":[]}],"responses":{"201":{"description":"Media revision queued for review"},"409":{"description":"Identical review candidate exists"},"429":{"description":"Console mutation rate limit exceeded"},"503":{"description":"Atomic rate-limit service unavailable"}}}},"/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/catalog/console/discover":{"post":{"summary":"Run bounded Catalog discovery","operationId":"discoverCatalogCandidates","security":[{"CookieAuth":[]}],"responses":{"202":{"description":"Bounded discovery run completed or queued source work"},"429":{"description":"Console mutation rate limit exceeded"},"503":{"description":"Atomic rate-limit service unavailable"}}}},"/v1/catalog/console/entities/{id}/verify":{"post":{"summary":"Verify a published Catalog entity","operationId":"verifyCatalogEntity","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification result"},"404":{"description":"Catalog entity not found"},"429":{"description":"Console mutation rate limit exceeded"},"503":{"description":"Atomic rate-limit service unavailable"}}}},"/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","minLength":1,"maxLength":100,"description":"Case-insensitively unique among active keys in the workspace."},"scopes":{"type":"array","items":{"type":"string","enum":["api:invoke"]},"default":["api:invoke"]},"expires_in_days":{"type":["integer","null"],"enum":[null,30,90,365],"default":null,"description":"Optional lifetime. Null creates a key with no expiry."}}}}}},"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"}}}},"403":{"description":"Owner or admin role required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Active key name already exists or active-key limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"API key issuance is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me":{"get":{"summary":"Inspect the current API-key context","description":"Validate a Bearer key and return its user, organization, explicit scopes, expiry, and effective rate limit without invoking a product operation.","operationId":"getApiKeyContext","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Authenticated API-key context","content":{"application/json":{"schema":{"type":"object","required":["user_id","organization_id","api_key","access_manifest_version"],"properties":{"user_id":{"type":"string"},"organization_id":{"type":"string"},"access_manifest_version":{"type":"string"},"api_key":{"type":"object","required":["id","scopes","rate_limit_per_minute","expires_at"],"properties":{"id":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rate_limit_per_minute":{"type":"integer"},"expires_at":{"type":["integer","null"]}}}}}}}},"401":{"description":"Missing, invalid, expired, or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/access/manifest":{"get":{"summary":"Get the released API access manifest","description":"Return the only scopes that may be assigned to a new key and the released operation metadata used by the Console.","operationId":"getAccessManifest","security":[{"CookieAuth":[]}],"responses":{"200":{"description":"Released 0.1.0 key-scope and operation contract","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys/{id}":{"delete":{"summary":"Revoke an API key","description":"Soft-revoke an active, unexpired API key (org-scoped).","operationId":"revokeKey","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Key revoked"},"403":{"description":"Owner or admin role required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Key not found or inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys/{id}/rotate":{"post":{"summary":"Rotate an API key","description":"Atomically revoke an active key and create a replacement. The new plaintext secret is returned exactly once.","operationId":"rotateKey","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Replacement key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreated"}}}},"403":{"description":"Owner or admin role required"},"404":{"description":"Key not found, revoked, or expired"},"409":{"description":"Concurrent rotation conflict"},"503":{"description":"API key issuance is temporarily unavailable"}}}},"/v1/keys/{id}/record":{"delete":{"summary":"Delete an inactive API key record","description":"Remove a revoked or expired key from Console listings while retaining referential and audit history. Active keys must be revoked first.","operationId":"deleteRevokedKeyRecord","security":[{"CookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Inactive key record removed from Console listings"},"403":{"description":"Owner or admin role required"},"404":{"description":"Key not found"},"409":{"description":"Key is active or was already deleted"}}}},"/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 payment gate. Preview accepts only allowlisted Stripe test canaries; production accepts only explicitly activated Stripe live canaries or the public audience.","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":[]}],"parameters":[{"name":"from","in":"query","schema":{"type":"integer","minimum":0}},{"name":"to","in":"query","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Organization-scoped usage records","content":{"application/json":{"schema":{"type":"object","properties":{"breakdown":{"type":"array","description":"API and unit totals for the full selected time range, independent of pagination.","items":{"type":"object","properties":{"operation_id":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":["string","null"]},"unit":{"type":"string"},"count":{"type":"integer"},"quantity":{"type":"number"},"cost_milli":{"type":"integer"}},"required":["operation_id","name","slug","unit","count","quantity","cost_milli"]}},"totals":{"type":"object","properties":{"event_count":{"type":"integer"},"quantity":{"type":"integer"},"cost_milli":{"type":"integer"},"first_event_at":{"type":["integer","null"]},"last_event_at":{"type":["integer","null"]}},"required":["event_count","quantity","cost_milli","first_event_at","last_event_at"]},"events":{"type":"array","items":{"$ref":"#/components/schemas/UsageEvent"}},"page":{"type":"object"}},"required":["totals","breakdown","events","page"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/checkout":{"post":{"summary":"Create Stripe Checkout Session","description":"Start an idempotent Stripe Checkout. Mixed environments fail closed: preview requires Stripe test plus an allowlisted canary, while production requires Stripe live plus an internal canary or public audience.","operationId":"createCheckoutSession","security":[{"CookieAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"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":{"purchase_id":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"},"idempotent":{"type":"boolean"}},"required":["purchase_id","status","url","idempotent"]}}}},"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/flow/templates":{"get":{"summary":"List available OpenBot Flow templates","description":"Returns versioned Flow templates and whether each is enabled for the authenticated workspace.","operationId":"listFlowTemplates","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Versioned Flow template list"}}}},"/v1/flow-runs":{"post":{"summary":"Create an OpenBot Flow Run","description":"Creates a gated asynchronous MCAP inspection or training-format conversion run from an immutable HTTPS source. MCAP inspection returns sealed evidence and is metered in input GiB; conversions return a sealed LeRobot v3, RLDS/TFDS, or robomimic HDF5 artifact and are metered in decimal input MB. RLDS is routed to an isolated TensorFlow worker.","operationId":"createFlowRun","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRunCreateRequest"}}}},"responses":{"200":{"description":"Existing idempotent Flow Run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRun"}}}},"202":{"description":"Flow Run admitted and queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRun"}}}},"402":{"description":"Insufficient available credits"},"404":{"description":"Template is not enabled for this workspace"},"409":{"description":"Idempotency key conflict"},"429":{"description":"Workspace concurrency limit exceeded"},"503":{"description":"Flow runtime, Queue, artifact store, or metering is unavailable"}}}},"/v1/flow-runs/{id}":{"get":{"summary":"Get a Flow Run","operationId":"getFlowRun","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tenant-scoped Flow Run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRun"}}}},"404":{"description":"Flow Run not found"}}}},"/v1/flow-runs/{id}/cancel":{"post":{"summary":"Cancel a Flow Run","description":"Cancellation is idempotent and never bills an incomplete Flow operation.","operationId":"cancelFlowRun","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Cancellation accepted or run already terminal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRun"}}}},"404":{"description":"Flow Run not found"}}}},"/v1/flow-runs/{id}/artifacts":{"get":{"summary":"Get sealed Flow Run artifacts","description":"Returns the verified result manifest plus a short-lived private download URL for the inspection evidence or converted dataset.","operationId":"getFlowRunArtifacts","security":[{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Sealed manifest and short-lived artifact download capability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowRunArtifacts"}}}},"404":{"description":"Flow Run not found"},"409":{"description":"Flow Run is not completed"},"503":{"description":"Sealed artifact is unavailable"}}}},"/v1/invoke/test-echo":{"post":{"summary":"Echo Test API","description":"Invoke Echo Test API through OpenBot billing.","operationId":"configured.test-echo.invoke","security":[{"BearerAuth":[]}],"x-openbot-metered":true,"x-openbot-meter-unit":"request","x-openbot-unit-price-milli":10,"x-openbot-timeout-ms":30000,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"responses":{"200":{"description":"Upstream JSON response; credits finalized from the configured meter."},"400":{"description":"Request or meter validation failed."},"402":{"description":"Insufficient credits."},"409":{"description":"Idempotency conflict or invocation already in progress."},"502":{"description":"The configured upstream API failed."},"503":{"description":"Settlement or a required Platform dependency is unavailable."}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"ob_live_..."},"CookieAuth":{"type":"apiKey","in":"cookie","name":"ob_session","description":"Private BFF credential accepted only over the openbot-api.internal service binding. Browsers receive a host-only Platform cookie and never send it to the public API origin."}},"schemas":{"CatalogPublicationReadiness":{"type":"object","additionalProperties":false,"properties":{"state":{"type":"string","enum":["decision_ready","needs_verification"],"description":"decision_ready satisfies the current publication quality gate; needs_verification remains public but has unresolved quality issues."},"issues":{"type":"array","items":{"type":"string"},"description":"Stable machine-readable quality issue codes; empty when state is decision_ready."}},"required":["state","issues"]},"CatalogPublicEntity":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","const":"published"},"revision":{"type":"integer"},"content":{"type":"object"},"evidence":{},"published_at":{"type":["integer","null"]},"last_verified_at":{"type":["integer","null"]},"next_verify_at":{"type":["integer","null"]},"publication_readiness":{"$ref":"#/components/schemas/CatalogPublicationReadiness"}},"required":["id","type","slug","status","revision","content","evidence","published_at","last_verified_at","next_verify_at","publication_readiness"]},"CatalogPublicList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogPublicEntity"}},"meta":{"type":"object","properties":{"generation":{"type":"integer"},"generated_at":{"type":"integer"},"count":{"type":"integer"},"limit":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]},"etag":{"type":["string","null"],"description":"Generation/query validator for the first page; continuation cursor pages return null."}},"required":["generation","generated_at","count","limit","has_more","next_cursor","etag"]}},"required":["data","meta"]},"CatalogExplorerList":{"type":"object","properties":{"data":{"type":"array","maxItems":48,"items":{"$ref":"#/components/schemas/CatalogPublicEntity"}},"summary":{"type":"object","description":"Compact global and cross-filtered counts/facets returned on the first page.","properties":{"total":{"type":"integer"},"counts":{"type":"object"},"facets":{"type":"object"},"has_popularity":{"type":"boolean"}},"required":["total","counts","facets","has_popularity"]},"meta":{"$ref":"#/components/schemas/CatalogPublicList/properties/meta"}},"required":["data","meta"]},"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"]},"ReleaseManifest":{"allOf":[{"$ref":"#/components/schemas/ReleaseMetadata"},{"type":"object","properties":{"product_version":{"type":"string","const":"0.2.0"},"release_status":{"type":"string","enum":["candidate","verified"]},"git_sha":{"type":["string","null"]},"schema_revision":{"type":"string","const":"0056"},"openapi_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"access_manifest_version":{"type":"string"},"website_deployment_id":{"type":["string","null"]},"acceptance":{"type":"object","properties":{"preview_run_id":{"type":["string","null"]},"production_run_id":{"type":["string","null"]},"live_payment_run_id":{"type":["string","null"]},"promotion_run_id":{"type":["string","null"]},"evidence_sha256":{"type":"object","properties":{"live_payment":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"}},"required":["live_payment"]}},"required":["preview_run_id","production_run_id","live_payment_run_id","promotion_run_id","evidence_sha256"]},"feature_gates":{"type":"object","properties":{"registration_mode":{"type":["string","null"]},"monetization_mode":{"type":"string"},"stripe_environment":{"type":["string","null"]},"payment_audience":{"type":"string"},"turnstile_verified":{"type":"boolean"},"metering_fixture_enabled":{"type":"boolean"},"training_conversion_availability":{"type":"string","enum":["disabled","internal_canary","public"]},"training_conversion_rlds_availability":{"type":"string","enum":["disabled","internal_canary","public"]},"mcap_inspection_availability":{"type":"string","enum":["disabled","internal_canary","public"]}},"required":["registration_mode","monetization_mode","stripe_environment","payment_audience","turnstile_verified","metering_fixture_enabled","training_conversion_availability","training_conversion_rlds_availability","mcap_inspection_availability"]},"smoke_status":{"type":"string","enum":["pending","passed","failed"]}},"required":["product_version","release_status","git_sha","schema_revision","openapi_sha256","access_manifest_version","website_deployment_id","acceptance","feature_gates","smoke_status"]}]},"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"]},"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},"active":{"type":"boolean"},"rate_limit":{"type":"integer","description":"Effective requests per minute."}}}}},"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},"active":{"type":"boolean"},"rate_limit":{"type":"integer","description":"Effective requests per minute."}},"required":["id","name","prefix","key","scopes","created_at","last_used_at","revoked_at","expires_at","active","rate_limit"]},"CreditBalance":{"type":"object","properties":{"org_id":{"type":"string"},"plan":{"type":"string"},"credits_balance":{"type":"integer","description":"Settled balance compatibility field in milli-credits."},"settled_balance":{"type":"integer"},"active_reserved":{"type":"integer"},"available_credits":{"type":"integer"},"debt":{"type":"integer"},"billing_risk_status":{"type":"string","enum":["normal","frozen","manual_review"]},"welcome_credit_claimed":{"type":"boolean"},"free_tier_used":{"type":"integer","description":"Whether the welcome credit was claimed; not whether it was spent."},"totals":{"type":"object"},"lots":{"type":"array","items":{"type":"object"}},"purchases":{"type":"array","items":{"type":"object"}},"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","settled_balance","active_reserved","available_credits","debt","billing_risk_status","welcome_credit_claimed","free_tier_used","totals","lots","ledger","purchases"]},"CreditPackage":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"price_cents":{"type":"integer"},"credits_milli":{"type":"integer"},"currency":{"type":"string"}},"required":["id","name","price_cents","credits_milli","currency"]},"MonetizationStatus":{"type":"object","properties":{"mode":{"type":"string","enum":["validation","paid"]},"stripe_environment":{"type":["string","null"],"enum":["test","live",null]},"payment_audience":{"type":"string","enum":["disabled","internal_canary","public"]},"checkout_enabled":{"type":"boolean"},"checkout_disabled_reason":{"type":["string","null"],"enum":["validation_mode","environment_mismatch","stripe_environment_invalid","payment_audience_disabled","stripe_not_configured","canary_not_allowed",null]}},"required":["mode","stripe_environment","payment_audience","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"},"cost_milli":{"type":["integer","null"]},"operation_id":{"type":["string","null"]},"pricing_version":{"type":["string","null"]},"reservation_id":{"type":["string","null"]},"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"]},"TrainingConversionCreateRequest":{"type":"object","additionalProperties":false,"required":["template_id","source","config"],"properties":{"template_id":{"type":"string","enum":["mcap-to-lerobot-v3","mcap-to-rlds-tfds","mcap-to-robomimic-hdf5"]},"source":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","url","sha256","size_bytes"],"properties":{"type":{"const":"mcap_url"},"url":{"type":"string","format":"uri","description":"Signed HTTPS canonical MCAP object under an approved storage prefix."},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1,"maximum":1000000000000}}},{"type":"object","additionalProperties":false,"required":["type","url","sha256","size_bytes","bundle_format","members"],"properties":{"type":{"const":"mcap_bundle_url"},"url":{"type":"string","format":"uri","description":"Signed HTTPS tar containing the declared canonical MCAP episodes."},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1,"maximum":1000000000000},"bundle_format":{"const":"tar"},"members":{"type":"array","minItems":2,"maxItems":64,"description":"Lexically ordered MCAP members; each member becomes one target episode.","items":{"type":"object","additionalProperties":false,"required":["path","sha256","size_bytes"],"properties":{"path":{"type":"string","minLength":6,"maxLength":512,"pattern":"^(?:[A-Za-z0-9_-][A-Za-z0-9._-]*/)*[A-Za-z0-9_-][A-Za-z0-9._-]*\\.[mM][cC][aA][pP]$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1,"maximum":1000000000000}}}}}}]},"config":{"type":"object","additionalProperties":false,"required":["dataset_id","robot_type","task","target_fps","signal_mappings"],"properties":{"dataset_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,95}/[A-Za-z0-9][A-Za-z0-9._-]{0,95}$"},"robot_type":{"type":"string","minLength":1,"maxLength":160},"task":{"type":"string","minLength":1,"maxLength":1000},"target_fps":{"type":"integer","minimum":1,"maximum":240},"signal_mappings":{"type":"array","minItems":2,"maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["source_topic","target_key","role","alignment","required"],"properties":{"source_topic":{"type":"string"},"source_field":{"type":"string"},"target_key":{"type":"string"},"role":{"type":"string","enum":["observation","action","image"]},"alignment":{"type":"string","enum":["exact","nearest","linear"]},"component_names":{"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}}}},"options":{"type":"object","additionalProperties":false,"properties":{"compression":{"type":"string","enum":["gzip","lzf","none"]},"environment_name":{"type":"string","minLength":1,"maxLength":160},"environment_type":{"type":"integer","enum":[1,2,3],"description":"robomimic EnvType: 1=robosuite, 2=Gym, 3=IG-MOMART."},"parallel_encoding":{"type":"boolean"},"terminal_on_last":{"type":"boolean"}}}}}},"allOf":[{"if":{"properties":{"template_id":{"const":"mcap-to-lerobot-v3"}}},"then":{"properties":{"config":{"properties":{"options":{"type":"object","additionalProperties":false,"properties":{"parallel_encoding":{"type":"boolean"}}}}}}}},{"if":{"properties":{"template_id":{"const":"mcap-to-rlds-tfds"}}},"then":{"properties":{"config":{"required":["options"],"properties":{"options":{"type":"object","additionalProperties":false,"required":["terminal_on_last"],"properties":{"terminal_on_last":{"type":"boolean"}}}}}}}},{"if":{"properties":{"template_id":{"const":"mcap-to-robomimic-hdf5"}}},"then":{"properties":{"config":{"required":["options"],"properties":{"options":{"type":"object","additionalProperties":false,"required":["environment_name","environment_type"],"properties":{"compression":{"type":"string","enum":["gzip","lzf","none"]},"environment_name":{"type":"string","minLength":1,"maxLength":160},"environment_type":{"type":"integer","enum":[1,2,3],"description":"robomimic EnvType: 1=robosuite, 2=Gym, 3=IG-MOMART."}}}}}}}}]},"McapInspectionCreateRequest":{"type":"object","additionalProperties":false,"required":["template_id","source"],"properties":{"template_id":{"const":"mcap-inspection-v1"},"source":{"oneOf":[{"type":"object","additionalProperties":false,"required":["type","url","sha256","size_bytes"],"properties":{"type":{"const":"mcap_url"},"url":{"type":"string","format":"uri","description":"Signed immutable HTTPS MCAP object under an approved storage prefix."},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1,"maximum":1000000000000}}},{"type":"object","additionalProperties":false,"required":["type","url","sha256","size_bytes","bundle_format","members"],"properties":{"type":{"const":"mcap_bundle_url"},"url":{"type":"string","format":"uri","description":"Signed immutable tar whose declared MCAP members are inspected independently."},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1,"maximum":1000000000000},"bundle_format":{"const":"tar"},"members":{"type":"array","minItems":2,"maxItems":64,"description":"Lexically ordered MCAP members with immutable size and digest identities.","items":{"type":"object","additionalProperties":false,"required":["path","sha256","size_bytes"],"properties":{"path":{"type":"string","minLength":6,"maxLength":512,"pattern":"^(?:[A-Za-z0-9_-][A-Za-z0-9._-]*/)*[A-Za-z0-9_-][A-Za-z0-9._-]*\\.[mM][cC][aA][pP]$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1,"maximum":1000000000000}}}}}}]},"config":{"type":"object","additionalProperties":false,"properties":{"retention_days":{"type":"integer","minimum":1,"maximum":30,"default":7}}}}},"FlowRunCreateRequest":{"oneOf":[{"$ref":"#/components/schemas/TrainingConversionCreateRequest"},{"$ref":"#/components/schemas/McapInspectionCreateRequest"}]},"FlowRun":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"flow.run"},"template":{"type":"object"},"operation_id":{"type":"string","enum":["training.format_conversion.create","mcap.inspection.create"]},"status":{"type":"string","enum":["queued","running","cancelling","finalizing","completed","failed","cancelled"]},"source":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["mcap_url","mcap_bundle_url"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1,"maximum":1000000000000},"episode_count":{"type":"integer","minimum":1,"maximum":64}},"required":["type","sha256","size_bytes","episode_count"]},"progress":{"type":"object"},"metering":{"type":"object"},"execution":{"type":["object","null"],"additionalProperties":false,"properties":{"service_version":{"type":"string"},"operation_version":{"type":"string"},"image_digest":{"type":["string","null"],"pattern":"^sha256:[a-f0-9]{64}$"}},"required":["service_version","operation_version","image_digest"],"description":"Validated Flow service identity from the terminal event. Internal worker and provider identifiers are not exposed."},"artifacts_url":{"type":["string","null"],"format":"uri"},"retention":{"type":"object","additionalProperties":false,"properties":{"delete_after":{"type":["integer","null"]},"deleted_at":{"type":["integer","null"]},"control_payloads":{"type":"object","additionalProperties":false,"description":"Thirty-day terminal control-body retention. Deleted payloads are compliance tombstones, not retryable storage failures.","properties":{"status":{"type":"string","enum":["active","retained","deleted"]},"delete_after":{"type":["integer","null"]},"deleted_at":{"type":["integer","null"]}},"required":["status","delete_after","deleted_at"]}},"required":["delete_after","deleted_at","control_payloads"]},"error":{"type":["object","null"]},"cancel_requested_at":{"type":["integer","null"]},"queued_at":{"type":"integer"},"started_at":{"type":["integer","null"]},"finished_at":{"type":["integer","null"]},"created_at":{"type":"integer"},"idempotent":{"type":"boolean"}},"required":["id","object","template","operation_id","status","source","progress","metering","execution","retention","artifacts_url","error","queued_at","started_at","finished_at","created_at"]},"FlowRunArtifacts":{"type":"object","properties":{"object":{"const":"flow.run.artifacts"},"run_id":{"type":"string"},"manifest":{"type":"object"},"data_artifact":{"type":"object","properties":{"object_key":{"type":"string"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":1},"media_type":{"const":"application/x-tar"},"download_url":{"type":"string","format":"uri"},"download_expires_at":{"type":"string","format":"date-time"}},"required":["object_key","sha256","size_bytes","media_type","download_url","download_expires_at"]}},"required":["object","run_id","manifest","data_artifact"]},"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)."},"retryable":{"type":"boolean"}},"required":["type","code","message"]}},"required":["error"]}}}}