{"openapi":"3.1.0","info":{"title":"Prova","description":"The first formally verified reasoning engine for AI. Prova analyzes AI reasoning chains and produces certificates of logical validity — or precise diagnoses of where reasoning breaks down.","version":"1.0.0"},"paths":{"/v1/chat/completions":{"post":{"tags":["gateway"],"summary":"Chat Completions","description":"OpenAI-compatible chat.completions proxy with inline Prova verification.","operationId":"chat_completions_v1_chat_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/messages":{"post":{"tags":["gateway"],"summary":"Messages","description":"Anthropic Messages API proxy with inline Prova verification.","operationId":"messages_v1_messages_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/analytics/cco":{"get":{"tags":["analytics"],"summary":"Get Cco Analytics","description":"Return aggregated CCO analytics for the authenticated user.\n\nQuery params:\n  range        -- date range, e.g. 30d, 90d, 365d (default: 90d)\n  model        -- filter by metadata.model\n  workflow     -- filter by metadata.workflow\n  failure_type -- filter by failure.type (CIRCULAR | CONTRADICTION | UNSUPPORTED_LEAP)","operationId":"get_cco_analytics_analytics_cco_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+d$","default":"90d","title":"Range"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"workflow","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow"}},{"name":"failure_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Cco Analytics Analytics Cco Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/cco/export":{"post":{"tags":["analytics"],"summary":"Export Board Report","description":"Generate and download a PDF board report for the current filter state.","operationId":"export_board_report_analytics_cco_export_post","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d+d$","default":"90d","title":"Range"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"workflow","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow"}},{"name":"failure_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence-pack":{"post":{"tags":["compliance"],"summary":"Create Evidence Pack","description":"Generate a signed compliance evidence ZIP for the authenticated user.\n\nThe ZIP contains PDFs for all certificates in the date range, a signed\nmanifest, and a coverage CSV. Download link expires in 24 hours.","operationId":"create_evidence_pack_evidence_pack_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidencePackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs":{"post":{"tags":["orgs"],"summary":"Create Org","operationId":"create_org_orgs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs/{org_id}":{"get":{"tags":["orgs"],"summary":"Get Org","operationId":"get_org_orgs__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs/{org_id}/members":{"get":{"tags":["orgs"],"summary":"List Members","operationId":"list_members_orgs__org_id__members_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs/{org_id}/invite":{"post":{"tags":["orgs"],"summary":"Invite Member","operationId":"invite_member_orgs__org_id__invite_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs/{org_id}/members/{uid}":{"patch":{"tags":["orgs"],"summary":"Patch Member","operationId":"patch_member_orgs__org_id__members__uid__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"uid","in":"path","required":true,"schema":{"type":"string","title":"Uid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/ingest":{"post":{"tags":["audit"],"summary":"Ingest","description":"Fire-and-forget audit ingest. Rolls sample_rate die; 202 always.","operationId":"ingest_v1_audit_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/workflows":{"get":{"tags":["audit"],"summary":"List Workflows","operationId":"list_workflows_v1_audit_workflows_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["audit"],"summary":"Create Workflow","operationId":"create_workflow_v1_audit_workflows_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/workflows/{workflow_id}/stats":{"get":{"tags":["audit"],"summary":"Workflow Stats","description":"Return daily validity rate timeseries + recent failed samples.","operationId":"workflow_stats_v1_audit_workflows__workflow_id__stats_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/export":{"get":{"tags":["audit"],"summary":"Export Audit Log","description":"Generate a signed JSONL export for the requested time range.\n\nReturns a presigned S3 URL (1-hour TTL) to a file where every line is\nan ed25519-signed audit event. Enterprise tier required.\n\nQuery parameters\n----------------\nfrom  ISO-8601 datetime, e.g. 2026-01-01T00:00:00Z\nto    ISO-8601 datetime, e.g. 2026-01-31T23:59:59Z","operationId":"export_audit_log_v1_audit_export_get","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","description":"ISO-8601 start datetime (UTC)","title":"From"},"description":"ISO-8601 start datetime (UTC)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","description":"ISO-8601 end datetime (UTC)","title":"To"},"description":"ISO-8601 end datetime (UTC)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List Webhooks","description":"List webhooks for the caller's organization. Secrets are not returned.","operationId":"list_webhooks_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["webhooks"],"summary":"Create Webhook","description":"Register a new webhook. Returns the signing secret once (not stored retrievably).","operationId":"create_webhook_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{webhook_id}":{"delete":{"tags":["webhooks"],"summary":"Delete Webhook","description":"Delete a webhook by ID. Must belong to the caller's organization.","operationId":"delete_webhook_v1_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bench/leaderboard":{"get":{"tags":["bench"],"summary":"Leaderboard","operationId":"leaderboard_bench_leaderboard_get","parameters":[{"name":"run_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bench/model/{model}":{"get":{"tags":["bench"],"summary":"Model Detail","operationId":"model_detail_bench_model__model__get","parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bench/run":{"post":{"tags":["bench"],"summary":"Trigger Run","operationId":"trigger_run_bench_run_post","parameters":[{"name":"x-cron-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["system"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/verify":{"post":{"tags":["verification"],"summary":"Verify","description":"Analyze a reasoning chain and return a formal validity certificate.","operationId":"verify_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateResponse"}}}},"422":{"description":"Input or extraction error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal analysis error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/verify/structured":{"post":{"tags":["verification"],"summary":"Verify Structured","description":"Analyze a pre-built argument graph and return a formal validity certificate.\n\nSkips extraction entirely. Callers supply the argument graph directly.\nconfidence_score is always 100 -- no extraction ambiguity is possible.\nextraction_prompt_version is always 'structured-input-v1'.","operationId":"verify_structured_verify_structured_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateResponse"}}}},"400":{"description":"Invalid structured graph","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Graph validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal analysis error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/repair":{"post":{"tags":["repair"],"summary":"Repair","description":"Verify a reasoning chain and auto-repair it if INVALID.\n\nRuns the full verify -> suggest -> apply -> re-verify loop server-side.\nA single call replaces the two-step verify-then-repair pattern.\n\nRate limit: each internal verification logs its own usage record.\nA /repair call with K iterations consumes K+1 verification quota slots.","operationId":"repair_repair_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepairRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepairResponse"}}}},"422":{"description":"No repair possible or repair unsuccessful with fail_open=false","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/certificate/{certificate_id}":{"get":{"tags":["certificates"],"summary":"Get Certificate By Id","operationId":"get_certificate_by_id_certificate__certificate_id__get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateResponse"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/certificate/{certificate_id}/pdf":{"get":{"tags":["certificates"],"summary":"Get Certificate Pdf","description":"Generate and return a PDF certificate by ID.","operationId":"get_certificate_pdf_certificate__certificate_id__pdf_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"PDF certificate","content":{"application/json":{"schema":{}},"application/pdf":{}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/certificate/{certificate_id}/lean":{"get":{"tags":["certificates"],"summary":"Get Certificate Lean","description":"Return the self-contained Lean 4 proof source for a VALID certificate.\n\nThe file requires only the Lean 4 core library and can be checked with\n`lean <file>`. INVALID certificates yield a 409.","operationId":"get_certificate_lean_certificate__certificate_id__lean_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Lean 4 proof source","content":{"application/json":{"schema":{}},"text/plain":{}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"409":{"description":"Certificate is INVALID — no proof available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/certificate/{certificate_id}/repair-suggestions":{"post":{"tags":["repair"],"summary":"Get Repair Suggestions","description":"Generate Claude-powered repair suggestions for an INVALID certificate.\n\nRequires authentication with a non-demo API key.\nGated to team and enterprise plans.","operationId":"get_repair_suggestions_certificate__certificate_id__repair_suggestions_post","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Content"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"}}}},"/certificate/{certificate_id}/auto-repair":{"post":{"tags":["repair"],"summary":"Auto Repair Certificate","description":"Auto-repair a reasoning chain using Claude.\n\nRequires authentication with a non-demo API key.\nGated to team and enterprise plans. Requires original reasoning (retain=true).","operationId":"auto_repair_certificate_certificate__certificate_id__auto_repair_post","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Content"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal Server Error"}}}},"/policies":{"get":{"tags":["policies"],"summary":"List Policies Endpoint","description":"Return the full policy registry.","operationId":"list_policies_endpoint_policies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/certificates/{certificate_id}/policies":{"get":{"tags":["policies"],"summary":"Get Certificate Policies","description":"Return the policies this certificate evidences.","operationId":"get_certificate_policies_certificates__certificate_id__policies_get","parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coverage":{"get":{"tags":["policies"],"summary":"Get Coverage","description":"Return aggregate certificate counts per policy article.\n\nOptional ?framework=EU_AI_ACT filter.","operationId":"get_coverage_coverage_get","parameters":[{"name":"framework","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Framework"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CertificateResponse":{"properties":{"certificate_id":{"type":"string","title":"Certificate Id"},"timestamp":{"type":"string","title":"Timestamp"},"verdict":{"type":"string","title":"Verdict"},"failure_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Type"},"confidence_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Confidence Score"},"prova_version":{"type":"string","title":"Prova Version"},"validator_version":{"type":"string","title":"Validator Version"},"extraction_prompt_version":{"type":"string","title":"Extraction Prompt Version"},"argument_graph":{"additionalProperties":true,"type":"object","title":"Argument Graph"},"failure":{"anyOf":[{"$ref":"#/components/schemas/FailureDetail"},{"type":"null"}]},"original_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Reasoning"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"certificate_url":{"type":"string","title":"Certificate Url"},"sha256":{"type":"string","title":"Sha256"},"lean_proof":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lean Proof"},"extraction_consensus":{"anyOf":[{"$ref":"#/components/schemas/ConsensusMetadata"},{"type":"null"}]}},"type":"object","required":["certificate_id","timestamp","verdict","confidence_score","prova_version","validator_version","extraction_prompt_version","argument_graph","certificate_url","sha256"],"title":"CertificateResponse","description":"Full certificate response -- returned by POST /verify and GET /certificate/{id}."},"ConsensusMetadata":{"properties":{"samples_requested":{"type":"integer","title":"Samples Requested"},"samples_successful":{"type":"integer","title":"Samples Successful"},"node_agreement_rate":{"type":"number","title":"Node Agreement Rate"},"edge_agreement_rate":{"type":"number","title":"Edge Agreement Rate"},"verdict_agreement_rate":{"type":"number","title":"Verdict Agreement Rate"},"chosen_sample_index":{"type":"integer","title":"Chosen Sample Index"},"divergent":{"type":"boolean","title":"Divergent"}},"type":"object","required":["samples_requested","samples_successful","node_agreement_rate","edge_agreement_rate","verdict_agreement_rate","chosen_sample_index","divergent"],"title":"ConsensusMetadata","description":"Extraction consensus metadata -- present only when n_extraction_samples > 1."},"CreateOrgRequest":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"sso_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sso Provider"},"sso_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sso Domain"}},"type":"object","required":["name","slug"],"title":"CreateOrgRequest"},"DiffChange":{"properties":{"type":{"type":"string","title":"Type"},"line_number":{"type":"integer","title":"Line Number"},"before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},"type":"object","required":["type","line_number"],"title":"DiffChange","description":"A single line-level change in a reasoning diff."},"ErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"message":{"type":"string","title":"Message"},"confidence_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confidence Score"}},"type":"object","required":["error","message"],"title":"ErrorResponse","description":"Standard error response shape for all API errors."},"EvidencePackRequest":{"properties":{"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"policy_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Policy Ids"},"format":{"type":"string","title":"Format","default":"zip"}},"type":"object","required":["start_date","end_date"],"title":"EvidencePackRequest"},"EvidencePackResponse":{"properties":{"url":{"type":"string","title":"Url"},"cert_count":{"type":"integer","title":"Cert Count"},"sha256":{"type":"string","title":"Sha256"}},"type":"object","required":["url","cert_count","sha256"],"title":"EvidencePackResponse"},"FailureDetail":{"properties":{"type":{"type":"string","title":"Type"},"failure_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Id"},"location":{"type":"string","title":"Location"},"description":{"type":"string","title":"Description"},"affected_nodes":{"items":{"type":"string"},"type":"array","title":"Affected Nodes"},"affected_edges":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Affected Edges"},"known_consequence":{"anyOf":[{"$ref":"#/components/schemas/KnownConsequence"},{"type":"null"}]}},"type":"object","required":["type","location","description","affected_nodes","affected_edges"],"title":"FailureDetail","description":"Failure diagnosis — present only on INVALID certificates."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"validator_version":{"type":"string","title":"Validator Version"}},"type":"object","required":["status","version","validator_version"],"title":"HealthResponse","description":"GET /health response."},"IngestRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["workflow_id","reasoning"],"title":"IngestRequest"},"InviteMemberRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","title":"Role","default":"member"}},"type":"object","required":["user_id"],"title":"InviteMemberRequest"},"KnownConsequence":{"properties":{"id":{"type":"string","title":"Id"},"domain":{"type":"string","title":"Domain"},"name":{"type":"string","title":"Name"},"consequence":{"type":"string","title":"Consequence"},"severity":{"type":"string","title":"Severity"}},"type":"object","required":["id","domain","name","consequence","severity"],"title":"KnownConsequence","description":"A known downstream failure consequence from the registry."},"PatchMemberRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"PatchMemberRequest"},"ReasoningDiff":{"properties":{"lines_changed":{"type":"integer","title":"Lines Changed"},"lines_added":{"type":"integer","title":"Lines Added"},"lines_removed":{"type":"integer","title":"Lines Removed"},"changes":{"items":{"$ref":"#/components/schemas/DiffChange"},"type":"array","title":"Changes"}},"type":"object","required":["lines_changed","lines_added","lines_removed","changes"],"title":"ReasoningDiff","description":"Line-level diff between original and repaired reasoning."},"RepairRequest":{"properties":{"reasoning":{"type":"string","maxLength":32000,"minLength":20,"title":"Reasoning"},"format":{"type":"string","pattern":"^(auto|structured|prose)$","title":"Format","default":"auto"},"retain":{"type":"boolean","title":"Retain","default":true},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"max_iterations":{"type":"integer","maximum":3.0,"minimum":1.0,"title":"Max Iterations","default":1},"fail_open":{"type":"boolean","title":"Fail Open","default":true}},"type":"object","required":["reasoning"],"title":"RepairRequest","description":"POST /repair request body."},"RepairResponse":{"properties":{"original_certificate":{"$ref":"#/components/schemas/CertificateResponse"},"repaired_certificate":{"anyOf":[{"$ref":"#/components/schemas/CertificateResponse"},{"type":"null"}]},"repaired_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repaired Reasoning"},"diff":{"anyOf":[{"$ref":"#/components/schemas/ReasoningDiff"},{"type":"null"}]},"iterations_used":{"type":"integer","title":"Iterations Used"},"suggestions_applied":{"type":"integer","title":"Suggestions Applied"},"repair_successful":{"type":"boolean","title":"Repair Successful"}},"type":"object","required":["original_certificate","repaired_certificate","repaired_reasoning","diff","iterations_used","suggestions_applied","repair_successful"],"title":"RepairResponse","description":"POST /repair response body."},"StructuredGraphEdge":{"properties":{"from":{"type":"string","title":"From"},"to":{"type":"string","title":"To"}},"type":"object","required":["from","to"],"title":"StructuredGraphEdge","description":"A directed edge in a pre-built argument graph."},"StructuredGraphNode":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"type":{"type":"string","title":"Type"}},"type":"object","required":["id","text","type"],"title":"StructuredGraphNode","description":"A node in a pre-built argument graph."},"StructuredVerifyRequest":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/StructuredGraphNode"},"type":"array","minItems":2,"title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/StructuredGraphEdge"},"type":"array","minItems":1,"title":"Edges"},"retain":{"type":"boolean","title":"Retain","description":"If false, the serialized graph is not stored as original_reasoning. Certificate metadata is always stored.","default":true},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["nodes","edges"],"title":"StructuredVerifyRequest","description":"POST /verify/structured request body."},"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"},"VerifyRequest":{"properties":{"reasoning":{"type":"string","maxLength":32000,"minLength":20,"title":"Reasoning","description":"The AI reasoning chain to verify. Plain text."},"format":{"type":"string","pattern":"^(auto|structured|prose)$","title":"Format","description":"Hint about reasoning structure. 'structured' for numbered steps, 'prose' for flowing text, 'auto' to detect automatically.","default":"auto"},"retain":{"type":"boolean","title":"Retain","description":"If false, the original reasoning text is not stored. Certificate metadata is always stored.","default":true},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Optional caller-provided key-value pairs attached to the certificate. Useful for pipeline names, decision IDs, model names."},"input_type":{"type":"string","pattern":"^(prose|structured)$","title":"Input Type","description":"'prose' for natural language reasoning. 'structured' is not accepted here; use POST /verify/structured instead.","default":"prose"},"n_extraction_samples":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"N Extraction Samples","description":"Number of extraction samples for consensus. Default follows PROVA_EXTRACTION_SAMPLES env var (1 if unset). 1 = current single-call behavior. Higher values run parallel extractions and return the majority consensus graph, improving reliability on ambiguous reasoning chains at proportional API cost."}},"type":"object","required":["reasoning"],"title":"VerifyRequest","description":"POST /verify request body."},"WebhookCreate":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"}},"type":"object","required":["url"],"title":"WebhookCreate"},"WorkflowCreate":{"properties":{"name":{"type":"string","title":"Name"},"sample_rate":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Sample Rate","default":0.01},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"}},"type":"object","required":["name"],"title":"WorkflowCreate"}}}}