{"openapi":"3.1.0","info":{"title":"SeaOtter API","description":"SeaOtter — multimodal adversarial work-evaluation platform.","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health":{"get":{"tags":["health"],"summary":"Health V1","operationId":"health_v1_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/version":{"get":{"tags":["health"],"summary":"Version","description":"Return API version and build info.","operationId":"version_api_v1_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/firebase/session":{"post":{"tags":["auth"],"summary":"Firebase Session","description":"Verify a Firebase ID token and return a SeaOtter session JWT.","operationId":"firebase_session_api_v1_auth_firebase_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirebaseSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Firebase Session Api V1 Auth Firebase Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/session":{"get":{"tags":["auth"],"summary":"Session","description":"Return the verified SeaOtter user/tenant mapping for a bearer token.","operationId":"session_api_v1_auth_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Session Api V1 Auth Session Get"}}}}}},"post":{"tags":["auth"],"summary":"Firebase Session Compat","description":"Compatibility exchange for clients that still POST to /auth/session.","operationId":"firebase_session_compat_api_v1_auth_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirebaseSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Firebase Session Compat Api V1 Auth Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/local-dev/session":{"post":{"tags":["auth"],"summary":"Local Dev Session","description":"Seed and return a visibly named full-access account for local workers.","operationId":"local_dev_session_api_v1_auth_local_dev_session_post","parameters":[{"name":"x-seaotter-dev-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Seaotter-Dev-Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LocalDevSessionRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Local Dev Session Api V1 Auth Local Dev Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/local-dev-token":{"post":{"tags":["auth"],"summary":"Local Dev Token","description":"Mint a loopback-only local development SeaOtter session token.\n\nThis is intentionally gated by environment and request origin. The desktop\nand web dev clients use it to prove the backend is really present instead of\nstoring a hardcoded bearer string that later fails against authenticated\nproduct APIs.","operationId":"local_dev_token_api_v1_auth_local_dev_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Local Dev Token Api V1 Auth Local Dev Token Post"}}}}}}},"/api/v1/kill-switch/health":{"get":{"tags":["kill-switch"],"summary":"Kill Switch Health","description":"UptimeRobot-monitored endpoint. HTTP 503 when the kill-switch is degraded.","operationId":"kill_switch_health_api_v1_kill_switch_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/events":{"post":{"tags":["events"],"summary":"Ingest Event","description":"Accept an analytics event from the frontend.\n\nPublic endpoint — no auth required.  Rate limited to 100 requests\nper minute per IP via the EndpointRateLimiterMiddleware configured\nin main.py.\n\nReturns 202 Accepted immediately; persistence is best-effort.","operationId":"ingest_event_api_v1_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/event":{"post":{"tags":["events"],"summary":"Ingest Event Legacy","description":"Accept analytics events via sendBeacon (raw JSON body).\n\nsendBeacon posts with Content-Type: text/plain, so we parse\nthe body manually rather than relying on Pydantic.","operationId":"ingest_event_legacy_api_v1_analytics_event_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/analytics/registry":{"get":{"tags":["analytics"],"summary":"Get Registry","operationId":"get_registry_api_v1_analytics_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Registry Api V1 Analytics Registry Get"}}}}}}},"/api/v1/analytics/telemetry-registry":{"get":{"tags":["analytics"],"summary":"Get Telemetry Registry","operationId":"get_telemetry_registry_api_v1_analytics_telemetry_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Telemetry Registry Api V1 Analytics Telemetry Registry Get"}}}}}}},"/api/v1/analytics/consent":{"put":{"tags":["analytics"],"summary":"Update Telemetry Consent","operationId":"update_telemetry_consent_api_v1_analytics_consent_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryConsentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Update Telemetry Consent Api V1 Analytics Consent Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/consents":{"post":{"tags":["analytics"],"summary":"Record Product Telemetry Consent","operationId":"record_product_telemetry_consent_api_v1_analytics_consents_post","parameters":[{"name":"x-user-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryConsentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Record Product Telemetry Consent Api V1 Analytics Consents Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/events":{"post":{"tags":["analytics"],"summary":"Ingest Telemetry Event","operationId":"ingest_telemetry_event_api_v1_analytics_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryEventRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ingest Telemetry Event Api V1 Analytics Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/telemetry-event":{"post":{"tags":["analytics"],"summary":"Ingest Product Telemetry Event","operationId":"ingest_product_telemetry_event_api_v1_analytics_telemetry_event_post","parameters":[{"name":"x-user-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryEventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Product Telemetry Event Api V1 Analytics Telemetry Event Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/export":{"get":{"tags":["analytics"],"summary":"Export Telemetry","operationId":"export_telemetry_api_v1_analytics_export_get","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Telemetry Api V1 Analytics Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["analytics"],"summary":"Erase Telemetry","operationId":"erase_telemetry_api_v1_analytics_export_delete","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Erase Telemetry Api V1 Analytics Export Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/telemetry-export":{"get":{"tags":["analytics"],"summary":"Export Product Telemetry","operationId":"export_product_telemetry_api_v1_analytics_telemetry_export_get","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Session Id"}},{"name":"x-user-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Product Telemetry Api V1 Analytics Telemetry Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/telemetry-erasure":{"delete":{"tags":["analytics"],"summary":"Erase Product Telemetry","operationId":"erase_product_telemetry_api_v1_analytics_telemetry_erasure_delete","parameters":[{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Session Id"}},{"name":"x-user-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Erase Product Telemetry Api V1 Analytics Telemetry Erasure Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/funnel-event":{"post":{"tags":["analytics"],"summary":"Ingest Funnel Event","operationId":"ingest_funnel_event_api_v1_analytics_funnel_event_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ingest Funnel Event Api V1 Analytics Funnel Event Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/funnel-summary":{"get":{"tags":["analytics"],"summary":"Funnel Summary","operationId":"funnel_summary_api_v1_analytics_funnel_summary_get","parameters":[{"name":"workflow_id","in":"query","required":true,"schema":{"type":"string","description":"Workflow to summarise","title":"Workflow Id"},"description":"Workflow to summarise"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Funnel Summary Api V1 Analytics Funnel Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feedback":{"post":{"tags":["feedback"],"summary":"Submit Feedback","description":"Submit NPS feedback.","operationId":"submit_feedback_api_v1_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__feedback_routes__FeedbackRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feedback/stats":{"get":{"tags":["feedback"],"summary":"Feedback Stats","description":"Return aggregate NPS statistics.","operationId":"feedback_stats_api_v1_feedback_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackStatsResponse"}}}}}}},"/api/v1/media/image":{"post":{"tags":["media"],"summary":"Post Image","operationId":"post_image_api_v1_media_image_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/media/speech":{"post":{"tags":["media"],"summary":"Post Speech","operationId":"post_speech_api_v1_media_speech_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechGenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechGenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/media/video":{"post":{"tags":["media"],"summary":"Post Video Start","operationId":"post_video_start_api_v1_media_video_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoStartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/media/video/poll":{"post":{"tags":["media"],"summary":"Post Video Poll","operationId":"post_video_poll_api_v1_media_video_poll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoPollRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoPollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/security/csrf-token":{"get":{"tags":["security"],"summary":"Get Csrf Token","description":"Return a CSRF token for SPA/frontend use.\n\nSets the token as a cookie and returns it in the response body.\nThe frontend should include this token in the X-CSRF-Token header\nfor all state-changing requests.","operationId":"get_csrf_token_api_v1_security_csrf_token_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/audit-log":{"get":{"tags":["security"],"summary":"Admin Audit Log","description":"Query the audit log. Admin only.","operationId":"admin_audit_log_api_v1_admin_audit_log_get","parameters":[{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/audit-stats":{"get":{"tags":["security"],"summary":"Admin Audit Stats","description":"Return audit log summary statistics. Admin only.","operationId":"admin_audit_stats_api_v1_admin_audit_stats_get","parameters":[{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/rotate":{"post":{"tags":["security"],"summary":"Rotate Api Key","description":"Rotate an existing API key.\n\nInvalidates the current key and issues a new one.\nThe new key is only shown once in the response.","operationId":"rotate_api_key_api_v1_api_keys_rotate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRotateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRotateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/security/csp-report":{"post":{"tags":["security"],"summary":"Receive Csp Report","description":"Receive Content Security Policy violation reports.\n\nBrowsers send these automatically when CSP is violated.\nWe log them for monitoring.","operationId":"receive_csp_report_api_v1_security_csp_report_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/sql-audit":{"get":{"tags":["security"],"summary":"Sql Injection Audit","description":"Audit SQL injection prevention across all DB queries.\n\nScans the codebase patterns to verify all queries use parameterized\nqueries. Returns a summary of the audit results.\n\nAdmin only.","operationId":"sql_injection_audit_api_v1_admin_sql_audit_get","parameters":[{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/csp-reports":{"get":{"tags":["security"],"summary":"Get Csp Reports","description":"Get recent CSP violation reports. Admin only.","operationId":"get_csp_reports_api_v1_admin_csp_reports_get","parameters":[{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/create-checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"DEPRECATED (410 Gone) — legacy simulated prosumer-plan checkout.\n\nThis route never created a real Stripe session; it fabricated a\n``cs_<hex>`` id and a ``checkout.stripe.com`` URL that 404s at Stripe. With a\nlive key now configured that fake URL is actively misleading, and the\nin-memory plan store it wrote was never wired to eval entitlement. The real,\nusage-based collection path is ``POST /api/v1/billing/pay-link`` (see\nbilling_paylink_routes.py). Refuse here instead of returning a dead link.","operationId":"create_checkout_api_v1_billing_create_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Subscription","description":"Get current subscription status for a user.\n\nReads user_id from X-User-ID header or query param.","operationId":"get_subscription_api_v1_billing_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/cancel":{"post":{"tags":["billing"],"summary":"Cancel Subscription","description":"Cancel subscription at end of billing period.","operationId":"cancel_subscription_api_v1_billing_cancel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/change-plan":{"post":{"tags":["billing"],"summary":"Change Plan","description":"Upgrade or downgrade subscription plan.","operationId":"change_plan_api_v1_billing_change_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices":{"get":{"tags":["billing"],"summary":"List Invoices","description":"List invoices for a user.","operationId":"list_invoices_api_v1_billing_invoices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/usage":{"get":{"tags":["billing"],"summary":"Get Usage Stats","description":"Get usage stats for billing purposes.\n\nReturns daily/monthly usage vs limits for the user's plan.","operationId":"get_usage_stats_api_v1_billing_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/webhooks/stripe":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\n\nVerifies webhook signature and processes events:\n  - checkout.session.completed -> Activate subscription\n  - invoice.paid -> Record payment\n  - customer.subscription.updated -> Sync plan changes\n  - customer.subscription.deleted -> Deactivate subscription","operationId":"stripe_webhook_api_v1_billing_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/pay-link":{"post":{"tags":["billing"],"summary":"Create Pay Link","description":"Create a Stripe Checkout URL for this tenant — the link to hand the owner.","operationId":"create_pay_link_api_v1_billing_pay_link_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/status":{"get":{"tags":["billing"],"summary":"Billing Status","description":"Report this tenant's billing + free-quota state for an agent to act on.","operationId":"billing_status_api_v1_billing_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Billing Status Api V1 Billing Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Billing Portal","description":"Create a Stripe Billing Portal link so the owner can manage the card.","operationId":"billing_portal_api_v1_billing_portal_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Billing Portal Api V1 Billing Portal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/stripe/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Stripe's signed callback. Verifies the signature (fail-closed) and applies\nthe entitlement change. Returns 400 on a bad/missing signature so Stripe\nretries; 503 if billing is not configured.","operationId":"stripe_webhook_api_v1_billing_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stripe Webhook Api V1 Billing Stripe Webhook Post"}}}}}}},"/api/v1/consent/modes":{"get":{"tags":["consent","billing"],"summary":"Get Consent Modes","description":"List consent modes with their training-discount, what each trains on, and the disclosure.\n\nFeeds the onboarding/checkout UI: \"choose your data-sharing mode → see the price + exactly\nwhat is shared\". The exact discount %s are pricing-policy defaults (founder sign-off pending).","operationId":"get_consent_modes_api_v1_consent_modes_get","parameters":[{"name":"plan","in":"query","required":false,"schema":{"type":"string","description":"billing plan key","default":"pro","title":"Plan"},"description":"billing plan key"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/consent/price-preview":{"get":{"tags":["consent","billing"],"summary":"Get Price Preview","description":"Prospective price IF the user opts into ``usage_scope`` (consent active).\n\nThe discount applies only while consent stays active; revoking restores full price\nprospectively. This is a preview only — it records nothing.","operationId":"get_price_preview_api_v1_consent_price_preview_get","parameters":[{"name":"plan","in":"query","required":false,"schema":{"type":"string","description":"billing plan key","default":"pro","title":"Plan"},"description":"billing plan key"},{"name":"usage_scope","in":"query","required":false,"schema":{"type":"string","description":"consent mode to preview","default":"training-corpus","title":"Usage Scope"},"description":"consent mode to preview"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chat/session":{"post":{"tags":["chat"],"summary":"Open Session","description":"Verify the human (Turnstile) and open a chat session.\n\nReturns 403 when the captcha token fails verification (real mode) or is\nempty (rejected by both the model validator and ``verify_token``).","operationId":"open_session_api_v1_chat_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chat/{session_id}/message":{"post":{"tags":["chat"],"summary":"Post Message","description":"Generate a concierge reply for a visitor message.","operationId":"post_message_api_v1_chat__session_id__message_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chat/{session_id}/lead":{"post":{"tags":["chat"],"summary":"Capture Lead","description":"Capture a lead (email/company/role) against a session.","operationId":"capture_lead_api_v1_chat__session_id__lead_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants":{"post":{"tags":["tenants"],"summary":"Signup","description":"Create a tenant and mint a JWT carrying the ``tenant_id`` claim.","operationId":"signup_api_v1_tenants_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSignup"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Api V1 Tenants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/me":{"get":{"tags":["tenants"],"summary":"Me","operationId":"me_api_v1_tenants_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Me Api V1 Tenants Me Get"}}}}}}},"/api/v1/tenants/by-email":{"get":{"tags":["tenants"],"summary":"By Email","description":"Public lookup for the /workspace/switch page.\n\nOnly returns slugs + names -- no secrets.  A spam signup rate-limit\nalready applies upstream.","operationId":"by_email_api_v1_tenants_by_email_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":320,"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response By Email Api V1 Tenants By Email Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/{tenant_id}":{"get":{"tags":["tenants"],"summary":"Fetch Tenant","operationId":"fetch_tenant_api_v1_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Fetch Tenant Api V1 Tenants  Tenant Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/{tenant_id}/audit-export":{"get":{"tags":["tenants"],"summary":"Audit Export","description":"Return a signed ZIP bundle of audit rows + scored runs for *tenant_id*.","operationId":"audit_export_api_v1_tenants__tenant_id__audit_export_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"string","title":"Tenant Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approvals/pending":{"get":{"tags":["approvals"],"summary":"Get Pending Approvals","operationId":"get_pending_approvals_api_v1_approvals_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingApprovalsResponse"}}}}}}},"/api/v1/approvals/{approval_id}/decide":{"post":{"tags":["approvals"],"summary":"Decide Approval","operationId":"decide_approval_api_v1_approvals__approval_id__decide_post","parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","title":"Approval Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecision"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audit-log/{range_id}":{"get":{"tags":["audit-log"],"summary":"Get Audit Log Range","operationId":"get_audit_log_range_api_v1_audit_log__range_id__get","parameters":[{"name":"range_id","in":"path","required":true,"schema":{"type":"string","title":"Range Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["audit-log"],"summary":"Delete Audit Log Range","operationId":"delete_audit_log_range_api_v1_audit_log__range_id__delete","parameters":[{"name":"range_id","in":"path","required":true,"schema":{"type":"string","title":"Range Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/app-drivers":{"get":{"tags":["app-drivers"],"summary":"List App Drivers","operationId":"list_app_drivers_api_v1_app_drivers_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDriverCatalogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/app-drivers/slack/approvals":{"post":{"tags":["app-drivers"],"summary":"Request Slack Driver Approval","operationId":"request_slack_driver_approval_api_v1_app_drivers_slack_approvals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackApprovalRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackApprovalRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/app-drivers/slack/actions/execute":{"post":{"tags":["app-drivers"],"summary":"Execute Slack Driver Action","operationId":"execute_slack_driver_action_api_v1_app_drivers_slack_actions_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackExecuteRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackExecuteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/app-drivers/slack/logs":{"get":{"tags":["app-drivers"],"summary":"Get Slack Driver Logs","operationId":"get_slack_driver_logs_api_v1_app_drivers_slack_logs_get","parameters":[{"name":"connection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackResearchLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/app-drivers/{driver_id}/probe":{"get":{"tags":["app-drivers"],"summary":"Probe App Driver","operationId":"probe_app_driver_api_v1_app_drivers__driver_id__probe_get","parameters":[{"name":"driver_id","in":"path","required":true,"schema":{"type":"string","title":"Driver Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDriverProbeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agentos/provider-config":{"get":{"tags":["agentos"],"summary":"Get Provider Config","operationId":"get_provider_config_api_v1_agentos_provider_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConfigResponse"}}}}}}},"/api/v1/agentos/provider-accounts/{account_id}":{"post":{"tags":["agentos"],"summary":"Mutate Provider Account","operationId":"mutate_provider_account_api_v1_agentos_provider_accounts__account_id__post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":160,"title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAccountPatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAccountMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agentos"],"summary":"Mutate Provider Account","operationId":"mutate_provider_account_api_v1_agentos_provider_accounts__account_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":160,"title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAccountPatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAccountMutationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/remediation/plans/{plan_id}/outcome-report":{"get":{"tags":["remediation"],"summary":"Outcome Report","description":"Compute + return the outcome report, persisting an attestation PDF.\n\nAdmin-only. Returns the full report shape; PDF is written to the API\nhost's tmp dir and its path is returned in `attestation_pdf_url`.\nhistorical cycle will swap the path for a signed GCS URL.","operationId":"outcome_report_api_v1_remediation_plans__plan_id__outcome_report_get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/security/priority-audits":{"get":{"tags":["mcp-security"],"summary":"List Priority Audits","operationId":"list_priority_audits_api_v1_mcp_security_priority_audits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpSecurityAuditListResponse"}}}}}}},"/api/v1/mcp/security/priority-audits/{server_id}":{"get":{"tags":["mcp-security"],"summary":"Get Priority Audit","operationId":"get_priority_audit_api_v1_mcp_security_priority_audits__server_id__get","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpSecurityAuditDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/security/install-gate/{server_id}":{"get":{"tags":["mcp-security"],"summary":"Get Install Gate","operationId":"get_install_gate_api_v1_mcp_security_install_gate__server_id__get","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpInstallGateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/registry":{"get":{"tags":["mcp-registry"],"summary":"List Registry","description":"List all Tier-1 MCP servers baked into the Phase-1 deployment router.","operationId":"list_registry_api_v1_mcp_registry_get","parameters":[{"name":"install_allowed_only","in":"query","required":false,"schema":{"type":"boolean","description":"When true, omit AGPL/GPL servers that require separate-process invocation.","default":false,"title":"Install Allowed Only"},"description":"When true, omit AGPL/GPL servers that require separate-process invocation."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Registry Api V1 Mcp Registry Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/registry/recommend":{"get":{"tags":["mcp-registry"],"summary":"Recommend","description":"Recommend Tier-1 MCPs for a job function or industry.\n\nPass exactly one of job_function or industry.","operationId":"recommend_api_v1_mcp_registry_recommend_get","parameters":[{"name":"job_function","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Benchmark pack job-function id (e.g. credit-memo, pr-review).","title":"Job Function"},"description":"Benchmark pack job-function id (e.g. credit-memo, pr-review)."},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Industry slug (e.g. finance, dev_tools, crm_sales).","title":"Industry"},"description":"Industry slug (e.g. finance, dev_tools, crm_sales)."},{"name":"install_allowed_only","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude AGPL/GPL servers from results.","default":true,"title":"Install Allowed Only"},"description":"Exclude AGPL/GPL servers from results."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Recommend Api V1 Mcp Registry Recommend Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/registry/gaps":{"get":{"tags":["mcp-registry"],"summary":"Gap Analysis","description":"Return Tier-2 computer-use gap list.\n\nThese are apps with no vendor MCP as of 2026-04-24.\nOrdered by SeaOtter workflow frequency × MCP-gap severity.\nSee issue #387 for GLM-4V computer-use spike.","operationId":"gap_analysis_api_v1_mcp_registry_gaps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gap Analysis Api V1 Mcp Registry Gaps Get"}}}}}}},"/api/v1/mcp/registry/{server_id}":{"get":{"tags":["mcp-registry"],"summary":"Get Server","description":"Return details for a single Tier-1 MCP server.","operationId":"get_server_api_v1_mcp_registry__server_id__get","parameters":[{"name":"server_id","in":"path","required":true,"schema":{"type":"string","title":"Server Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Server Api V1 Mcp Registry  Server Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/registry/models":{"get":{"tags":["registry"],"summary":"List Models","description":"List models from the registry.\n\nAccessible by operator or admin.","operationId":"list_models_api_v1_registry_models_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by kind (llm, xgboost, …)","title":"Kind"},"description":"Filter by kind (llm, xgboost, …)"},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"active | shadow | retired | all","default":"active","title":"Status"},"description":"active | shadow | retired | all"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Models Api V1 Registry Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["registry"],"summary":"Create Model","description":"Create or upsert a model in the registry.\n\nAdmin only. Existing entries are updated on name+version conflict.","operationId":"create_model_api_v1_registry_models_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Model Api V1 Registry Models Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/registry/models/terraform-outputs":{"post":{"tags":["registry"],"summary":"Ingest Terraform Outputs","description":"Ingest BYOC Terraform model-serving outputs into the runtime registry.","operationId":"ingest_terraform_outputs_api_v1_registry_models_terraform_outputs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerraformOutputsIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ingest Terraform Outputs Api V1 Registry Models Terraform Outputs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/registry/models/recommend-runtime":{"post":{"tags":["registry"],"summary":"Recommend Runtime Model Route","description":"Recommend a cost-controlled runtime model route from the registry.","operationId":"recommend_runtime_model_route_api_v1_registry_models_recommend_runtime_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeRecommendationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeRecommendationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/privacy/observed-data/export":{"get":{"tags":["privacy","observed-data"],"summary":"Get Observed Data Export","operationId":"get_observed_data_export_api_v1_privacy_observed_data_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservedDataExportContract"}}}}}}},"/api/v1/privacy/observed-data":{"delete":{"tags":["privacy","observed-data"],"summary":"Delete Observed Data","operationId":"delete_observed_data_api_v1_privacy_observed_data_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservedDataDeleteContract"}}}}}}},"/api/v1/privacy/consent":{"patch":{"tags":["privacy","observed-data"],"summary":"Patch Consent","description":"Update consent scope for all active shadow windows belonging to this tenant.\n\nRecording ``consent_captured_at`` = now() is the canonical signal that\nthe user has explicitly reviewed and confirmed their consent choice.\nDerived eligibility flags (eligible_for_holdout, eligible_for_training)\nare re-evaluated and stored atomically with the new scope.","operationId":"patch_consent_api_v1_privacy_consent_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentUpdateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentUpdateContract"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/privacy/observed-data/enforce-retention":{"post":{"tags":["privacy","observed-data"],"summary":"Post Observed Data Retention Enforcement","operationId":"post_observed_data_retention_enforcement_api_v1_admin_privacy_observed_data_enforce_retention_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetentionEnforcementContract"}}}}}}},"/api/v1/org/events/stream":{"get":{"tags":["org"],"summary":"Stream Org Events","description":"Stream org-bus JSONL rows as Server-Sent Events.\n\nBrowser clients can reconnect with ``Last-Event-ID``. Query param\n``last_event_id`` is also accepted for clients that cannot set headers.","operationId":"stream_org_events_api_v1_org_events_stream_get","parameters":[{"name":"replay","in":"query","required":false,"schema":{"type":"integer","maximum":250,"minimum":0,"default":25,"title":"Replay"}},{"name":"last_event_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orchestrator/status":{"get":{"tags":["orchestrator"],"summary":"Orchestrator Status","description":"Return a JSON snapshot of orchestrator state.\n\nAlways returns HTTP 200.  Individual keys may be empty dicts/lists\nwhen source files are missing — never raises.","operationId":"orchestrator_status_api_v1_orchestrator_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Orchestrator Status Api V1 Orchestrator Status Get"}}}}}}},"/api/v1/orchestrator/topology":{"get":{"tags":["orchestrator"],"summary":"Orchestrator Topology","description":"Return live org communication topology.\n\nSource of truth is ``orchestrator/tickets/local.jsonl`` plus\n``orchestrator/events/org_bus.jsonl``. Edges use ``sync:*`` and\n``async:*`` kind prefixes so the dashboard can distinguish durable ticket\nstate from emitted bus events.","operationId":"orchestrator_topology_api_v1_orchestrator_topology_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Orchestrator Topology Api V1 Orchestrator Topology Get"}}}}}}},"/api/v1/orchestrator/stream":{"get":{"tags":["orchestrator"],"summary":"Orchestrator Stream","description":"SSE stream of heartbeat + GPU events, one event every 10 seconds.\n\nContent-Type: text/event-stream\nEach event: data: {\"ts\": \"...\", \"heartbeats\": {...}, \"gpu\": {...}}\n\nClients reconnect automatically on disconnect (browser EventSource).","operationId":"orchestrator_stream_api_v1_orchestrator_stream_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/agentic/kpi":{"get":{"tags":["agentic-kpi"],"summary":"Get Agentic Kpi","description":"Latest agentic-org KPI snapshot.\n\nAlways returns 200. Top-level fields (`active_sidecars`, `queue_depth`,\n`provider_distribution`, `calls_per_min_5m`, `last_call_at`) are derived\nso dashboards can render without unwrapping the full snapshot.","operationId":"get_agentic_kpi_api_v1_agentic_kpi_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Agentic Kpi Api V1 Agentic Kpi Get"}}}}}}},"/api/v1/agentic/kpi/history":{"get":{"tags":["agentic-kpi"],"summary":"Get Agentic Kpi History","description":"Recent snapshot history from the JSONL trail (oldest → newest).","operationId":"get_agentic_kpi_history_api_v1_agentic_kpi_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":60,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agentic Kpi History Api V1 Agentic Kpi History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agentic/research":{"get":{"tags":["agentic-kpi"],"summary":"Get Agentic Research","description":"Live research visibility mirror for API consumers.\n\nThe local executor endpoint on port 7081 is the primary dashboard source.\nThis mirror keeps the public FastAPI route contract aligned for tests,\ndocs, and any web client routed through the API service.","operationId":"get_agentic_research_api_v1_agentic_research_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":8,"title":"Limit"}},{"name":"viewer_role","in":"query","required":false,"schema":{"type":"string","default":"operator","title":"Viewer Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agentic Research Api V1 Agentic Research Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/live/status":{"get":{"tags":["live"],"summary":"Live Status","description":"Return the latest full UI live snapshot.","operationId":"live_status_api_v1_live_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Live Status Api V1 Live Status Get"}}}}}}},"/api/v1/live/stream":{"get":{"tags":["live"],"summary":"Live Stream","description":"Server-sent event stream for desktop and web live surfaces.","operationId":"live_stream_api_v1_live_stream_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/scheduler/burndown":{"get":{"tags":["scheduler"],"summary":"Burndown","operationId":"burndown_api_v1_scheduler_burndown_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Burndown Api V1 Scheduler Burndown Get"}}}}}}},"/api/v1/eval/rubrics":{"get":{"tags":["eval"],"summary":"Get Rubrics","operationId":"get_rubrics_api_v1_eval_rubrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Rubrics Api V1 Eval Rubrics Get"}}}}}}},"/api/v1/eval/rubrics/{rubric_id}":{"get":{"tags":["eval"],"summary":"Get Rubric","description":"Return one rubric's criteria + weights.\n\nResolution order: desktop dotted-v0 alias -> otterflows YAML -> seeded\n``eval_rubric`` -> a workflow's representative step rubric (the benchmark\nwhole-workflow screen passes a ``workflow_id`` here). ``modality`` narrows\nthe workflow-step resolution when provided.","operationId":"get_rubric_api_v1_eval_rubrics__rubric_id__get","parameters":[{"name":"rubric_id","in":"path","required":true,"schema":{"type":"string","title":"Rubric Id"}},{"name":"modality","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modality"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Rubric Api V1 Eval Rubrics  Rubric Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/runs":{"post":{"tags":["eval"],"summary":"Create Run","operationId":"create_run_api_v1_eval_runs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Run Api V1 Eval Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/runs/{run_id}/iterate":{"post":{"tags":["eval"],"summary":"Iterate Run","operationId":"iterate_run_api_v1_eval_runs__run_id__iterate_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IterateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Iterate Run Api V1 Eval Runs  Run Id  Iterate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/runs/{run_id}":{"get":{"tags":["eval"],"summary":"Get Run","operationId":"get_run_api_v1_eval_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Run Api V1 Eval Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/runs/{run_id}/score":{"get":{"tags":["eval"],"summary":"Get Score","operationId":"get_score_api_v1_eval_runs__run_id__score_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Score Api V1 Eval Runs  Run Id  Score Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/workflows/{wf_id}/topology":{"post":{"tags":["eval"],"summary":"Score Topology","description":"Trace-aware whole-workflow score (real chain_critique, doc §2 formula).\n\nThree layers replace the old hardcoded ``scores[i] < 0.55`` edge penalty:\nper-NODE critic (unchanged), per-EDGE hand-off critic (does the child consume\nthe parent's output? — the learned upgrade of the deterministic 3-signal\ncoherence, which is the ``rule_fallback`` when LLM/DB is down), and a\nwhole-CHAIN compounding pass that traces an origin fault through contaminated\ndownstream steps (the ode propagation gold, derived at serve time). Edge texts\nare read through a BOUNDED READ-ONLY trajectory tool loop (no write/fetch/exec\ntool; budget-counted), so a recorded trajectory is inspected with no side\neffects. Orchestration lives in ``eval_trace_critic.run_topology`` so this\nroute stays under the size ceiling.","operationId":"score_topology_api_v1_eval_workflows__wf_id__topology_post","parameters":[{"name":"wf_id","in":"path","required":true,"schema":{"type":"string","title":"Wf Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopologyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Score Topology Api V1 Eval Workflows  Wf Id  Topology Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/stream":{"post":{"tags":["eval"],"summary":"Stream Run","description":"Stream the critic's grade for one artifact as Server-Sent Events.\n\nSame request schema and auth as ``POST /api/v1/eval/runs``; the difference is\nthe agent gets ``received`` → ``scanning`` → ``flaw`` → ``verdict`` → ``done``\nas they happen, with a real, iterable ``run_id``.\n\nValidation errors (unknown modality / rubric) are raised BEFORE the response\nstarts so the caller gets a normal 422/404 rather than a half-open stream.","operationId":"stream_run_api_v1_eval_stream_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamEvalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/jobs":{"post":{"tags":["eval-jobs"],"summary":"Create Job Endpoint","description":"Submit work for grading. One front door; sync inline 200 or async 202.\n\nFlow:\n  1. validate mode scope (must-fix #6) + resolve submission/timeout.\n  2. payload_hash + idempotency check (must-fix #7): a re-POST with the SAME\n     (tenant, key) and a MATCHING hash returns the existing job (200); a\n     DIFFERING hash is a 409.\n  3. SSRF-gate callback_url (must-fix #4).\n  4. reserve the authorized budget (must-fix #1/#8) — 402 on cap/concurrency.\n  5. create the job, enqueue (async) or block for the inline verdict (sync).","operationId":"create_job_endpoint_api_v1_eval_jobs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJobRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Create Job Endpoint Api V1 Eval Jobs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/jobs/{job_id}":{"get":{"tags":["eval-jobs"],"summary":"Get Job Endpoint","description":"Poll a job: status + progress + cost + result_summary (tenant-scoped).","operationId":"get_job_endpoint_api_v1_eval_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Job Endpoint Api V1 Eval Jobs  Job Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["eval-jobs"],"summary":"Cancel Job Endpoint","description":"Cancel a job at the next checkpoint (via the lease).\n\nThe in-flight pass aborts at its next checkpoint (the worker holds the lease\nand checks for a ``cancelled`` status). ``cost_spent_usd`` is STILL billed\n(must-fix #10 — real COGS); the refund is ``authorized − spent``. The cancel\nis recorded against the caller's ``api_key_id`` (must-fix key-scoping). A job\nthat already reached a terminal state returns 409 (idempotent: there is\nnothing to cancel).","operationId":"cancel_job_endpoint_api_v1_eval_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Job Endpoint Api V1 Eval Jobs  Job Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/jobs/{job_id}/stream":{"get":{"tags":["eval-jobs"],"summary":"Stream Job Endpoint","description":"Tail a job's reasoning steps + status as Server-Sent Events.\n\nReuses the SSE framing from ``src.eval.stream`` (same ``event:``/``data:``\nframes, same heartbeat + disconnect handling) and tails the\n``eval_reasoning_steps`` table so an agent sees ``queued → running → [per\npass] step → verdict → done`` live, with the per-pass ``cost_remaining_usd``\nso it can cancel before overspending. A 404 (unknown/cross-tenant) is raised\nBEFORE the stream opens so the caller gets a normal error.","operationId":"stream_job_endpoint_api_v1_eval_jobs__job_id__stream_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/public/leaderboard":{"get":{"tags":["leaderboard"],"summary":"Public Leaderboard","description":"Public, anonymized free-agent work-quality leaderboard (opted-in agents).","operationId":"public_leaderboard_api_v1_eval_public_leaderboard_get","parameters":[{"name":"board","in":"query","required":false,"schema":{"type":"string","default":"benchmark","title":"Board"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Public Leaderboard Api V1 Eval Public Leaderboard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/benchmark/tasks":{"get":{"tags":["leaderboard"],"summary":"Benchmark Tasks","description":"The fixed public benchmark task set every agent attempts (same prompt + rubric).","operationId":"benchmark_tasks_api_v1_eval_benchmark_tasks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Benchmark Tasks Api V1 Eval Benchmark Tasks Get"}}}}}}},"/api/v1/eval/leaderboard/opt-in":{"post":{"tags":["leaderboard"],"summary":"Leaderboard Opt In","description":"Opt THIS agent key in/out of the public leaderboard + set its handle.\n\nOnly self-serve agent keys (ctx.actor == ``k_<hash>``) can join — the public\nboard is the free-tier surface, never enterprise/anonymous/admin identities.","operationId":"leaderboard_opt_in_api_v1_eval_leaderboard_opt_in_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptInRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Leaderboard Opt In Api V1 Eval Leaderboard Opt In Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/benchmark/{task_id}/submit":{"post":{"tags":["leaderboard"],"summary":"Submit Benchmark","description":"Submit YOUR artifact for a fixed benchmark task. Reuses the eval-jobs\npipeline (metering, entitlement, idempotency, grading) — the modality + rubric\nare forced to the task spec, and the job is tagged to feed the benchmark board.","operationId":"submit_benchmark_api_v1_eval_benchmark__task_id__submit_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchmarkSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Submit Benchmark Api V1 Eval Benchmark  Task Id  Submit Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/eval/jobs/{job_id}/execute":{"post":{"tags":["eval-jobs-worker"],"summary":"Execute Job","description":"Execute a queued job. OIDC-authed, internal-only, at-most-once via the lease.\n\nReturns 200 ``{job_id, result}`` on a handled run; 200 ``{noop}`` when the lease\ncannot be acquired (terminal/held — at-most-once); 401/403 for an unauthorized\ncaller. A genuine internal failure is finalized as ``failed`` (cost still\nbilled) and returned 200 so Cloud Tasks does not retry a poisoned job forever.","operationId":"execute_job_internal_eval_jobs__job_id__execute_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Execute Job Internal Eval Jobs  Job Id  Execute Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/presign":{"post":{"tags":["ingest"],"summary":"Presign","description":"Mint signed PUT URLs for a new artifact bundle (off-API upload).","operationId":"presign_api_v1_ingest_presign_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Presign Api V1 Ingest Presign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/complete":{"post":{"tags":["ingest"],"summary":"Complete","description":"Validate + scan + compress + persist a bundle's uploaded files.\n\nA non-clean file is recorded with its terminal status (auditable) but is\nnever eval-able. A ``training-corpus`` retention class without\n``consent_scope`` is a 400 (GDPR consent gate).","operationId":"complete_api_v1_ingest_complete_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Complete Api V1 Ingest Complete Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ingest/{artifact_id}":{"get":{"tags":["ingest"],"summary":"Get Status","description":"Status of an artifact (incl. ``scan_status``). Tenant-scoped: another\ntenant's id resolves to 404.","operationId":"get_status_api_v1_ingest__artifact_id__get","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Status Api V1 Ingest  Artifact Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ingest"],"summary":"Erase","description":"GDPR right-to-erasure: delete the object + the row for one artifact.\n\nTenant-scoped — a tenant can only erase its own artifacts (another tenant's\nid is a 404). Idempotent: erasing an already-erased / unknown id is a 404.","operationId":"erase_api_v1_ingest__artifact_id__delete","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Erase Api V1 Ingest  Artifact Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sandbox":{"post":{"tags":["sandbox"],"summary":"Create Sandbox","description":"Create an isolated, disposable, capped sandbox for the caller's tenant.","operationId":"create_sandbox_api_v1_sandbox_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Sandbox Api V1 Sandbox Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sandbox/{session_id}/run":{"post":{"tags":["sandbox"],"summary":"Run In Sandbox","description":"Run one agentic eval step inside the sandbox; refused if over caps.","operationId":"run_in_sandbox_api_v1_sandbox__session_id__run_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run In Sandbox Api V1 Sandbox  Session Id  Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sandbox/{session_id}":{"get":{"tags":["sandbox"],"summary":"Get Sandbox","description":"Fetch session state (tenant-scoped).","operationId":"get_sandbox_api_v1_sandbox__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Sandbox Api V1 Sandbox  Session Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sandbox"],"summary":"Dispose Sandbox","description":"Dispose the sandbox (idempotent teardown).","operationId":"dispose_sandbox_api_v1_sandbox__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dispose Sandbox Api V1 Sandbox  Session Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/policies":{"get":{"tags":["eval"],"summary":"List Policies","description":"Org acceptance policies the agent can condition its grading on.","operationId":"list_policies_api_v1_eval_policies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Policies Api V1 Eval Policies Get"}}}}}}},"/api/v1/eval/feedback":{"post":{"tags":["eval"],"summary":"Feedback","description":"Grade work in one call → flat verdict + run_id to keep iterating.","operationId":"feedback_api_v1_eval_feedback_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__routes__eval_agent_routes__FeedbackRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Feedback Api V1 Eval Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/feedback-artifacts/{ref}":{"get":{"tags":["eval"],"summary":"Get Feedback Artifact","description":"Fetch a rendered feedback artifact by ``{run_id}::{idx}::{i}`` ref.","operationId":"get_feedback_artifact_api_v1_eval_feedback_artifacts__ref__get","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Feedback Artifact Api V1 Eval Feedback Artifacts  Ref  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies":{"get":{"tags":["policies"],"summary":"List Policies","operationId":"list_policies_api_v1_policies_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Policies Api V1 Policies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["policies"],"summary":"Create Policy","operationId":"create_policy_api_v1_policies_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Policy Api V1 Policies Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/{policy_id}":{"get":{"tags":["policies"],"summary":"Get Policy","operationId":"get_policy_api_v1_policies__policy_id__get","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Policy Api V1 Policies  Policy Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["policies"],"summary":"Update Policy","operationId":"update_policy_api_v1_policies__policy_id__put","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Policy Api V1 Policies  Policy Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["policies"],"summary":"Delete Policy","operationId":"delete_policy_api_v1_policies__policy_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Policy Api V1 Policies  Policy Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/policies/{policy_id}/preview":{"post":{"tags":["policies"],"summary":"Preview Policy","operationId":"preview_policy_api_v1_policies__policy_id__preview_post","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Preview Policy Api V1 Policies  Policy Id  Preview Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-keys":{"get":{"tags":["agent-keys"],"summary":"List Agent Keys","description":"List the caller tenant's keys (never the secret).","operationId":"list_agent_keys_api_v1_agent_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Agent Keys Api V1 Agent Keys Get"}}}}}},"post":{"tags":["agent-keys"],"summary":"Create Agent Key","description":"Mint a new agent API key for the caller's tenant.\n\nReturns ``{id, key, key_prefix, name, created_at}`` — ``key`` is the FULL\nsecret and is shown ONLY here (never stored, never re-fetchable).","operationId":"create_agent_key_api_v1_agent_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentKeyCreateIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Agent Key Api V1 Agent Keys Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-keys/signup":{"post":{"tags":["agent-keys"],"summary":"Signup Agent","description":"Fully-programmatic agent self-signup — NO human step required.\n\nCreates a fresh free-tier tenant and mints its first agent key in one call,\nso an autonomous agent can register itself and immediately start scoring on\nthe free quota. Once the quota is exhausted the eval API returns HTTP 402\nwith a Stripe pay-link the agent hands to its owner. Abuse is bounded by a\nDURABLE per-IP + global daily cap (Postgres, fleet-wide), the in-process\nEndpointRateLimiter, and the fact that usage beyond the free quota requires a\nreal payment method.\n\nThe full secret is returned exactly once under ``api_key``.","operationId":"signup_agent_api_v1_agent_keys_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSignupIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup Agent Api V1 Agent Keys Signup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent-keys/{key_id}/revoke":{"post":{"tags":["agent-keys"],"summary":"Revoke Agent Key","description":"Revoke one of the caller tenant's keys.\n\n404 if the key does not exist for this tenant (including a cross-tenant id\nor an already-revoked key) — a tenant can never act on another's key.","operationId":"revoke_agent_key_api_v1_agent_keys__key_id__revoke_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Agent Key Api V1 Agent Keys  Key Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/email/inbound":{"post":{"tags":["email-gateway"],"summary":"Email Inbound","operationId":"email_inbound_api_v1_email_inbound_post","parameters":[{"name":"x-webhook-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Webhook-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundEmailPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Email Inbound Api V1 Email Inbound Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/assignments":{"get":{"tags":["eval:platform"],"summary":"List Assignments","description":"Open assignments for a contractor, highest info-gain priority first.\n\nThe SQL ``ORDER BY info_gain_priority DESC`` (backed by\n``idx_eval_assignment_info_gain``) is the persisted ranking; the\n``assignment.py`` Swiss-InfoGain scorer is what *writes* that column when\nthe pre-gen / pairing job computes priorities. We also expose the candidate\nset so the contractor app can render the right viewer.\n\nAUTH (round-2 critic S1): the caller is authenticated from the\n``benchmark_session`` JWT; the verified ``reviewerIdHash`` is the\nauthoritative identity and a mismatched ``contractor_id`` query param is a\n403 (no reading another contractor's queue). The verified hash may be the\nsalted ``reviewer_id_hash`` the web cookie carries OR the raw contractor\nUUID; it is resolved to the canonical id before filtering (integration\nseam).","operationId":"list_assignments_api_v1_eval_assignments_get","parameters":[{"name":"contractor_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Contractor Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Assignments Api V1 Eval Assignments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/judgments":{"post":{"tags":["eval:platform"],"summary":"Submit Judgment","description":"Persist one judgment row and append a tamper-evident audit event.\n\nAUTH (round-2 critic S1): the submitter is authenticated from the\n``benchmark_session`` JWT; the verified ``reviewerIdHash`` is the\nauthoritative identity, so a ``contractor_id`` in the body that does not\nmatch it is a 403 (no submitting judgments as another contractor).","operationId":"submit_judgment_api_v1_eval_judgments_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgmentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Submit Judgment Api V1 Eval Judgments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/artifacts/{artifact_id}/url":{"get":{"tags":["eval:platform"],"summary":"Artifact Signed Url","description":"Return a short-lived signed URL for one artifact's bytes.\n\nBuckets are private; the URL is minted server-side and expires in\n``ARTIFACT_URL_TTL_SECONDS``. The contractor viewer streams the bytes\ndirectly from GCS using this URL (never a public bucket).\n\nAUTH (round-4 critic S2 — unauthenticated artifact IDOR): minting a signed\nURL for any artifact was open to anyone. The endpoint now requires a valid\n``benchmark_session`` (the ``resolve_authenticated_contractor`` dependency\n401s an unauthenticated caller outside the testing no-credentials fallback),\nso only a signed-in contractor can mint artifact URLs.","operationId":"artifact_signed_url_api_v1_eval_artifacts__artifact_id__url_get","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","title":"Artifact Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Artifact Signed Url Api V1 Eval Artifacts  Artifact Id  Url Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/leaderboard":{"get":{"tags":["eval:platform"],"summary":"Leaderboard","description":"Per-workflow Bradley-Terry leaderboard with bootstrap CIs.\n\nA rank is NEVER returned without ``ci_low``/``ci_high`` (rank_subjects\nguarantees it). Also reports ``n_comparisons`` so thin data is visible.","operationId":"leaderboard_api_v1_eval_leaderboard_get","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(workflow|step)$","default":"workflow","title":"Scope"}},{"name":"step_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Leaderboard Api V1 Eval Leaderboard Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/agreement":{"get":{"tags":["eval:platform"],"summary":"Agreement","description":"Krippendorff alpha across contractor verdicts for a workflow.\n\nBuilds the ``coders x units`` reliability matrix from per-candidate-set\nverdicts (one row per contractor, one column per candidate set), runs\nKrippendorff's nominal alpha, and reports the reliability band.\n\nAlso returns ``per_criterion`` — nominal alpha computed independently for\neach criterion that appears in the judgments' ``criterion_scores`` — when\nany criterion has at least one rating. The admin Agreement view's\nlow-agreement heatmap activates on this map; it is omitted (``null``) when\nno per-criterion scores are present so the heatmap stays cleanly hidden.","operationId":"agreement_api_v1_eval_agreement_get","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Agreement Api V1 Eval Agreement Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/admin/progress":{"get":{"tags":["eval:platform"],"summary":"Admin Progress","description":"Per-workflow assignment + judgment progress.","operationId":"admin_progress_api_v1_eval_admin_progress_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Progress Api V1 Eval Admin Progress Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/admin/contractors":{"get":{"tags":["eval:platform"],"summary":"Admin Contractors","description":"Per-contractor performance: status, rolling gold accuracy, throughput.","operationId":"admin_contractors_api_v1_eval_admin_contractors_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Contractors Api V1 Eval Admin Contractors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/admin/cost":{"get":{"tags":["eval:platform"],"summary":"Admin Cost","description":"Cost-ledger summary + quality-adjusted cost per accepted judgment.","operationId":"admin_cost_api_v1_eval_admin_cost_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Cost Api V1 Eval Admin Cost Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/admin/audit/export":{"get":{"tags":["eval:platform"],"summary":"Admin Audit Export","description":"Export the eval audit chain + a tamper-evident verification result.\n\nRows are returned in monotonic insertion order (``ORDER BY seq``) — the\nstable chain order, since ``ts`` can collide at sub-millisecond resolution.\n``verified`` is the result of re-deriving every link + payload hash +\nsignature (audit.py ``verify_chain``); ``broken_at`` localizes the first\nbad row when the chain has been tampered with.","operationId":"admin_audit_export_api_v1_eval_admin_audit_export_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-otterbench-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Otterbench-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Audit Export Api V1 Eval Admin Audit Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/qualification/exam":{"get":{"tags":["eval:platform"],"summary":"Qualification Exam","description":"Serve the per-skill / per-domain gold-set qualification exam.\n\nItems are derived from the seeded otterflows rubric criteria for the skill's\nmodality (see ``_exam_items_from_rubrics``). Returns an empty ``items`` list\n(HTTP 200) rather than 404 when the eval schema is absent or no criteria\nmatch, so the contractor screen degrades to a clear \"unavailable\" state.\n\nAUTH (round-2 critic S1): the caller is authenticated from the\n``benchmark_session`` JWT. The exam content itself is not\ncontractor-specific, but the endpoint still requires a session so only a\nsigned-in contractor can pull a gold set, and a ``reviewer_id_hash`` query\nparam that does not match the verified identity is a 403.\n\nSECURITY (defect S0): each item is passed through ``_public_exam_item`` so\nthe answer key and the answer-revealing ``rationale`` are NEVER sent to the\nclient. Scoring is server-authoritative.","operationId":"qualification_exam_api_v1_eval_qualification_exam_get","parameters":[{"name":"reviewer_id_hash","in":"query","required":false,"schema":{"type":"string","minLength":0,"default":"","title":"Reviewer Id Hash"}},{"name":"skill","in":"query","required":false,"schema":{"type":"string","default":"general","title":"Skill"}},{"name":"domain","in":"query","required":false,"schema":{"type":"string","default":"general","title":"Domain"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Qualification Exam Api V1 Eval Qualification Exam Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/qualifications":{"post":{"tags":["eval:platform"],"summary":"Submit Qualification","description":"Score a qualification attempt SERVER-SIDE and persist one row.\n\nThe client-computed score is advisory only: this endpoint rebuilds the\nauthoritative gold key from the seeded rubric corpus, scores the submitted\nanswers against it, decides pass/fail against the (server-clamped) bar, and\nwrites one ``eval_qualification`` row keyed to the resolved contractor. The\ngrant/denial is also appended to the HMAC audit chain.\n\nAUTH (round-2 critic S1): the attempt is authenticated from the\n``benchmark_session`` JWT; the verified ``reviewerIdHash`` is the\nauthoritative identity, so a ``reviewer_id_hash`` in the body that does not\nmatch it is a 403 (no recording a qualification for another contractor).","operationId":"submit_qualification_api_v1_eval_qualifications_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualificationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Submit Qualification Api V1 Eval Qualifications Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/admin/contractors/{contractor_id}/status":{"post":{"tags":["eval:platform"],"summary":"Set Contractor Status","description":"Update a contractor's workforce status + append an HMAC audit event.\n\n``contractor_id`` may be the salted ``reviewer_id_hash`` or the raw UUID\n(resolved before the write). The status must be one of the workforce\nstates. The before/after status are captured in the audit event so the\nenterprise audit export shows the full pause/promote history.","operationId":"set_contractor_status_api_v1_eval_admin_contractors__contractor_id__status_post","parameters":[{"name":"contractor_id","in":"path","required":true,"schema":{"type":"string","title":"Contractor Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Contractor Status Api V1 Eval Admin Contractors  Contractor Id  Status Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/session":{"post":{"tags":["eval:session"],"summary":"Create Eval Session","description":"Verify Google sign-in, upsert the contractor, return qualification.\n\nReturns the verified contractor identity plus a qualification summary. The\ncaller (web app) mints the signed ``benchmark_session`` browser cookie.\n\nAccess is gated by the benchmark allowlist (``benchmark_gate``): a verified\nbut non-allowlisted account is denied with 403. An allowlisted account is\nissued a session (so they can reach the qualification exam); whether they\nare *assigned work* is governed downstream by their qualification state.","operationId":"create_eval_session_api_v1_eval_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Eval Session Api V1 Eval Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/benchmark/allowlist":{"get":{"tags":["admin:benchmark"],"summary":"Admin List Benchmark Allowlist","description":"Return every benchmark allowlist entry.","operationId":"admin_list_benchmark_allowlist_api_v1_admin_benchmark_allowlist_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Benchmark Allowlist Api V1 Admin Benchmark Allowlist Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin:benchmark"],"summary":"Admin Add Benchmark Allowlist Entry","description":"Add (or refresh the note of) one email or domain allowlist entry.","operationId":"admin_add_benchmark_allowlist_entry_api_v1_admin_benchmark_allowlist_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowlistEntryRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Add Benchmark Allowlist Entry Api V1 Admin Benchmark Allowlist Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/benchmark/allowlist/{entry_id}":{"delete":{"tags":["admin:benchmark"],"summary":"Admin Delete Benchmark Allowlist Entry","description":"Remove one allowlist entry by id.","operationId":"admin_delete_benchmark_allowlist_entry_api_v1_admin_benchmark_allowlist__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Delete Benchmark Allowlist Entry Api V1 Admin Benchmark Allowlist  Entry Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/records":{"get":{"tags":["curation"],"summary":"List Records","description":"Queue view: filtered, paginated record summaries (contract §6).\n\nA signed-in contractor is routed to records in their qualified modalities\n(``eval_contractor.modality_expertise``, set from their parsed profile) unless\nthey pass an explicit ``modality`` or ``all_modalities=true``. Admins always\nsee the whole queue.","operationId":"list_records_api_v1_curation_records_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Status"}},{"name":"modality","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Modality"}},{"name":"kept_reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kept Reason"}},{"name":"frontier_detected","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Frontier Detected"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Q"}},{"name":"all_modalities","in":"query","required":false,"schema":{"type":"boolean","description":"contractor opt-out of domain routing","default":false,"title":"All Modalities"},"description":"contractor opt-out of domain routing"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Records Api V1 Curation Records Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/records/{sha}":{"get":{"tags":["curation"],"summary":"Get Record","description":"Full record detail + decision history (contract §6 RecordDetail).","operationId":"get_record_api_v1_curation_records__sha__get","parameters":[{"name":"sha","in":"path","required":true,"schema":{"type":"string","title":"Sha"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Record Api V1 Curation Records  Sha  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/records/{sha}/artifact/{name}/url":{"get":{"tags":["curation"],"summary":"Artifact Signed Url","description":"Resolve a loadable URL for one record attachment.\n\nReturns the same-origin streaming proxy (``…/artifact/{name}/raw``) rather\nthan a signed GCS URL: the review console renders EVERY file format, and\nsigning V4 URLs needs a private key or the IAM signBlob role — fragile on\nCloud Run compute credentials, impossible against local ADC. The proxy\nstreams the bytes with the SA's read access (works prod + local, any\nformat) and the viewer points ``<img>/<video>/<object>`` straight at it.\nAlready-public http(s) fixtures pass through unchanged. 404 if the named\nattachment is absent.","operationId":"artifact_signed_url_api_v1_curation_records__sha__artifact__name__url_get","parameters":[{"name":"sha","in":"path","required":true,"schema":{"type":"string","title":"Sha"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Artifact Signed Url Api V1 Curation Records  Sha  Artifact  Name  Url Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/records/{sha}/artifact/{name}/raw":{"get":{"tags":["curation"],"summary":"Artifact Raw","description":"Stream one record attachment's bytes through the authed API — no signing.\n\nServes ANY file format (image / pdf / video / audio / office / …) with the\nstored MIME type and HTTP Range support (so video/audio seek and the\ntimestamp localization work). The reviewer session/admin gates it; the\ncurated-bucket guard in ``gcs.fetch_object`` stops it serving arbitrary\nobjects. 404 if the attachment is absent, 503 if GCS is unavailable.","operationId":"artifact_raw_api_v1_curation_records__sha__artifact__name__raw_get","parameters":[{"name":"sha","in":"path","required":true,"schema":{"type":"string","title":"Sha"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/records/{sha}/artifact/{name}/render":{"get":{"tags":["curation"],"summary":"Artifact Render","description":"Server-side render-to-canonical for the heavy office types (docx/pptx).\n\nThe console renders most types natively in the browser; docx/pptx are\nconverted here FROM THE REAL BYTES to a safe semantic representation\n(docx → sanitized HTML + plain text, pptx → per-slide structure) so the\nviewer can show layout AND keep the flaw-anchor highlight working against the\nsame text the data engine pinned. The response declares ``representation`` so\nthe viewer states which rendering it is showing.\n\n422 when the type has no server-side renderer or the file is corrupt/missing\nits optional dep (the viewer then falls back to the raw download); 404 when\nthe file/member is absent; 503 when GCS is unavailable.","operationId":"artifact_render_api_v1_curation_records__sha__artifact__name__render_get","parameters":[{"name":"sha","in":"path","required":true,"schema":{"type":"string","title":"Sha"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Artifact Render Api V1 Curation Records  Sha  Artifact  Name  Render Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/records/{sha}/decision":{"post":{"tags":["curation"],"summary":"Record Decision","description":"Affirm / reject / edit / reopen a record (contract §6); a trajectory\nrecord may also carry per-node / whole-chain verdicts. Writes a\n``curation_decision`` row + an HMAC audit event, transitions the\n``curation_record``, returns ``{ok, curation_status, decision_id, audit_event_id}``.","operationId":"record_decision_api_v1_curation_records__sha__decision_post","parameters":[{"name":"sha","in":"path","required":true,"schema":{"type":"string","title":"Sha"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Record Decision Api V1 Curation Records  Sha  Decision Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/stats":{"get":{"tags":["curation"],"summary":"Stats","description":"Queue header stats (contract §6 ``/stats``).","operationId":"stats_api_v1_curation_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stats Api V1 Curation Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/me":{"get":{"tags":["curation"],"summary":"Whoami","description":"The caller's curation identity. Lets the console reveal admin-only\ncontrols — chiefly the labelled-corpus download — to admins only. A valid\ncontractor session returns ``is_admin: false`` (200); no/invalid session is\n401 from ``require_reviewer``.","operationId":"whoami_api_v1_curation_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Whoami Api V1 Curation Me Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/verify-source":{"post":{"tags":["curation"],"summary":"Verify Source","description":"Tool-grounded source verification for a FACT-dependent flaw (reviewer-gated).\n\nThe curator/critic grades a record against the rubric. For a fact / citation /\nfreshness / claim flaw, the verdict depends on a source of truth — so the critic\ncalls this tool to FETCH the record's ``source_url`` (and/or SEARCH the web) and\nattach the cited evidence via the decision ``evidence`` field. Self-contained\nlogic / consistency / arithmetic flaws are graded from the artifact alone\n(no-oracle rule).\n\nBody: ``{url?, query?}`` — at least one is required (400 otherwise). Bounded +\nfail-explicit: ``fetch`` is SSRF-guarded (private / loopback / metadata hosts\nblocked), timeout/size/redirect-capped, and never forwards credentials;\n``search`` returns ``{ok:false, error:\"search_not_configured\"}`` when no search\nprovider is wired (it never fabricates results). Returns the combined evidence\nobject ``{ok, verified_at, fetch?, search?}``.","operationId":"verify_source_api_v1_curation_verify_source_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifySourceBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Verify Source Api V1 Curation Verify Source Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/lease":{"post":{"tags":["curation"],"summary":"Lease","description":"Claim a DISJOINT batch of pending records for this curator.\n\nAtomic ``FOR UPDATE SKIP LOCKED`` claim: concurrent curators never get the same\n``canonical_sha``. With ``dedupe`` (default), near-identical artifacts collapse\nto one representative (the rest return to the pool); the lease expires after\n``ttl_seconds`` (default 30m) so an abandoned batch auto-returns. Returns\n``{lease_id, leased_until, count, records}``; submit via ``POST /decisions:batch``.","operationId":"lease_api_v1_curation_lease_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lease Api V1 Curation Lease Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/decisions:batch":{"post":{"tags":["curation"],"summary":"Decisions Batch","description":"Submit a batch of verdicts (the cost-amortizing counterpart to ``/lease``).\n\nEach decision is applied independently + audit-chained (incl. any per-node /\nwhole-chain trajectory verdicts + multi-flaw ``edited_flaws``); one bad item is\na per-item error and never aborts the rest. The un-graded remainder of\n``lease_id`` is released. Returns ``{ok, results:[...], released}``; pay accrues\nper affirm/reject/edit.","operationId":"decisions_batch_api_v1_curation_decisions_batch_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDecisionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Decisions Batch Api V1 Curation Decisions Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/upload/dedup-check":{"post":{"tags":["curation"],"summary":"Upload Dedup Check","description":"Split a list of ``canonical_sha`` into ``{new, existing}`` against the corpus.\n\nThe DISTRIBUTED-dedup gate an agent calls BEFORE :func:`upload` so it uploads\nONLY the ``new`` rows and never re-stores an artifact the corpus already holds;\nuniqueness holds across all distributed agents via the content-hash PK\n(:func:`curation_upload.dedup_check` → :func:`curation_store.existing_shas`).\nAccepts ``Content-Encoding: gzip`` (decompressed server-side, size-bounded); a\nplain JSON body behaves identically. Returns ``{new, existing}`` (input\nde-duplicated + blank-stripped; ``new`` keeps first-seen order).","operationId":"upload_dedup_check_api_v1_curation_upload_dedup_check_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Dedup Check Api V1 Curation Upload Dedup Check Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/upload":{"post":{"tags":["curation"],"summary":"Upload","description":"Contribute a BATCH of agent-crafted flawed artifacts to the curation corpus.\n\nThe GRADE-only counterpart of ``/lease`` + ``/decisions:batch`` cannot add a NEW\nartifact; this contribution path uploads 1..200 fail-set rows (the SAME shape\n``gcs._manifest_to_record`` consumes), landing as ``pending`` rows for grading.\nPer row (see :func:`curation_upload.apply_upload`): resolve ``canonical_sha``\n(client-supplied trusted, else computed identically to the generator), REQUIRE\nsource attribution + an allowed licence (else ``rejected``), stamp\n``provenance.uploaded_by``, ``upsert_batch`` (FK) then ``upsert_record``.\n\nDistributed uniqueness is by ``canonical_sha`` (the content-hash PK): the SAME\nartifact uploaded twice collapses to ONE row (the loser is ``duplicate``), so\nupload is safe to retry / across agents. The agent should call\n``/upload/dedup-check`` first and upload only the ``new`` rows. Accepts\n``Content-Encoding: gzip`` (decompressed server-side, size-bounded).\n\nReturns ``{batch_id, inserted, duplicates, rejected, results:[...]}``. A bad row\nis a per-row ``rejected`` and never aborts the rest of the batch.","operationId":"upload_api_v1_curation_upload_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Api V1 Curation Upload Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/lease/{lease_id}/release":{"post":{"tags":["curation"],"summary":"Lease Release","description":"Return this curator's un-graded records held by ``lease_id`` to the pool.","operationId":"lease_release_api_v1_curation_lease__lease_id__release_post","parameters":[{"name":"lease_id","in":"path","required":true,"schema":{"type":"string","title":"Lease Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lease Release Api V1 Curation Lease  Lease Id  Release Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/lease/{lease_id}/renew":{"post":{"tags":["curation"],"summary":"Lease Renew","description":"Extend the TTL of this curator's ``lease_id`` so a long grade doesn't expire.","operationId":"lease_renew_api_v1_curation_lease__lease_id__renew_post","parameters":[{"name":"lease_id","in":"path","required":true,"schema":{"type":"string","title":"Lease Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RenewBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lease Renew Api V1 Curation Lease  Lease Id  Renew Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/ingest":{"post":{"tags":["curation"],"summary":"Ingest","description":"Scan the curated GCS bucket and upsert records (idempotent by sha).\n\nAuthorized by the admin key OR the continuous-ingest scheduler's OIDC token\n(see ``require_ingest_auth``). ``batch_id`` limits ingest to a single\n``batches/<batch_id>.jsonl`` object. Fails explicit: a GCS/SDK or bucket\nconfig error surfaces as 503. Idempotent — safe to run on a schedule.","operationId":"ingest_api_v1_curation_ingest_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Api V1 Curation Ingest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/batches":{"get":{"tags":["curation"],"summary":"Batches","description":"List ingested batches (admin-only).","operationId":"batches_api_v1_curation_batches_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Batches Api V1 Curation Batches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/audit/export":{"get":{"tags":["curation"],"summary":"Audit Export","description":"Export the signed audit chain + a tamper-evident verification result.\n\nAdmin-only (admin API key OR an admin-allowlisted session). ``ok`` is the\nwhole-chain verification verdict; ``broken_at`` localizes the first tampered\nlink.","operationId":"audit_export_api_v1_curation_audit_export_get","parameters":[{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After Seq"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Audit Export Api V1 Curation Audit Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/export/training":{"get":{"tags":["curation"],"summary":"Export Training","description":"Stream RLHF/GRPO-ready training rows as JSONL (admin-only: admin API key\nfor agents, OR an admin-allowlisted session for a human on the console).\n\n``status`` (passed to :func:`curation_store.training_rows`): ``affirmed``\n(default) → training-ready ``affirmed`` ∪ ``edited`` (contract §2); ``edited``\n→ human-corrected only; ``all`` → every decided row (+ ``rejected``) in one\npull; ``rejected`` → rejected only (audit).\n\n``since`` (iso8601, optional) is the **incremental cursor** the cloud→local\ncorpus sync passes: only rows with ``last_decision_at > since`` are streamed\n(newest-first, so the sync's next watermark is the first line's\n``last_decision_at``); omitted → a full pull (existing behaviour).\n\nEach JSONL row is a flat dict carrying ``rlhf_label`` (``gold_positive`` |\n``clean_negative`` | ``corrected`` | ``rejected``), ``effective_flaw`` /\n``effective_anchor`` (the human-corrected primary label, else the original),\nthe FULL ``gold_flaws`` / ``effective_flaws`` LIST (multi-flaw gold, contract\n§3.1 — what the trainer reads), and the ORIGINAL frontier ``gate`` verdict, so\neach row is a usable preference/reward example.","operationId":"export_training_api_v1_curation_export_training_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":32,"default":"affirmed","title":"Status"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Since"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/upload-url":{"post":{"tags":["curation"],"summary":"Mint Upload Url","description":"Mint a short-lived, path-scoped GCS WRITE capability for ONE object.\n\nCurator-token-authed (NOT admin-only). ``signed_url`` mode → a V4 PUT URL the\nagent PUTs bytes to directly; ``proxy`` mode → ``{mode:'proxy', put_endpoint}``\nthe agent PUTs bytes to. 422 on an out-of-scope path (other\nbucket/prefix/traversal); 503 if signing/GCS is unavailable.","operationId":"mint_upload_url_api_v1_curation_upload_url_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mint Upload Url Api V1 Curation Upload Url Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/upload-url:batch":{"post":{"tags":["curation"],"summary":"Mint Upload Urls","description":"Batch ``/upload-url`` (≤200 objects in one round-trip).\n\nOne bad path is a per-item ``{object_path, error}`` and never aborts the rest\n(mirrors ``/decisions:batch``); a 503 (signing/GCS down) aborts all.","operationId":"mint_upload_urls_api_v1_curation_upload_url_batch_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlBatchBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mint Upload Urls Api V1 Curation Upload Url Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curation/upload-blob":{"put":{"tags":["curation"],"summary":"Upload Blob","description":"Proxy-mode write target (Backend B): stream the curator's bytes to the\nvalidated path with the SA's ``objectAdmin``. 404 in ``signed_url`` mode (the\nagent PUTs straight to GCS there), 422 out-of-scope path, 413 too large / sha\nmismatch, 503 GCS down.","operationId":"upload_blob_api_v1_curation_upload_blob_put","parameters":[{"name":"object_path","in":"query","required":true,"schema":{"type":"string","maxLength":512,"title":"Object Path"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}},{"name":"curator_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Blob Api V1 Curation Upload Blob Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curate/session":{"post":{"tags":["curate"],"summary":"Create Curator Session","description":"Verify Google sign-in + enforce the curator allowlist.\n\nReturns ``{ok, email, name, curatorId}`` for the web to mint the\n``curator_session`` cookie/token. 401 for an unverifiable token, 403 for a\nverified-but-not-allowlisted email, 503 if Firebase verification is\nunavailable. The curator id is the normalized email (a stable, human-legible\nactor recorded in the audit chain as ``curator:<email>``).","operationId":"create_curator_session_api_v1_curate_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CuratorSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Curator Session Api V1 Curate Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/curate/token":{"post":{"tags":["curate"],"summary":"Mint Curator Token","description":"Admin-only: issue a curator agent token for ``email`` (out-of-band path).\n\nLets a founder wire up a cofounder's agent without the browser flow. The\nemail is still required to be on the curator allowlist (the same trust\nboundary as the Google sign-in). Returns ``{ok, token, email, ttl_days}``.","operationId":"mint_curator_token_api_v1_curate_token_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CuratorTokenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mint Curator Token Api V1 Curate Token Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/contractor/profile":{"get":{"tags":["contractor"],"summary":"Get Profile","description":"Full contractor profile: LinkedIn, parsed features, rate, payout, earnings.","operationId":"get_profile_api_v1_eval_contractor_profile_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Profile Api V1 Eval Contractor Profile Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/contractor/linkedin/verify":{"post":{"tags":["contractor"],"summary":"Verify Linkedin","description":"Re-verify a LinkedIn OIDC id_token server-side and persist the identity.\n\nThe web exchanged the auth code for this token (it holds the client secret);\nwe cryptographically re-verify here so a forged ``verified=true`` POST to the\ndirectly-reachable API cannot fake a LinkedIn identity.","operationId":"verify_linkedin_api_v1_eval_contractor_linkedin_verify_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedInVerifyBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Verify Linkedin Api V1 Eval Contractor Linkedin Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/contractor/profile/parse":{"post":{"tags":["contractor"],"summary":"Parse Profile","description":"Parse a CV (PDF/DOCX/TXT) or pasted text → features → rate; persist.\n\nThe contractor explicitly submits this to be priced; we send the text to the\ncheap LLM, then store only the STRUCTURED features + a hash of the input —\nnever the raw CV. Falls back to a deterministic parser with no LLM key.","operationId":"parse_profile_api_v1_eval_contractor_profile_parse_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_parse_profile_api_v1_eval_contractor_profile_parse_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Parse Profile Api V1 Eval Contractor Profile Parse Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/contractor/payout-account":{"post":{"tags":["contractor"],"summary":"Create Payout Account","description":"Create (or reuse) the contractor's Express account; return an onboarding URL.","operationId":"create_payout_account_api_v1_eval_contractor_payout_account_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutAccountBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Payout Account Api V1 Eval Contractor Payout Account Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["contractor"],"summary":"Get Payout Account","description":"Return the Stripe Connect account status, refreshed from Stripe if linked.","operationId":"get_payout_account_api_v1_eval_contractor_payout_account_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Payout Account Api V1 Eval Contractor Payout Account Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/contractor/earnings":{"get":{"tags":["contractor"],"summary":"Get Earnings","description":"Accrued / paid earnings summary, current rate, and payout history.","operationId":"get_earnings_api_v1_eval_contractor_earnings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Earnings Api V1 Eval Contractor Earnings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/eval/contractor/payout":{"post":{"tags":["contractor"],"summary":"Request Payout","description":"Settle all accrued earnings to the contractor's Stripe account.\n\nConcurrency-safe: a pending-payout row keyed by the current balance collapses\na double-click, and earnings are atomically claimed before the transfer so no\nearning is ever paid twice. A transfer failure reverts the claim.","operationId":"request_payout_api_v1_eval_contractor_payout_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"benchmark_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Request Payout Api V1 Eval Contractor Payout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/raise/session":{"post":{"tags":["raise"],"summary":"Create Raise Session","description":"Verify Google sign-in, enforce the allowlist, record NDA acceptance.\n\nReturns the verified viewer identity. The caller (web app) mints the\nsigned browser session cookie.","operationId":"create_raise_session_api_v1_raise_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaiseSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Raise Session Api V1 Raise Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/raise/request-access":{"post":{"tags":["raise"],"summary":"Request Raise Access","description":"Email the SeaOtter team an access request from a verified Google user.\n\nUsed by the login page when a viewer signs in but is not allowlisted.\nThe Firebase token is verified so the request carries a real Google\nidentity — an unauthenticated form would only invite inbox spam.\n\nThe founder notification is dispatched as a background task: a slow or\nstalled email provider must never hang the viewer's HTTP request.","operationId":"request_raise_access_api_v1_raise_request_access_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaiseAccessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Request Raise Access Api V1 Raise Request Access Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/raise/allowlist":{"get":{"tags":["admin:raise"],"summary":"Admin List Allowlist","description":"Return every allowlist entry.","operationId":"admin_list_allowlist_api_v1_admin_raise_allowlist_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Allowlist Api V1 Admin Raise Allowlist Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin:raise"],"summary":"Admin Add Allowlist Entry","description":"Add (or refresh the note of) one email or domain allowlist entry.","operationId":"admin_add_allowlist_entry_api_v1_admin_raise_allowlist_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowlistEntryRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Add Allowlist Entry Api V1 Admin Raise Allowlist Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/raise/allowlist/{entry_id}":{"delete":{"tags":["admin:raise"],"summary":"Admin Delete Allowlist Entry","description":"Remove one allowlist entry by id.","operationId":"admin_delete_allowlist_entry_api_v1_admin_raise_allowlist__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Delete Allowlist Entry Api V1 Admin Raise Allowlist  Entry Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/raise/nda-acceptances":{"get":{"tags":["admin:raise"],"summary":"Admin List Nda Acceptances","description":"Return recent click-through NDA acceptances, newest first.","operationId":"admin_list_nda_acceptances_api_v1_admin_raise_nda_acceptances_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Nda Acceptances Api V1 Admin Raise Nda Acceptances Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{issue_num}/active_run":{"get":{"tags":["tickets"],"summary":"Get Active Run","description":"Return the active run_id linked to this issue, or null.","operationId":"get_active_run_api_v1_tickets__issue_num__active_run_get","parameters":[{"name":"issue_num","in":"path","required":true,"schema":{"type":"integer","title":"Issue Num"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Active Run Api V1 Tickets  Issue Num  Active Run Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{issue_num}/events":{"get":{"tags":["tickets"],"summary":"Stream Run Events","description":"SSE stream of graph_channels messages for the active run.","operationId":"stream_run_events_api_v1_tickets__issue_num__events_get","parameters":[{"name":"issue_num","in":"path","required":true,"schema":{"type":"integer","title":"Issue Num"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{issue_num}/message":{"post":{"tags":["tickets"],"summary":"Post Founder Message","description":"Post a founder message to the founder_comment channel for the active run.","operationId":"post_founder_message_api_v1_tickets__issue_num__message_post","parameters":[{"name":"issue_num","in":"path","required":true,"schema":{"type":"integer","title":"Issue Num"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FounderMessageBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Founder Message Api V1 Tickets  Issue Num  Message Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessLevel":{"type":"string","enum":["read","write","admin","execute"],"title":"AccessLevel"},"AgentKeyCreateIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","title":"AgentKeyCreateIn","description":"Create body. ``tenant_id`` is taken from the auth context, never here."},"AgentSignupIn":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email","description":"Owner email (for invoices / pay-link)."},"org_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Org Name"},"key_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Key Name"}},"additionalProperties":false,"type":"object","required":["email"],"title":"AgentSignupIn","description":"Self-serve signup body — no auth; creates a fresh free-tier tenant + key."},"AllowlistEntryRequest":{"properties":{"entry_type":{"type":"string","pattern":"^(email|domain)$","title":"Entry Type"},"value":{"type":"string","maxLength":320,"minLength":1,"title":"Value"},"note":{"type":"string","maxLength":500,"title":"Note","default":""}},"additionalProperties":false,"type":"object","required":["entry_type","value"],"title":"AllowlistEntryRequest"},"ApiKeyRotateRequest":{"properties":{"current_key":{"type":"string","title":"Current Key","description":"The current API key to rotate"},"name":{"type":"string","title":"Name","description":"New name for the rotated key (optional)","default":""}},"type":"object","required":["current_key"],"title":"ApiKeyRotateRequest","description":"Request to rotate an API key."},"ApiKeyRotateResponse":{"properties":{"new_key":{"type":"string","title":"New Key"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","title":"Tier"},"rate_limit":{"type":"integer","title":"Rate Limit"},"rotated_at":{"type":"string","title":"Rotated At"},"message":{"type":"string","title":"Message","default":"Previous key is now invalidated."}},"type":"object","required":["new_key","name","tier","rate_limit","rotated_at"],"title":"ApiKeyRotateResponse","description":"Response with the new API key after rotation."},"AppDriverCatalogResponse":{"properties":{"schema":{"type":"string","title":"Schema","default":"seaotter.agentos.app_driver_catalog.v1"},"drivers":{"items":{"$ref":"#/components/schemas/AppDriverProfileStatusOut"},"type":"array","title":"Drivers"},"driver_surface_implementation":{"additionalProperties":{"$ref":"#/components/schemas/DriverSurfaceImplementationOut"},"type":"object","title":"Driver Surface Implementation"}},"type":"object","required":["drivers"],"title":"AppDriverCatalogResponse"},"AppDriverFailureEventOut":{"properties":{"kind":{"type":"string","const":"app_driver.failure","title":"Kind","default":"app_driver.failure"},"event_id":{"type":"string","minLength":1,"title":"Event Id"},"app_id":{"type":"string","minLength":1,"title":"App Id"},"driver_id":{"type":"string","minLength":1,"title":"Driver Id"},"failure_class":{"type":"string","enum":["auth_expired","scope_insufficient","not_installed","rate_limited","unreachable","other"],"title":"Failure Class"},"human_message":{"type":"string","minLength":1,"title":"Human Message"},"retry_after_seconds":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retry After Seconds"},"tune_action_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tune Action Url"},"settings_tab":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Settings Tab"},"technical_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Technical Details"},"privacy_lineage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Privacy Lineage"},"emitted_at":{"type":"string","minLength":1,"title":"Emitted At"}},"additionalProperties":false,"type":"object","required":["event_id","app_id","driver_id","failure_class","human_message","emitted_at"],"title":"AppDriverFailureEventOut"},"AppDriverProbeResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"kind":{"type":"string","const":"app_driver.probe","title":"Kind","default":"app_driver.probe"},"driver_id":{"type":"string","minLength":1,"title":"Driver Id"},"app_id":{"type":"string","minLength":1,"title":"App Id"},"connector_id":{"type":"string","minLength":1,"title":"Connector Id"},"status":{"type":"string","enum":["ok","degraded","down","unknown"],"title":"Status"},"checked_at":{"type":"string","minLength":1,"title":"Checked At"},"human_message":{"type":"string","minLength":1,"title":"Human Message"},"failure":{"anyOf":[{"$ref":"#/components/schemas/AppDriverFailureEventOut"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["ok","driver_id","app_id","connector_id","status","checked_at","human_message"],"title":"AppDriverProbeResponse"},"AppDriverProfileStatusOut":{"properties":{"driver_id":{"type":"string","minLength":1,"title":"Driver Id"},"app_family":{"type":"string","minLength":1,"title":"App Family"},"app_versions":{"items":{"type":"string"},"type":"array","title":"App Versions"},"category":{"type":"string","minLength":1,"title":"Category"},"tier":{"type":"string","enum":["read","click","full"],"title":"Tier"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"approval_required":{"type":"boolean","title":"Approval Required"},"status":{"type":"string","title":"Status"},"bundle_id":{"type":"string","title":"Bundle Id"},"profile_id":{"type":"string","title":"Profile Id"},"display_name":{"type":"string","title":"Display Name"},"daemon_healthy":{"type":"boolean","title":"Daemon Healthy"},"observation_ready":{"type":"boolean","title":"Observation Ready"},"driver_order":{"items":{"type":"string"},"type":"array","title":"Driver Order"},"driver_surfaces":{"items":{"$ref":"#/components/schemas/AppDriverSurfaceStatusOut"},"type":"array","title":"Driver Surfaces"}},"additionalProperties":false,"type":"object","required":["driver_id","app_family","category","tier","approval_required","status","bundle_id","profile_id","display_name","daemon_healthy","observation_ready"],"title":"AppDriverProfileStatusOut"},"AppDriverSurfaceStatusOut":{"properties":{"surface_id":{"type":"string","minLength":1,"title":"Surface Id"},"kind":{"type":"string","minLength":1,"title":"Kind"},"driver_id":{"type":"string","minLength":1,"title":"Driver Id"},"implemented":{"anyOf":[{"type":"string","enum":["yes","partial","no"]},{"type":"string"}],"title":"Implemented"},"runtime":{"type":"string","minLength":1,"title":"Runtime"},"driver_health":{"additionalProperties":true,"type":"object","title":"Driver Health"},"verbs":{"items":{"type":"string"},"type":"array","title":"Verbs"},"side_effects":{"items":{"type":"string"},"type":"array","title":"Side Effects"},"approval_gates":{"items":{"type":"string"},"type":"array","title":"Approval Gates"}},"additionalProperties":false,"type":"object","required":["surface_id","kind","driver_id","implemented","runtime"],"title":"AppDriverSurfaceStatusOut"},"ApprovalDecision":{"properties":{"approval_id":{"type":"string","title":"Approval Id"},"decision":{"type":"string","enum":["approve","reject","snooze"],"title":"Decision"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"decided_at":{"type":"string","title":"Decided At"},"decided_by":{"type":"string","title":"Decided By"},"item":{"$ref":"#/components/schemas/ApprovalItem"}},"additionalProperties":false,"type":"object","required":["approval_id","decision","decided_at","decided_by","item"],"title":"ApprovalDecision"},"ApprovalDecisionRequest":{"properties":{"decision":{"type":"string","maxLength":32,"minLength":1,"title":"Decision"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"},"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"},"decided_by":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Decided By"}},"type":"object","required":["decision"],"title":"ApprovalDecisionRequest"},"ApprovalItem":{"properties":{"approval_id":{"type":"string","title":"Approval Id"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"created_at":{"type":"string","title":"Created At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"source":{"$ref":"#/components/schemas/ApprovalSource"},"request_id":{"type":"string","title":"Request Id"},"requested_at":{"type":"string","title":"Requested At"},"blast_radius":{"type":"string","title":"Blast Radius","default":""},"severity":{"type":"string","enum":["info","warn","high","critical"],"title":"Severity","default":"info"},"structural_payload":{"additionalProperties":true,"type":"object","title":"Structural Payload"}},"additionalProperties":false,"type":"object","required":["approval_id","kind","title","summary","created_at","request_id","requested_at"],"title":"ApprovalItem"},"ApprovalSource":{"properties":{"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"recommendation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Id"}},"additionalProperties":false,"type":"object","title":"ApprovalSource"},"ArtifactPartRef":{"properties":{"mime_type":{"type":"string","maxLength":128,"title":"Mime Type","default":"text/plain"},"text":{"anyOf":[{"type":"string","maxLength":200000},{"type":"null"}],"title":"Text"},"data_b64":{"anyOf":[{"type":"string","maxLength":2000000},{"type":"null"}],"title":"Data B64"},"uri":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Uri"},"ingest_artifact_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Ingest Artifact Id"},"content_sha256":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Content Sha256"},"render_view":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Render View"},"logical_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Logical Name"}},"additionalProperties":false,"type":"object","title":"ArtifactPartRef","description":"One part of the artifact's actual content, sent inline with a run.\n\nThe critic grounds flaws against verbatim content; an ``artifact_ref`` hash\nalone is uncritiquable. So the SDK ships the real parts here for inline\n``text`` (and small base64 ``data_b64``) artifacts. ``content_sha256`` lets\nthe server confirm the parts match the keyed ``artifact_ref``. URI-only\nartifacts send no parts and the critic fetches them out-of-band.\n\n``ingest_artifact_id`` references a file already uploaded through the\nagent-native ingestion plane (``POST /api/v1/ingest`` presign -> PUT ->\ncomplete). The server dereferences it TENANT-SCOPED at grade time, fetches\nthe stored (scanned, clean) GCS bytes, and runs the same Tier-1 converters as\nan inline ``data_b64`` part — so a 2 GB screen recording or a 40 MB deck can\nbe graded without riding the JSON body. An ``ingest_artifact_id`` that does\nnot resolve to a clean artifact owned by the caller's tenant is REJECTED\n(never graded as the empty string)."},"AuditEntry":{"properties":{"id":{"type":"string","title":"Id"},"timestamp":{"type":"string","title":"Timestamp"},"actor":{"type":"string","title":"Actor"},"action":{"type":"string","title":"Action"},"payload_hash":{"type":"string","title":"Payload Hash"},"prev_hash":{"type":"string","title":"Prev Hash"},"event_type":{"type":"string","title":"Event Type"},"run_id":{"type":"string","title":"Run Id"},"seq":{"type":"integer","title":"Seq"},"workflow_id":{"type":"string","title":"Workflow Id"},"created_at":{"type":"string","title":"Created At"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"additionalProperties":false,"type":"object","required":["id","timestamp","actor","action","payload_hash","prev_hash","event_type","run_id","seq","workflow_id","created_at"],"title":"AuditEntry"},"AuditLogDeleteResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"},"ok":{"type":"boolean","title":"Ok","default":true},"range_id":{"type":"string","title":"Range Id"},"deleted_event_count":{"type":"integer","title":"Deleted Event Count"}},"additionalProperties":false,"type":"object","required":["deleted_count","range_id","deleted_event_count"],"title":"AuditLogDeleteResponse"},"AuditLogResponse":{"properties":{"range_id":{"type":"string","title":"Range Id"},"entries":{"items":{"$ref":"#/components/schemas/AuditEntry"},"type":"array","title":"Entries"},"total_count":{"type":"integer","title":"Total Count"},"ok":{"type":"boolean","title":"Ok","default":true},"count":{"type":"integer","title":"Count"},"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Events"}},"additionalProperties":false,"type":"object","required":["range_id","entries","total_count","count"],"title":"AuditLogResponse"},"BatchDecisionBody":{"properties":{"lease_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Lease Id"},"decisions":{"items":{"$ref":"#/components/schemas/BatchDecisionItem"},"type":"array","maxItems":200,"minItems":1,"title":"Decisions"}},"additionalProperties":false,"type":"object","required":["decisions"],"title":"BatchDecisionBody"},"BatchDecisionItem":{"properties":{"canonical_sha":{"type":"string","maxLength":128,"title":"Canonical Sha"},"action":{"type":"string","title":"Action","description":"affirm | reject | edit | reopen"},"reason":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Reason"},"edited_flaw":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Edited Flaw"},"edited_anchor":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Edited Anchor"},"edited_flaws":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":10},{"type":"null"}],"title":"Edited Flaws"},"human_missed":{"type":"boolean","title":"Human Missed","description":"the flaw fooled the curator too (affirm only)","default":false},"evidence":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":20},{"type":"null"}],"title":"Evidence"},"node_verdicts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Node Verdicts"},"chain_verdict":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Chain Verdict"}},"additionalProperties":false,"type":"object","required":["canonical_sha","action"],"title":"BatchDecisionItem"},"BenchmarkSubmitRequest":{"properties":{"artifact_parts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":16,"title":"Artifact Parts"},"artifact_ref":{"type":"string","maxLength":2048,"title":"Artifact Ref","default":"inline"},"submission":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Submission"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Idempotency Key"}},"additionalProperties":false,"type":"object","title":"BenchmarkSubmitRequest"},"BlastRadius":{"type":"string","enum":["low","medium","high","critical"],"title":"BlastRadius"},"Body_parse_profile_api_v1_eval_contractor_profile_parse_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","title":"Body_parse_profile_api_v1_eval_contractor_profile_parse_post"},"CancelRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"reason":{"type":"string","title":"Reason","default":""}},"type":"object","required":["user_id"],"title":"CancelRequest"},"CapabilityCategory":{"type":"string","enum":["browser","code_host","database","filesystem","memory","messaging","network"],"title":"CapabilityCategory"},"CapsIn":{"properties":{"cpu":{"type":"number","maximum":8.0,"exclusiveMinimum":0.0,"title":"Cpu","default":1.0},"mem_mb":{"type":"integer","maximum":8192.0,"exclusiveMinimum":0.0,"title":"Mem Mb","default":512},"timeout_s":{"type":"integer","maximum":1200.0,"exclusiveMinimum":0.0,"title":"Timeout S","default":60},"max_cost_usd":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Max Cost Usd","default":0.1}},"additionalProperties":false,"type":"object","title":"CapsIn"},"ChangePlanRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"new_plan":{"type":"string","title":"New Plan","description":"New plan: free, starter, pro"}},"type":"object","required":["user_id","new_plan"],"title":"ChangePlanRequest","description":"Request to change subscription plan."},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan","description":"Plan: starter, pro, enterprise"},"user_id":{"type":"string","title":"User Id","description":"User ID"},"success_url":{"type":"string","title":"Success Url","default":"https://seaotter.ai/settings?billing=success"},"cancel_url":{"type":"string","title":"Cancel Url","default":"https://seaotter.ai/pricing"}},"type":"object","required":["plan","user_id"],"title":"CheckoutRequest","description":"Create a Stripe checkout session."},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["checkout_url","session_id"],"title":"CheckoutResponse","description":"Checkout session result."},"CompleteFileIn":{"properties":{"file_id":{"type":"string","maxLength":64,"minLength":1,"title":"File Id"},"filename":{"type":"string","maxLength":1024,"minLength":1,"title":"Filename"},"mime":{"type":"string","maxLength":256,"minLength":1,"title":"Mime"},"key":{"type":"string","maxLength":2048,"minLength":1,"title":"Key"}},"additionalProperties":false,"type":"object","required":["file_id","filename","mime","key"],"title":"CompleteFileIn"},"CompleteIn":{"properties":{"bundle_id":{"type":"string","maxLength":64,"minLength":1,"title":"Bundle Id"},"files":{"items":{"$ref":"#/components/schemas/CompleteFileIn"},"type":"array","maxItems":2000,"minItems":1,"title":"Files"},"retention_class":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Retention Class"},"consent_scope":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Consent Scope"}},"additionalProperties":false,"type":"object","required":["bundle_id","files"],"title":"CompleteIn","description":"Report a bundle's uploads complete; triggers validate + scan + persist."},"ConsentUpdateContract":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"consent_captured_at":{"type":"string","title":"Consent Captured At"},"usage_scope":{"type":"string","title":"Usage Scope"},"retention_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Retention Days"},"policy":{"additionalProperties":true,"type":"object","title":"Policy"},"windows_updated":{"type":"integer","title":"Windows Updated"},"windows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Windows"}},"additionalProperties":true,"type":"object","required":["tenant_id","consent_captured_at","usage_scope","retention_days","policy","windows_updated","windows"],"title":"ConsentUpdateContract"},"ConsentUpdateIn":{"properties":{"usage_scope":{"type":"string","title":"Usage Scope","description":"One of: user-only, cohort-aggregate, training-corpus"},"retention_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Retention Days","default":30}},"type":"object","required":["usage_scope"],"title":"ConsentUpdateIn"},"ContractorStatusUpdate":{"properties":{"status":{"type":"string","maxLength":32,"minLength":1,"title":"Status"},"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"}},"additionalProperties":false,"type":"object","required":["status"],"title":"ContractorStatusUpdate"},"CreateJobRequest":{"properties":{"mode":{"type":"string","maxLength":24,"title":"Mode","default":"one_shot"},"submission":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Submission"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Idempotency Key"},"priority":{"type":"string","maxLength":8,"title":"Priority","default":"medium"},"callback_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Callback Url"},"accept_timeout_secs":{"anyOf":[{"type":"number","maximum":60.0,"minimum":0.0},{"type":"null"}],"title":"Accept Timeout Secs"},"cost_authorized_usd":{"anyOf":[{"type":"number","maximum":50.0,"minimum":0.0},{"type":"null"}],"title":"Cost Authorized Usd"},"workflow_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Workflow Id"},"modality":{"type":"string","maxLength":32,"title":"Modality"},"rubric_id":{"type":"string","maxLength":128,"minLength":1,"title":"Rubric Id"},"artifact_ref":{"type":"string","maxLength":2048,"minLength":1,"title":"Artifact Ref"},"artifact_parts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":16,"title":"Artifact Parts"},"intent_text":{"type":"string","maxLength":4000,"title":"Intent Text","default":""},"user_prompt":{"type":"string","maxLength":4000,"title":"User Prompt","default":""},"references":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":5,"title":"References"},"prior_iterations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":20,"title":"Prior Iterations"},"cost_cap_usd":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Cost Cap Usd"},"policy_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Policy Id"},"locale":{"type":"string","maxLength":16,"title":"Locale","default":"en"},"return_feedback_artifacts":{"type":"boolean","title":"Return Feedback Artifacts","default":false},"benchmark_task_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Benchmark Task Id"}},"additionalProperties":false,"type":"object","required":["modality","rubric_id","artifact_ref"],"title":"CreateJobRequest","description":"Submit work for grading. Mirrors ``CreateRunRequest`` + the job envelope.\n\n``tenant_id`` is NEVER accepted from the body — it is resolved from the auth\ncontext by ``require_eval_api_key`` (S0-1 pivot fix), so a caller cannot\nsubmit under another tenant's id."},"CreateRunRequest":{"properties":{"workflow_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Workflow Id"},"modality":{"type":"string","maxLength":32,"title":"Modality"},"rubric_id":{"type":"string","maxLength":128,"minLength":1,"title":"Rubric Id"},"artifact_ref":{"type":"string","maxLength":2048,"minLength":1,"title":"Artifact Ref"},"artifact_parts":{"items":{"$ref":"#/components/schemas/ArtifactPartRef"},"type":"array","maxItems":16,"title":"Artifact Parts"},"intent_text":{"type":"string","maxLength":4000,"title":"Intent Text","default":""},"user_prompt":{"type":"string","maxLength":4000,"title":"User Prompt","default":""},"references":{"items":{"$ref":"#/components/schemas/ReferenceRef"},"type":"array","maxItems":5,"title":"References"},"prior_iterations":{"items":{"$ref":"#/components/schemas/IterationRef"},"type":"array","maxItems":20,"title":"Prior Iterations"},"cost_cap_usd":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Cost Cap Usd"},"policy_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Policy Id"},"locale":{"type":"string","maxLength":16,"title":"Locale","default":"en"},"return_feedback_artifacts":{"type":"boolean","title":"Return Feedback Artifacts","default":false}},"additionalProperties":false,"type":"object","required":["modality","rubric_id","artifact_ref"],"title":"CreateRunRequest"},"CuratorSessionRequest":{"properties":{"id_token":{"type":"string","maxLength":8192,"minLength":8,"title":"Id Token"}},"additionalProperties":false,"type":"object","required":["id_token"],"title":"CuratorSessionRequest"},"CuratorTokenRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Name"},"ttl_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Ttl Days","default":30}},"additionalProperties":false,"type":"object","required":["email"],"title":"CuratorTokenRequest"},"DangerousCapability":{"properties":{"capability_id":{"type":"string","title":"Capability Id"},"label":{"type":"string","title":"Label"},"category":{"$ref":"#/components/schemas/CapabilityCategory"},"default_enabled":{"type":"boolean","title":"Default Enabled"},"blast_radius":{"$ref":"#/components/schemas/BlastRadius"},"notes":{"type":"string","title":"Notes"}},"type":"object","required":["capability_id","label","category","default_enabled","blast_radius","notes"],"title":"DangerousCapability","description":"High-risk operations that deserve install-time scrutiny."},"DecisionBody":{"properties":{"action":{"type":"string","title":"Action","description":"affirm | reject | edit | reopen"},"reason":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Reason"},"edited_flaw":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Edited Flaw"},"edited_anchor":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Edited Anchor"},"edited_flaws":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":10},{"type":"null"}],"title":"Edited Flaws"},"evidence":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":20},{"type":"null"}],"title":"Evidence"},"node_verdicts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Node Verdicts"},"chain_verdict":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Chain Verdict"}},"additionalProperties":false,"type":"object","required":["action"],"title":"DecisionBody"},"DriverSurfaceImplementationOut":{"properties":{"implemented":{"anyOf":[{"type":"string","enum":["yes","partial","no"]},{"type":"string"}],"title":"Implemented"},"runtime":{"type":"string","title":"Runtime"},"log_levels":{"items":{"type":"string"},"type":"array","title":"Log Levels"}},"additionalProperties":false,"type":"object","required":["implemented","runtime"],"title":"DriverSurfaceImplementationOut"},"EvalSessionRequest":{"properties":{"id_token":{"type":"string","minLength":1,"title":"Id Token"},"agreement_accepted":{"type":"boolean","title":"Agreement Accepted","default":false},"agreement_version":{"type":"string","maxLength":64,"title":"Agreement Version","default":""},"ip_address":{"type":"string","maxLength":64,"title":"Ip Address","default":""},"user_agent":{"type":"string","maxLength":512,"title":"User Agent","default":""}},"additionalProperties":false,"type":"object","required":["id_token"],"title":"EvalSessionRequest"},"EventRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","description":"Event name (e.g. page_view, benchmark_started)"},"properties":{"additionalProperties":true,"type":"object","title":"Properties","description":"Arbitrary key-value metadata for this event"},"session_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Session Id","description":"Client-generated session identifier"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp","description":"ISO-8601 timestamp from the client"},"consent_granted":{"type":"boolean","title":"Consent Granted","description":"True only after explicit product analytics consent","default":false},"consent_category":{"type":"string","maxLength":80,"title":"Consent Category","description":"Telemetry consent category","default":"product_analytics"}},"type":"object","required":["name"],"title":"EventRequest","description":"Incoming analytics event from the frontend."},"FeedbackResponse":{"properties":{"id":{"type":"integer","title":"Id"},"nps_score":{"type":"integer","title":"Nps Score"},"message":{"type":"string","title":"Message","default":"Thank you for your feedback!"}},"type":"object","required":["id","nps_score"],"title":"FeedbackResponse","description":"Confirmation of feedback submission."},"FeedbackStatsResponse":{"properties":{"total_responses":{"type":"integer","title":"Total Responses"},"mean_nps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mean Nps"},"promoters":{"type":"integer","title":"Promoters"},"passives":{"type":"integer","title":"Passives"},"detractors":{"type":"integer","title":"Detractors"},"nps_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nps Score"},"share_willing":{"type":"integer","title":"Share Willing"}},"type":"object","required":["total_responses","mean_nps","promoters","passives","detractors","nps_score","share_willing"],"title":"FeedbackStatsResponse","description":"Aggregate NPS statistics."},"FindingSeverity":{"type":"string","enum":["low","medium","high","critical"],"title":"FindingSeverity"},"FirebaseSessionRequest":{"properties":{"id_token":{"type":"string","title":"Id Token"}},"type":"object","required":["id_token"],"title":"FirebaseSessionRequest"},"FounderMessageBody":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"FounderMessageBody"},"FunnelEventRequest":{"properties":{"event":{"type":"string","maxLength":50,"title":"Event"},"session_id":{"type":"string","maxLength":200,"title":"Session Id"},"workflow_id":{"type":"string","maxLength":100,"title":"Workflow Id"},"tenant_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Tenant Id"}},"additionalProperties":false,"type":"object","required":["event","session_id","workflow_id"],"title":"FunnelEventRequest"},"GateReason":{"properties":{"reason_id":{"type":"string","title":"Reason Id"},"reason_type":{"type":"string","title":"Reason Type"},"severity":{"anyOf":[{"$ref":"#/components/schemas/FindingSeverity"},{"type":"null"}]},"summary":{"type":"string","title":"Summary"},"source_ids":{"items":{"type":"string"},"type":"array","title":"Source Ids"}},"type":"object","required":["reason_id","reason_type","summary"],"title":"GateReason","description":"Machine-readable explanation for an install verdict."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageGenRequest":{"properties":{"feature":{"type":"string","maxLength":128,"minLength":1,"title":"Feature"},"prompt":{"type":"string","maxLength":100000,"minLength":1,"title":"Prompt"},"sample_count":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Sample Count","default":1}},"type":"object","required":["feature","prompt"],"title":"ImageGenRequest"},"ImageGenResponse":{"properties":{"model":{"type":"string","title":"Model"},"images":{"items":{"$ref":"#/components/schemas/ImageItem"},"type":"array","title":"Images"},"cost_usd":{"type":"number","title":"Cost Usd"}},"type":"object","required":["model","images","cost_usd"],"title":"ImageGenResponse"},"ImageItem":{"properties":{"mime_type":{"type":"string","title":"Mime Type"},"data_base64":{"type":"string","title":"Data Base64"}},"type":"object","required":["mime_type","data_base64"],"title":"ImageItem"},"InboundEmailPayload":{"properties":{"from":{"type":"string","title":"From","default":""},"subject":{"type":"string","title":"Subject","default":""},"body":{"type":"string","title":"Body","default":""},"attachments":{"items":{"$ref":"#/components/schemas/_Attachment"},"type":"array","title":"Attachments"},"modality":{"type":"string","title":"Modality","default":"text"}},"type":"object","title":"InboundEmailPayload","description":"Provider-neutral parsed-inbound-email shape. Accepts the common aliases so a\nResend/SendGrid/Postmark webhook maps without a per-provider adapter here."},"IngestBody":{"properties":{"batch_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Batch Id"}},"additionalProperties":false,"type":"object","title":"IngestBody"},"InstallGate":{"type":"string","enum":["safe","caveated","unsafe"],"title":"InstallGate"},"IterateRequest":{"properties":{"decision":{"type":"string","minLength":1,"title":"Decision"},"user_prompt":{"type":"string","maxLength":4000,"title":"User Prompt","default":""},"new_artifact_ref":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"New Artifact Ref"},"new_artifact_parts":{"items":{"$ref":"#/components/schemas/ArtifactPartRef"},"type":"array","maxItems":16,"title":"New Artifact Parts"},"locale":{"type":"string","maxLength":16,"title":"Locale","default":"en"},"return_feedback_artifacts":{"type":"boolean","title":"Return Feedback Artifacts","default":false}},"additionalProperties":false,"type":"object","required":["decision"],"title":"IterateRequest"},"IterationRef":{"properties":{"iter":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Iter"},"critique":{"type":"string","maxLength":8000,"title":"Critique","default":""},"decision":{"type":"string","maxLength":16,"title":"Decision","default":"pending"},"user_followup":{"type":"string","maxLength":4000,"title":"User Followup","default":""}},"additionalProperties":false,"type":"object","required":["iter"],"title":"IterationRef","description":"One prior (critique, decision, follow-up) tuple — §1.6 history slot.\n\nCarried in ``prior_iterations`` so a fresh run starts with N>0 history.\nDistinct from in-run iterations stored under ``eval_iterations``."},"JudgmentRequest":{"properties":{"contractor_id":{"type":"string","maxLength":128,"minLength":1,"title":"Contractor Id"},"candidate_set_id":{"type":"string","maxLength":128,"minLength":1,"title":"Candidate Set Id"},"assignment_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Assignment Id"},"level":{"type":"string","pattern":"^(workflow|step)$","title":"Level"},"method":{"type":"string","pattern":"^(pairwise|kway_rank|best_of_n|bws|likert)$","title":"Method"},"step_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Step Id"},"artifact_a_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Artifact A Id"},"artifact_b_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Artifact B Id"},"ranking":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Ranking"},"verdict":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Verdict"},"strength":{"anyOf":[{"type":"integer","maximum":8.0,"minimum":1.0},{"type":"null"}],"title":"Strength"},"tie":{"type":"boolean","title":"Tie","default":false},"both_bad":{"type":"boolean","title":"Both Bad","default":false},"criterion_scores":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Criterion Scores"},"flaws_found":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":50},{"type":"null"}],"title":"Flaws Found"},"accept":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accept"},"load_bearing_step_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Load Bearing Step Id"},"prompt_order_seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prompt Order Seed"},"time_spent_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Time Spent Ms"}},"additionalProperties":false,"type":"object","required":["contractor_id","candidate_set_id","level","method"],"title":"JudgmentRequest"},"LeadRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"role":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Role"}},"additionalProperties":false,"type":"object","required":["email"],"title":"LeadRequest"},"LeadResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"LeadResponse"},"LeaseBody":{"properties":{"n":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"N","description":"batch size to claim","default":10},"modality":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Modality"},"ttl_seconds":{"anyOf":[{"type":"integer","maximum":21600.0,"minimum":60.0},{"type":"null"}],"title":"Ttl Seconds"},"dedupe":{"type":"boolean","title":"Dedupe","description":"drop near-dup artifacts within the batch","default":true}},"additionalProperties":false,"type":"object","title":"LeaseBody"},"LinkedInVerifyBody":{"properties":{"idToken":{"type":"string","maxLength":8192,"minLength":16,"title":"Idtoken"},"linkedinUrl":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Linkedinurl"}},"additionalProperties":false,"type":"object","required":["idToken"],"title":"LinkedInVerifyBody"},"LocalDevSessionRequest":{"properties":{"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},"type":"object","title":"LocalDevSessionRequest"},"McpInstallGateResponse":{"properties":{"server_id":{"type":"string","title":"Server Id"},"display_name":{"type":"string","title":"Display Name"},"contract_version":{"type":"string","title":"Contract Version"},"security_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Security Score"},"install_gate":{"$ref":"#/components/schemas/InstallGate"},"install_allowed":{"type":"boolean","title":"Install Allowed"},"highest_finding_severity":{"$ref":"#/components/schemas/FindingSeverity"},"primary_evidence_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Evidence Url"},"permission_surface_count":{"type":"integer","minimum":0.0,"title":"Permission Surface Count"},"dangerous_capability_count":{"type":"integer","minimum":0.0,"title":"Dangerous Capability Count"},"risk_summary":{"additionalProperties":true,"type":"object","title":"Risk Summary"},"blocking_findings":{"items":{"type":"string"},"type":"array","title":"Blocking Findings"},"gate_reasons":{"items":{"$ref":"#/components/schemas/GateReason"},"type":"array","title":"Gate Reasons"},"control_hints":{"items":{"$ref":"#/components/schemas/SecurityControlHint"},"type":"array","title":"Control Hints"},"remediation_notes":{"items":{"type":"string"},"type":"array","title":"Remediation Notes"},"scoring_contract":{"additionalProperties":true,"type":"object","title":"Scoring Contract"},"reproducibility_contract":{"additionalProperties":true,"type":"object","title":"Reproducibility Contract"}},"type":"object","required":["server_id","display_name","contract_version","security_score","install_gate","install_allowed","highest_finding_severity","permission_surface_count","dangerous_capability_count","risk_summary","blocking_findings","gate_reasons","control_hints","remediation_notes","scoring_contract","reproducibility_contract"],"title":"McpInstallGateResponse"},"McpSecurityAudit":{"properties":{"server_id":{"type":"string","title":"Server Id"},"display_name":{"type":"string","title":"Display Name"},"maintainer":{"type":"string","title":"Maintainer"},"ownership_trust":{"type":"string","title":"Ownership Trust"},"summary":{"type":"string","title":"Summary"},"primary_evidence_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Evidence Url"},"evidence_urls":{"items":{"type":"string"},"type":"array","title":"Evidence Urls"},"transports":{"items":{"type":"string"},"type":"array","title":"Transports"},"auth_model":{"type":"string","title":"Auth Model"},"dimension_scores":{"items":{"$ref":"#/components/schemas/SecurityDimensionScore"},"type":"array","title":"Dimension Scores"},"permission_surfaces":{"items":{"$ref":"#/components/schemas/PermissionSurface"},"type":"array","title":"Permission Surfaces"},"dangerous_capabilities":{"items":{"$ref":"#/components/schemas/DangerousCapability"},"type":"array","title":"Dangerous Capabilities"},"findings":{"items":{"$ref":"#/components/schemas/SecurityFinding"},"type":"array","title":"Findings"},"security_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Security Score"},"install_gate":{"$ref":"#/components/schemas/InstallGate"},"install_allowed":{"type":"boolean","title":"Install Allowed"}},"type":"object","required":["server_id","display_name","maintainer","ownership_trust","summary","auth_model","dimension_scores","permission_surfaces","dangerous_capabilities","findings","security_score","install_gate","install_allowed"],"title":"McpSecurityAudit","description":"Canonical security contract for one MCP server."},"McpSecurityAuditDetailResponse":{"properties":{"audit":{"$ref":"#/components/schemas/McpSecurityAudit"},"skill_result":{"$ref":"#/components/schemas/SkillResult"},"contract_version":{"type":"string","title":"Contract Version"},"risk_summary":{"additionalProperties":true,"type":"object","title":"Risk Summary"}},"type":"object","required":["audit","skill_result","contract_version","risk_summary"],"title":"McpSecurityAuditDetailResponse"},"McpSecurityAuditListItem":{"properties":{"server_id":{"type":"string","title":"Server Id"},"display_name":{"type":"string","title":"Display Name"},"contract_version":{"type":"string","title":"Contract Version"},"security_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Security Score"},"install_gate":{"$ref":"#/components/schemas/InstallGate"},"install_allowed":{"type":"boolean","title":"Install Allowed"},"highest_finding_severity":{"$ref":"#/components/schemas/FindingSeverity"},"risk_summary":{"additionalProperties":true,"type":"object","title":"Risk Summary"},"summary":{"type":"string","title":"Summary"},"primary_evidence_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Evidence Url"}},"type":"object","required":["server_id","display_name","contract_version","security_score","install_gate","install_allowed","highest_finding_severity","risk_summary","summary"],"title":"McpSecurityAuditListItem"},"McpSecurityAuditListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"gate_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Gate Counts"},"audits":{"items":{"$ref":"#/components/schemas/McpSecurityAuditListItem"},"type":"array","title":"Audits"}},"type":"object","required":["count","gate_counts","audits"],"title":"McpSecurityAuditListResponse"},"MessageRequest":{"properties":{"message":{"type":"string","maxLength":800,"minLength":1,"title":"Message"}},"additionalProperties":false,"type":"object","required":["message"],"title":"MessageRequest"},"MessageResponse":{"properties":{"reply":{"type":"string","title":"Reply"},"message_count":{"type":"integer","title":"Message Count"},"at_capacity":{"type":"boolean","title":"At Capacity"}},"type":"object","required":["reply","message_count","at_capacity"],"title":"MessageResponse"},"ModelCreateRequest":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"kind":{"type":"string","title":"Kind","description":"llm | finetune | xgboost | ols | rule_engine | custom"},"version":{"type":"string","maxLength":64,"title":"Version","default":"1"},"provider":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Provider"},"endpoint":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Endpoint"},"cost_per_1k_tokens_in":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cost Per 1K Tokens In"},"cost_per_1k_tokens_out":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cost Per 1K Tokens Out"},"benchmark_scores":{"additionalProperties":true,"type":"object","title":"Benchmark Scores"},"routing_priority":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Routing Priority","default":50},"status":{"type":"string","title":"Status","default":"active"},"host":{"type":"string","title":"Host","default":"cloud"},"privacy_tier":{"type":"string","title":"Privacy Tier","default":"trusted"},"latency_p50_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Latency P50 Ms"},"latency_p95_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Latency P95 Ms"},"serving_mode":{"type":"string","maxLength":128,"title":"Serving Mode","default":"unknown"},"cost_posture":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Cost Posture"},"route_hint":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Route Hint"},"region":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Region"},"min_instances":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Instances"},"max_instances":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Instances"},"concurrency":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Concurrency"},"dedicated_endpoint_opt_in":{"type":"boolean","title":"Dedicated Endpoint Opt In","default":false}},"type":"object","required":["name","kind"],"title":"ModelCreateRequest"},"ModelResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"version":{"type":"string","title":"Version"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"cost_per_1k_tokens_in":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per 1K Tokens In"},"cost_per_1k_tokens_out":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per 1K Tokens Out"},"benchmark_scores":{"additionalProperties":true,"type":"object","title":"Benchmark Scores"},"routing_priority":{"type":"integer","title":"Routing Priority"},"status":{"type":"string","title":"Status"},"host":{"type":"string","title":"Host"},"privacy_tier":{"type":"string","title":"Privacy Tier"},"latency_p50_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency P50 Ms"},"latency_p95_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency P95 Ms"},"serving_mode":{"type":"string","title":"Serving Mode"},"cost_posture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Posture"},"route_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route Hint"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"min_instances":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Instances"},"max_instances":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Instances"},"concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concurrency"},"dedicated_endpoint_opt_in":{"type":"boolean","title":"Dedicated Endpoint Opt In"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","kind","version","provider","endpoint","cost_per_1k_tokens_in","cost_per_1k_tokens_out","benchmark_scores","routing_priority","status","host","privacy_tier","latency_p50_ms","latency_p95_ms","serving_mode","cost_posture","route_hint","region","min_instances","max_instances","concurrency","dedicated_endpoint_opt_in","created_at","updated_at"],"title":"ModelResponse"},"ObservedDataDeleteContract":{"properties":{"deleted_at":{"type":"string","title":"Deleted At"},"tenant_id":{"type":"string","title":"Tenant Id"},"retention_enforcement":{"additionalProperties":true,"type":"object","title":"Retention Enforcement"},"shadow_windows_deleted":{"type":"integer","title":"Shadow Windows Deleted"},"shadow_runs_deleted":{"type":"integer","title":"Shadow Runs Deleted"},"observed_samples_deleted":{"type":"integer","title":"Observed Samples Deleted"}},"additionalProperties":true,"type":"object","required":["deleted_at","tenant_id","retention_enforcement","shadow_windows_deleted","shadow_runs_deleted","observed_samples_deleted"],"title":"ObservedDataDeleteContract"},"ObservedDataExportContract":{"properties":{"exported_at":{"type":"string","title":"Exported At"},"tenant_id":{"type":"string","title":"Tenant Id"},"key_custody":{"additionalProperties":true,"type":"object","title":"Key Custody"},"privacy_learning_contract":{"additionalProperties":true,"type":"object","title":"Privacy Learning Contract"},"retention_enforcement":{"additionalProperties":true,"type":"object","title":"Retention Enforcement"},"local_only_data":{"additionalProperties":true,"type":"object","title":"Local Only Data"},"retained_product_data":{"additionalProperties":true,"type":"object","title":"Retained Product Data"},"training_eligible_aggregate":{"additionalProperties":true,"type":"object","title":"Training Eligible Aggregate"}},"additionalProperties":true,"type":"object","required":["exported_at","tenant_id","key_custody","privacy_learning_contract","retention_enforcement","local_only_data","retained_product_data","training_eligible_aggregate"],"title":"ObservedDataExportContract"},"OptInRequest":{"properties":{"opt_in":{"type":"boolean","title":"Opt In","default":true},"handle":{"anyOf":[{"type":"string","maxLength":40,"minLength":3,"pattern":"^[A-Za-z0-9 _-]+$"},{"type":"null"}],"title":"Handle"}},"additionalProperties":false,"type":"object","title":"OptInRequest"},"PayLinkRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","title":"PayLinkRequest"},"PayLinkResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},"type":"object","required":["checkout_url"],"title":"PayLinkResponse"},"PayoutAccountBody":{"properties":{"returnUrl":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Returnurl"},"refreshUrl":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Refreshurl"},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country"}},"additionalProperties":false,"type":"object","title":"PayoutAccountBody"},"PendingApprovalsResponse":{"properties":{"schema":{"type":"string","const":"seaotter.approvals.pending.v1","title":"Schema","default":"seaotter.approvals.pending.v1"},"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/ApprovalItem"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["count","items"],"title":"PendingApprovalsResponse"},"PermissionSurface":{"properties":{"permission_id":{"type":"string","title":"Permission Id"},"label":{"type":"string","title":"Label"},"access_level":{"$ref":"#/components/schemas/AccessLevel"},"category":{"$ref":"#/components/schemas/CapabilityCategory"},"blast_radius":{"$ref":"#/components/schemas/BlastRadius"},"notes":{"type":"string","title":"Notes"}},"type":"object","required":["permission_id","label","access_level","category","blast_radius","notes"],"title":"PermissionSurface","description":"What the host effectively grants when this server is installed."},"PolicyIn":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name","default":""},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"visibility":{"type":"string","title":"Visibility","default":"team"},"modality_scope":{"items":{"type":"string"},"type":"array","title":"Modality Scope"},"hard_rules":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Hard Rules"},"conditioning":{"additionalProperties":true,"type":"object","title":"Conditioning"},"bands":{"additionalProperties":true,"type":"object","title":"Bands"}},"type":"object","required":["id"],"title":"PolicyIn","description":"Writable policy fields. tenant_id is taken from the auth context, never the body."},"PortalRequest":{"properties":{"return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url"}},"type":"object","title":"PortalRequest"},"PresignFileIn":{"properties":{"filename":{"type":"string","maxLength":1024,"minLength":1,"title":"Filename"},"mime":{"type":"string","maxLength":256,"minLength":1,"title":"Mime"},"size_bytes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Size Bytes"}},"additionalProperties":false,"type":"object","required":["filename","mime"],"title":"PresignFileIn"},"PresignIn":{"properties":{"files":{"items":{"$ref":"#/components/schemas/PresignFileIn"},"type":"array","maxItems":2000,"minItems":1,"title":"Files"}},"additionalProperties":false,"type":"object","required":["files"],"title":"PresignIn","description":"Request N upload targets for one (possibly multi-file) artifact."},"PreviewIn":{"properties":{"artifact_text":{"type":"string","title":"Artifact Text"},"modality":{"type":"string","title":"Modality","default":"text"},"preview_score":{"type":"number","title":"Preview Score","default":0.75}},"type":"object","required":["artifact_text"],"title":"PreviewIn"},"ProviderAccountMutationResponse":{"properties":{"account":{"additionalProperties":true,"type":"object","title":"Account"}},"type":"object","required":["account"],"title":"ProviderAccountMutationResponse"},"ProviderAccountOut":{"properties":{"account_id":{"type":"string","minLength":1,"title":"Account Id"},"provider":{"type":"string","enum":["openai","anthropic","vertex","gemini","codex","mlx_local"],"title":"Provider"},"model_family":{"type":"string","minLength":1,"title":"Model Family"},"health":{"type":"string","enum":["healthy","cooldown","unhealthy"],"title":"Health"},"last_probe_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Probe At"},"daily_usd":{"type":"number","minimum":0.0,"title":"Daily Usd"},"daily_cap_usd":{"type":"number","minimum":0.0,"title":"Daily Cap Usd"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"additionalProperties":false,"type":"object","required":["account_id","provider","model_family","health","daily_usd","daily_cap_usd"],"title":"ProviderAccountOut"},"ProviderAccountPatchIn":{"properties":{"actor":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Actor"},"daily_cap_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Daily Cap Usd"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"spec":{"anyOf":[{"$ref":"#/components/schemas/ProviderAccountPatchSpec"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"ProviderAccountPatchIn"},"ProviderAccountPatchSpec":{"properties":{"daily_cap_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Daily Cap Usd"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"additionalProperties":false,"type":"object","title":"ProviderAccountPatchSpec"},"ProviderConfigResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"schema":{"type":"string","const":"seaotter.agentos.provider_config.v1","title":"Schema","default":"seaotter.agentos.provider_config.v1"},"status":{"type":"string","title":"Status"},"namespace":{"type":"string","title":"Namespace"},"generated_at":{"type":"string","title":"Generated At"},"provider_accounts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Provider Accounts"},"model_runtimes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Model Runtimes"},"providers":{"items":{"$ref":"#/components/schemas/ProviderAccountOut"},"type":"array","title":"Providers"}},"type":"object","required":["ok","status","namespace","generated_at","provider_accounts","model_runtimes"],"title":"ProviderConfigResponse"},"QualificationAnswer":{"properties":{"item_id":{"type":"string","minLength":1,"title":"Item Id"},"option_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option Id"}},"additionalProperties":false,"type":"object","required":["item_id"],"title":"QualificationAnswer"},"QualificationRequest":{"properties":{"reviewer_id_hash":{"type":"string","minLength":1,"title":"Reviewer Id Hash"},"skill":{"type":"string","maxLength":64,"title":"Skill","default":"general"},"domain":{"type":"string","maxLength":64,"title":"Domain","default":"general"},"pass_bar":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Pass Bar"},"answers":{"items":{"$ref":"#/components/schemas/QualificationAnswer"},"type":"array","maxItems":200,"title":"Answers"}},"additionalProperties":false,"type":"object","required":["reviewer_id_hash"],"title":"QualificationRequest"},"RaiseAccessRequest":{"properties":{"id_token":{"type":"string","minLength":1,"title":"Id Token"},"message":{"type":"string","maxLength":2000,"title":"Message","default":""}},"additionalProperties":false,"type":"object","required":["id_token"],"title":"RaiseAccessRequest"},"RaiseSessionRequest":{"properties":{"id_token":{"type":"string","minLength":1,"title":"Id Token"},"nda_version":{"type":"string","maxLength":64,"minLength":1,"title":"Nda Version"},"nda_accepted":{"type":"boolean","title":"Nda Accepted","default":false},"ip_address":{"type":"string","maxLength":64,"title":"Ip Address","default":""},"user_agent":{"type":"string","maxLength":512,"title":"User Agent","default":""}},"additionalProperties":false,"type":"object","required":["id_token","nda_version"],"title":"RaiseSessionRequest"},"ReferenceRef":{"properties":{"kind":{"type":"string","maxLength":16,"title":"Kind"},"artifact_ref":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Artifact Ref"},"caption":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Caption"},"label":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Label"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"ReferenceRef","description":"One reference media item — §1.6.1 per-user conditional critic.\n\nSee docs/methodology/adversarial-multimodal-eval.md §1.6: references\nare 0-5 labelled media items that anchor the user's \"good\" bar.\n``artifact_ref`` is the same shape as the main artifact\n(``file://`` / ``sha256:<hex>`` / ``s3://``) and is **optional**: a\nreference may be a labelled note (caption + label, no media), in which\ncase the key is omitted and the shared renderer degrades it to\n``[label/kind] caption``. When present it must be non-empty."},"RenewBody":{"properties":{"ttl_seconds":{"anyOf":[{"type":"integer","maximum":21600.0,"minimum":60.0},{"type":"null"}],"title":"Ttl Seconds"}},"additionalProperties":false,"type":"object","title":"RenewBody"},"RetentionEnforcementContract":{"properties":{"enforced_at":{"type":"string","title":"Enforced At"},"tenant_id":{"type":"string","title":"Tenant Id"},"shadow_windows_deleted":{"type":"integer","title":"Shadow Windows Deleted"},"shadow_runs_deleted":{"type":"integer","title":"Shadow Runs Deleted"},"observed_samples_deleted":{"type":"integer","title":"Observed Samples Deleted"},"tenants":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Tenants"}},"additionalProperties":true,"type":"object","required":["enforced_at","tenant_id","shadow_windows_deleted","shadow_runs_deleted","observed_samples_deleted","tenants"],"title":"RetentionEnforcementContract"},"RunIn":{"properties":{"command":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":256},{"type":"null"}],"title":"Command"},"artifact_ref":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Artifact Ref"},"stdin":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}],"title":"Stdin"},"estimated_cost_usd":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Estimated Cost Usd","default":0.0}},"additionalProperties":false,"type":"object","title":"RunIn","description":"One agentic step. Exactly one of ``command`` (argv) / ``artifact_ref``."},"RuntimeRecommendationRequest":{"properties":{"environment":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Environment","default":"dev"},"volume":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Volume"},"serving_mode":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Serving Mode"},"allow_dedicated_endpoint":{"type":"boolean","title":"Allow Dedicated Endpoint","default":false},"route_hint":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Route Hint"},"modality":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Modality"}},"type":"object","title":"RuntimeRecommendationRequest"},"RuntimeRecommendationResponse":{"properties":{"model":{"$ref":"#/components/schemas/ModelResponse"},"reason":{"type":"string","title":"Reason"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["model","reason","warnings"],"title":"RuntimeRecommendationResponse"},"SandboxCreateIn":{"properties":{"caps":{"anyOf":[{"$ref":"#/components/schemas/CapsIn"},{"type":"null"}]},"ttl_s":{"type":"integer","maximum":3600.0,"minimum":60.0,"title":"Ttl S","default":900},"image_ref":{"type":"string","maxLength":256,"title":"Image Ref","default":"python:3.13-slim"}},"additionalProperties":false,"type":"object","title":"SandboxCreateIn","description":"Create body. ``tenant_id`` is taken from auth context, never here."},"SecurityControlHint":{"properties":{"control_id":{"type":"string","title":"Control Id"},"label":{"type":"string","title":"Label"},"control_type":{"type":"string","title":"Control Type"},"enforcement_level":{"type":"string","title":"Enforcement Level"},"summary":{"type":"string","title":"Summary"},"source_ids":{"items":{"type":"string"},"type":"array","title":"Source Ids"}},"type":"object","required":["control_id","label","control_type","enforcement_level","summary"],"title":"SecurityControlHint","description":"Compensating control or deployment guardrail for install review."},"SecurityDimensionScore":{"properties":{"dimension_id":{"type":"string","title":"Dimension Id"},"label":{"type":"string","title":"Label"},"points":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Points"},"max_points":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Max Points"},"rationale":{"type":"string","title":"Rationale"}},"type":"object","required":["dimension_id","label","points","max_points","rationale"],"title":"SecurityDimensionScore","description":"One reproducible scoring slice that contributes to the 0-100 score."},"SecurityFinding":{"properties":{"finding_id":{"type":"string","title":"Finding Id"},"severity":{"$ref":"#/components/schemas/FindingSeverity"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"remediation":{"type":"string","title":"Remediation"},"evidence_urls":{"items":{"type":"string"},"type":"array","title":"Evidence Urls"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["finding_id","severity","title","summary","remediation"],"title":"SecurityFinding","description":"Evidence-backed security concern or caveat."},"SessionRequest":{"properties":{"captcha_token":{"type":"string","maxLength":4096,"minLength":1,"title":"Captcha Token"},"locale":{"type":"string","maxLength":16,"title":"Locale","default":"en"}},"additionalProperties":false,"type":"object","required":["captcha_token"],"title":"SessionRequest"},"SessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"SessionResponse"},"SkillResult":{"properties":{"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score"},"passed":{"type":"boolean","title":"Passed"},"summary":{"type":"string","title":"Summary"},"evidence_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence Url"},"raw_result":{"additionalProperties":true,"type":"object","title":"Raw Result"}},"type":"object","required":["score","passed","summary","raw_result"],"title":"SkillResult","description":"Strict JSON shape required by the MCP security verifier skill."},"SlackApprovalRequestIn":{"properties":{"connection_id":{"type":"string","minLength":1,"title":"Connection Id"},"action":{"type":"string","enum":["send_message","edit_message","react"],"title":"Action"},"channel_id":{"type":"string","minLength":1,"title":"Channel Id"},"message_text":{"type":"string","maxLength":40000,"title":"Message Text","default":""},"message_ts":{"type":"string","maxLength":80,"title":"Message Ts","default":""},"reaction":{"type":"string","maxLength":80,"title":"Reaction","default":""},"workflow_ref":{"type":"string","maxLength":200,"title":"Workflow Ref","default":""},"target_ref":{"type":"string","maxLength":200,"title":"Target Ref","default":""}},"additionalProperties":false,"type":"object","required":["connection_id","action","channel_id"],"title":"SlackApprovalRequestIn"},"SlackApprovalRequestOut":{"properties":{"schema":{"type":"string","const":"seaotter.app_driver.slack.approval_request.v1","title":"Schema"},"approval_id":{"type":"string","title":"Approval Id"},"action":{"type":"string","title":"Action"},"channel_id":{"type":"string","title":"Channel Id"}},"type":"object","required":["schema","approval_id","action","channel_id"],"title":"SlackApprovalRequestOut"},"SlackExecuteRequestIn":{"properties":{"approval_id":{"type":"string","minLength":1,"title":"Approval Id"}},"additionalProperties":false,"type":"object","required":["approval_id"],"title":"SlackExecuteRequestIn"},"SlackExecuteResponse":{"properties":{"schema":{"type":"string","const":"seaotter.app_driver.slack.execution.v1","title":"Schema"},"status":{"type":"string","title":"Status"},"approval_id":{"type":"string","title":"Approval Id"},"slack_called":{"type":"boolean","title":"Slack Called"},"driver_instance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Driver Instance"},"receipt":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Receipt"}},"additionalProperties":true,"type":"object","required":["schema","status","approval_id","slack_called"],"title":"SlackExecuteResponse"},"SlackResearchLogResponse":{"properties":{"schema":{"type":"string","const":"seaotter.app_driver.slack.research_log.v1","title":"Schema"},"logs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Logs"}},"additionalProperties":false,"type":"object","required":["schema"],"title":"SlackResearchLogResponse"},"SpeechGenRequest":{"properties":{"feature":{"type":"string","maxLength":128,"minLength":1,"title":"Feature"},"text":{"type":"string","maxLength":100000,"minLength":1,"title":"Text"},"voice":{"type":"string","maxLength":64,"title":"Voice","default":""}},"type":"object","required":["feature","text"],"title":"SpeechGenRequest"},"SpeechGenResponse":{"properties":{"model":{"type":"string","title":"Model"},"mime_type":{"type":"string","title":"Mime Type"},"data_base64":{"type":"string","title":"Data Base64"},"cost_usd":{"type":"number","title":"Cost Usd"}},"type":"object","required":["model","mime_type","data_base64","cost_usd"],"title":"SpeechGenResponse"},"StreamEvalRequest":{"properties":{"workflow_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Workflow Id"},"modality":{"type":"string","maxLength":32,"title":"Modality"},"rubric_id":{"type":"string","maxLength":128,"minLength":1,"title":"Rubric Id"},"artifact_ref":{"type":"string","maxLength":2048,"minLength":1,"title":"Artifact Ref"},"artifact_parts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":16,"title":"Artifact Parts"},"intent_text":{"type":"string","maxLength":4000,"title":"Intent Text","default":""},"user_prompt":{"type":"string","maxLength":4000,"title":"User Prompt","default":""},"references":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":5,"title":"References"},"prior_iterations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":20,"title":"Prior Iterations"},"cost_cap_usd":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Cost Cap Usd"},"policy_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Policy Id"},"locale":{"type":"string","maxLength":16,"title":"Locale","default":"en"},"return_feedback_artifacts":{"type":"boolean","title":"Return Feedback Artifacts","default":false}},"additionalProperties":false,"type":"object","required":["modality","rubric_id","artifact_ref"],"title":"StreamEvalRequest","description":"Mirror of ``CreateRunRequest`` — same fields, same semantics.\n\n``tenant_id`` is NOT accepted from the body; it is resolved from the auth\ncontext by ``require_eval_api_key`` (S0-1 pivot fix)."},"TelemetryConsentRequest":{"properties":{"category":{"type":"string","maxLength":80,"title":"Category","default":"product_analytics"},"granted":{"type":"boolean","title":"Granted"},"ui_version":{"type":"string","maxLength":80,"minLength":1,"title":"Ui Version","default":"unknown"},"source":{"type":"string","maxLength":80,"minLength":1,"title":"Source","default":"ui"},"session_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Session Id"}},"additionalProperties":false,"type":"object","required":["granted"],"title":"TelemetryConsentRequest"},"TelemetryEventRequest":{"properties":{"event":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Event"},"event_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Event Name"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"session_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Session Id"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"ui_version":{"type":"string","maxLength":80,"title":"Ui Version","default":"unknown"},"consent_granted":{"type":"boolean","title":"Consent Granted","default":false},"consent_category":{"type":"string","title":"Consent Category","default":"product_analytics"}},"additionalProperties":false,"type":"object","title":"TelemetryEventRequest"},"TenantSignup":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"owner_email":{"type":"string","maxLength":320,"minLength":3,"pattern":"^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$","title":"Owner Email"},"tier":{"type":"string","maxLength":32,"title":"Tier","default":"free"}},"additionalProperties":false,"type":"object","required":["name","owner_email"],"title":"TenantSignup"},"TerraformOutputsIngestRequest":{"properties":{"outputs":{"additionalProperties":true,"type":"object","title":"Outputs","description":"Raw terraform output -json payload, including custom_model_service_registry and vertex_ai_model_registry_seed."}},"type":"object","required":["outputs"],"title":"TerraformOutputsIngestRequest"},"TopologyEdge":{"properties":{"from":{"type":"string","maxLength":64,"minLength":1,"title":"From"},"to":{"type":"string","maxLength":64,"minLength":1,"title":"To"}},"additionalProperties":false,"type":"object","required":["from","to"],"title":"TopologyEdge","description":"One explicit DAG edge (from -> to) by step_id."},"TopologyRequest":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/TopologyStep"},"type":"array","maxItems":20,"title":"Steps"},"intent_text":{"type":"string","maxLength":4000,"title":"Intent Text","default":""},"topology":{"anyOf":[{"items":{"$ref":"#/components/schemas/TopologyEdge"},"type":"array","maxItems":64},{"type":"null"}],"title":"Topology"},"trajectory_steps":{"items":{"$ref":"#/components/schemas/TrajectoryStepRef"},"type":"array","maxItems":20,"title":"Trajectory Steps"},"chain_coherence_floor":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Chain Coherence Floor"},"chain_penalty_weight":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Chain Penalty Weight"}},"additionalProperties":false,"type":"object","title":"TopologyRequest"},"TopologyStep":{"properties":{"step_id":{"type":"string","maxLength":64,"minLength":1,"title":"Step Id"},"modality":{"type":"string","maxLength":32,"title":"Modality"},"artifact_ref":{"type":"string","maxLength":2048,"minLength":1,"title":"Artifact Ref"},"artifact_parts":{"items":{"$ref":"#/components/schemas/ArtifactPartRef"},"type":"array","maxItems":16,"title":"Artifact Parts"},"rubric_id":{"type":"string","maxLength":128,"minLength":1,"title":"Rubric Id"},"weight":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Weight","default":1.0},"step_index":{"anyOf":[{"type":"integer","maximum":64.0,"minimum":0.0},{"type":"null"}],"title":"Step Index"},"parents":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Parents"}},"additionalProperties":false,"type":"object","required":["step_id","modality","artifact_ref","rubric_id"],"title":"TopologyStep"},"TrajectoryStepRef":{"properties":{"step_id":{"type":"string","maxLength":64,"minLength":1,"title":"Step Id"},"modality":{"type":"string","maxLength":32,"title":"Modality"},"rubric_id":{"type":"string","maxLength":128,"minLength":1,"title":"Rubric Id"},"artifact_ref":{"type":"string","maxLength":2048,"title":"Artifact Ref","default":""},"artifact_parts":{"items":{"$ref":"#/components/schemas/ArtifactPartRef"},"type":"array","maxItems":16,"title":"Artifact Parts"},"step_index":{"anyOf":[{"type":"integer","maximum":64.0,"minimum":0.0},{"type":"null"}],"title":"Step Index"},"parents":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Parents"},"weight":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Weight","default":1.0}},"additionalProperties":false,"type":"object","required":["step_id","modality","rubric_id"],"title":"TrajectoryStepRef","description":"One recorded step of an agent trajectory submitted to /topology (the\ntrajectory mode the bounded read-only tool loop inspects; no side effects)."},"UploadUrlBatchBody":{"properties":{"objects":{"items":{"$ref":"#/components/schemas/UploadUrlBody"},"type":"array","maxItems":200,"minItems":1,"title":"Objects"}},"additionalProperties":false,"type":"object","required":["objects"],"title":"UploadUrlBatchBody","description":"Mint up to 200 write capabilities in one round-trip (amortizes RTTs)."},"UploadUrlBody":{"properties":{"object_path":{"type":"string","maxLength":512,"title":"Object Path","description":"curated-bucket-relative path: batches/<id>.jsonl[.gz] or artifacts/<sha>/<name>"},"content_type":{"type":"string","maxLength":128,"minLength":1,"title":"Content Type"},"content_sha256_b64":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Content Sha256 B64","description":"base64(sha256(bytes)); pins the URL/write to these exact bytes"},"ttl_seconds":{"anyOf":[{"type":"integer","maximum":900.0,"minimum":60.0},{"type":"null"}],"title":"Ttl Seconds"}},"additionalProperties":false,"type":"object","required":["object_path","content_type"],"title":"UploadUrlBody","description":"Mint a write capability for ONE curated-bucket object.\n\n``object_path`` MUST be ``batches/<id>.jsonl[.gz]`` or\n``artifacts/<64-hex-sha256>/<name>`` (validated + fail-closed server-side)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifySourceBody":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Url","description":"public source URL to fetch"},"query":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Query","description":"web-search query"}},"additionalProperties":false,"type":"object","title":"VerifySourceBody"},"VideoItem":{"properties":{"gcs_uri":{"type":"string","title":"Gcs Uri","default":""},"mime_type":{"type":"string","title":"Mime Type","default":""},"data_base64":{"type":"string","title":"Data Base64","default":""}},"type":"object","title":"VideoItem"},"VideoPollRequest":{"properties":{"feature":{"type":"string","maxLength":128,"minLength":1,"title":"Feature"},"operation_name":{"type":"string","maxLength":2048,"minLength":1,"title":"Operation Name"}},"type":"object","required":["feature","operation_name"],"title":"VideoPollRequest"},"VideoPollResponse":{"properties":{"done":{"type":"boolean","title":"Done"},"videos":{"items":{"$ref":"#/components/schemas/VideoItem"},"type":"array","title":"Videos"},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0}},"type":"object","required":["done"],"title":"VideoPollResponse"},"VideoStartRequest":{"properties":{"feature":{"type":"string","maxLength":128,"minLength":1,"title":"Feature"},"prompt":{"type":"string","maxLength":100000,"minLength":1,"title":"Prompt"},"storage_uri":{"type":"string","maxLength":2048,"title":"Storage Uri","default":""},"sample_count":{"type":"integer","maximum":2.0,"minimum":1.0,"title":"Sample Count","default":1}},"type":"object","required":["feature","prompt"],"title":"VideoStartRequest"},"VideoStartResponse":{"properties":{"model":{"type":"string","title":"Model"},"operation_name":{"type":"string","title":"Operation Name"}},"type":"object","required":["model","operation_name"],"title":"VideoStartResponse"},"_Attachment":{"properties":{"filename":{"type":"string","title":"Filename","default":""},"text":{"type":"string","title":"Text","default":""}},"type":"object","title":"_Attachment"},"src__routes__eval_agent_routes__FeedbackRequest":{"properties":{"modality":{"type":"string","maxLength":32,"title":"Modality","default":"text"},"rubric_id":{"type":"string","maxLength":128,"title":"Rubric Id","default":"enterprise-acceptance-default"},"policy_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Policy Id"},"artifact":{"anyOf":[{"type":"string","maxLength":200000},{"type":"null"}],"title":"Artifact"},"artifact_parts":{"items":{"$ref":"#/components/schemas/ArtifactPartRef"},"type":"array","maxItems":16,"title":"Artifact Parts"},"artifact_ref":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Artifact Ref"},"prompt":{"type":"string","maxLength":4000,"title":"Prompt","default":""},"intent_text":{"type":"string","maxLength":4000,"title":"Intent Text","default":""},"references":{"items":{"$ref":"#/components/schemas/ReferenceRef"},"type":"array","maxItems":5,"title":"References"},"locale":{"type":"string","maxLength":16,"title":"Locale","default":"en"},"cost_cap_usd":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Cost Cap Usd"},"return_feedback_artifacts":{"type":"boolean","title":"Return Feedback Artifacts","default":true}},"additionalProperties":false,"type":"object","title":"FeedbackRequest","description":"One-shot grade request. ``artifact`` is convenience inline text; for\nmultimodal pass ``artifact_parts`` (base64 data, file refs)."},"src__routes__feedback_routes__FeedbackRequest":{"properties":{"context":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Context","description":"Free-form context about what the feedback refers to."},"nps_score":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Nps Score","description":"Net Promoter Score (0-10): 0-6 detractor, 7-8 passive, 9-10 promoter"},"verbatims":{"additionalProperties":true,"type":"object","title":"Verbatims","description":"Free-text feedback fields: {what_surprised, what_missing, would_share, other}"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Optional user ID if the tester is logged in"}},"additionalProperties":false,"type":"object","required":["nps_score"],"title":"FeedbackRequest","description":"NPS feedback submission."}}}}