{"openapi":"3.1.0","info":{"title":"ARKHEIA 7™ — Deterministic Agent Gate","description":"ARKHEIA 7™ is a deterministic pre-execution agent gate with Mandate verification and Aegis-Swarm evaluation. Also preserves the existing deterministic risk evaluation API for Auto and Housing contracts. Engine: ARKHEIA DVE™ | Architecture: PLATFORM-ARCHITECTURE-2026-V1 | Active modules: dve-clearcheck, dve-riskcheck.","contact":{"name":"ARKHEIA GROUP","url":"https://ericscott.ai/"},"license":{"name":"Proprietary"},"version":"1.0.1","x-commercial":{"product":"ARKHEIA 7™ — Deterministic Agent Gate","brand":"7™","version":"1.0.1","publisher":"ARKHEIA GROUP","website":"https://ericscott.ai","license":"Proprietary"}},"paths":{"/health":{"get":{"tags":["system"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}},"head":{"tags":["system"],"summary":"Health","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/risk/auto":{"post":{"tags":["risk"],"summary":"Risk Auto","operationId":"risk_auto_risk_auto_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoContractIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoRiskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk/housing":{"post":{"tags":["risk"],"summary":"Risk Housing","operationId":"risk_housing_risk_housing_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HousingContractIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HousingRiskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/risk/aggregate":{"post":{"tags":["risk"],"summary":"Risk Aggregate","description":"Accepts either or both contract types and combines whichever are\npresent into a single weighted envelope. At least one must be\nsupplied (enforced below rather than at the schema layer, since\neither field alone is valid).","operationId":"risk_aggregate_risk_aggregate_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_risk_aggregate_risk_aggregate_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregateRiskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/create-checkout-session":{"post":{"tags":["billing"],"summary":"Create Checkout","operationId":"create_checkout_billing_create_checkout_session_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/create-portal-session":{"post":{"tags":["billing"],"summary":"Create Portal","operationId":"create_portal_billing_create_portal_session_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/status":{"get":{"tags":["billing"],"summary":"Billing Status","operationId":"billing_status_billing_status_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/clearcheck/preview":{"post":{"tags":["clearcheck"],"summary":"Clearcheck Preview","operationId":"clearcheck_preview_api_clearcheck_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearCheckPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearCheckPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/clearcheck/report/{check_id}":{"get":{"tags":["clearcheck"],"summary":"Clearcheck Report","operationId":"clearcheck_report_api_clearcheck_report__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":24,"maxLength":255,"pattern":"^cs_(?:test|live)_[A-Za-z0-9]{16,}$"},{"type":"null"}],"title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearCheckReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/clearcheck/checkout":{"post":{"tags":["clearcheck"],"summary":"Clearcheck Checkout","operationId":"clearcheck_checkout_api_clearcheck_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearCheckCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearCheckCheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/clearcheck/trial/status":{"get":{"tags":["clearcheck"],"summary":"Clearcheck Trial Status","operationId":"clearcheck_trial_status_api_clearcheck_trial_status_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","minLength":24,"maxLength":255,"pattern":"^cs_(?:test|live)_[A-Za-z0-9]{16,}$","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/clearcheck/trial/portal":{"post":{"tags":["clearcheck"],"summary":"Clearcheck Trial Portal","operationId":"clearcheck_trial_portal_api_clearcheck_trial_portal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialPortalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialPortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/check":{"post":{"tags":["governance"],"summary":"Governance Check","operationId":"governance_check_api_governance_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernanceCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernanceCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/governance/checks/{receipt_id}":{"get":{"tags":["governance"],"summary":"Governance Lookup","operationId":"governance_lookup_api_governance_checks__receipt_id__get","parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","minLength":68,"maxLength":68,"pattern":"^gov_[0-9a-f]{64}$","title":"Receipt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GovernanceCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/verify-receipt":{"post":{"tags":["receipts"],"summary":"Verify Receipt Endpoint","operationId":"verify_receipt_endpoint_v1_verify_receipt_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/public-keys":{"get":{"tags":["receipts"],"summary":"Public Keys Endpoint","operationId":"public_keys_endpoint_v1_public_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/settlement/check":{"post":{"tags":["platform-checks"],"summary":"Settlement Check","operationId":"settlement_check_api_settlement_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCheckResponse"}}}}}}},"/api/provenance/check":{"post":{"tags":["platform-checks"],"summary":"Provenance Check","operationId":"provenance_check_api_provenance_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCheckResponse"}}}}}}},"/api/custody/check":{"post":{"tags":["platform-checks"],"summary":"Custody Check","operationId":"custody_check_api_custody_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCheckResponse"}}}}}}},"/api/edge/check":{"post":{"tags":["platform-checks"],"summary":"Edge Check","operationId":"edge_check_api_edge_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCheckResponse"}}}}}}},"/api/mandate/verify":{"post":{"tags":["clearance"],"summary":"Mandate Verify","operationId":"mandate_verify_api_mandate_verify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/aegis/evaluate":{"post":{"tags":["clearance"],"summary":"Aegis Evaluate","operationId":"aegis_evaluate_api_aegis_evaluate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/clearance/head":{"get":{"tags":["clearance"],"summary":"Clearance Head","operationId":"clearance_head_api_clearance_head_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccountStatus":{"type":"string","enum":["open","closed","paid","charged_off","in_collection","disputed"],"title":"AccountStatus"},"AggregateRiskOut":{"properties":{"combined_risk_score":{"type":"number","title":"Combined Risk Score"},"combined_risk_tier":{"type":"string","title":"Combined Risk Tier"},"components":{"additionalProperties":true,"type":"object","title":"Components"}},"type":"object","required":["combined_risk_score","combined_risk_tier","components"],"title":"AggregateRiskOut","description":"Combined output when both auto and housing results are supplied."},"AutoContractIn":{"properties":{"vin":{"type":"string","minLength":1,"title":"Vin","description":"Vehicle identification number"},"driver_age":{"type":"integer","maximum":100.0,"minimum":16.0,"title":"Driver Age","description":"Driver age in years"},"vehicle_value":{"type":"number","minimum":0.0,"title":"Vehicle Value","description":"Vehicle value in USD"},"incident_history":{"type":"integer","maximum":20.0,"minimum":0.0,"title":"Incident History","description":"Number of prior at-fault incidents on record","default":0},"region_risk_tier":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Region Risk Tier","description":"Illustrative region risk tier, 1 (lowest) to 5 (highest). Not derived from any licensed actuarial dataset.","default":2}},"type":"object","required":["vin","driver_age","vehicle_value"],"title":"AutoContractIn","description":"Input contract for auto risk evaluation.\n\nAll fields are required; there are no server-side defaults. Extra\nfields beyond a v1-style flat contract (incident_history, region) are\nintentionally simple types so this remains easy to extend."},"AutoRiskFactors":{"properties":{"driver_age_factor":{"type":"number","title":"Driver Age Factor"},"vehicle_value_factor":{"type":"number","title":"Vehicle Value Factor"},"incident_history_factor":{"type":"number","title":"Incident History Factor"},"region_risk_factor":{"type":"number","title":"Region Risk Factor"}},"type":"object","required":["driver_age_factor","vehicle_value_factor","incident_history_factor","region_risk_factor"],"title":"AutoRiskFactors","description":"Raw, per-factor evaluator output before aggregation."},"AutoRiskOut":{"properties":{"type":{"type":"string","title":"Type","default":"AUTO"},"raw":{"$ref":"#/components/schemas/AutoRiskFactors"},"risk_score":{"type":"number","title":"Risk Score"},"risk_tier":{"type":"string","title":"Risk Tier"},"model_version":{"type":"string","title":"Model Version"}},"type":"object","required":["raw","risk_score","risk_tier","model_version"],"title":"AutoRiskOut"},"Body_risk_aggregate_risk_aggregate_post":{"properties":{"auto_contract":{"anyOf":[{"$ref":"#/components/schemas/AutoContractIn"},{"type":"null"}]},"housing_contract":{"anyOf":[{"$ref":"#/components/schemas/HousingContractIn"},{"type":"null"}]}},"type":"object","title":"Body_risk_aggregate_risk_aggregate_post"},"CheckoutSessionRequest":{"properties":{"tier":{"$ref":"#/components/schemas/Tier"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"}},"type":"object","required":["tier"],"title":"CheckoutSessionRequest"},"CheckoutSessionResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutSessionResponse"},"ClearCheckAccountEntry":{"properties":{"account_number":{"type":"string","maxLength":64,"minLength":1,"title":"Account Number"},"creditor_name":{"type":"string","maxLength":128,"minLength":1,"title":"Creditor Name"},"status":{"$ref":"#/components/schemas/AccountStatus"},"date_opened":{"type":"string","format":"date","title":"Date Opened"},"date_closed":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Closed"},"date_of_last_activity":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Last Activity"},"reported_balance":{"type":"number","minimum":0.0,"title":"Reported Balance"},"reported_past_due":{"type":"number","minimum":0.0,"title":"Reported Past Due","default":0},"credit_limit":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Credit Limit"}},"type":"object","required":["account_number","creditor_name","status","date_opened","reported_balance"],"title":"ClearCheckAccountEntry","description":"One reported account/tradeline as the consumer sees it."},"ClearCheckCheckoutRequest":{"properties":{"check_id":{"type":"string","title":"Check Id"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"plan":{"type":"string","enum":["single_report","trial_7d"],"title":"Plan","default":"single_report"}},"type":"object","required":["check_id"],"title":"ClearCheckCheckoutRequest"},"ClearCheckCheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["checkout_url"],"title":"ClearCheckCheckoutResponse"},"ClearCheckPreviewRequest":{"properties":{"consumer_name":{"type":"string","maxLength":128,"minLength":1,"title":"Consumer Name"},"consumer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consumer Email"},"ssn_last4":{"anyOf":[{"type":"string","maxLength":4,"minLength":4},{"type":"null"}],"title":"Ssn Last4"},"jurisdiction":{"type":"string","maxLength":16,"minLength":2,"title":"Jurisdiction","default":"US"},"report_date":{"type":"string","format":"date","title":"Report Date"},"accounts":{"items":{"$ref":"#/components/schemas/ClearCheckAccountEntry"},"type":"array","maxItems":100,"minItems":1,"title":"Accounts"}},"type":"object","required":["consumer_name","report_date","accounts"],"title":"ClearCheckPreviewRequest"},"ClearCheckPreviewResponse":{"properties":{"check_id":{"type":"string","title":"Check Id"},"findings_count":{"type":"integer","title":"Findings Count"},"redacted_summary":{"items":{"type":"string"},"type":"array","title":"Redacted Summary"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_metadata":{"additionalProperties":true,"type":"object","title":"Jurisdiction Metadata"},"notice":{"type":"string","title":"Notice"},"unlock_required":{"type":"boolean","title":"Unlock Required"}},"type":"object","required":["check_id","findings_count","redacted_summary","jurisdiction","jurisdiction_metadata","notice","unlock_required"],"title":"ClearCheckPreviewResponse"},"ClearCheckReportResponse":{"properties":{"check_id":{"type":"string","title":"Check Id"},"unlocked":{"type":"boolean","title":"Unlocked"},"findings_count":{"type":"integer","title":"Findings Count"},"findings":{"items":{"$ref":"#/components/schemas/Finding"},"type":"array","title":"Findings"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_metadata":{"additionalProperties":true,"type":"object","title":"Jurisdiction Metadata"},"notice":{"type":"string","title":"Notice"}},"type":"object","required":["check_id","unlocked","findings_count","findings","jurisdiction","jurisdiction_metadata","notice"],"title":"ClearCheckReportResponse"},"Finding":{"properties":{"code":{"type":"string","title":"Code"},"severity":{"type":"string","title":"Severity"},"account_ref":{"type":"string","title":"Account Ref"},"field":{"type":"string","title":"Field"},"description":{"type":"string","title":"Description"}},"type":"object","required":["code","severity","account_ref","field","description"],"title":"Finding","description":"A single deterministic consistency finding. `account_ref` is\nalways a masked account number — never the raw identifier."},"GovernanceCheckRequest":{"properties":{"model_id":{"type":"string","title":"Model Id"},"decision_domain":{"type":"string","title":"Decision Domain"},"proposed_action":{"type":"string","title":"Proposed Action"},"confidence_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence Score"},"human_override_required":{"type":"boolean","title":"Human Override Required"},"policy_thresholds":{"$ref":"#/components/schemas/PolicyThresholds"},"transaction_amount":{"type":"number","minimum":0.0,"title":"Transaction Amount","default":0.0},"redacted_subject_ref":{"type":"string","title":"Redacted Subject Ref"}},"additionalProperties":false,"type":"object","required":["model_id","decision_domain","proposed_action","confidence_score","human_override_required","redacted_subject_ref"],"title":"GovernanceCheckRequest","description":"Strings are never echoed or persisted, including the redacted reference."},"GovernanceCheckResponse":{"properties":{"receipt_id":{"type":"string","maxLength":68,"minLength":68,"pattern":"^gov_[0-9a-f]{64}$","title":"Receipt Id"},"gate":{"type":"string","enum":["PASS","HOLD"],"title":"Gate"},"architecture_version":{"type":"string","const":"PLATFORM-ARCHITECTURE-2026-V1","title":"Architecture Version"},"sha256_digest":{"type":"string","maxLength":64,"minLength":64,"pattern":"^[0-9a-f]{64}$","title":"Sha256 Digest"},"findings":{"items":{"$ref":"#/components/schemas/GovernanceFinding"},"type":"array","maxItems":3,"title":"Findings"},"evaluated_at":{"type":"string","format":"date-time","title":"Evaluated At"}},"additionalProperties":false,"type":"object","required":["receipt_id","gate","architecture_version","sha256_digest","findings","evaluated_at"],"title":"GovernanceCheckResponse","description":"A content-addressed receipt, not an authenticated cryptographic signature."},"GovernanceFinding":{"properties":{"code":{"type":"string","enum":["LOW_MODEL_CONFIDENCE","UNSUPERVISED_HIGH_VALUE_ACTION","MISSING_MODEL_PROVENANCE"],"title":"Code"},"reason":{"type":"string","title":"Reason"}},"additionalProperties":false,"type":"object","required":["code","reason"],"title":"GovernanceFinding","description":"Reasons are static rule text, not caller- or storage-controlled prose."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"app":{"type":"string","title":"App"},"environment":{"type":"string","title":"Environment"},"version":{"type":"string","title":"Version"},"engine":{"type":"string","title":"Engine","default":"ARKHEIA DVE™"},"architecture_version":{"type":"string","title":"Architecture Version","default":"PLATFORM-ARCHITECTURE-2026-V1"},"modules":{"items":{"type":"string"},"type":"array","title":"Modules","default":["dve-clearcheck","dve-riskcheck"]}},"type":"object","required":["status","app","environment","version"],"title":"HealthResponse"},"HousingContractIn":{"properties":{"address":{"type":"string","minLength":1,"title":"Address"},"home_value":{"type":"number","minimum":0.0,"title":"Home Value","description":"Home value in USD"},"year_built":{"type":"integer","maximum":2026.0,"minimum":1700.0,"title":"Year Built"},"location_risk_tier":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Location Risk Tier","description":"Illustrative location risk tier, 1 (lowest) to 5 (highest). Not derived from any licensed actuarial dataset.","default":2},"structural_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Structural Score","description":"Illustrative structural condition score, 0-100 (higher is better condition).","default":70}},"type":"object","required":["address","home_value","year_built"],"title":"HousingContractIn","description":"Input contract for housing risk evaluation."},"HousingRiskFactors":{"properties":{"age_factor":{"type":"number","title":"Age Factor"},"value_factor":{"type":"number","title":"Value Factor"},"location_risk_factor":{"type":"number","title":"Location Risk Factor"},"structural_factor":{"type":"number","title":"Structural Factor"}},"type":"object","required":["age_factor","value_factor","location_risk_factor","structural_factor"],"title":"HousingRiskFactors"},"HousingRiskOut":{"properties":{"type":{"type":"string","title":"Type","default":"HOUSING"},"raw":{"$ref":"#/components/schemas/HousingRiskFactors"},"risk_score":{"type":"number","title":"Risk Score"},"risk_tier":{"type":"string","title":"Risk Tier"},"model_version":{"type":"string","title":"Model Version"}},"type":"object","required":["raw","risk_score","risk_tier","model_version"],"title":"HousingRiskOut"},"PlatformCheckResponse":{"properties":{"receipt_id":{"type":"string","maxLength":68,"minLength":68,"pattern":"^(stl|prv|cst|edg)_[0-9a-f]{64}$","title":"Receipt Id"},"gate":{"type":"string","enum":["PASS","HOLD"],"title":"Gate"},"findings":{"items":{"$ref":"#/components/schemas/PlatformFinding"},"type":"array","maxItems":3,"title":"Findings"},"sha256":{"type":"string","maxLength":64,"minLength":64,"pattern":"^[0-9a-f]{64}$","title":"Sha256"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"architecture_version":{"type":"string","const":"PLATFORM-ARCHITECTURE-2026-V1","title":"Architecture Version","default":"PLATFORM-ARCHITECTURE-2026-V1"}},"additionalProperties":false,"type":"object","required":["receipt_id","gate","findings","sha256","timestamp"],"title":"PlatformCheckResponse","description":"Content-addressed PLATFORM receipt; not a signed DVE v1 receipt."},"PlatformFinding":{"properties":{"code":{"type":"string","enum":["SPLIT_CONSERVATION_VIOLATION","INVALID_GROSS_AMOUNT","MISSING_PROVENANCE_HASH","UNVERIFIED_RIGHTS_CHAIN","INSUFFICIENT_QUORUM_SIGNATURES","EXPIRED_OR_INACTIVE_CUSTODY_POLICY","CUSTODY_LIMIT_EXCEEDED","UNATTESTED_EDGE_NODE","SENSOR_INVARIANT_BREACH","MISSING_LOCAL_AUDIT_HASH"],"title":"Code"},"reason":{"type":"string","title":"Reason"}},"additionalProperties":false,"type":"object","required":["code","reason"],"title":"PlatformFinding"},"PolicyThresholds":{"properties":{"min_confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Confidence","default":0.85},"max_unsupervised_amount":{"type":"number","minimum":0.0,"title":"Max Unsupervised Amount","default":10000.0}},"additionalProperties":false,"type":"object","title":"PolicyThresholds","description":"Only these two keys are accepted; omitted keys receive their defaults."},"PortalSessionResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"PortalSessionResponse"},"SubscriptionStatusResponse":{"properties":{"tenant_id":{"type":"string","title":"Tenant Id"},"tier":{"$ref":"#/components/schemas/Tier"},"display_name":{"type":"string","title":"Display Name"},"status":{"type":"string","title":"Status"},"rate_limit_per_minute":{"type":"integer","title":"Rate Limit Per Minute"},"allowed_modules":{"items":{"type":"string"},"type":"array","title":"Allowed Modules"},"monthly_price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Price Usd"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"},"has_stripe_customer":{"type":"boolean","title":"Has Stripe Customer"}},"type":"object","required":["tenant_id","tier","display_name","status","rate_limit_per_minute","allowed_modules","monthly_price_usd","current_period_end","has_stripe_customer"],"title":"SubscriptionStatusResponse"},"Tier":{"type":"string","enum":["free","pro","enterprise"],"title":"Tier"},"TrialPortalRequest":{"properties":{"session_id":{"type":"string","maxLength":255,"minLength":24,"pattern":"^cs_(?:test|live)_[A-Za-z0-9]{16,}$","title":"Session Id"}},"type":"object","required":["session_id"],"title":"TrialPortalRequest"},"TrialPortalResponse":{"properties":{"url":{"type":"string","title":"Url"},"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["url","portal_url"],"title":"TrialPortalResponse"},"TrialStatusResponse":{"properties":{"trial_active":{"type":"boolean","title":"Trial Active"},"trial_expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Expires At"}},"type":"object","required":["trial_active","trial_expires_at"],"title":"TrialStatusResponse"},"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"}}}}