{"openapi":"3.1.0","info":{"title":"Xyntherium API","version":"1.0.0","description":"Verify any question across six leading AI models and receive a single synthesized, attributed answer with confidence scoring and divergence detection."},"servers":[{"url":"https://xyntherium.com"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/verify":{"post":{"summary":"Verify an answer against its sources (Verify v1), or run a multi-AI deliberation (legacy prompt shape)","operationId":"verify","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/EvidenceVerifyRequest"},{"$ref":"#/components/schemas/VerifyRequest"}]}}}},"responses":{"200":{"description":"Verify v1 result (EvidenceVerifyResponse) or legacy deliberation receipt (VerifyResponse), by request shape. A result with status \"incomplete\" (a checking model was unavailable) also carries Retry-After and X-Xyntherium-Status: incomplete.","headers":{"X-Xyntherium-Schema-Version":{"schema":{"type":"string","const":"2026-10-15"}},"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]}},"X-Xyntherium-Status":{"schema":{"type":"string","enum":["incomplete"]},"description":"Present only on incomplete results."},"Retry-After":{"schema":{"type":"integer"},"description":"Present only on incomplete results: seconds to wait before retrying."}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/EvidenceVerifyResponse"},{"$ref":"#/components/schemas/VerifyResponse"}]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Verify v1 only. Enforced in storage: a repeat returns the stored result without re-running or re-billing."}]}},"/v1/verify/image":{"post":{"summary":"Verify a prompt about an image across the vision panel","description":"Runs Claude, GPT-4.1, Grok, and Gemini against the image (non-vision providers are rejected). Provide image_url or image_base64.","operationId":"verifyImage","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyImageRequest"},"examples":{"url":{"summary":"Public image URL","value":{"prompt":"What is shown in this chart?","image_url":"https://example.com/chart.png"}},"base64":{"summary":"Inline base64","value":{"prompt":"What is wrong with this food label?","image_base64":{"mime_type":"image/jpeg","data":"<base64 string>"}}}}}}},"responses":{"200":{"description":"Deliberation receipt (3-of-4 or 4-of-4 vision providers)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}},"/v1/usage":{"get":{"summary":"Usage for the calling key in the current billing period","operationId":"getUsage","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Usage summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}}},"/v1/health":{"get":{"summary":"Provider availability snapshot (no auth)","operationId":"getHealth","security":[],"responses":{"200":{"description":"All providers available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"503":{"description":"One or more providers degraded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/v1/verify/document":{"post":{"summary":"Verify an answer against one long document (PDF, .docx, Markdown or text)","description":"The document is split into one source per numbered section, so every claim's evidence cites \"Section 3.2.4, REQ-…\" with the quoted text. Same plan, allowance and metering as POST /v1/verify. Limits: a 25 MB file, 1,500,000 extracted characters (about 160 dense pages); over a limit the request is refused with the limit and the document's size, never truncated. A long answer against a long document can also exceed what one check can finish in its time limit (the full 1,500,000 characters for answers up to about 20 statements; about 350,000 characters for a 60-statement answer in strict mode; see docs/verify-size-limits.md): such a request is refused with 413 check_too_large naming the limit for that answer length, before anything runs or is counted.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVerifyRequest"}}}},"responses":{"200":{"description":"The Verify result plus the document's stats and the sections it was split into.","headers":{"X-Xyntherium-Schema-Version":{"schema":{"type":"string","const":"2026-10-15"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVerifyResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}},"/v1/verify/{id}":{"get":{"summary":"A stored Verify v1 result for your account","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The result (claim text and quotes are null after the retention window: content_available=false)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceVerifyResponse"}}}},"202":{"description":"Still running"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/ledger/{id}":{"get":{"summary":"An evidence-ledger entry with its hash checks recomputed","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Ledger entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntry"}}}},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key: `Authorization: Bearer xyn_live_…`"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"VerifyRequest":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"providers":{"type":"array","items":{"type":"string","enum":["anthropic","openai","xai","perplexity","google","deepseek"]},"description":"Optional subset of providers (min 3). Defaults to the full active panel."}}},"VerifyImageRequest":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"image_url":{"type":"string","format":"uri","description":"Publicly reachable image (jpeg/png/webp/gif, ≤20MB)."},"image_base64":{"type":"object","required":["mime_type","data"],"properties":{"mime_type":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/gif"]},"data":{"type":"string","description":"base64-encoded image bytes"}}},"providers":{"type":"array","items":{"type":"string","enum":["anthropic","openai","xai","google"]},"description":"Optional subset of vision providers. Non-vision ids are rejected."}},"description":"Exactly one of image_url or image_base64 is required."},"VerifyResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"receipt":{"type":["object","null"],"properties":{"slug":{"type":"string"},"url":{"type":"string","format":"uri"}}},"prompt":{"type":"string"},"tier":{"type":"string","enum":["free","connect","master"]},"synthesized_answer":{"type":"string"},"confidence_band":{"type":"string","enum":["low","medium","high"]},"consensus_score":{"type":"number"},"attribution":{"$ref":"#/components/schemas/Attribution"},"divergence":{"type":"object"},"consensus_claims":{"type":"array","items":{"type":"object"}},"per_model_stats":{"type":"array","items":{"type":"object"}},"providers":{"type":"array","items":{"$ref":"#/components/schemas/ProviderSummary"}},"meta":{"type":"object"}}},"Attribution":{"type":"object","properties":{"spans":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer"},"end":{"type":"integer"},"text":{"type":"string"},"attribution_type":{"type":"string","enum":["provider_consensus","provider_specific","synthesizer_inference"]},"supporting_providers":{"type":"array","items":{"type":"string"}}}}}}},"ProviderSummary":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"latency_ms":{"type":["integer","null"]},"cost_cents":{"type":["number","null"]},"responded":{"type":"boolean"},"contributed":{"type":"boolean"},"exclusion_reason":{"type":["string","null"],"enum":["truncated","no_claims","error","timeout",null]},"error":{"type":["string","null"]},"response_text":{"type":["string","null"]}}},"Usage":{"type":"object","properties":{"key_id":{"type":"string","format":"uuid"},"tier":{"type":"string"},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"queries_completed":{"type":"integer"},"queries_failed":{"type":"integer"},"cost_cents":{"type":"number"},"rate_limit_per_minute":{"type":"integer"}}},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"available":{"type":"boolean"}}}},"timestamp":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"DocumentVerifyRequest":{"type":"object","required":["answer"],"properties":{"question":{"type":"string","maxLength":2000},"answer":{"type":"string","maxLength":20000,"description":"The AI answer to check."},"mode":{"type":"string","enum":["fast","strict"],"default":"fast"},"document":{"type":"object","required":["mime_type","data"],"properties":{"mime_type":{"type":"string","enum":["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/plain","text/markdown"]},"data":{"type":"string","description":"The file, base64."},"name":{"type":"string"}},"description":"The document as a file. Either this or document_text."},"document_text":{"type":"string","description":"The document as text. Either this or document."},"allow_research_use":{"type":"boolean","default":false,"description":"Opt in, for this request only, to let Xyntherium keep the check for research if it finds a problem: source text is removed (hashes and offsets only), the question and answer are kept with emails, phone numbers and card numbers masked, and no account or key is kept. Off by default; nothing is kept without it. See https://www.xyntherium.com/privacy#research."},"private":{"type":"boolean","default":false,"description":"Private check: nothing is saved but an anonymous counter, the text goes only to Anthropic, research use stays off, and no ledger entry is written."},"no_ai":{"type":"boolean","default":false,"description":"Code-only private check: no model and no outside call. Catches less."},"providers_allow":{"type":"array","items":{"type":"string","enum":["anthropic","openai","xai","perplexity","google","deepseek"]},"description":"Only these AI providers may be used."},"providers_deny":{"type":"array","items":{"type":"string","enum":["anthropic","openai","xai","perplexity","google","deepseek"]},"description":"These AI providers may not be used."},"providers_preset":{"type":"string","enum":["us_developed"],"description":"Only models built in the US with a confirmed lineage."},"document_name":{"type":"string"}}},"DocumentVerifyResponse":{"allOf":[{"$ref":"#/components/schemas/EvidenceVerifyResponse"},{"type":"object","properties":{"document":{"type":"object","properties":{"name":{"type":"string"},"chars":{"type":"integer"},"sections":{"type":"integer"},"format":{"type":"string","enum":["pdf","docx","text","markdown"]},"split_sections":{"type":"array","items":{"type":"string"}},"sections_checked":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"chars":{"type":"integer"}}}},"sections_not_checked":{"type":"array","items":{"type":"string"},"description":"Always empty: a document over the limit is refused, never truncated."}}},"citation_mismatches":{"type":"array","items":{"type":"object","properties":{"claim_index":{"type":"integer"},"cited":{"type":"string","description":"The section or requirement the answer named."},"evidence":{"type":"string","description":"Where the supporting passage sits, e.g. \"Section 3.2.4, REQ-FUN-043\"."}}}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"},"description":"The section sources the document was split into (id = section number, title = heading)."}}}]},"EvidenceVerifyRequest":{"type":"object","required":["question","answer","sources"],"properties":{"question":{"type":"string","maxLength":2000},"answer":{"type":"string","maxLength":20000,"description":"The AI-generated answer to check."},"sources":{"type":"array","minItems":1,"maxItems":400,"items":{"type":"object","required":["id","text"],"properties":{"id":{"type":"string","maxLength":128},"title":{"type":"string"},"text":{"type":"string","maxLength":400000,"description":"Passage text. Required: v1 is text only."},"url":{"type":"string","description":"Metadata only. Never fetched."},"retrieved_at":{"type":"string","format":"date-time"}}}},"allow_research_use":{"type":"boolean","default":false,"description":"Opt in, for this request only, to let Xyntherium keep the check for research if it finds a problem: source text is removed (hashes and offsets only), the question and answer are kept with emails, phone numbers and card numbers masked, and no account or key is kept. Off by default; nothing is kept without it. See https://www.xyntherium.com/privacy#research."},"private":{"type":"boolean","default":false,"description":"Private check: nothing is saved but an anonymous counter, the text goes only to Anthropic, research use stays off, and no ledger entry is written."},"no_ai":{"type":"boolean","default":false,"description":"Code-only private check: no model and no outside call. Catches less."},"providers_allow":{"type":"array","items":{"type":"string","enum":["anthropic","openai","xai","perplexity","google","deepseek"]},"description":"Only these AI providers may be used."},"providers_deny":{"type":"array","items":{"type":"string","enum":["anthropic","openai","xai","perplexity","google","deepseek"]},"description":"These AI providers may not be used."},"providers_preset":{"type":"string","enum":["us_developed"],"description":"Only models built in the US with a confirmed lineage."},"options":{"type":"object","properties":{"require_citations":{"type":"boolean"},"thresholds":{"type":"object","properties":{"max_unsupported":{"type":"integer","minimum":0},"max_unverifiable":{"type":"integer","minimum":0}}}}}}},"Span":{"type":"object","properties":{"source_id":{"type":"string"},"start":{"type":"integer","description":"Offset into the original source text (inclusive)."},"end":{"type":"integer","description":"Offset into the original source text (exclusive)."},"quote":{"type":"string","description":"Exactly source.text.slice(start, end)."},"match_type":{"type":"string","enum":["exact","normalized","punctuation_tolerant"]},"edit_distance":{"type":"integer"},"role":{"type":"string","enum":["supports","conflicts","qualifies"]},"source_hash":{"type":"string","description":"sha256 of the full source text"}}},"Qualifier":{"type":"object","properties":{"type":{"type":"string","enum":["date","time_range","entity","quantity","condition","scope","modality","negation"]},"claim_text":{"type":["string","null"]},"source_text":{"type":["string","null"]},"status":{"type":"string","enum":["preserved","dropped","contradicted","ambiguous"]},"material":{"type":"boolean"},"note":{"type":"string"},"proposed_by":{"type":"string","enum":["code","model"]}}},"Claim":{"type":"object","properties":{"index":{"type":"integer"},"text":{"type":"string"},"claim_type":{"type":"string"},"material":{"type":"boolean"},"answer_start":{"type":["integer","null"]},"answer_end":{"type":["integer","null"]},"verdict":{"type":"string","enum":["supported","contradicted","unsupported","unverifiable"]},"failure_reason":{"type":["string","null"],"enum":["qualifier_loss","no_supporting_span","unsupported_detail","unverified_contradiction","number_mismatch","date_mismatch","entity_mismatch","negation","condition_mismatch","arithmetic_error","superseded","comparative","out_of_scope","conflicting_sources","model_abstained","cost_ceiling","deadline","provider_error","deliberation_disagreement","possible_paraphrase","needs_review","not_adjudicated",null]},"resolved_by":{"type":"string","enum":["code","model","deliberation"]},"calibrated_confidence":{"type":["number","null"],"description":"Null until benchmark calibration is validated. A measured hit rate on labelled items, never a probability of truth."},"calibration_label":{"type":["string","null"]},"citation":{"type":"object","properties":{"cited":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ok","missing","mismatch","not_required"]}}},"provenance":{"type":"object","properties":{"spans":{"type":"array","items":{"$ref":"#/components/schemas/Span"}},"context":{"type":["object","null"]},"qualifiers":{"type":"array","items":{"$ref":"#/components/schemas/Qualifier"}},"checks":{"type":"array","items":{"type":"object"}},"rule_id":{"type":"string"},"model_used":{"type":"boolean"},"models":{"type":"array","items":{"type":"string"}},"prompt_versions":{"type":"array","items":{"type":"string"}},"discarded_quotes":{"type":"integer"}}}}},"EvidenceVerifyResponse":{"type":"object","properties":{"schema_version":{"type":"string","const":"2026-10-15"},"request_id":{"type":"string","format":"uuid"},"evidence_ledger_id":{"type":["string","null"]},"status":{"type":"string","enum":["completed","partial","incomplete","failed"],"description":"completed: every claim was checked (the only billed status). partial: a limit stopped some claims (cost ceiling, time limit, claim cap). incomplete: a checking model was unavailable (incomplete_reason), so this is not a full check and must not be treated as a verdict; retry after retry_after_seconds. failed: nothing was checked."},"incomplete_reason":{"type":"string","enum":["model_unavailable"],"description":"Set when status is \"incomplete\". model_unavailable: the claim-extraction or adjudication model could not be reached (out of credit, key rejected, rate limited, provider error or timeout). Not billed; an Idempotency-Key used for an incomplete check may be sent again and runs again."},"retry_after_seconds":{"type":"integer","description":"Set when status is \"incomplete\"; also sent as the Retry-After header, with X-Xyntherium-Status: incomplete."},"overall_status":{"type":"string","enum":["all_supported","issues_found","insufficient_sources","partial"]},"release_recommendation":{"type":"string","enum":["allow","cite_required","revise","human_review"]},"release_reasons":{"type":"array","items":{"type":"string"}},"partial_reasons":{"type":"array","items":{"type":"string"}},"counts":{"type":"object"},"claims":{"type":"array","items":{"$ref":"#/components/schemas/Claim"}},"rejected_claims":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"reason":{"type":"string"}}}},"material_unsupported_claims":{"type":"array","items":{"type":"integer"}},"qualifier_loss_detected":{"type":"boolean"},"billable_units":{"type":"integer"},"provider_cost_breakdown":{"type":"array","items":{"type":"object"}},"versions":{"type":"object"},"disclaimer":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"LedgerEntry":{"type":"object","properties":{"evidence_ledger_id":{"type":"string"},"request_id":{"type":"string"},"seq":{"type":"integer"},"payload":{"type":"object"},"payload_hash":{"type":"string"},"prev_hash":{"type":["string","null"]},"entry_hash":{"type":"string"},"verification":{"type":"object"}}}}}}