{"components":{"schemas":{"AnalyzeConflictsRequestDto":{"properties":{"figures":{"description":"Figures extracted across one or more documents. The engine groups compatible entities, periods, currencies, scales, bases and definitions, recomputes derivable metrics, and reports conflicts or unavailable comparisons.","items":{"$ref":"#/components/schemas/FigureDto"},"type":"array"},"fxRates":{"description":"Source-linked FX observations. A rate is used only for its exact applicable period and declared conversion direction.","items":{"$ref":"#/components/schemas/FxRateDto"},"type":"array"},"precedenceRules":{"description":"Reviewed, scope-exact decisions that select one observation and enumerate every superseded competing identity.","items":{"$ref":"#/components/schemas/ObservationPrecedenceDto"},"type":"array"}},"required":["figures"],"type":"object"},"AnalyzeDocumentRequestDto":{"properties":{"asset_id":{"description":"Uploaded asset id (from POST /upload). The spreadsheet is downloaded, figures are extracted deterministically with cell provenance, then recomputed and cross-checked.","example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}},"required":["asset_id"],"type":"object"},"AnchoredChunkDto":{"properties":{"ordinal":{"description":"Position of this chunk in the document, from 0.","type":"number"},"page":{"description":"1-based page the chunk came from.","type":"number"},"section":{"description":"Nearest preceding markdown heading.","type":"string"},"sheet":{"description":"Workbook tab the chunk came from.","type":"string"},"text":{"description":"The chunk text.","type":"string"},"token_estimate":{"description":"Rough token count (~4 chars/token) for packing a retrieval budget.","type":"number"}},"required":["ordinal","text","token_estimate"],"type":"object"},"BatchItemDto":{"properties":{"asset_id":{"description":"An uploaded asset id to check against.","type":"string"},"id":{"description":"Caller id echoed back on the result.","type":"string"},"meaning":{"description":"A meaning-preservation problem you have already found, from an assessment such as POST /api/v2/context/assess-meaning. Only the cautious states are accepted: \"changed\" and \"ambiguous\" stop a citation presenting as verified. \"faithful\" is deliberately NOT accepted here — a clearance asserted by the party asking for the check is not a check, and this field exists precisely so that \"nobody assessed this\" cannot be mistaken for \"an assessor cleared this\". Omit it when you found no problem; the result then reports meaning \"not_checked\", which is what absence honestly means.","enum":["changed","ambiguous"],"type":"string"},"page":{"description":"1-based page for an asset source.","type":"number"},"quote":{"description":"The claim or quote to check.","type":"string"},"representation_id":{"type":"string"},"source_text":{"description":"The source text to check the quote against. Provide this, or url, or asset_id.","type":"string"},"source_unit_id":{"type":"string"},"source_version_id":{"description":"Immutable source version. Requires exact representation and unit IDs.","type":"string"},"url":{"description":"A web source URL to resolve and check.","type":"string"}},"required":["quote"],"type":"object"},"BillingUsageDto":{"properties":{"credits":{"description":"Credits actually deducted; null when a priced operation was not metered. Zero denotes a genuinely free operation.","nullable":true,"type":"number"}},"required":["credits"],"type":"object"},"BindBackDto":{"properties":{"grounded":{"description":"True when the quote was found in the resolved source.","type":"boolean"},"matched_quote":{"description":"The matched substring, when grounded verbatim.","type":"string"},"matched_text":{"description":"The best-matching passage found in the source — present even when unbound, so a reviewer sees the closest evidence.","type":"string"},"method":{"description":"How the quote matched: exact/normalized substring, fuzzy passage match, reflowed OCR reading, or unbound.","enum":["exact","normalized","fuzzy","reflowed","unbound"],"type":"string"},"reading":{"description":"Derived body reading with page furniture removed; absent for stored text.","enum":["body"],"type":"string"},"rescue":{"description":"OCR rescue outcome: attempted=false with code/reason, attempted=true and rescued=false (optionally ambiguous), or rescued=true with transformations, raw dropped lines and retained spans. Unknown or unattempted is never a failed rescue.","oneOf":[{"properties":{"attempted":{"enum":[false],"type":"boolean"},"code":{"enum":["not_ocr","labels_not_available","judge_unavailable","not_prepared","disabled","resource_limit"],"type":"string"},"reason":{"type":"string"}},"required":["attempted","code","reason"],"type":"object"},{"properties":{"ambiguous":{"enum":[true],"type":"boolean"},"attempted":{"enum":[true],"type":"boolean"},"rescued":{"enum":[false],"type":"boolean"}},"required":["attempted","rescued"],"type":"object"},{"properties":{"attempted":{"enum":[true],"type":"boolean"},"basis":{"enum":["code","measured"],"type":"string"},"calibrationKey":{"type":"string"},"decidedAt":{"format":"date-time","type":"string"},"droppedLines":{"items":{"type":"string"},"type":"array"},"model":{"nullable":true,"type":"string"},"reading":{"description":"Derived matching text; display the raw preview text instead.","type":"string"},"rescued":{"enum":[true],"type":"boolean"},"retainedSpans":{"items":{"properties":{"fromLine":{"type":"integer"},"page":{"type":"integer"},"toLine":{"type":"integer"}},"required":["page","fromLine","toLine"],"type":"object"},"type":"array"},"transformations":{"items":{"properties":{"afterLine":{"type":"integer"},"atLine":{"type":"integer"},"kind":{"enum":["dehyphenate","join","drop"],"type":"string"},"line":{"type":"string"},"source":{"enum":["element_label","repetition","page_number","margin_band"],"type":"string"}},"required":["kind"],"type":"object"},"type":"array"}},"required":["attempted","rescued","reading","transformations","droppedLines","retainedSpans","calibrationKey","basis","model","decidedAt"],"type":"object"}]},"score":{"description":"Similarity of the best match, 0..1.","type":"number"}},"required":["grounded","method"],"type":"object"},"ChatAnswerBlockDto":{"properties":{"citations":{"description":"claim: ids of returned citations supporting it, at least one, one id per entry.","example":["1","3"],"items":{"type":"string"},"type":"array"},"kind":{"enum":["claim","unknown"],"type":"string"},"text":{"description":"claim: the statement, without [n] markers.","type":"string"},"topic":{"description":"unknown: the part of the question the sources do not answer.","type":"string"}},"required":["kind"],"type":"object"},"ChatAnswerDto":{"properties":{"sections":{"items":{"$ref":"#/components/schemas/ChatAnswerSectionDto"},"type":"array"}},"required":["sections"],"type":"object"},"ChatAnswerSectionDto":{"properties":{"blocks":{"items":{"$ref":"#/components/schemas/ChatAnswerBlockDto"},"type":"array"},"heading":{"type":"string"}},"required":["heading","blocks"],"type":"object"},"CitationDto":{"properties":{"author":{"description":"Author or domain name","example":"example","type":"string"},"credibility_basis":{"description":"Whether credibility_score rests on an actual measurement ('measured') or is a placeholder because no check has run yet ('unknown', e.g. no grounding signal or the citation has not been analysed). Absent means the same as \"measured\" for citations produced before this field existed.","enum":["measured","heuristic","unknown"],"example":"measured","type":"string"},"credibility_score":{"description":"Credibility/relevance score from 1-100 (higher = more credible/relevant/authoritative)","example":95,"type":"number"},"evidence":{"description":"Publisher evidence receipt v1: state, originalUrl, finalUrl, contentHash, retrievedAt, quoteMatch, typed publisher dates, retention, replayable and failureReason. Missing on legacy records means unknown provenance.","type":"object"},"group_id":{"description":"Group ID for citations from the same domain","example":"group-example-com","type":"string"},"highlight_ranges":{"description":"Character ranges [start, end] in snippet that are most relevant to the claim","example":[[10,25],[40,55]],"items":{"type":"string"},"type":"array"},"id":{"description":"Unique citation identifier","example":"1","type":"string"},"is_group_primary":{"description":"Whether this is the primary (highest-ranked) citation from its domain group","example":true,"type":"boolean"},"publication_year":{"description":"Publication year of the cited source","example":2024,"type":"number"},"rank":{"description":"Sequential rank (1, 2, 3...) where rank 1 is the highest/best citation, based on credibility_score and verified status","example":1,"type":"number"},"ranking_factors":{"allOf":[{"$ref":"#/components/schemas/RankingFactorsDto"}],"description":"Breakdown of how the ranking score was calculated"},"snippet":{"description":"Relevant excerpt from the source","example":"This is a snippet from the article...","type":"string"},"source_metadata":{"allOf":[{"$ref":"#/components/schemas/SourceMetadataDto"}],"description":"Additional metadata about the source"},"source_type":{"description":"Source type: Government Document, Dataset, Journal, Report, Trusted Media, Article, Reddit, Social Media","enum":["Government Document","Dataset","Journal","Report","Trusted Media","Article","Reddit","Social Media"],"example":"Article","type":"string"},"stance":{"description":"Whether this citation supports or contradicts the claim (only with useEnhancedAnalysis)","enum":["supports","contradicts","partially_supports","neutral","inconclusive"],"example":"supports","type":"string"},"stance_confidence":{"description":"Confidence in the stance assessment (0-100)","example":90,"type":"number"},"stance_explanation":{"description":"Brief explanation of the stance determination","example":"The source directly confirms the key claim with supporting data.","type":"string"},"status":{"description":"Verification status of the citation","example":"verified","type":"string"},"title":{"description":"Title of the cited source","example":"Example Article Title","type":"string"},"url":{"description":"URL of the cited source","example":"https://example.com/article","type":"string"}},"required":["title","url","snippet","id","author","status","credibility_score","rank"],"type":"object"},"CitationListResponseDto":{"properties":{"data":{"description":"Array of citation records","example":[{"citation":"[{\"title\":\"Example\",\"url\":\"https://example.com\"}]","created_at":"2024-01-01T00:00:00.000Z","id":"123e4567-e89b-12d3-a456-426614174000","is_active":true,"prompt":"Latest trends in AI","thread_id":"thread-123"}],"items":{"$ref":"#/components/schemas/CitationRecordDto"},"type":"array"},"message":{"description":"Response message","example":"Citations fetched successfully","type":"string"},"pagination":{"allOf":[{"$ref":"#/components/schemas/PaginationMetaDto"}],"description":"Pagination metadata"},"statusCode":{"description":"HTTP status code","example":200,"type":"number"}},"required":["data","pagination","statusCode","message"],"type":"object"},"CitationRecordDto":{"properties":{"api_key_id":{"description":"API key ID used for this citation","example":"api-key-123","type":"string"},"citation":{"description":"Citation data (JSON string or array of CitationObject)","example":"[{\"title\":\"Example\",\"url\":\"https://example.com\",\"snippet\":\"...\"}]","type":"object"},"created_at":{"description":"Timestamp when the citation was created","example":"2024-01-01T00:00:00.000Z","format":"date-time","type":"string"},"id":{"description":"Unique identifier of the citation record","example":"123e4567-e89b-12d3-a456-426614174000","type":"string"},"is_active":{"description":"Whether the citation is active","example":true,"type":"boolean"},"prompt":{"description":"The original prompt that generated this citation","example":"Latest trends in AI","type":"string"},"thread_id":{"description":"Thread ID associated with this citation","example":"123e4567-e89b-12d3-a456-426614174000","type":"string"},"updated_at":{"description":"Timestamp when the citation was last updated","example":"2024-01-01T00:00:00.000Z","format":"date-time","type":"string"},"user_id":{"description":"User ID who created this citation","example":"user-123","type":"string"}},"required":["id","thread_id","prompt"],"type":"object"},"CitationViewDataDto":{"properties":{"citation":{"description":"Citation data (JSON string or array of CitationObject)","example":"[{\"title\":\"Example Article\",\"url\":\"https://example.com/article\",\"snippet\":\"This is a snippet...\",\"id\":\"1\",\"author\":\"example\",\"status\":\"verified\",\"credibility_score\":95,\"rank\":1}]","oneOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/CitationDto"},"type":"array"}]},"created_at":{"description":"Original record time","format":"date-time","type":"string"},"generated_prompts":{"description":"Array of generated sub-prompts when useMultiplePrompt was enabled","example":["What are the latest AI trends in 2024?","What are emerging AI technologies?","What are AI adoption trends in industry?"],"items":{"type":"string"},"type":"array"},"id":{"description":"Stored citation identifier","type":"string"},"metadata":{"description":"Historical metadata. final_response preserves the final result under evidence_policy_version 9; absent for legacy records.","type":"object"},"prompt":{"description":"The original prompt that generated this citation","example":"Latest trends in AI","type":"string"},"thread_id":{"description":"Stored thread identifier, when present","type":"string"}},"required":["prompt","citation"],"type":"object"},"CitationViewResponseDto":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/CitationViewDataDto"}],"description":"Citation data"},"message":{"description":"Response message","example":"Citation fetched successfully","type":"string"},"statusCode":{"description":"HTTP status code","example":200,"type":"number"}},"required":["statusCode","message","data"],"type":"object"},"ClaimGroupDto":{"properties":{"citation_count":{"description":"Number of citations for this claim","example":5,"type":"number"},"citations":{"description":"All citations for this claim (full objects with stance, ranking, etc.)","items":{"$ref":"#/components/schemas/CitationDto"},"type":"array"},"claim":{"description":"The claim/sub-prompt text","example":"What are the AI trends in healthcare?","type":"string"},"claim_id":{"description":"Unique identifier for this claim group","example":"claim-1","type":"string"},"claim_index":{"description":"Index of the claim (1-based)","example":1,"type":"number"},"domain_groups":{"description":"Citations grouped by domain (lightweight, for deduplication UI)","items":{"$ref":"#/components/schemas/DomainGroupDto"},"type":"array"},"stance_summary":{"description":"Overall stance summary based on citations","enum":["supported","contradicted","mixed","unverifiable"],"example":"supported","type":"string"},"verdict":{"allOf":[{"$ref":"#/components/schemas/VerdictDto"}],"description":"Verdict for this claim (streamed as citations complete)"}},"required":["claim_id","claim_index","claim","stance_summary","citation_count","citations"],"type":"object"},"ClassifyRequestDto":{"properties":{"asset_id":{"description":"An uploaded asset id (from POST /upload). One of asset_id / asset_url is required.","type":"string"},"asset_url":{"description":"A direct URL to the file (e.g. the consumer's own signed GCS URL). One of asset_id / asset_url is required.","type":"string"},"taxonomy":{"description":"Taxonomy preset to classify against. Default \"vc\".","enum":["vc","ma"],"type":"string"}},"type":"object"},"ClassifyResponseDto":{"properties":{"basis":{"enum":["content","filename","fallback"],"type":"string"},"category":{"description":"The coarse category, or `unfiled` when nothing matched. Unchanged by a refusal: check `code` to learn whether the document was read at all.","type":"string"},"code":{"description":"The stable classification of `reason`, safe to switch on. The same vocabulary and the same values as `POST /extract`. Null when nothing refused.\n\n| Code | What it means | What to do |\n|------|---------------|------------|\n| `source_too_large` | a size or expansion ceiling refused the read | `reason` carries the observed value and the limit; send a smaller file |\n| `source_encrypted` | the container is password-protected | send an unlocked copy |\n| `source_corrupt` | the container could not be opened as the format it declares | re-export the file |\n| `unsupported_format` | no reader is registered for this format | convert it |\n| `ocr_unavailable` | the page had no text layer and no vision provider is configured | configure a vision key, or send a text-layer file |\n| `partial_extraction` | some of the source was recovered and some was not | use what came back |\n| `empty_source` | the source was read and held nothing | a fact about the file, not a failure — nothing to retry |\n| `extraction_error` | our failure | retry |","enum":["source_too_large","source_encrypted","source_corrupt","unsupported_format","ocr_unavailable","partial_extraction","empty_source","extraction_error"],"nullable":true,"type":"string"},"confidence":{"description":"Heuristic signal score, not a calibrated probability.","maximum":1,"minimum":0,"type":"number"},"confidenceAssessment":{"properties":{"basis":{"enum":["heuristic"],"type":"string"},"calibrated":{"enum":[false],"type":"boolean"},"language":{"description":"Unknown; the vocabulary census is not a document language detector.","nullable":true,"type":"string"},"languageBasis":{"enum":["unknown"],"type":"string"},"perLanguageCalibration":{"enum":["unavailable"],"type":"string"}},"required":["basis","calibrated","language","languageBasis","perLanguageCalibration"],"type":"object"},"covers":{"description":"The fine multi-type covers the document holds. Empty when nothing matched.","items":{"type":"string"},"type":"array"},"reason":{"description":"Free text naming the cause, straight from whatever refused or failed — `spreadsheet_magic_mismatch:xlsx`, `spreadsheet_too_large:bytes:33554433>33554432`, `extraction_failed:File is password-protected`. Carries detail no enum can, and is NOT stable: it includes dependency error text. Display it; do not branch on it. Null when nothing refused.","nullable":true,"type":"string"},"state":{"description":"How much of the source the read recovered, in one word. `complete` on a healthy read, whatever the payload beside it turned out to contain.","enum":["complete","partial","unsupported","error"],"type":"string"},"sufficiency":{"properties":{"reason":{"type":"string"},"status":{"enum":["unavailable"],"type":"string"}},"required":["status","reason"],"type":"object"}},"required":["state","reason","code","confidence","basis","category","covers"],"type":"object"},"ConflictSideDto":{"properties":{"citation_id":{"description":"Id of the citation taking this side","example":"cit_3","type":"string"},"quote":{"description":"The text this source actually carries, quoted rather than summarised, so a reader can check the disagreement themselves","example":"The review concluded the figure was 3.1 billion.","type":"string"},"source":{"description":"The source, by url where known and by domain otherwise","example":"ministry.example.gov","type":"string"}},"required":["citation_id","source","quote"],"type":"object"},"CorrectionDto":{"properties":{"actual":{"deprecated":true,"description":"Deprecated v1 alias of corrected_statement","type":"string"},"citation_ids":{"description":"IDs of citations that support this correction","example":["2"],"items":{"type":"string"},"type":"array"},"claimed":{"description":"What the user originally claimed","example":"The original claimed value","type":"string"},"corrected_statement":{"description":"A standalone replacement statement supported by the cited evidence","example":"The CAA operates under the UAE Ministry of Higher Education and Scientific Research.","type":"string"},"proof":{"items":{"$ref":"#/components/schemas/CorrectionProofDto"},"type":"array"}},"required":["claimed","corrected_statement","citation_ids","proof"],"type":"object"},"CorrectionProofDto":{"properties":{"citation_id":{"example":"caa-mohesr-2025","type":"string"},"quote":{"description":"Exact passage copied from the cited source excerpt","type":"string"}},"required":["citation_id","quote"],"type":"object"},"CreateAskDto":{"properties":{"documentName":{"description":"Label for diagnostics and evidence.","example":"10-K FY2025","type":"string"},"documentText":{"description":"Document text. v1 accepts text; file ingest with page splits is a later slice.","type":"string"},"hasTextLayer":{"description":"Set false when the caller knows the source is a scan with no text layer.","type":"boolean"},"question":{"description":"The question to answer over the document.","example":"What was net income in FY2025?","type":"string"},"topK":{"default":8,"description":"Retrieved passages fed to the drafter.","type":"number"}},"required":["question","documentText"],"type":"object"},"CreditUsageDto":{"properties":{"credits_remaining":{"description":"Credits left in the current billing period after this request.","nullable":true,"type":"number"},"credits_used":{"description":"Credits this request deducted. Null when the charge was not recorded.","nullable":true,"type":"number"},"monthly_allocation":{"description":"Credits the plan grants each billing period.","nullable":true,"type":"number"},"operation_id":{"description":"The same identifier as the top-level `operation_id`.","nullable":true,"type":"string"},"overage_enabled":{"description":"Whether the account continues past its allocation on overage billing.","nullable":true,"type":"boolean"}},"required":["credits_used","credits_remaining","monthly_allocation","overage_enabled","operation_id"],"type":"object"},"DomainGroupDto":{"properties":{"domain":{"description":"Domain that groups these citations","example":"example.com","type":"string"},"domain_category":{"description":"Category of this domain","enum":["government","academic","news","organization","encyclopedia","social","other"],"example":"news","type":"string"},"group_id":{"description":"Unique identifier for this domain group","example":"group-example-com","type":"string"},"group_stance":{"description":"Overall stance of citations from this domain","enum":["supports","contradicts","mixed","neutral"],"example":"supports","type":"string"},"primary_citation_id":{"description":"ID of the primary (highest-ranked) citation from this domain","example":"1","type":"string"}},"required":["group_id","domain","domain_category","group_stance","primary_citation_id"],"type":"object"},"ExtractElementDto":{"properties":{"bbox":{"description":"`[x0, y0, x1, y1]` as fractions of the page width and height, origin at the top left, `x0 < x1` and `y0 < y1`.","example":[0.0871,0.1012,0.9127,0.1388],"items":{"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"description":{"description":"Pictures only: what the picture shows, in the reader's words. Kept apart from `markdown`, which holds source text only.","type":"string"},"markdown":{"description":"The block transcribed as Markdown. Tables are HTML or pipe tables; a picture carries its readable lettering and any chart data table. Can be empty for a picture that has only a `description`.","type":"string"},"type":{"description":"What the block is. `page_header` and `page_footer` mark running headers and footers.","enum":["text","title","section_header","table","picture","list_item","list","page_header","page_footer","caption","footnote","formula"],"type":"string"}},"required":["type","markdown","bbox"],"type":"object"},"ExtractFiguresResponseDto":{"properties":{"code":{"description":"The stable classification of `reason`, safe to switch on. The same vocabulary and the same values as `POST /extract`. Null when nothing refused.\n\n| Code | What it means | What to do |\n|------|---------------|------------|\n| `source_too_large` | a size or expansion ceiling refused the read | `reason` carries the observed value and the limit; send a smaller file |\n| `source_encrypted` | the container is password-protected | send an unlocked copy |\n| `source_corrupt` | the container could not be opened as the format it declares | re-export the file |\n| `unsupported_format` | no reader is registered for this format | convert it |\n| `ocr_unavailable` | the page had no text layer and no vision provider is configured | configure a vision key, or send a text-layer file |\n| `partial_extraction` | some of the source was recovered and some was not | use what came back |\n| `empty_source` | the source was read and held nothing | a fact about the file, not a failure — nothing to retry |\n| `extraction_error` | our failure | retry |","enum":["source_too_large","source_encrypted","source_corrupt","unsupported_format","ocr_unavailable","partial_extraction","empty_source","extraction_error"],"nullable":true,"type":"string"},"figures":{"description":"Every known metric found, as `{ metric, value, unit, entity?, period?, band, bound, provenance }`. Empty both when the document held no recognised metric and when the read was refused.","items":{"type":"object"},"type":"array"},"reason":{"description":"Free text naming the cause, straight from whatever refused or failed — `spreadsheet_magic_mismatch:xlsx`, `spreadsheet_too_large:bytes:33554433>33554432`, `extraction_failed:File is password-protected`. Carries detail no enum can, and is NOT stable: it includes dependency error text. Display it; do not branch on it. Null when nothing refused.","nullable":true,"type":"string"},"state":{"description":"How much of the source the read recovered, in one word. `complete` on a healthy read, whatever the payload beside it turned out to contain.","enum":["complete","partial","unsupported","error"],"type":"string"}},"required":["state","reason","code","figures"],"type":"object"},"ExtractPageChargeDto":{"properties":{"credits":{"description":"Credits this page cost: the model cost of every read made for it, at list price, to 4 decimal places.","type":"number"},"page":{"description":"1-based page number, the `index` of the unit it paid for.","type":"number"},"page_type":{"description":"The kind of page the reader was chosen for, as in `units[].reader.page_type`.","type":"string"}},"required":["page","credits"],"type":"object"},"ExtractPageGeometryDto":{"properties":{"coordinateSystem":{"description":"The coordinate system of every `elements[].bbox` on this unit.","enum":["normalized-top-left-v1"],"type":"string"},"height":{"description":"Page height in PDF points, or in pixels for an image.","type":"number"},"rotation":{"description":"The page rotation in degrees that the boxes already account for.","type":"number"},"width":{"description":"Page width in PDF points, or in pixels for an image.","type":"number"}},"required":["coordinateSystem","width","height","rotation"],"type":"object"},"ExtractPageReaderDto":{"properties":{"page_type":{"description":"What kind of page this was judged to be before it was read, from its text layer and drawing: `scan` (an image with little or no text layer), `form`, `dense` (a table with very many cells), `table`, `chart`, `complex_text` (several columns, rotated lines, non-Latin script or a damaged text layer) or `plain_text`.","enum":["scan","form","dense","table","chart","complex_text","plain_text"],"type":"string"}},"required":["page_type"],"type":"object"},"ExtractPagesResponseDto":{"properties":{"chunks":{"description":"Anchored chunks, in document order. Empty both when the document held no text and when the read was refused — `code` is what tells those apart.","items":{"$ref":"#/components/schemas/AnchoredChunkDto"},"type":"array"},"code":{"description":"The stable classification of `reason`, safe to switch on. The same vocabulary and the same values as `POST /extract`. Null when nothing refused.\n\n| Code | What it means | What to do |\n|------|---------------|------------|\n| `source_too_large` | a size or expansion ceiling refused the read | `reason` carries the observed value and the limit; send a smaller file |\n| `source_encrypted` | the container is password-protected | send an unlocked copy |\n| `source_corrupt` | the container could not be opened as the format it declares | re-export the file |\n| `unsupported_format` | no reader is registered for this format | convert it |\n| `ocr_unavailable` | the page had no text layer and no vision provider is configured | configure a vision key, or send a text-layer file |\n| `partial_extraction` | some of the source was recovered and some was not | use what came back |\n| `empty_source` | the source was read and held nothing | a fact about the file, not a failure — nothing to retry |\n| `extraction_error` | our failure | retry |","enum":["source_too_large","source_encrypted","source_corrupt","unsupported_format","ocr_unavailable","partial_extraction","empty_source","extraction_error"],"nullable":true,"type":"string"},"mode":{"description":"Present when the chunks come from a `mode: \"lite\"` request; absent on a standard request.","enum":["lite"],"type":"string"},"reason":{"description":"Free text naming the cause, straight from whatever refused or failed — `spreadsheet_magic_mismatch:xlsx`, `spreadsheet_too_large:bytes:33554433>33554432`, `extraction_failed:File is password-protected`. Carries detail no enum can, and is NOT stable: it includes dependency error text. Display it; do not branch on it. Null when nothing refused.","nullable":true,"type":"string"},"state":{"description":"How much of the source the read recovered, in one word. `complete` on a healthy read, whatever the payload beside it turned out to contain.","enum":["complete","partial","unsupported","error"],"type":"string"}},"required":["state","reason","code","chunks"],"type":"object"},"ExtractRequestDto":{"properties":{"asset_id":{"description":"An uploaded asset id (from POST /upload). One of asset_id / asset_url is required.","type":"string"},"asset_url":{"description":"A direct URL to the file. One of asset_id / asset_url is required.","type":"string"},"mode":{"description":"How PDF pages and images are read on `/extract` and `/extract/pages`. `lite` is the faster, lower-cost read, about 0.12 credits a page. `standard` is the higher-accuracy read for each page type, about 0.75 credits a page, with a second read for form pages and for a read that fails; it does better on complex tables, handwriting and scans. Every other step is the same in both modes: the reading is checked against the page's text layer and drawing, long tables are read again in row bands, chart values are measured from the drawing, and form and table rules apply. A lite read and a standard read of the same file are kept apart; neither is served for the other. Spreadsheets and text documents are read the same way in both modes. With no mode, an account created on or after 20 November 2026 (04:00 UTC) reads in lite; an account created before then keeps standard, as before, and can send `lite` to opt in. A visual rendition is read in standard mode.","enum":["standard","lite"],"type":"string"},"refresh":{"default":false,"description":"Read the file again even when the same content was read before in this account, and keep the new complete read in place of the earlier one. The new read is charged. Default false.","type":"boolean"},"source_version_id":{"description":"Exact immutable owned source version for visual_rendition.","type":"string"},"visual_rendition":{"description":"Explicit JPEG/PNG visual layout rendition. Requires owned asset_id, exact source_version_id and Idempotency-Key. Source remains partial; does not select the rendition. The response carries `state: \"partial\"`, `complete: false`, `code: \"partial_extraction\"` and `reason: \"model_visual_layout_not_certified\"`: the layout is a reading of the image, to review before relying on it.","type":"boolean"}},"type":"object"},"ExtractResponseDto":{"properties":{"code":{"description":"The stable classification of `reason`, safe to switch on. Null on a complete read.\n\n| Code | What it means | What to do |\n|------|---------------|------------|\n| `source_too_large` | a size or expansion ceiling refused the read | `reason` carries the observed value and the limit; send a smaller file |\n| `source_encrypted` | the container is password-protected | send an unlocked copy |\n| `source_corrupt` | the container could not be opened as the format it declares | re-export the file |\n| `unsupported_format` | no reader is registered for this format | convert it |\n| `ocr_unavailable` | the page had no text layer and no vision provider is configured | configure a vision key, or send a text-layer file |\n| `partial_extraction` | some of the source was recovered and some was not | use what came back; `lost[]` names the rest |\n| `empty_source` | the source was read and held nothing | a fact about the file, not a failure — nothing to retry |\n| `extraction_error` | our failure | retry |","enum":["source_too_large","source_encrypted","source_corrupt","unsupported_format","ocr_unavailable","partial_extraction","empty_source","extraction_error"],"nullable":true,"type":"string"},"complete":{"description":"Present, and only ever `false`, when the read did not recover the whole source. Absent on a complete read, so seeing it is a determination rather than a default.","type":"boolean"},"credit_usage":{"allOf":[{"$ref":"#/components/schemas/CreditUsageDto"}],"description":"The charge with a snapshot of the account balance. The same figures are sent as `X-Credits-*` response headers."},"extraction_method":{"description":"The path that produced most of this document's text.","enum":["text_layer","ocr","spreadsheet_cells","none"],"type":"string"},"format":{"description":"The format the bytes were read as.","type":"string"},"lost":{"description":"The parts that were not recovered. Absent on a complete read.","items":{"$ref":"#/components/schemas/LostPartDto"},"type":"array"},"markdown":{"description":"The whole document as markdown. Empty when nothing was read.","type":"string"},"operation_id":{"description":"Identifier of this billed operation. Quote it when asking about a charge.","nullable":true,"type":"string"},"reason":{"description":"Free text naming the cause, straight from whatever refused or failed — `extraction_failed:File is password-protected`, `spreadsheet_too_large:bytes:33554433>33554432`. Carries detail no enum can (the observed value and the limit are both in it) and is NOT stable: it includes dependency error text. Display it; do not branch on it. Null on a complete read.","nullable":true,"type":"string"},"sheets":{"description":"Spreadsheets only: every sheet the workbook declares, in workbook order, with its structure and read state.","items":{"additionalProperties":true,"type":"object"},"type":"array"},"state":{"description":"How much of the source the read recovered, in one word.","enum":["complete","partial","unsupported","error"],"type":"string"},"units":{"description":"The document part by part, in source order: one unit per page or sheet. Empty when nothing was read.","items":{"$ref":"#/components/schemas/ExtractUnitDto"},"type":"array"},"usage":{"allOf":[{"$ref":"#/components/schemas/ExtractUsageDto"}],"description":"What this request was charged: the metered cost of its page reads, in credits to 4 decimal places. 0 when nothing readable came back or no page image was read."}},"required":["format","markdown","extraction_method","state","reason","code","units","operation_id","usage"],"type":"object"},"ExtractUnitDto":{"properties":{"content_sha256":{"description":"SHA-256 of the unit content, when the reader recorded one.","type":"string"},"elements":{"description":"The page as typed blocks in reading order, each with a box. Present on visually read pages, and on a text-layer page whose blocks could be placed from the text layer; absent otherwise.","items":{"$ref":"#/components/schemas/ExtractElementDto"},"type":"array"},"extraction_method":{"description":"How this unit's text was produced. `ocr` means the page image was read.","enum":["text_layer","ocr","spreadsheet_cells","none"],"type":"string"},"geometry":{"allOf":[{"$ref":"#/components/schemas/ExtractPageGeometryDto"}],"description":"Present with `elements`: the page size and the coordinate system of the boxes."},"image_input":{"description":"Present when a page with a text layer was read from its rendered image instead of the PDF, because the text layer does not carry the printed text: the checks that found it. `unmapped`: the layer holds control or private-use characters where the page prints letters. `garbled`: the layer's words have the shapes of a broken font map. `hidden` (lite mode only): the layer is drawn invisibly under a scan, an embedded OCR layer.","items":{"enum":["unmapped","garbled","hidden"],"type":"string"},"type":"array"},"index":{"description":"1-based position of the part in the document.","type":"number"},"kind":{"description":"The kind of part: `page` for PDFs and images, `sheet` for spreadsheets; other formats name their own parts (`slide`, `document`, `table`, `message_body`, ...).","type":"string"},"mode":{"description":"Present on every unit of a `mode: \"lite\"` request; absent on a standard request.","enum":["lite"],"type":"string"},"provenance":{"allOf":[{"$ref":"#/components/schemas/ExtractUnitProvenanceDto"}],"description":"Where in the source this unit came from."},"reader":{"allOf":[{"$ref":"#/components/schemas/ExtractPageReaderDto"}],"description":"Visually read pages only, when the server routes pages by type: the kind of page it was read as."},"reason":{"description":"Present with `state`: free text naming what went wrong on this unit. Display it; do not branch on it.","type":"string"},"sheet":{"additionalProperties":true,"description":"Sheet units only: the tab's native structure (`name`, `visibility`, `merges`, and `cells` when the workbook was parsed for this request).","type":"object"},"state":{"description":"Present only when this unit was not read completely. The same unit is named in `lost[]`.","enum":["partial","unreadable","error"],"type":"string"},"text":{"description":"The part as Markdown (CSV for a sheet). On a page with `elements` it is the same reading as the elements in order.","type":"string"}},"required":["kind","index","text","provenance","extraction_method"],"type":"object"},"ExtractUnitProvenanceDto":{"properties":{"endMs":{"description":"End offset in milliseconds (media).","type":"number"},"messageId":{"description":"Message identifier (email).","type":"string"},"page":{"description":"1-based page number (PDFs and images).","type":"number"},"part":{"description":"Message part (email).","type":"string"},"path":{"description":"Location inside the container (structured documents).","type":"string"},"range":{"description":"Cell range the unit covers (spreadsheets).","type":"string"},"sheet":{"description":"Workbook tab name (spreadsheets).","type":"string"},"slide":{"description":"1-based slide number (presentations).","type":"number"},"startMs":{"description":"Start offset in milliseconds (media).","type":"number"},"track":{"description":"Track name (media).","type":"string"}},"type":"object"},"ExtractUsageDto":{"properties":{"credits":{"description":"Credits actually deducted; null when a priced operation was not metered. Zero denotes a genuinely free operation.","nullable":true,"type":"number"},"page_charges":{"description":"One line for each page charged. The lines add up to `credits` to within rounding; when the charge stopped at the balance, `credits` is lower than their sum.","items":{"$ref":"#/components/schemas/ExtractPageChargeDto"},"type":"array"},"pages":{"description":"Pages this request was charged for: the PDF pages and images that came back with text. A page that could not be read is not counted. 0 for a spreadsheet or a text document, which no model reads.","type":"number"}},"required":["credits"],"type":"object"},"FigureDto":{"properties":{"basis":{"description":"Whether the figure is actual, forecast, assumed or unknown.","enum":["actual","forecast","assumption","unknown"],"type":"string"},"currency":{"description":"Currency code of the normalized value.","type":"string"},"decimalValue":{"description":"Canonical decimal text used for exact arithmetic. Without it the figure can be reported but not recomputed.","example":"62.125","type":"string"},"definition":{"description":"Definition or accounting-policy scope.","type":"string"},"entity":{"description":"Entity scope, e.g. \"subscription\".","type":"string"},"metric":{"description":"Metric dictionary key, e.g. \"gross_margin\".","example":"gross_margin","type":"string"},"observationId":{"description":"Immutable observation identity. Exact replay may reuse it.","type":"string"},"period":{"description":"Period, e.g. \"FY2024\".","type":"string"},"provenance":{"$ref":"#/components/schemas/ProvenanceDto"},"scale":{"description":"Scale qualifier for the already-normalized value. This does not apply another conversion.","type":"string"},"unit":{"description":"Canonical unit.","enum":["percent","multiple","currency","ratio","count","months"],"type":"string"},"value":{"description":"Value normalized to the metric canonical unit.","example":62,"type":"number"}},"required":["metric","value","unit","provenance"],"type":"object"},"FxRateDto":{"properties":{"applicableDate":{"example":"2025-12-31","type":"string"},"applicablePeriod":{"type":"string"},"decimalRate":{"description":"Canonical decimal rate used by exact arithmetic.","example":"1.08425","type":"string"},"direction":{"enum":["multiply","divide"],"type":"string"},"fromCurrency":{"type":"string"},"id":{"type":"string"},"provenance":{"$ref":"#/components/schemas/ProvenanceDto"},"rate":{"type":"number"},"ruleRevision":{"type":"string"},"toCurrency":{"type":"string"}},"required":["id","fromCurrency","toCurrency","rate","decimalRate","direction","applicablePeriod","applicableDate","ruleRevision","provenance"],"type":"object"},"GapDocDto":{"properties":{"category":{"type":"string"},"covers":{"items":{"type":"string"},"type":"array"},"filename":{"type":"string"},"label":{"type":"string"}},"type":"object"},"GapsRequestDto":{"properties":{"category":{"description":"The category whose expected-documents checklist to compute.","type":"string"},"docs":{"description":"The documents currently filed in that category.","items":{"$ref":"#/components/schemas/GapDocDto"},"type":"array"},"stage":{"description":"Stage to tailor the checklist to.","enum":["early","growth"],"type":"string"},"taxonomy":{"description":"Taxonomy preset. Default \"vc\".","enum":["vc","ma"],"type":"string"}},"required":["category","docs"],"type":"object"},"KeyFindingDto":{"properties":{"citation_ids":{"description":"IDs of citations that support this finding","example":["1","3","4"],"items":{"type":"string"},"type":"array"},"confidence":{"description":"Finding score (0-100); not calibrated truth confidence","example":92,"type":"number"},"confidence_available":{"description":"True only when calibrated confidence is available","type":"boolean"},"confidence_basis":{"enum":["unknown","heuristic","calibrated"],"type":"string"},"evidence_role":{"description":"Whether cited sources take a position on this claim or provide context only; absent means unassessed.","enum":["claim_evidence","context"],"type":"string"},"finding":{"description":"A key fact extracted from the citations","example":"The event occurred on the stated date according to official records","type":"string"}},"required":["finding","citation_ids","confidence"],"type":"object"},"LostPartDto":{"properties":{"code":{"description":"The stable classification of this part's `reason`. Same vocabulary as the document-level `code`; the two can differ, because a document that recovered most of itself is `partial_extraction` while the one part it lost names its own cause.","enum":["source_too_large","source_encrypted","source_corrupt","unsupported_format","ocr_unavailable","partial_extraction","empty_source","extraction_error"],"nullable":true,"type":"string"},"index":{"description":"1-based page / sheet index, as on the unit that failed.","type":"number"},"kind":{"description":"Which kind of unit was lost.","enum":["page","sheet"],"type":"string"},"reason":{"description":"Free text: what the reader said about this part.","nullable":true,"type":"string"},"sheet":{"description":"Sheet units only: the tab the workbook declared.","type":"string"},"state":{"description":"What happened to this part specifically.","enum":["partial","unreadable","error"],"type":"string"}},"required":["kind","index","state","reason","code"],"type":"object"},"NamedConflictDto":{"properties":{"contradicting":{"$ref":"#/components/schemas/ConflictSideDto"},"supporting":{"$ref":"#/components/schemas/ConflictSideDto"}},"required":["supporting","contradicting"],"type":"object"},"ObservationPrecedenceDto":{"properties":{"basis":{"enum":["actual","forecast","assumption","unknown"],"type":"string"},"currency":{"type":"string"},"definition":{"type":"string"},"entity":{"type":"string"},"id":{"type":"string"},"metric":{"type":"string"},"period":{"type":"string"},"provenance":{"$ref":"#/components/schemas/ProvenanceDto"},"reason":{"type":"string"},"reviewerId":{"type":"string"},"ruleRevision":{"type":"string"},"scale":{"type":"string"},"selectedObservationId":{"type":"string"},"supersededObservationIds":{"items":{"type":"string"},"type":"array"}},"required":["id","metric","selectedObservationId","supersededObservationIds","reviewerId","reason","ruleRevision","entity","period","currency","scale","basis","definition","provenance"],"type":"object"},"PaginationMetaDto":{"properties":{"hasNextPage":{"description":"Whether there is a next page","example":true,"type":"boolean"},"hasPreviousPage":{"description":"Whether there is a previous page","example":false,"type":"boolean"},"limit":{"description":"Number of items per page","example":20,"type":"number"},"page":{"description":"Current page number","example":1,"type":"number"},"total":{"description":"Total number of items","example":100,"type":"number"},"totalPages":{"description":"Total number of pages","example":5,"type":"number"}},"required":["total","page","limit","totalPages","hasNextPage","hasPreviousPage"],"type":"object"},"ProvenanceDto":{"properties":{"assetId":{"description":"Asset the figure came from.","type":"string"},"cell":{"description":"Cell reference, e.g. B4.","type":"string"},"documentName":{"description":"Human-readable document name.","type":"string"},"method":{"description":"How the value was extracted.","enum":["rule","model"],"type":"string"},"page":{"description":"1-based page.","type":"number"},"sheet":{"description":"Sheet name.","type":"string"}},"required":["assetId","documentName","method"],"type":"object"},"RankingFactorsDto":{"properties":{"content_relevance":{"description":"How well the content matches the claim being verified (0-100).","example":85,"type":"number"},"recency":{"description":"Publication freshness score (0-100). Current year = 100, decreases with age.","example":100,"type":"number"},"source_authority":{"description":"Domain reputation score (0-100). Higher scores for government, academic, major news sources.","example":90,"type":"number"}},"required":["source_authority","content_relevance","recency"],"type":"object"},"SearchMetadataDto":{"properties":{"constraint":{"description":"Explicit constraint accounting: searched vs kept, plus dropped host classes (not publisher names).","type":"object"},"processing_time_ms":{"description":"Total processing time in milliseconds","example":2340,"type":"number"},"relevant_sources_found":{"description":"Number of relevant sources found and included","example":5,"type":"number"},"source_url_reads":{"description":"Per supplied-URL read receipts, with fetched_at from retained capture time or null when unknown. Present for authenticated DD/eval; omitted on public MCP.","items":{"type":"string"},"type":"array"},"total_sources_searched":{"description":"Total number of sources searched","example":12,"type":"number"}},"required":["total_sources_searched","relevant_sources_found","processing_time_ms"],"type":"object"},"SearchResponseDto":{"properties":{"answer":{"allOf":[{"$ref":"#/components/schemas/ChatAnswerDto"}],"description":"POST /citation/chat only. The typed answer: sections of claims, each citing one or more returned citation ids (one id per entry, never a range), and unknown blocks for parts of the question the sources do not answer. When present, search_result_with_citations_mapping is rendered from it. Null unless answer_status is valid.","nullable":true,"type":"object"},"answer_status":{"description":"POST /citation/chat only. valid: answer validated (after at most one model retry). invalid: it failed validation twice. model_error: the model call failed. no_answer_text: there was no grounded answer to type (for example a cached replay). In every case but valid, search_result_with_citations_mapping is the original grounded text.","enum":["valid","invalid","model_error","no_answer_text"],"type":"string"},"citations":{"deprecated":true,"description":"[DEPRECATED] Use claim_groups[0].citations instead. Legacy citations array.","items":{"$ref":"#/components/schemas/CitationDto"},"type":"array"},"claim_groups":{"description":"Unified tree: All data organized by claim. Each claim_group contains citations, domain_groups, and verdict.","items":{"$ref":"#/components/schemas/ClaimGroupDto"},"type":"array"},"content":{"description":"Text content from agent (for non-citation responses)","type":"string"},"domain_groups":{"deprecated":true,"description":"[DEPRECATED] Use claim_groups[n].domain_groups instead. Legacy domain grouping.","items":{"$ref":"#/components/schemas/DomainGroupDto"},"type":"array"},"generated_prompts":{"description":"Generated sub-prompts when useMultiplePrompt is enabled","example":["What are the latest AI trends?","What are emerging AI technologies?"],"items":{"type":"string"},"type":"array"},"narrative_status":{"description":"no_sources: no citation was retained, so no narrative is returned except the legacy NOT_SEARCHABLE sentinel. model_text: the narrative is model-written; only its kept [n] markers point at returned citations.","enum":["no_sources","model_text"],"type":"string"},"operation_id":{"description":"Billing operation identifier on public v1 responses; null when no operation was recorded.","nullable":true,"type":"string"},"search_metadata":{"allOf":[{"$ref":"#/components/schemas/SearchMetadataDto"}],"description":"Metadata about the search and analysis process"},"search_result":{"description":"Model-written search summary. It is not evidence. With no_sources it is empty except for the legacy NOT_SEARCHABLE sentinel.","type":"string"},"search_result_with_citations_mapping":{"description":"The search summary with [n] markers. [n] is the nth entry of citations (or of claim_groups citations when citations is absent). A marker is kept only when that citation passage is fetched and contains every figure and literal metric/unit context in the marked sentence or table row; figures without a marker are unsourced model text. Empty when narrative_status is no_sources.","type":"string"},"thread_id":{"description":"Thread ID for conversation continuity","example":"123e4567-e89b-12d3-a456-426614174000","type":"string"},"totalResults":{"description":"Total number of citations across all claims","example":5,"type":"number"},"usage":{"allOf":[{"$ref":"#/components/schemas/BillingUsageDto"}],"description":"Billing usage on public v1 responses."},"usages":{"allOf":[{"$ref":"#/components/schemas/UsageTotalsDto"}],"description":"Token usage of the model calls this request made; credits are reported separately."},"verdict":{"allOf":[{"$ref":"#/components/schemas/VerdictDto"}],"deprecated":true,"description":"[DEPRECATED] Use claim_groups[n].verdict instead. Legacy overall verdict."}},"type":"object"},"SearchSourcesDto":{"properties":{"filters":{"additionalProperties":false,"description":"Applied to retrieval query and retained source metadata. Domain and exclude_domain include subdomains. Known primary-source mismatches are excluded; unknown authority remains unconfirmed. Required domain, type, year and official-country constraints must match; an excluded domain never appears.","properties":{"domain":{"items":{"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"exclude_domain":{"description":"Domains, with their subdomains, that no returned source may come from. A source whose redirect lands on one is excluded too. Applied after retrieval, so it never widens what is searched.","example":["politifact.com","snopes.com"],"items":{"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"is_primary_source":{"type":"boolean"},"official_country":{"description":"Two-letter country code for a recognized government authority; normalized to lower case.","example":"ae","pattern":"^[a-zA-Z]{2}$","type":"string"},"publication_year":{"additionalProperties":false,"properties":{"from":{"maximum":9999,"minimum":1000,"type":"integer"},"to":{"maximum":9999,"minimum":1000,"type":"integer"}},"type":"object"},"source_type":{"items":{"type":"string"},"maxItems":20,"minItems":1,"type":"array"}},"type":"object"},"limit":{"default":10,"description":"Maximum number of sources to return (1-20)","maximum":20,"minimum":1,"type":"number"},"query":{"description":"Search query to find sources for","example":"climate change effects on coral reefs","type":"string"}},"required":["query"],"type":"object"},"SourceMetadataDto":{"properties":{"domain":{"description":"Extracted domain from URL","example":"example.gov","type":"string"},"domain_category":{"description":"Category of the source domain","enum":["government","academic","news","organization","encyclopedia","social","other"],"example":"government","type":"string"},"is_fact_check_site":{"description":"Whether this is a fact-checking website (snopes, politifact, etc.)","example":false,"type":"boolean"},"is_primary_source":{"description":"Whether this is a primary source (government, official, press release)","example":true,"type":"boolean"}},"required":["domain","domain_category","is_primary_source","is_fact_check_site"],"type":"object"},"SourcePreviewRequestDto":{"properties":{"asset_id":{"description":"Uploaded asset ID to preview (from POST /upload). Provide this OR url. Also accepts an \"asset://<id>\" citation url.","example":"123e4567-e89b-12d3-a456-426614174000","type":"string"},"cell":{"description":"Spreadsheet cell anchor: an A1 reference such as C7 on the sheet given by `page` (1-based, default 1), or a sheet-qualified reference such as Sheet1!C7 or 'My sheet'!$C$7, which selects the sheet by name.","type":"string"},"full":{"description":"Return the capped full sheet instead of a cell window.","type":"boolean"},"highlight_terms":{"description":"Terms to highlight in the preview.","items":{"type":"string"},"type":"array"},"page":{"default":1,"description":"1-based page (PDF) or sheet index (spreadsheet) to preview.","example":3,"type":"number"},"quote":{"description":"The cited quote. It is bound back against the resolved source text; the response reports whether it was found (grounded) and how it matched.","example":"the Eiffel Tower is 330 metres tall","type":"string"},"representation_id":{"description":"Exact parser representation, never latest.","type":"string"},"source_unit_id":{"description":"Exact unit within the immutable representation.","type":"string"},"source_version_id":{"description":"Immutable source version. Requires representation_id and source_unit_id.","type":"string"},"title":{"description":"Optional title for a web source.","type":"string"},"url":{"description":"Web source URL to preview. Provide this OR asset_id. Returns a text-fragment deep link that scrolls to the quote.","example":"https://en.wikipedia.org/wiki/Eiffel_Tower","type":"string"}},"type":"object"},"SourcePreviewResponseDto":{"properties":{"anchor":{"type":"string"},"asset_id":{"description":"Asset ID (kind=page|grid).","type":"string"},"binding":{"allOf":[{"$ref":"#/components/schemas/BindBackDto"}],"description":"bindBack result — whether the quote is grounded in the source."},"cells":{"description":"Bounded rows of cells with A1 refs, values and anchor flags.","items":{"type":"string"},"type":"array"},"deep_link":{"description":"Deep link to the source at the cited location: url#:~:text=quote for web, asset_url#page=N for documents.","type":"string"},"highlight_terms":{"description":"Highlight terms.","items":{"type":"string"},"type":"array"},"image_base64":{"type":"string"},"judgment":{"type":"object"},"kind":{"description":"Preview shape.","enum":["web","page","grid","unit","image"],"type":"string"},"locator":{"type":"object"},"mime_type":{"enum":["application/pdf"],"type":"string"},"page":{"description":"Page/sheet number (kind=page|grid).","type":"number"},"quote":{"description":"The cited quote.","type":"string"},"representation_id":{"type":"string"},"sheet":{"description":"Sheet name (kind=grid).","type":"string"},"source_unit_id":{"type":"string"},"source_version_id":{"type":"string"},"state":{"type":"object"},"text":{"description":"Resolved source text (kind=page|grid).","type":"string"},"title":{"description":"Web source title (kind=web).","type":"string"},"transcribed":{"description":"True when the stored page text is a model's transcription of the page (kind=page).","type":"boolean"},"url":{"description":"Web source URL (kind=web).","type":"string"}},"required":["kind","deep_link","binding"],"type":"object"},"StanceBreakdownDto":{"properties":{"contradicts":{"description":"Number of citations that contradict the claim","example":0,"type":"number"},"inconclusive":{"description":"Number of citations that looked at the claim and could not tell. Distinct from neutral, which is a source that took no side.","example":1,"type":"number"},"irrelevant":{"description":"Number of citations judged off-topic. Excluded from every verdict denominator.","example":0,"type":"number"},"neutral":{"description":"Number of citations that took no side. This counts the neutral stance only. It previously also absorbed inconclusive and unscored citations, which are now reported in their own fields below.","example":1,"type":"number"},"partially_supports":{"description":"Number of citations that partially support the claim","example":1,"type":"number"},"supports":{"description":"Number of citations that fully support the claim","example":3,"type":"number"},"unknown":{"description":"Number of citations with no stance recorded. Never treated as agreement or as neutral: these were not scored, not scored as undecided.","example":0,"type":"number"}},"required":["supports","partially_supports","contradicts","neutral"],"type":"object"},"UploadResponseDto":{"properties":{"credit_usage":{"allOf":[{"$ref":"#/components/schemas/CreditUsageDto"}],"description":"The charge with a snapshot of the account balance."},"data":{"$ref":"#/components/schemas/UploadedAssetDto"},"message":{"example":"File uploaded successfully","type":"string"},"operation_id":{"description":"Identifier of this billed operation.","nullable":true,"type":"string"},"successCode":{"description":"The HTTP status repeated in the body.","example":200,"type":"number"},"usage":{"allOf":[{"$ref":"#/components/schemas/BillingUsageDto"}],"description":"What the upload was charged: 0 credits. Uploading is free."}},"required":["successCode","message","data","operation_id","usage"],"type":"object"},"UploadUrlDto":{"properties":{"filename":{"description":"Display filename. Its extension must match the fetched bytes.","type":"string"},"url":{"description":"Public HTTPS URL of the file. Fetched server-side with no caller credentials or headers; private, loopback, link-local and metadata addresses are refused on every redirect.","example":"https://example.com/report.pdf","type":"string"}},"required":["url"],"type":"object"},"UploadedAssetDto":{"properties":{"asset_id":{"description":"Identifier to pass to `POST /extract` and the other document endpoints.","type":"string"},"asset_url":{"description":"Private storage address of the stored bytes. Not a public web address.","type":"string"},"filename":{"description":"The filename sent with the upload.","type":"string"},"size":{"description":"Size of the stored file in bytes.","type":"number"},"source_version_id":{"description":"Immutable identifier of exactly these bytes.","type":"string"}},"required":["asset_id","asset_url","source_version_id","filename","size"],"type":"object"},"UsageTotalsDto":{"properties":{"cached":{"description":"True when the response was served from the server cache and this request spent no tokens.","type":"boolean"},"input_tokens":{"description":"Input tokens of the model calls this request made. 0 when the response was served from the server cache.","type":"number"},"output_tokens":{"description":"Output tokens of the model calls this request made.","type":"number"},"total_tokens":{"description":"Total tokens of the model calls this request made.","type":"number"},"usage_unknown":{"description":"True when a model call this request made could not be measured, so the totals are a lower bound.","type":"boolean"}},"required":["input_tokens","output_tokens","total_tokens","usage_unknown","cached"],"type":"object"},"VerdictDto":{"properties":{"aggregation_score":{"description":"Aggregate evidence score","type":"number"},"calibrated_confidence":{"nullable":true,"type":"number"},"claim":{"description":"The original prompt/claim that was analyzed","example":"User query or claim being verified","type":"string"},"confidence":{"description":"Aggregate evidence score (0-100); use confidence_available and calibrated_confidence for calibration status","example":88,"type":"number"},"confidence_available":{"description":"True only when calibrated confidence is available","type":"boolean"},"confidence_basis":{"enum":["unknown","heuristic","calibrated"],"type":"string"},"conflict":{"allOf":[{"$ref":"#/components/schemas/NamedConflictDto"}],"description":"The quoted, named pair of sources behind a \"mixed\" verdict. Null for every other verdict.","nullable":true,"type":"object"},"correction_status":{"description":"Whether a source-backed replacement statement is available","enum":["available","not_established","conflicted","not_needed"],"type":"string"},"corrections":{"description":"Corrections when the claim contains inaccuracies","items":{"$ref":"#/components/schemas/CorrectionDto"},"type":"array"},"document_breakdown":{"allOf":[{"$ref":"#/components/schemas/StanceBreakdownDto"}],"description":"Stance counts over every document analysed, before syndicated copies of one telling were collapsed into a single origin."},"document_count":{"description":"Documents analysed. Reported for transparency; origin_count is what the verdict counts.","example":5,"type":"number"},"evidence_status":{"description":"Readable source availability and stance coverage, independent of the legacy conflict flag. Absent means not assessed by this policy.","enum":["unavailable","claim_evidence","context_only","unassessed"],"type":"string"},"insufficient_evidence":{"description":"True when the counts were split but no two sources could be quoted disagreeing, so the split was reported as unverifiable rather than as a controversy.","example":false,"type":"boolean"},"key_findings":{"description":"Key facts extracted from citations (only with useEnhancedAnalysis)","items":{"$ref":"#/components/schemas/KeyFindingDto"},"type":"array"},"origin_count":{"description":"Distinct origins behind those documents. Four outlets running one wire story are four documents and one origin, and only this number votes.","example":2,"type":"number"},"result":{"description":"Overall verdict based on citation analysis","enum":["supported","partially_supported","contradicted","mixed","unverifiable"],"example":"supported","type":"string"},"stance_breakdown":{"allOf":[{"$ref":"#/components/schemas/StanceBreakdownDto"}],"description":"Breakdown of citation stances over distinct ORIGINS, which is what the verdict is computed from. For the raw per-document counts before origins were collapsed, see document_breakdown."},"summary":{"description":"Human-readable summary of the findings","example":"Based on 4 authoritative sources, the claim appears to be well-supported by available evidence.","type":"string"},"unverified_claims":{"description":"Parts of the claim that could not be verified by any source","example":["Aspect of claim that could not be verified"],"items":{"type":"string"},"type":"array"}},"required":["claim","result","confidence","summary","stance_breakdown"],"type":"object"},"VerificationStampDto":{"properties":{"band":{"enum":["verified","needs_review","unverified"],"type":"string"},"binding_method":{"enum":["exact","normalized","fuzzy","reflowed","unbound"],"type":"string"},"confidence":{"maximum":100,"minimum":0,"nullable":true,"type":"number"},"grounded":{"type":"boolean"},"layer":{"enum":["deterministic","bound","model","unbound"],"type":"string"},"meaning":{"enum":["not_checked","faithful","changed","ambiguous"],"type":"string"},"review_reason":{"type":"string"}},"required":["layer","band","confidence","grounded","meaning"],"type":"object"},"VerifyBatchRequestDto":{"properties":{"evidence_scope":{"description":"Bind items that carry no source to a folder's filed sources: {folder_id, include_descendants (default true)}. Each such item is checked against the best folder citation for its quote and returns it as `citation`; an item with no match returns an error. Items with their own source are unchanged. Omit for the unchanged behaviour.","properties":{"folder_id":{"format":"uuid","type":"string"},"include_descendants":{"default":true,"type":"boolean"}},"type":"object"},"items":{"description":"Claims to verify, each against its source. Bound back per item; a fuzzy match is capped at needs_review, never verified.","items":{"$ref":"#/components/schemas/BatchItemDto"},"type":"array"}},"required":["items"],"type":"object"},"VerifyBatchResultDto":{"properties":{"binding":{"$ref":"#/components/schemas/BindBackDto"},"engine":{"enum":["context_graph"],"type":"string"},"error":{"type":"string"},"feedback_token":{"type":"string"},"id":{"description":"Caller id echoed from the request.","type":"string"},"judgment":{"additionalProperties":true,"type":"object"},"quote":{"type":"string"},"source_check":{"enum":["read","not_read"],"type":"string"},"verification":{"$ref":"#/components/schemas/VerificationStampDto"}},"required":["quote","binding","verification","feedback_token"],"type":"object"},"VerifyClaimDto":{"properties":{"claim":{"description":"The factual claim to verify","example":"The Eiffel Tower is 330 meters tall","type":"string"},"decompose_claim":{"default":false,"description":"Break complex claims into sub-claims and verify each independently","type":"boolean"},"evidence_scope":{"description":"Ground the claim in a folder's filed sources instead of the web: {folder_id, include_descendants (default true)}. The response carries folder citations (stable citation_id, span, quote, folder_id, relation); stance and verdict are not produced. Omit for the unchanged web verification.","properties":{"folder_id":{"format":"uuid","type":"string"},"include_descendants":{"default":true,"type":"boolean"}},"type":"object"},"filters":{"description":"Required source constraints, the same fields as POST /sources/search filters (domain, exclude_domain, source_type, is_primary_source, official_country, publication_year). An unmet constraint returns no qualifying citation; a source on an exclude_domain is never cited.","type":"object"},"include_numeric_assess":{"default":false,"description":"If true, also run deterministic numeric assessment on the claim text (no extra figure operands). Skips with reason when the claim is not numeric. Default false. Does not add a separate credit charge in this release; uses the verify bill only.","type":"boolean"},"include_source_reads":{"description":"Include retained supplied-URL read receipts. Requires a signed product source-verify delegation with an active workspace grant. Public MCP responses remain redacted.","type":"boolean"},"include_stance":{"default":true,"description":"Include stance analysis for each source (adds 1 credit)","type":"boolean"},"include_verdict":{"default":true,"description":"Generate an overall verdict with confidence score (adds 1 credit)","type":"boolean"},"source_urls":{"description":"Up to five public HTTPS source URLs to inspect directly.","items":{"type":"string"},"type":"array"},"thread_id":{"description":"Thread ID to continue a conversation","type":"string"}},"required":["claim"],"type":"object"},"VerifyFeedbackRequestDto":{"properties":{"note":{"description":"Optional note or correction.","type":"string"},"token":{"description":"The feedback_token from a batch result.","type":"string"},"verdict":{"description":"The human verdict on the result.","enum":["correct","incorrect","unsure"],"type":"string"}},"required":["token","verdict"],"type":"object"},"FileDeletedDto":{"properties":{"asset_id":{"type":"string"},"deleted":{"example":true,"type":"boolean"}},"required":["asset_id","deleted"],"type":"object"},"CitationDeletedDto":{"properties":{"deleted":{"example":true,"type":"boolean"},"id":{"type":"string"}},"required":["id","deleted"],"type":"object"},"BulkDeletedDto":{"properties":{"deleted":{"items":{"type":"string"},"type":"array"},"in_progress":{"description":"Reviews still running; delete them after they finish.","items":{"type":"string"},"type":"array"},"not_found":{"description":"Ids this account does not own or that do not exist.","items":{"type":"string"},"type":"array"}},"required":["deleted","not_found"],"type":"object"},"BulkDeleteDto":{"properties":{"ids":{"description":"Ids to delete (1 to 100).","items":{"type":"string"},"maxItems":100,"minItems":1,"type":"array"}},"required":["ids"],"type":"object"}},"securitySchemes":{"apiKey":{"in":"header","name":"x-api-key","type":"apiKey"},"x-api-key":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Webcite API key. Create one at https://webcite.co/api-keys (sign-in required)."},"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Session token of a user signed in to the Webcite web app. Agents and server code use the x-api-key header."},"oauth2":{"type":"oauth2","description":"OAuth 2.0 authorization code flow with PKCE (S256) for the hosted MCP server at https://api.webcite.co/mcp. Clients register dynamically or use a Client ID Metadata Document. Discovery: https://api.webcite.co/.well-known/oauth-authorization-server. The REST operations here take the x-api-key header.","flows":{"authorizationCode":{"authorizationUrl":"https://api.webcite.co/api/v1/oauth/authorize","tokenUrl":"https://api.webcite.co/api/v1/oauth/token","refreshUrl":"https://api.webcite.co/api/v1/oauth/token","scopes":{"webcite:mcp":"Use the Webcite MCP tools, billed to your account like an API key."}}}}}},"info":{"title":"Webcite API","version":"1.0","description":"Webcite parses documents and checks claims against sources. The API converts PDFs, scans, images, spreadsheets and office files to Markdown with page and sheet locations, splits them into citation-ready chunks, verifies a claim against web sources with citations, a stance for each source and a verdict, checks that quotes appear in the sources you give, searches for sources, and extracts and cross-checks financial figures. Send your API key in the x-api-key header; create a key at https://webcite.co/api-keys (sign-in required). Documentation: https://webcite.co/api-docs","contact":{"name":"Webcite support","url":"https://webcite.co/support","email":"support@webcite.co"},"termsOfService":"https://webcite.co/terms-and-conditions"},"openapi":"3.0.0","paths":{"/api/v1/accuracy":{"get":{"description":"The engine's measured accuracy against a gold-set corpus: conflict detection recall and precision, and recompute correctness. Reproducible and gated on every build — an accuracy regression cannot ship.\n\n**Cost: 1 credit.** Deterministic; the report runs the deterministic gold-set eval on the server, so it is subject to your plan's rate limits.","operationId":"ApiV1Controller_accuracy","parameters":[],"responses":{"200":{"description":"Corpus accuracy report"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Measured numeric-accuracy report","tags":["Figures and conflicts"]}},"/api/v1/analyze/conflicts":{"post":{"description":"Verify NUMBERS, not just text. Given figures extracted across one or more documents, the finance accuracy engine:\n\n- **recomputes** every derivable metric from its primitives (e.g. gross margin from revenue and COGS, revenue growth from two periods) and flags where the stated value does not match the computed one;\n- **detects cross-document conflicts** — figures for the same metric/entity/period that disagree beyond the metric's tolerance;\n- **flags semantic conflicts** — metrics that are each plausible alone but jointly impossible (e.g. logo retention far below 100 − churn);\n- returns a **review** flag: whether a human should look, and the concrete reasons (a conflict, a recompute mismatch, or model-read inputs). The findings are deterministic — a conflict exists or it does not — so this is a flag with reasons, not a probability score.\n\nDeterministic compute. **Cost: 1 credit.** Still subject to your plan's rate limits, since the request uses server compute.","operationId":"ApiV1Controller_analyzeConflicts","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeConflictsRequestDto"}}},"required":true},"responses":{"200":{"description":"Conflicts, recomputations, and a review flag"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Analyze numeric figures for conflicts and mismatches","tags":["Figures and conflicts"]}},"/api/v1/analyze/document":{"post":{"description":"Document-in numeric analysis. Give an uploaded asset id; the document is downloaded, its figures are extracted, then recomputed and cross-checked. Returns the extracted figures alongside conflicts, recomputations, and a review flag.\n\n- **Spreadsheets** (xlsx/xls/csv): extracted deterministically with exact cell provenance. A cell read is exact, so these are rule reads. Server compute and file I/O only.\n- **PDFs**: the printed figures are read from the page image (never computed); these are model reads, capped at needs_review and never presented as verified. Their value is cross-source, e.g. a deck figure that disagrees with the spreadsheet. **This path makes a paid read of each page image.**\n\n**Cost: 3 credits.** The document is downloaded and parsed; PDF pages may also be read from their images. Rate-limited more strictly than compute-only endpoints.","operationId":"ApiV1Controller_analyzeDocument","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeDocumentRequestDto"}}},"required":true},"responses":{"200":{"description":"Extracted figures with conflicts, recomputations, and a review flag"},"400":{"description":"Asset not found or unsupported type"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Analyze a spreadsheet or PDF document for conflicts and mismatches","tags":["Figures and conflicts"]}},"/api/v1/ask":{"post":{"description":"Queues an ask job: the document is chunked, top passages are\nretrieved, a derivation is drafted, and every drafted number is checked\nagainst the passages (verbatim match) or recomputed from grounded operands.\nUnverified values return as null, never as claims. Poll GET ask/:id.\n\n**Credits: 5** (retrieval plus a model draft plus verification)","operationId":"ApiV1Controller_ask","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAskDto"}}},"required":true},"responses":{"202":{"description":"Ask job queued."},"400":{"description":"bad_input or needs_ocr."},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Ask a question over a document","tags":["Parse documents"]}},"/api/v1/ask/{id}":{"get":{"description":"Job view with status (queued, running, done, failed) and,\nwhen done, the checked result or a null answer with warnings.\n\n**Cost: 0 credits** — this is a read of a result you already generated.","operationId":"ApiV1Controller_askStatus","parameters":[{"description":"Ask job ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ask job view."},"401":{"description":"Unauthorized - API key required"},"404":{"description":"Ask job not found."}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Poll an ask job","tags":["Parse documents"]}},"/api/v1/citations":{"get":{"description":"List your past verification results. Supports pagination and filtering by thread_id.\n\n**Cost: 1 credit.** This is a read of results you already generated. Deterministic.","operationId":"ApiV1Controller_listCitations","parameters":[{"description":"Page number (starts at 1)","in":"query","name":"page","required":false,"schema":{"default":1,"example":1,"minimum":1,"type":"number"}},{"description":"Results per page (max 50)","in":"query","name":"limit","required":false,"schema":{"default":20,"example":20,"maximum":100,"minimum":1,"type":"number"}},{"description":"Predefined field set to return","in":"query","name":"fields","required":false,"schema":{"default":"all","enum":["minimal","basic","detailed","with_relations","all"],"example":"basic","type":"string"}},{"description":"Filter by thread ID","in":"query","name":"thread_id","required":false,"schema":{"example":"123e4567-e89b-12d3-a456-426614174000","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CitationListResponseDto"}}},"description":"Citations retrieved"},"401":{"description":"Unauthorized - API key required"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"List citations","tags":["Saved citations"]}},"/api/v1/citations/source-preview":{"post":{"description":"Resolve a citation back to its exact source and render it, so you can show the evidence behind a claim.\n\n- **Web sources** (`url`): returns a text-fragment deep link (`url#:~:text=quote`) that scrolls a browser to the quote.\n- **Document sources** (`asset_id`, from POST /upload): returns the cited page's extracted text and a `asset_url#page=N` deep link. Spreadsheets return the sheet grid.\n\nEvery preview includes a **bindBack** result: whether the cited quote is actually present in the source (`grounded`) and how it matched (`exact`, `normalized`, `fuzzy`, `reflowed`, or `unbound`). A `reflowed` match used a derived OCR reading and always requires review. A citation that cannot be bound back is never reported as grounded.\n\n**Cost: 1 credit.** Deterministic, but a web preview fetches the source URL, so this endpoint is subject to your plan's rate limits.","operationId":"ApiV1Controller_sourcePreview","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcePreviewRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcePreviewResponseDto"}}},"description":"Source preview with bindBack verification"},"400":{"description":"Provide a web url or an asset_id"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Preview a citation source","tags":["Check quotes"]}},"/api/v1/citations/{id}":{"get":{"description":"Get the full details of a specific verification by its ID.\n\n**Cost: 1 credit.** This is a read of a result you already generated. Deterministic.","operationId":"ApiV1Controller_getCitation","parameters":[{"description":"Citation ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CitationViewResponseDto"}}},"description":"Citation retrieved"},"401":{"description":"Unauthorized - API key required"},"404":{"description":"Citation not found"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Get citation by ID","tags":["Saved citations"]},"delete":{"description":"Permanently deletes a verification result (citation), its source captures and judgments. Free. Billing records of the credits it used are kept without its content.","operationId":"DataDeletionController_deleteCitation","parameters":[{"description":"Citation id","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CitationDeletedDto"}}},"description":""},"404":{"description":"No verification result with this id in your account"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Delete a verification result","tags":["Saved citations"]}},"/api/v1/classify":{"post":{"description":"Deterministic, model-free document classification. Downloads an uploaded asset, extracts its content + spreadsheet sheet names, and returns a coarse **category** plus the fine multi-type **covers** it holds (a bundled workbook covers several). Works with no model configured (air-gapped safe).\n\nPass an optional `taxonomy` preset (`vc` = venture data-room, `ma` = M&A categories; default `vc`).\n\n**`unfiled` is an answer, not a failure.** A document that was read completely and matched no category gets it, so it cannot also mean \"we never read this\". `state`, `reason` and `code` — the same three fields, the same vocabulary and the same values as `POST /extract` — say whether the classifier ever saw any content. A refused, corrupt, unsupported or unreadable asset returns `unfiled` with a non-null `code`; a genuinely empty document returns `unfiled` with `code: \"empty_source\"`; a complete read returns `code: null`. `category` and `covers` are untouched by this — anything routing on them today keeps working.\n\n**Cost: 1 credit.** Deterministic, but downloads + parses the asset.","operationId":"ApiV1Controller_classify","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyResponseDto"}}},"description":"{ category, covers[], state, reason, code }"},"400":{"description":"Asset not found"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Classify a document into a category and covered types","tags":["Parse documents"]}},"/api/v1/extract":{"post":{"description":"All-formats extraction (PDF, JPEG/PNG images, spreadsheets, docx/pptx/html/txt, …) into a normalized document: whole-doc `markdown`, per-page/sheet `units` with page/sheet provenance, and (for spreadsheets) sheet names. Extraction never hard-fails: an unreadable asset returns empty text. The request is synchronous: the response is the finished document, and there is no job to poll.\n\n**How pages are read.** Spreadsheets and text formats are read deterministically from the file. Every PDF page, and a JPEG or PNG as a one-page document, is read from its rendered image, and the reading is checked against the page's own text layer and drawing where the page has them. Before the read, each page is given a page type (`scan`, `form`, `dense`, `table`, `chart`, `complex_text`, `plain_text`). In lite mode every page gets the faster, lower-cost read; in standard mode each page gets the higher-accuracy read for its page type, and a second read takes over when the first fails. Such a unit has `extraction_method: \"ocr\"`, a `reader` naming the page type, `elements` (typed blocks in reading order, each with its Markdown and a normalized `bbox`) and the page `geometry`. A page whose read could not be completed falls back to its text layer (or, in standard mode, plain OCR): it has no `reader`, may have no `elements`, and is reported through `state` and `lost[]`.\n\n**Lite and standard.** `mode: \"lite\"` is the faster, lower-cost read, about 0.12 credits a page. `mode: \"standard\"` is the higher-accuracy read, about 0.75 credits a page, which does better on complex tables, handwriting and scans. A request with no `mode` reads in lite for an account created on or after 20 November 2026 (04:00 UTC); an account created before then keeps standard as its default, with the same price, estimate and response as before, and can send `mode: \"lite\"` to opt in. Either mode can always be sent explicitly. Every other step is the same in both modes: the reading is checked against the page's text layer and drawing, long tables are read again in row bands, chart values are measured from the drawing, and the form and table rules apply. Lite also reads a page whose text is a hidden OCR layer (an invisible text layer under a scan, with no other text printed over it) from its rendered image, and `image_input` then names `hidden`. In lite a form page is not read a second time, and a page whose read fails after its retry is not read another way: it keeps its text layer or is reported through `state` and `lost[]`, and is not charged. Each unit of a lite read carries `mode: \"lite\"`; a standard read carries no `mode`. A lite read and a standard read of the same file are kept apart: neither is served for the other. A visual rendition is read in standard mode.\n\n**A partial read says so.** When the file opened but a part of it could not be read (a workbook sheet whose part the package is missing, a page that failed), the response carries `complete: false` and `lost[]` naming what was not recovered (sheet or page, and why). Both keys are absent from a complete read, so seeing either is a finding rather than a default, and `state` (`complete` | `partial` | `error` | `unsupported`) is the same determination in one word. `unsupported` was served but not listed here: it is the answer for a format no reader is registered for, and a consumer switching on the documented three fell through on it.\n\n**Why a read did not complete, in two fields.** `reason` is free text straight from whatever refused or failed, so it carries detail no enum can: `spreadsheet_too_large:bytes:33554433>33554432` has the observed value and the limit in it. It is not stable: it includes dependency error text such as `extraction_failed:Cannot read properties of undefined (reading 'Pages')`. Failure text from the service that read a page (its name, a model id, an endpoint or its own error wording) is never passed on: in `reason`, `error` and `message` it is replaced with `the document could not be read` for the document, or `the page could not be read` inside a unit or a `lost[]` entry, and the code before the colon is kept, as in `extraction_failed:the document could not be read`. `code` is the stable classification of the same refusal, and it is the one to switch on.\n\n| `code` | Meaning | Caller's move |\n|--------|---------|---------------|\n| `source_too_large` | a size or expansion ceiling refused the read | send a smaller file; `reason` has the numbers |\n| `source_encrypted` | the container is password-protected | send an unlocked copy |\n| `source_corrupt` | the container could not be opened as the format it declares | re-export the file |\n| `unsupported_format` | no reader is registered for this format | convert it |\n| `ocr_unavailable` | no text layer, and page-image reading is not configured | send a text-layer file |\n| `partial_extraction` | some of the source came back and some did not | use what came back; `lost[]` names the rest |\n| `empty_source` | the source was read and held nothing | nothing to retry: this is a fact about the file |\n| `extraction_error` | our failure | retry |\n\nBoth are `null` on a complete read. Each `lost[]` entry carries its own `reason` and `code` for the part it names, which can differ from the document's: a workbook that lost one sheet of two is `partial_extraction` while the lost sheet is `source_corrupt`.\n\n**`extraction_method`** says which path produced the text, so a consumer storing this as evidence can tell a deterministic read from a model transcription:\n\n| Value | Meaning |\n|-------|---------|\n| `text_layer` | the file's own machine-readable text, read deterministically |\n| `ocr` | no text layer, so the page image was transcribed |\n| `spreadsheet_cells` | cells read out of the workbook, no model and no rendering |\n| `none` | nothing readable came back (empty, unparseable, or a scan with no OCR configured) |\n\nA document can mix paths, such as a text-layer PDF with two scanned pages in it. The top-level `extraction_method` is then the **dominant** path (the one behind the most readable units, ties going to `ocr`); `units[].extraction_method` is the exact answer for that page or sheet.\n\n**Spreadsheet units** also carry `sheet`: the tab's native structure straight from the workbook. `sheet.merges` lists the merged ranges (`[\"A1:A2\",\"B1:C1\"]`) and `sheet.cells[].merged_range` says which range each cell belongs to, so a header spanning two columns can be rebuilt: the `text` CSV flattens it to a value plus a blank.\n\n**Cost: metered, at cost.** Each page is charged what its read costs at list prices, converted at $0.04 a credit, as a decimal number of credits (4 decimal places). A lite page costs about 0.12 credits (0 cents) and a standard page about 0.75 credits (3 cents); a page of plain text costs less and a dense table more. One page is never charged more than 10 credits ($0.40). A page that could not be read is free, and so is a spreadsheet or a text document (docx, pptx, html, txt), which is read from the file directly.\n\n**Reading the receipt.** `usage.credits` is the amount deducted, `usage.pages` the number of pages charged, and `usage.page_charges` one line a page with its `page_type` and `credits`. The lines add up to `usage.credits` to within rounding.\n\n**Before the read.** The cost is known only after the pages are read, so a PDF is first checked against an estimate: its page count at 0.12 credits a page for a lite read or 0.75 for a standard read. When the balance is under the estimate and the account has no overage billing, the request is refused with `400` naming the credits required and available, nothing is read and nothing is charged. A document is read whole or not at all. If the pages cost more than the balance holds, the charge stops at the balance, which never goes below zero; accounts with overage billing are charged the full cost.\n\n**Repeated files.** A PDF or image whose exact content this account had read completely in the last 24 hours, under the same reader build, is answered from that read: no page is read again and nothing is charged (`usage.credits` 0). Send `refresh: true` to read it again anyway (for example to compare two reads); the new read is charged and, when complete, replaces the earlier one.\n\n**Limits.** The asset can be at most 100 MB (`413` above that), and its download into the reader has 30 seconds (`504`). This endpoint is rate limited at half the plan's request limits (per minute and per day); a `429` carries a `Retry-After` header and `retryAfter` seconds in the body. A long document is read page by page inside the one request, so allow a client timeout of several minutes.","operationId":"ApiV1Controller_extract","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequestDto"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractResponseDto"}}},"description":"The extracted document: { format, markdown, extraction_method, state, reason, code, units[], sheets?[], complete?: false, lost?[], operation_id, usage, credit_usage }"},"400":{"description":"asset_url is not an allowed public web address, neither asset_id nor asset_url was given, `mode` is not `standard` or `lite`, `mode: \"lite\"` was sent with a visual rendition, or the balance is under the estimate for the document, its page count at 0.12 credits a page in lite or 0.75 in standard (`Insufficient credits. Required: 0.75, Available: 0. …` for a one-page PDF read in standard). The body has `message`, `error`, `statusCode` and `credit_usage`"},"401":{"description":"Unauthorized - API key required"},"403":{"description":"APP_KEY_ROUTE_FORBIDDEN: app keys cannot use this endpoint"},"404":{"description":"The asset does not exist, or the store has no bytes for it"},"413":{"description":"The asset is over the 100 MB download ceiling. The body carries `bytes` (null when the reader refused mid-stream) and `max_bytes`"},"429":{"description":"Rate limit exceeded. `Retry-After` header and body `{ statusCode, message, error, retryAfter, limit, remaining, plan }`, `retryAfter` in seconds"},"502":{"description":"The asset store returned a failure. Ours, not the request: retry"},"503":{"description":"Private evidence storage is not configured, so an evidence:// asset cannot be read"},"504":{"description":"The asset download timed out. Retry"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Extract any document into normalized text + units with provenance","tags":["Parse documents"]}},"/api/v1/extract/figures":{"post":{"description":"Reads a spreadsheet and returns each known metric as a **figure**: the value normalized to its canonical unit, plus what it means (`metric`), `unit`, optional `entity`/`period`, a confidence `band`, whether it was confirmed against the cited cell (`bound`), and full `provenance` (asset, sheet, cell, source label). This is deterministic financial-model reading: header scale (\"$M\"/\"'000\"), accounting negatives, period columns (FY2023 vs FY2024), and unit-declaration checks are all honoured, so a % is never mis-read as currency.\n\nDeterministic-first. Reads **spreadsheets** (cell-level discovery), **PDFs with a text layer** (grounded and cited by page), and **every other text-bearing format** (docx, pptx, html, txt) deterministically with no model calls. **Scanned PDF pages and image files** (png/jpg/...) are transcribed by vision OCR first, then grounded, so their numbers are still extracted (provenance marked `model`); this needs page-image reading on the server and is skipped otherwise. Accepts `asset_id` (uploaded asset) or `asset_url` (your own signed URL).\n\n**An empty `figures` says why it is empty.** `state`, `reason` and `code` — the same three fields, the same vocabulary and the same values as `POST /extract` — describe **the read that fed the figure engine**, not the figure list. A workbook that opened and yielded no known metric is `state: \"complete\"` with `code: null`: the engine measured it and found nothing to tag, which is an answer. A refusal never reached the engine and carries its cause (`source_too_large`, `source_corrupt`, `source_encrypted`, `unsupported_format`, `extraction_error`). `figures` itself is untouched.\n\n**Cost: 2 credits.** Deterministic; downloads and runs the full figure engine over every sheet/page.","operationId":"ApiV1Controller_extractFigures","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractFiguresResponseDto"}}},"description":"{ figures: { metric, value, unit, entity?, period?, band, bound, provenance }[], state, reason, code }"},"400":{"description":"Asset not found"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Extract every number from a document as a tagged, source-grounded figure","tags":["Figures and conflicts"]}},"/api/v1/extract/pages":{"post":{"description":"The same all-formats extraction as POST /extract, sliced into retrieval-sized **chunks** that keep the anchor a citation needs: `page` (PDF), `sheet` (workbook tab), `section` (nearest preceding markdown heading), plus a `token_estimate` for packing a context budget. `ordinal` is contiguous from 0 across the whole document.\n\nUse this instead of /extract when you intend to index the text and later point a reader at where a passage came from: flat pages cannot carry a citation.\n\n**An empty `chunks` says why it is empty.** `state`, `reason` and `code` are the extraction's own determination, carried through verbatim: the same three fields, the same vocabulary and the same values as `POST /extract` over the same asset. A refusal (`source_too_large`, `source_corrupt`, `source_encrypted`, `unsupported_format`) and a document that genuinely holds nothing (`empty_source`) both return no chunks, and `code` is what tells them apart. `code` is `null` on a complete read.\n\n**Cost: metered, at cost.** Each page is charged what its read costs at list prices, converted at $0.04 a credit, as a decimal number of credits (4 decimal places). A lite page costs about 0.12 credits (0 cents) and a standard page about 0.75 credits (3 cents); a page of plain text costs less and a dense table more. One page is never charged more than 10 credits ($0.40). A page that could not be read is free, and so is a spreadsheet or a text document (docx, pptx, html, txt), which is read from the file directly. The same price as /extract: the chunking is in-process and makes no model call. A repeated file is answered from the earlier read as on /extract, and `refresh: true` reads it again.\n\n**Lite and standard.** As on /extract: `mode: \"lite\"` is the faster, lower-cost read and `mode: \"standard\"` the higher-accuracy read; with no `mode`, an account created on or after 20 November 2026 (04:00 UTC) reads in lite and an older account keeps standard. The response carries `mode: \"lite\"` for a lite read.","operationId":"ApiV1Controller_extractPages","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractPagesResponseDto"}}},"description":"{ chunks[], state, reason, code }"},"400":{"description":"Asset not found, `mode` is not `standard` or `lite`, or the balance is under the estimate for the document (the same `Insufficient credits.` refusal as POST /extract)"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Extract a document into anchored chunks ready to index and cite","tags":["Parse documents"]}},"/api/v1/extract/visual-rendition":{"post":{"operationId":"ApiV1Controller_extractVisualRendition","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequestDto"}}},"required":true},"responses":{"201":{"description":""}},"security":[{"x-api-key":[]},{"bearer":[]}],"tags":["Parse documents"],"summary":"Create model-generated layout evidence for an uploaded JPEG or PNG"}},"/api/v1/gaps":{"post":{"description":"Given the documents already filed in a category, returns each expected document type flagged present/absent. An item is present when any document matches it by filename, category, or covered type. Advisory — nothing blocks the workflow. Pure and deterministic; no I/O.\n\nPass an optional `taxonomy` preset and `stage` (`early`/`growth`) to tailor the list.\n\n**Cost: 1 credit.** Pure and deterministic (no I/O).","operationId":"ApiV1Controller_gaps","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GapsRequestDto"}}},"required":true},"responses":{"200":{"description":"{ items: { name, present }[] }"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Compute the \"usually also here\" checklist for a category","tags":["Parse documents"]}},"/api/v1/sources/search":{"post":{"description":"Search for authoritative sources related to a query. Returns raw citations without stance analysis or verdict.\n\n**Credits: 2** (search only)","operationId":"ApiV1Controller_searchSources","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSourcesDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponseDto"}}},"description":"Sources found"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Search for sources","tags":["Search sources"]}},"/api/v1/upload":{"post":{"description":"Store a file and get the `asset_id` that `POST /extract` and the other document endpoints take. Send `multipart/form-data` with one `file` part; the part's filename decides the format, so keep its extension.\n\n**Cost: 0 credits.** Uploading is free and needs no credit balance; `usage.credits` is 0. Reading the file with `POST /extract` is charged for each page read.\n\n**Limits.** The file can be at most 100 MB and must not be empty. Uploads are not counted against the plan's request limits; the general limit of 300 requests per minute applies and answers `429` with a `Retry-After` header.","operationId":"ApiV1Controller_uploadFile","parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"File to upload","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponseDto"}}},"description":"File uploaded successfully"},"400":{"description":"No `file` part was sent, the file is empty or over 100 MB (`Invalid source metadata or bytes`), or the account has too few credits"},"401":{"description":"Unauthorized - API key required"},"403":{"description":"APP_KEY_ROUTE_FORBIDDEN: app keys cannot use this endpoint"},"429":{"description":"More than 300 requests in a minute. Wait for `Retry-After`"},"503":{"description":"Private evidence storage required: set EVIDENCE_STORAGE_ROOT or EVIDENCE_BUCKET_NAME (I1; never public-first)"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Upload a file","tags":["Upload"]}},"/api/v1/verify":{"post":{"description":"Verify a factual claim against authoritative sources. Returns sources with stance analysis and an overall verdict. When a wrong clause has a proven replacement, verdict.corrections contains a corrected_statement and exact proof quotes tied to citations in the same claim group. correction_status is not_established when the evidence cannot prove a replacement.\n\n**Credit System:**\n| Operation | Credits | Description |\n|-----------|---------|-------------|\n| Search | 2 | Find sources for the claim |\n| Stance Analysis | 1 | Analyze stance of each source (set include_stance=false to skip) |\n| Verdict | 1 | Generate overall verdict (set include_verdict=false to skip) |\n\nThe fixed prices are:\n\n| include_stance | include_verdict | Credits |\n|----------------|-----------------|---------|\n| false | false | 2 |\n| true | false | 3 |\n| false | true | 4 |\n| true | true | 4 |\n\nVerdict generation requires stance analysis internally, so verdict-only costs 4. Cached and uncached V1 requests use the same price.\n\nApp keys require evidence_scope with a readable folder and verify permission. This scoped route retrieves filed-source citations at zero credits, returns support:not_checked and verdict:null, and does not run public-web verification.","operationId":"ApiV1Controller_verifyClaim","parameters":[{"description":"Optional 1-128 printable non-space ASCII key scoped per API key (with its app, folder limit and permissions) or per user for a user key, and to the verify endpoint. Reuse with the same request to recover a completed result without regenerating or charging twice. Different payload returns 409. Completed checkpoints are retained for 24 hours; missing checkpoints or unresolved accounting return 503 instead of repeating work. This header contract applies to JSON verify only.","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"quick":{"summary":"Quick verify","value":{"claim":"The Eiffel Tower is 330 meters tall","include_stance":true,"include_verdict":true}},"with_numeric":{"summary":"Verify + numeric assess","value":{"claim":"Revenue rose from 12.5 to 20.0, up 60%","include_numeric_assess":true,"include_stance":true,"include_verdict":true}}},"schema":{"$ref":"#/components/schemas/VerifyClaimDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponseDto"}}},"description":"Claim verified successfully"},"401":{"description":"Unauthorized - API key required"},"403":{"description":"APP_KEY_EVIDENCE_SCOPE_REQUIRED: app keys need evidence_scope. KEY_SCOPE_DENIED: the key lacks read or verify permission."},"409":{"description":"Idempotency-Key reused with a different verification request"},"429":{"description":"Rate limit exceeded"},"503":{"description":"Idempotent work in progress, saved result unavailable, or accounting unresolved; retry with the same key"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Verify a factual claim","tags":["Verify claims"]}},"/api/v1/verify/batch":{"post":{"description":"Bind every claim to its source in a single request. Each item is a quote plus its source (inline text, a url, or an asset). The response gives, per item, whether the quote is grounded, how it matched (exact, normalized, fuzzy, reflowed, or unbound), the best-matching passage and score even when unbound, the verification tier, and a feedback token.\n\nA fuzzy match is capped at needs_review, never verified. A reflowed match uses a derived OCR reading and is also capped at needs_review. Use this to check every citation in a document at once.\n\nApp keys require evidence_scope with a readable folder and verify permission. Their items must omit source_text, url, asset_id, source_version_id, representation_id and source_unit_id. Each quote is grounded in filed-source citations; unmatched quotes return explicit item errors. The folder organization billing owner pays the batch, after scope and payer validation.\n\n**Cost: 1 credit per item.** BindBack is deterministic, but a batch can be large and `url`/`asset` items fetch their source, so this endpoint is rate-limited more strictly than compute-only endpoints.","operationId":"ApiV1Controller_verifyBatch","parameters":[{"description":"Optional 1-128 printable non-space ASCII key scoped per API key (with its app, folder limit and permissions) or per user for a user key, and to the verify/batch endpoint. Reuse with the same body (the whole validated request) to recover a completed result without re-running or charging twice. A different body or changed app-batch billing owner returns 409; a repeat while the first is running returns 503. Completed results are retained for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyBatchRequestDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VerifyBatchResultDto"},"type":"array"}}},"description":"Per-item verification results"},"401":{"description":"Unauthorized - API key required"},"403":{"description":"APP_KEY_EVIDENCE_SCOPE_REQUIRED: app keys need evidence_scope. APP_KEY_BATCH_SOURCE_FORBIDDEN: app items must not supply their own source. FOLDER_BILLING_OWNER_UNAVAILABLE: the folder has no active org payer. KEY_SCOPE_DENIED: missing read or verify permission."},"409":{"description":"Idempotency-Key reused with a different batch request or app-batch billing owner"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Verify many claims in one call","tags":["Check quotes"]}},"/api/v1/verify/feedback":{"post":{"description":"Accept, reject, or flag a result using the feedback_token from a batch result. The token carries the result summary, so token plus verdict is enough. Feedback is stored so corrections accumulate over time.\n\n**Cost: 1 credit.** Records a single row. Subject to your plan's rate limits.","operationId":"ApiV1Controller_verifyFeedback","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyFeedbackRequestDto"}}},"required":true},"responses":{"200":{"description":"Feedback recorded"},"400":{"description":"Invalid feedback_token"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Record a verdict on a verification result","tags":["Verify claims"]}},"/api/v1/verify/stream":{"post":{"description":"Stream verification results via Server-Sent Events. Citations stream as processed, followed by verdict when requested.\n\nPrices match POST /verify: search-only 2 credits, stance without verdict 3 credits, and any request with verdict 4 credits. Cached and uncached V1 requests use the same price.\n\n**Event Types:** citation, groups, verdict, metadata, result, usage, done, error. A successful stream emits one usage event followed by one done event.","operationId":"ApiV1Controller_verifyClaimStream","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyClaimDto"}}},"required":true},"responses":{"200":{"description":"SSE stream of verification results"},"401":{"description":"Unauthorized - API key required"},"429":{"description":"Rate limit exceeded"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Verify a claim with streaming response","tags":["Verify claims"]}},"/api/v2/sources":{"post":{"operationId":"SourceVersionController_register","parameters":[],"responses":{"201":{"description":""}},"security":[{"x-api-key":[]},{"bearer":[]}],"tags":["Retained sources"],"summary":"Register original text or CSV bytes for an uploaded asset"}},"/api/v2/sources/{versionId}/representations/latest":{"get":{"operationId":"SourceVersionController_latestRepresentation","parameters":[{"in":"path","name":"versionId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"x-api-key":[]},{"bearer":[]}],"tags":["Retained sources"],"summary":"Get the latest representation and source unit IDs of a retained source"}},"/api/v2/sources/{versionId}/representations/text":{"post":{"operationId":"SourceVersionController_publishTextRepresentation","parameters":[{"in":"path","name":"versionId","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"x-api-key":[]},{"bearer":[]}],"tags":["Retained sources"],"summary":"Publish a text or CSV representation of a retained source"}},"/api/v2/sources/{versionId}/representations/{representationId}/prepare-ocr-rescue":{"post":{"description":"A new successful preparation costs 5 credits. Retained replays do not charge again. A dispatched outcome that cannot be confirmed remains pending reconciliation.","operationId":"OcrRescueController_prepare","parameters":[{"in":"path","name":"versionId","required":true,"schema":{"type":"string"}},{"in":"path","name":"representationId","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Prepare judged OCR rescue for an owned source","tags":["Retained sources"]}},"/api/v2/sources/{versionId}/representations/{representationId}/units/{unitId}":{"get":{"operationId":"SourceVersionController_unit","parameters":[{"in":"path","name":"versionId","required":true,"schema":{"type":"string"}},{"in":"path","name":"representationId","required":true,"schema":{"type":"string"}},{"in":"path","name":"unitId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"x-api-key":[]},{"bearer":[]}],"tags":["Retained sources"],"summary":"Read one immutable source unit"}},"/api/v2/verify/numeric":{"post":{"operationId":"NumericClaimController_assess","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"claim":{"maxLength":10000,"minLength":1,"type":"string"},"operands":{"items":{"additionalProperties":false,"properties":{"figure_index":{"maximum":10000,"minimum":0,"type":"integer"},"representation_id":{"type":"string"},"source_unit_id":{"type":"string"},"source_version_id":{"type":"string"}},"required":["source_version_id","representation_id","source_unit_id","figure_index"],"type":"object"},"maxItems":2,"minItems":1,"type":"array"}},"required":["claim","operands"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"arithmetic":{"nullable":true,"properties":{"computed":{"nullable":true,"type":"number"},"reason":{"type":"string"},"tolerance":{"type":"number"},"verdict":{"enum":["holds","fails","not_computable"],"type":"string"}},"required":["verdict","computed","tolerance","reason"],"type":"object"},"certificate":{"description":"Rerunnable receipt in the ProofArtifact shape. status is proved (supported), refuted (contradicted), unknown (escalate) or not_applicable. An independent checker recomputes the verdict from witness alone; check reports agreement or each disagreement. Figure readings, printed facet values and semantic comparability facets are premises bound by bindingHash and proofHash, not recomputed. Not persisted.","properties":{"bindingHash":{"type":"string"},"check":{"properties":{"agrees":{"type":"boolean"},"disagreements":{"items":{"type":"string"},"type":"array"}},"required":["agrees","disagreements"],"type":"object"},"checkedAxioms":{"items":{"type":"string"},"type":"array"},"checkerDigest":{"type":"string"},"checkerPolicyRevision":{"type":"string"},"formalStatementHash":{"type":"string"},"premiseRevisionIds":{"items":{"type":"string"},"type":"array"},"proofHash":{"type":"string"},"property":{"enum":["equality"],"type":"string"},"scope":{"enum":["arithmetic"],"type":"string"},"status":{"enum":["proved","refuted","unknown","not_applicable"],"type":"string"},"toolchainVersion":{"type":"string"},"translationVersion":{"type":"string"},"witness":{"properties":{"arithmetic":{"enum":["holds","fails","not_computable"],"nullable":true,"type":"string"},"claim":{"nullable":true,"properties":{"bound":{"enum":["gte","lte"],"nullable":true,"type":"string"},"direction":{"enum":[-1,0,1],"type":"integer"},"hedged":{"type":"boolean"},"key":{"description":"The claimKey.","type":"object"},"kind":{"enum":["growth_percent","difference","ratio","absolute"],"type":"string"},"stated":{"properties":{"accounting":{"type":"boolean"},"comparator":{"enum":["gte"],"nullable":true,"type":"string"},"decimal":{"description":"Printed decimal, unsigned and unscaled.","type":"string"},"interval":{"description":"Every value that rounds to the printed figure.","items":{"type":"string"},"maxItems":2,"minItems":2,"type":"array"},"raw":{"type":"string"},"scale":{"type":"number"},"sign":{"enum":[-1,1],"type":"integer"},"unit":{"nullable":true,"type":"string"},"unitClass":{"type":"string"},"value":{"description":"Exact value: a decimal, or n/d when it does not terminate.","type":"string"}},"type":"object"},"tolerance":{"description":"Exact half-width of the stated band.","type":"string"}},"type":"object"},"claimText":{"type":"string"},"comparability":{"nullable":true,"type":"object"},"operands":{"items":{"properties":{"accounting":{"type":"boolean"},"comparator":{"enum":["gte"],"nullable":true,"type":"string"},"decimal":{"description":"Printed decimal, unsigned and unscaled.","type":"string"},"facets":{"description":"As operands[].facets.","items":{"type":"object"},"type":"array"},"interval":{"description":"Every value that rounds to the printed figure.","items":{"type":"string"},"maxItems":2,"minItems":2,"type":"array"},"raw":{"type":"string"},"scale":{"type":"number"},"sign":{"enum":[-1,1],"type":"integer"},"source":{"nullable":true,"properties":{"figure_index":{"type":"integer"},"representation_id":{"type":"string"},"source_unit_id":{"type":"string"},"source_version_id":{"type":"string"}},"type":"object"},"unit":{"nullable":true,"type":"string"},"unitClass":{"type":"string"},"value":{"description":"Exact value: a decimal, or n/d when it does not terminate.","type":"string"}},"type":"object"},"type":"array"},"outcome":{"enum":["supported","contradicted","escalate","not_applicable"],"type":"string"},"relation":{"nullable":true,"properties":{"interval":{"description":"Exact range over the operand intervals.","items":{"type":"string"},"maxItems":2,"minItems":2,"nullable":true,"type":"array"},"value":{"nullable":true,"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"claimKey":{"description":"Fact key read deterministically from the claim text. A part is null unless the text prints exactly one value for it.","nullable":true,"properties":{"basis":{"nullable":true,"properties":{"end":{"type":"integer"},"lexeme":{"type":"string"},"start":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"currency":{"nullable":true,"properties":{"end":{"type":"integer"},"lexeme":{"type":"string"},"start":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"entity":{"nullable":true,"properties":{"end":{"type":"integer"},"lexeme":{"type":"string"},"start":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"measure":{"nullable":true,"properties":{"end":{"type":"integer"},"lexeme":{"type":"string"},"start":{"type":"integer"},"value":{"type":"string"}},"type":"object"},"period":{"nullable":true,"properties":{"end":{"type":"integer"},"lexeme":{"type":"string"},"start":{"type":"integer"},"value":{"properties":{"kind":{"enum":["fy","year","quarter","half","ytd","ltm"],"type":"string"},"part":{"type":"integer"},"year":{"type":"integer"}},"type":"object"}},"type":"object"},"role":{"nullable":true,"properties":{"end":{"type":"integer"},"lexeme":{"type":"string"},"start":{"type":"integer"},"value":{"type":"string"}},"type":"object"}},"type":"object"},"comparability":{"nullable":true,"properties":{"facets":{"items":{"properties":{"decidedBy":{"enum":["code","judge"],"type":"string"},"facet":{"enum":["unit","scale","measure","entity","period","basis"],"type":"string"},"p":{"nullable":true,"type":"number"},"passed":{"nullable":true,"type":"boolean"}},"type":"object"},"type":"array"},"reason":{"type":"string"},"verdict":{"enum":["comparable","not_comparable","unknown"],"type":"string"}},"required":["verdict","facets","reason"],"type":"object"},"limitation":{"type":"string"},"operands":{"items":{"properties":{"binding":{"enum":["retained_source_slice"],"type":"string"},"facets":{"description":"The claim's fact key checked against this figure's own line. Contradicted needs printed evidence; unknown never lowers the outcome. A contradiction escalates.","items":{"properties":{"claim":{"type":"string"},"evidence":{"nullable":true,"properties":{"end":{"type":"integer"},"lexeme":{"type":"string"},"start":{"type":"integer"}},"type":"object"},"facet":{"enum":["measure","entity","period","basis","currency","role"],"type":"string"},"figure":{"nullable":true,"type":"string"},"outcome":{"enum":["supported","contradicted","unknown"],"type":"string"}},"required":["facet","outcome","claim","figure","evidence"],"type":"object"},"type":"array"},"figure":{"properties":{"accounting":{"type":"boolean"},"comparator":{"enum":["gte"],"type":"string"},"index":{"type":"integer"},"magnitude":{"type":"number"},"raw":{"type":"string"},"scale":{"type":"number"},"sign":{"enum":[-1,1],"type":"integer"},"unit":{"nullable":true,"type":"string"},"unitClass":{"enum":["percent","percentage_point","basis_point","currency","none"],"type":"string"},"value":{"type":"number"}},"type":"object"},"source":{"properties":{"representation_id":{"type":"string"},"source_unit_id":{"type":"string"},"source_version_id":{"type":"string"}},"type":"object"}},"required":["figure","source","binding"],"type":"object"},"type":"array"},"outcome":{"enum":["supported","contradicted","escalate","not_applicable"],"type":"string"},"reason":{"type":"string"},"scope":{"enum":["arithmetic_only"],"type":"string"}},"required":["outcome","arithmetic","comparability","reason","scope","limitation","operands"],"type":"object"}}},"description":"Arithmetic assessment over owned retained source figures, never full semantic verification."}},"security":[{"x-api-key":[]},{"bearer":[]}],"tags":["Retained sources"],"summary":"Check arithmetic against one or two retained figures"}},"/api/v1/upload/url":{"post":{"description":"Fetches the file server-side and stores it exactly like a multipart upload, returning asset_id and source_version_id for review and extraction.\n\nThe URL must be public HTTPS. Every redirect hop is re-checked; private, loopback, link-local, metadata, multicast and reserved addresses (IPv4 and IPv6) are refused, no caller credentials or headers are forwarded, the body is capped at 100 MB while streaming and the fetch times out after 30 s. The bytes must be one of: PDF, PNG, JPEG, WebP, DOCX, PPTX, XLSX, XLSM, XLSB, XLS, ODS, CSV, TSV, TXT, MD.\n\n**Cost: 0 credits.** Uploading is free and needs no credit balance; `usage.credits` is 0.","operationId":"ApiV1Controller_uploadFromUrl","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponseDto"}}},"description":"File fetched and stored"},"400":{"description":"URL not allowed (non-https, private address, credentials, bad redirect)"},"413":{"description":"File larger than 100 MB"},"415":{"description":"Bytes are not a supported format"},"422":{"description":"URL returned a non-2xx status or an empty body"},"504":{"description":"Fetch timed out"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Upload a file from a public HTTPS URL","tags":["Upload"]}},"/api/v1/files/{asset_id}":{"delete":{"description":"Permanently deletes a file you uploaded and everything derived from it: the stored bytes, extracted text, pages and units, embeddings, search index entries and the cached read. Free. Verification results and document reviews that used the file stay until you delete them. Repeating the call after a 503 finishes the deletion.","operationId":"DataDeletionController_deleteFile","parameters":[{"description":"The asset_id returned by POST /upload","in":"path","name":"asset_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeletedDto"}}},"description":""},"404":{"description":"No file with this asset_id in your account"},"503":{"description":"Part of the deletion failed after retries; repeat the request to finish it"}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Delete an uploaded file","tags":["Upload"]}},"/api/v1/citations/delete":{"post":{"description":"Deletes up to 100 verification results. Free.","operationId":"DataDeletionController_deleteCitations","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteDto"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeletedDto"}}},"description":""}},"security":[{"x-api-key":[]},{"bearer":[]}],"summary":"Delete verification results in bulk","tags":["Saved citations"]}}},"servers":[{"description":"Production","url":"https://api.webcite.co"}],"tags":[{"name":"Upload","description":"Store a file once and get an asset_id for extraction, figures or review."},{"name":"Parse documents","description":"Convert PDFs, scans, images, spreadsheets and office files to Markdown with page and sheet locations, split them into anchored chunks, classify them and ask numeric questions of them."},{"name":"Verify claims","description":"Check one factual claim against web sources and get citations, a stance for each source and a verdict."},{"name":"Check quotes","description":"Check that quotes appear in the sources you give, and open a citation at its quoted passage."},{"name":"Search sources","description":"Find sources for a query, without a stance or verdict."},{"name":"Saved citations","description":"Read your past verification results."},{"name":"Figures and conflicts","description":"Extract financial figures with units, periods and locations, recompute totals and flag figures that conflict."},{"name":"Retained sources","description":"Register, publish and read immutable source representations and units, and check arithmetic against them."}],"externalDocs":{"description":"Webcite API documentation","url":"https://webcite.co/api-docs"},"security":[{"x-api-key":[]}]}