{"components":{"schemas":{"AgentCreateRequest":{"properties":{"description":{"title":"Description","type":"string"},"instructions":{"title":"Instructions","type":"string"},"name":{"title":"Name","type":"string"},"tool_names":{"items":{"type":"string"},"title":"Tool Names","type":"array"}},"required":["name","description","instructions"],"title":"AgentCreateRequest","type":"object"},"AgentCreateResponse":{"properties":{"agent_id":{"title":"Agent Id","type":"string"},"created_at":{"title":"Created At","type":"number"},"description":{"title":"Description","type":"string"},"instructions":{"title":"Instructions","type":"string"},"name":{"title":"Name","type":"string"},"tools":{"items":{"$ref":"#/components/schemas/ToolDefinition"},"title":"Tools","type":"array"}},"required":["agent_id","name","description","instructions","created_at"],"title":"AgentCreateResponse","type":"object"},"AgentToolsResponse":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/ToolDefinition"},"title":"Tools","type":"array"}},"title":"AgentToolsResponse","type":"object"},"AskRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"include_grounding":{"default":true,"title":"Include Grounding","type":"boolean"},"input":{"anyOf":[{"$ref":"#/components/schemas/InputSource"},{"type":"null"}]},"inputs":{"items":{"$ref":"#/components/schemas/InputSource"},"title":"Inputs","type":"array"},"query":{"title":"Query","type":"string"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Reusable session returned by a prior document-grounded Ask response. When provided with the same ordered inputs, Docspeed reuses prepared parsing and indexing. Valid reusable Ask sessions use the generated session_id_ prefix.","title":"Session Id"}},"required":["query"],"title":"AskRequest","type":"object"},"AskResponse":{"properties":{"answer":{"title":"Answer","type":"string"},"citations":{"items":{"$ref":"#/components/schemas/ChatCitation"},"title":"Citations","type":"array"},"doc_ids":{"items":{"type":"string"},"title":"Doc Ids","type":"array"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Reusable session for follow-up Ask requests over the same ordered inputs. Generated values use the session_id_ prefix.","title":"Session Id"}},"required":["answer"],"title":"AskResponse","type":"object"},"Body_upload_public_files_api_v1_upload_post":{"properties":{"files":{"items":{"format":"binary","type":"string"},"title":"Files","type":"array"}},"required":["files"],"title":"Body_upload_public_files_api_v1_upload_post","type":"object"},"ChartAxes":{"properties":{"x_label":{"default":"","title":"X Label","type":"string"},"y_label":{"default":"","title":"Y Label","type":"string"}},"title":"ChartAxes","type":"object"},"ChartDescribeRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"input":{"$ref":"#/components/schemas/InputSource"}},"required":["input"],"title":"ChartDescribeRequest","type":"object"},"ChartDescribeResponse":{"properties":{"engine":{"default":"chart_codegen","enum":["chart_codegen","parse_fallback"],"title":"Engine","type":"string"},"grounding_regions":{"items":{"$ref":"#/components/schemas/GroundingRegion"},"title":"Grounding Regions","type":"array"},"items":{"items":{"$ref":"#/components/schemas/ChartItem"},"title":"Items","type":"array"},"pages":{"default":0,"title":"Pages","type":"integer"}},"title":"ChartDescribeResponse","type":"object"},"ChartItem":{"properties":{"axes":{"$ref":"#/components/schemas/ChartAxes"},"bbox":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Bbox"},"bbox_ids":{"items":{"type":"string"},"title":"Bbox Ids","type":"array"},"confidence":{"default":0.0,"title":"Confidence","type":"number"},"insights":{"items":{"type":"string"},"title":"Insights","type":"array"},"item_id":{"title":"Item Id","type":"string"},"kind":{"default":"figure","enum":["chart","figure","diagram","flowchart","engineering_diagram"],"title":"Kind","type":"string"},"mermaid":{"default":"","title":"Mermaid","type":"string"},"page_index":{"title":"Page Index","type":"integer"},"region_ids":{"items":{"type":"string"},"title":"Region Ids","type":"array"},"series":{"items":{"$ref":"#/components/schemas/ChartSeries"},"title":"Series","type":"array"},"summary":{"default":"","title":"Summary","type":"string"},"title":{"default":"","title":"Title","type":"string"}},"required":["item_id","page_index"],"title":"ChartItem","type":"object"},"ChartSeries":{"properties":{"name":{"default":"","title":"Name","type":"string"},"points":{"items":{"$ref":"#/components/schemas/ChartSeriesPoint"},"title":"Points","type":"array"}},"title":"ChartSeries","type":"object"},"ChartSeriesPoint":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"x":{"anyOf":[{},{"type":"null"}],"title":"X"},"y":{"anyOf":[{},{"type":"null"}],"title":"Y"}},"title":"ChartSeriesPoint","type":"object"},"ChatCitation":{"properties":{"doc_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Id"},"regions":{"items":{"$ref":"#/components/schemas/ChatCitationRegion"},"title":"Regions","type":"array"}},"title":"ChatCitation","type":"object"},"ChatCitationBBox":{"properties":{"height":{"title":"Height","type":"number"},"width":{"title":"Width","type":"number"},"x":{"title":"X","type":"number"},"y":{"title":"Y","type":"number"}},"required":["x","y","width","height"],"title":"ChatCitationBBox","type":"object"},"ChatCitationRegion":{"properties":{"bbox":{"$ref":"#/components/schemas/ChatCitationBBox"},"page_height":{"title":"Page Height","type":"number"},"page_index":{"title":"Page Index","type":"integer"},"page_width":{"title":"Page Width","type":"number"}},"required":["page_index","bbox","page_width","page_height"],"title":"ChatCitationRegion","type":"object"},"ClassDefinition":{"properties":{"description":{"title":"Description","type":"string"},"label":{"title":"Label","type":"string"}},"required":["label","description"],"title":"ClassDefinition","type":"object"},"ClassificationDebug":{"properties":{"sampled_page_classifications":{"items":{"$ref":"#/components/schemas/ClassificationPage"},"title":"Sampled Page Classifications","type":"array"}},"title":"ClassificationDebug","type":"object"},"ClassificationMetadata":{"properties":{"budget_limited":{"default":false,"title":"Budget Limited","type":"boolean"},"class_count":{"default":0,"title":"Class Count","type":"integer"},"classification_scope":{"default":"document","enum":["document","page"],"title":"Classification Scope","type":"string"},"processed_pages":{"default":1,"title":"Processed Pages","type":"integer"},"sampled_page_indexes":{"items":{"type":"integer"},"title":"Sampled Page Indexes","type":"array"},"total_pages":{"default":1,"title":"Total Pages","type":"integer"},"verbosity":{"default":"none","enum":["none","debug"],"title":"Verbosity","type":"string"}},"title":"ClassificationMetadata","type":"object"},"ClassificationPage":{"properties":{"components_present":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Components Present"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"doc_class":{"title":"Doc Class","type":"string"},"document_identity_hints":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Document Identity Hints"},"page_index":{"title":"Page Index","type":"integer"},"page_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Role"}},"required":["page_index","doc_class"],"title":"ClassificationPage","type":"object"},"ClassificationResult":{"properties":{"classification_metadata":{"$ref":"#/components/schemas/ClassificationMetadata"},"debug":{"anyOf":[{"$ref":"#/components/schemas/ClassificationDebug"},{"type":"null"}]},"doc_class":{"title":"Doc Class","type":"string"},"document_identity_hints":{"additionalProperties":true,"title":"Document Identity Hints","type":"object"},"input_type":{"default":"auto","enum":["markdown","image","pdf","text","auto"],"title":"Input Type","type":"string"},"page_classifications":{"items":{"$ref":"#/components/schemas/ClassificationPage"},"title":"Page Classifications","type":"array"},"page_count":{"default":1,"title":"Page Count","type":"integer"},"page_dimensions":{"items":{"$ref":"#/components/schemas/PageDimension"},"title":"Page Dimensions","type":"array"}},"required":["doc_class"],"title":"ClassificationResult","type":"object"},"ClassifyRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"class_definitions":{"items":{"$ref":"#/components/schemas/ClassDefinition"},"title":"Class Definitions","type":"array"},"classification_scope":{"default":"document","enum":["document","page"],"title":"Classification Scope","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"input":{"$ref":"#/components/schemas/InputSource"},"input_type":{"default":"auto","enum":["markdown","image","pdf","text","auto"],"title":"Input Type","type":"string"},"verbosity":{"default":"none","enum":["none","debug"],"title":"Verbosity","type":"string"}},"required":["input"],"title":"ClassifyRequest","type":"object"},"EquationExtractRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"boundary_source":{"default":"detector","enum":["detector","layout","none"],"title":"Boundary Source","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"input":{"$ref":"#/components/schemas/InputSource"}},"required":["input"],"title":"EquationExtractRequest","type":"object"},"EquationExtractResponse":{"properties":{"engine":{"default":"equation_codegen","enum":["equation_codegen","parse_fallback"],"title":"Engine","type":"string"},"equations":{"items":{"$ref":"#/components/schemas/EquationResult"},"title":"Equations","type":"array"},"grounding_regions":{"items":{"$ref":"#/components/schemas/GroundingRegion"},"title":"Grounding Regions","type":"array"},"pages":{"default":0,"title":"Pages","type":"integer"}},"title":"EquationExtractResponse","type":"object"},"EquationResult":{"properties":{"bbox":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Bbox"},"bbox_ids":{"items":{"type":"string"},"title":"Bbox Ids","type":"array"},"confidence":{"default":0.0,"title":"Confidence","type":"number"},"display_mode":{"default":"block","enum":["inline","block"],"title":"Display Mode","type":"string"},"equation_id":{"title":"Equation Id","type":"string"},"latex":{"default":"","title":"Latex","type":"string"},"page_index":{"title":"Page Index","type":"integer"},"region_ids":{"items":{"type":"string"},"title":"Region Ids","type":"array"},"source_text":{"default":"","title":"Source Text","type":"string"}},"required":["equation_id","page_index"],"title":"EquationResult","type":"object"},"ExtractRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"grounding":{"anyOf":[{"type":"boolean"},{"enum":["none","regions","cell"],"type":"string"}],"default":true,"title":"Grounding"},"input":{"$ref":"#/components/schemas/InputSource"},"schema":{"anyOf":[{"$ref":"#/components/schemas/SchemaV2Payload-Input"},{"type":"null"}]},"schema_file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema File Id"}},"required":["input"],"title":"ExtractRequest","type":"object"},"ExtractionResult":{"properties":{"grounding_mode":{"anyOf":[{"type":"boolean"},{"type":"string"}],"title":"Grounding Mode"},"page_count":{"default":1,"title":"Page Count","type":"integer"},"result":{"additionalProperties":true,"title":"Result","type":"object"},"schema":{"$ref":"#/components/schemas/SchemaV2Payload-Output"}},"required":["schema","result","grounding_mode"],"title":"ExtractionResult","type":"object"},"FileRef":{"properties":{"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"created_at":{"title":"Created At","type":"number"},"file_id":{"title":"File Id","type":"string"},"filename":{"title":"Filename","type":"string"},"page_count":{"default":1,"title":"Page Count","type":"integer"},"size_bytes":{"title":"Size Bytes","type":"integer"}},"required":["file_id","filename","size_bytes","created_at"],"title":"FileRef","type":"object"},"GroundingRegion":{"properties":{"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"page_index":{"title":"Page Index","type":"integer"},"region_id":{"title":"Region Id","type":"string"},"shape":{"additionalProperties":true,"title":"Shape","type":"object"}},"required":["region_id","page_index","shape"],"title":"GroundingRegion","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"InputSource":{"properties":{"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"image_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Base64"},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown"},"pdf_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Base64"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"title":"InputSource","type":"object"},"JobRef":{"properties":{"created_at":{"title":"Created At","type":"number"},"execution_mode":{"enum":["async","sync"],"title":"Execution Mode","type":"string"},"job_id":{"title":"Job Id","type":"string"},"operation":{"title":"Operation","type":"string"},"status":{"enum":["pending","processing","completed","failed"],"title":"Status","type":"string"},"updated_at":{"title":"Updated At","type":"number"}},"required":["job_id","operation","status","execution_mode","created_at","updated_at"],"title":"JobRef","type":"object"},"LayoutComponent":{"properties":{"bbox":{"items":{"type":"integer"},"title":"Bbox","type":"array"},"id":{"title":"Id","type":"string"},"reading_order_rank":{"title":"Reading Order Rank","type":"integer"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"type":{"title":"Type","type":"string"}},"required":["id","reading_order_rank","type","bbox"],"title":"LayoutComponent","type":"object"},"LayoutPage":{"properties":{"components":{"items":{"$ref":"#/components/schemas/LayoutComponent"},"title":"Components","type":"array"},"height":{"title":"Height","type":"integer"},"image_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Ref"},"ocr_median_line_height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ocr Median Line Height"},"page_index":{"title":"Page Index","type":"integer"},"width":{"title":"Width","type":"integer"}},"required":["page_index","width","height"],"title":"LayoutPage","type":"object"},"LayoutRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"input":{"$ref":"#/components/schemas/InputSource"},"mode":{"default":"non_overlapping","enum":["nested","non_overlapping"],"title":"Mode","type":"string"}},"required":["input"],"title":"LayoutRequest","type":"object"},"LayoutResponse":{"properties":{"mode":{"enum":["nested","non_overlapping"],"title":"Mode","type":"string"},"pages":{"items":{"$ref":"#/components/schemas/LayoutPage"},"title":"Pages","type":"array"}},"required":["mode"],"title":"LayoutResponse","type":"object"},"OcrLine":{"properties":{"bbox":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Bbox"},"bbox_id":{"title":"Bbox Id","type":"string"},"page_index":{"title":"Page Index","type":"integer"},"polygon":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Polygon"},"text":{"title":"Text","type":"string"}},"required":["bbox_id","text","page_index"],"title":"OcrLine","type":"object"},"OcrPage":{"properties":{"height":{"title":"Height","type":"integer"},"lines":{"items":{"$ref":"#/components/schemas/OcrLine"},"title":"Lines","type":"array"},"page_index":{"title":"Page Index","type":"integer"},"text":{"title":"Text","type":"string"},"width":{"title":"Width","type":"integer"}},"required":["page_index","width","height","text"],"title":"OcrPage","type":"object"},"OcrRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"input":{"$ref":"#/components/schemas/InputSource"},"language":{"default":"auto","enum":["auto","global"],"title":"Language","type":"string"},"mode":{"default":"regular","enum":["regular","classic","agentic"],"title":"Mode","type":"string"}},"required":["input"],"title":"OcrRequest","type":"object"},"OcrResponse":{"properties":{"language":{"enum":["auto","global"],"title":"Language","type":"string"},"mode":{"enum":["regular","classic"],"title":"Mode","type":"string"},"pages":{"items":{"$ref":"#/components/schemas/OcrPage"},"title":"Pages","type":"array"}},"required":["language","mode"],"title":"OcrResponse","type":"object"},"PageDimension":{"properties":{"height":{"title":"Height","type":"integer"},"page_index":{"title":"Page Index","type":"integer"},"width":{"title":"Width","type":"integer"}},"required":["page_index","width","height"],"title":"PageDimension","type":"object"},"ParseChunk":{"properties":{"bbox":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Bbox"},"cells":{"items":{"additionalProperties":true,"type":"object"},"title":"Cells","type":"array"},"chunk_id":{"title":"Chunk Id","type":"string"},"display_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Label"},"grid_col_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Grid Col Count"},"grid_row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Grid Row Count"},"header_row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Header Row Count"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"mapping_quality":{"anyOf":[{"enum":["exact","heuristic","fallback"],"type":"string"},{"type":"null"}],"title":"Mapping Quality"},"markdown":{"title":"Markdown","type":"string"},"page_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Index"},"region_ids":{"items":{"type":"string"},"title":"Region Ids","type":"array"},"render_grid":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Render Grid"},"table_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Html"},"type":{"default":"text","title":"Type","type":"string"}},"required":["chunk_id","markdown"],"title":"ParseChunk","type":"object"},"ParsePage":{"properties":{"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"image_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Ref"},"ocr_median_line_height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ocr Median Line Height"},"page_index":{"title":"Page Index","type":"integer"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"}},"required":["page_index"],"title":"ParsePage","type":"object"},"ParseRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"grounding":{"default":"regions","enum":["none","regions","ocr_lines"],"title":"Grounding","type":"string"},"include_artifacts":{"default":false,"title":"Include Artifacts","type":"boolean"},"input":{"$ref":"#/components/schemas/InputSource"},"profile":{"default":"grounded","enum":["grounded","fast"],"title":"Profile","type":"string"}},"required":["input"],"title":"ParseRequest","type":"object"},"ParseResponse":{"properties":{"chunks":{"items":{"$ref":"#/components/schemas/ParseChunk"},"title":"Chunks","type":"array"},"doc_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Id"},"markdown":{"title":"Markdown","type":"string"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"pages":{"items":{"$ref":"#/components/schemas/ParsePage"},"title":"Pages","type":"array"},"regions":{"items":{"$ref":"#/components/schemas/GroundingRegion"},"title":"Regions","type":"array"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}},"required":["markdown"],"title":"ParseResponse","type":"object"},"SchemaAutoRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"file_id":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"File Id"},"inputs":{"items":{"$ref":"#/components/schemas/InputSource"},"title":"Inputs","type":"array"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"title":"SchemaAutoRequest","type":"object"},"SchemaV2Field":{"properties":{"array":{"default":false,"title":"Array","type":"boolean"},"description":{"title":"Description","type":"string"},"key":{"title":"Key","type":"string"},"type":{"default":"string","enum":["string","number","integer","boolean"],"title":"Type","type":"string"}},"required":["key","description"],"title":"SchemaV2Field","type":"object"},"SchemaV2Payload-Input":{"properties":{"doc_class":{"title":"Doc Class","type":"string"},"fields":{"items":{"$ref":"#/components/schemas/SchemaV2Field"},"title":"Fields","type":"array"},"tables":{"items":{"$ref":"#/components/schemas/SchemaV2Table"},"title":"Tables","type":"array"}},"required":["doc_class"],"title":"SchemaV2Payload","type":"object"},"SchemaV2Payload-Output":{"properties":{"doc_class":{"title":"Doc Class","type":"string"},"fields":{"items":{"$ref":"#/components/schemas/SchemaV2Field"},"title":"Fields","type":"array"},"tables":{"items":{"$ref":"#/components/schemas/SchemaV2Table"},"title":"Tables","type":"array"}},"required":["doc_class"],"title":"SchemaV2Payload","type":"object"},"SchemaV2Table":{"properties":{"description":{"default":"","title":"Description","type":"string"},"fields":{"items":{"$ref":"#/components/schemas/SchemaV2Field"},"title":"Fields","type":"array"},"key":{"title":"Key","type":"string"}},"required":["key"],"title":"SchemaV2Table","type":"object"},"SplitPlan":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/SplitSegment"},"title":"Documents","type":"array"},"page_summaries":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Page Summaries"},"split_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Split Metadata"},"total_pages":{"title":"Total Pages","type":"integer"}},"required":["total_pages","documents"],"title":"SplitPlan","type":"object"},"SplitRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"input":{"$ref":"#/components/schemas/InputSource"},"verbosity":{"default":"none","enum":["none","debug"],"title":"Verbosity","type":"string"}},"required":["input"],"title":"SplitRequest","type":"object"},"SplitSegment":{"properties":{"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"doc_class":{"title":"Doc Class","type":"string"},"end_page":{"title":"End Page","type":"integer"},"file_ref":{"anyOf":[{"$ref":"#/components/schemas/FileRef"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"start_page":{"title":"Start Page","type":"integer"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"required":["start_page","end_page","doc_class"],"title":"SplitSegment","type":"object"},"SynthesizeInput":{"properties":{"file_id":{"title":"File Id","type":"string"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"required":["file_id"],"title":"SynthesizeInput","type":"object"},"SynthesizePage":{"properties":{"height":{"title":"Height","type":"integer"},"image_ref":{"title":"Image Ref","type":"string"},"page_index":{"title":"Page Index","type":"integer"},"width":{"title":"Width","type":"integer"}},"required":["page_index","width","height","image_ref"],"title":"SynthesizePage","type":"object"},"SynthesizeRequest":{"additionalProperties":false,"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"execution_mode":{"default":"sync","enum":["async","sync"],"title":"Execution Mode","type":"string"},"inputs":{"items":{"$ref":"#/components/schemas/SynthesizeInput"},"title":"Inputs","type":"array"},"prompt":{"title":"Prompt","type":"string"}},"required":["prompt"],"title":"SynthesizeRequest","type":"object"},"SynthesizeResponse":{"properties":{"file":{"$ref":"#/components/schemas/FileRef"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"pages":{"items":{"$ref":"#/components/schemas/SynthesizePage"},"title":"Pages","type":"array"},"prompt":{"title":"Prompt","type":"string"},"source_file_ids":{"items":{"type":"string"},"title":"Source File Ids","type":"array"},"task":{"enum":["edit_document","generate_po","generate_related_document"],"title":"Task","type":"string"}},"required":["file","task","prompt"],"title":"SynthesizeResponse","type":"object"},"SynthesizeSetDocument":{"properties":{"depends_on":{"items":{"type":"string"},"title":"Depends On","type":"array"},"document_key":{"title":"Document Key","type":"string"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"file":{"$ref":"#/components/schemas/FileRef"},"input_file_ids":{"items":{"type":"string"},"title":"Input File Ids","type":"array"},"matching_against":{"items":{"type":"string"},"title":"Matching Against","type":"array"},"matching_policy":{"additionalProperties":true,"title":"Matching Policy","type":"object"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"pages":{"items":{"$ref":"#/components/schemas/SynthesizePage"},"title":"Pages","type":"array"},"prompt":{"title":"Prompt","type":"string"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"source_file_ids":{"items":{"type":"string"},"title":"Source File Ids","type":"array"},"task":{"enum":["edit_document","generate_po","generate_related_document"],"title":"Task","type":"string"}},"required":["document_key","file","task","prompt"],"title":"SynthesizeSetDocument","type":"object"},"SynthesizeSetResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/SynthesizeSetDocument"},"title":"Documents","type":"array"},"metadata":{"additionalProperties":true,"title":"Metadata","type":"object"},"prompt":{"title":"Prompt","type":"string"},"source_file_ids":{"items":{"type":"string"},"title":"Source File Ids","type":"array"}},"required":["prompt"],"title":"SynthesizeSetResponse","type":"object"},"TableCell":{"properties":{"bbox":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Bbox"},"bbox_ids":{"items":{"type":"string"},"title":"Bbox Ids","type":"array"},"cell_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cell Id"},"col":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Col"},"col_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Col Index"},"colspan":{"default":1,"title":"Colspan","type":"integer"},"effective_region_ids":{"items":{"type":"string"},"title":"Effective Region Ids","type":"array"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html"},"is_header":{"default":false,"title":"Is Header","type":"boolean"},"page_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Index"},"region_ids":{"items":{"type":"string"},"title":"Region Ids","type":"array"},"row":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row"},"row_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Index"},"rowspan":{"default":1,"title":"Rowspan","type":"integer"},"source_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Order"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"value":{"title":"Value","type":"string"}},"required":["value"],"title":"TableCell","type":"object"},"TableExtractRequest":{"properties":{"billing_profile":{"default":"standard","enum":["standard","engineering_drawing"],"title":"Billing Profile","type":"string"},"boundary_source":{"default":"detector","enum":["detector","layout","none"],"title":"Boundary Source","type":"string"},"detection_policy":{"default":"strict","enum":["strict","liberal"],"title":"Detection Policy","type":"string"},"execution_mode":{"default":"async","enum":["async","sync"],"title":"Execution Mode","type":"string"},"grounding":{"default":"cell","enum":["none","table","cell"],"title":"Grounding","type":"string"},"input":{"$ref":"#/components/schemas/InputSource"}},"required":["input"],"title":"TableExtractRequest","type":"object"},"TableExtractResponse":{"properties":{"grounding":{"enum":["none","table","cell"],"title":"Grounding","type":"string"},"grounding_regions":{"anyOf":[{"items":{"$ref":"#/components/schemas/GroundingRegion"},"type":"array"},{"type":"null"}],"title":"Grounding Regions"},"tables":{"items":{"$ref":"#/components/schemas/TableResult"},"title":"Tables","type":"array"}},"required":["grounding"],"title":"TableExtractResponse","type":"object"},"TableRenderGrid":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/TableRenderGridRow"},"title":"Rows","type":"array"}},"title":"TableRenderGrid","type":"object"},"TableRenderGridCell":{"properties":{"cell_id":{"title":"Cell Id","type":"string"},"col_index":{"title":"Col Index","type":"integer"},"colspan":{"default":1,"title":"Colspan","type":"integer"},"effective_region_ids":{"items":{"type":"string"},"title":"Effective Region Ids","type":"array"},"is_header":{"default":false,"title":"Is Header","type":"boolean"},"region_ids":{"items":{"type":"string"},"title":"Region Ids","type":"array"},"row_index":{"title":"Row Index","type":"integer"},"rowspan":{"default":1,"title":"Rowspan","type":"integer"},"source_order":{"title":"Source Order","type":"integer"},"value":{"default":"","title":"Value","type":"string"}},"required":["cell_id","source_order","row_index","col_index"],"title":"TableRenderGridCell","type":"object"},"TableRenderGridRow":{"properties":{"cells":{"items":{"$ref":"#/components/schemas/TableRenderGridCell"},"title":"Cells","type":"array"},"is_header":{"default":false,"title":"Is Header","type":"boolean"},"row_index":{"title":"Row Index","type":"integer"}},"required":["row_index"],"title":"TableRenderGridRow","type":"object"},"TableResult":{"properties":{"bbox":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Bbox"},"cells":{"items":{"$ref":"#/components/schemas/TableCell"},"title":"Cells","type":"array"},"grid_col_count":{"default":0,"title":"Grid Col Count","type":"integer"},"grid_row_count":{"default":0,"title":"Grid Row Count","type":"integer"},"header_row_count":{"default":0,"title":"Header Row Count","type":"integer"},"html":{"title":"Html","type":"string"},"mapping_quality":{"default":"fallback","enum":["exact","heuristic","fallback"],"title":"Mapping Quality","type":"string"},"page_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Index"},"region_ids":{"items":{"type":"string"},"title":"Region Ids","type":"array"},"region_type":{"default":"table_body","title":"Region Type","type":"string"},"render_grid":{"$ref":"#/components/schemas/TableRenderGrid"},"source_page_indexes":{"items":{"type":"integer"},"title":"Source Page Indexes","type":"array"}},"required":["html"],"title":"TableResult","type":"object"},"ToolDefinition":{"properties":{"description":{"title":"Description","type":"string"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"mcp_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Name"},"name":{"title":"Name","type":"string"}},"required":["name","description"],"title":"ToolDefinition","type":"object"},"UploadFilesResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/FileRef"},"title":"Files","type":"array"}},"title":"UploadFilesResponse","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}},"securitySchemes":{"bearerAuth":{"bearerFormat":"API Key","description":"Send your hosted Docspeed API key as `Authorization: Bearer <DOCSPEED_API_KEY>` on every customer API request.","scheme":"bearer","type":"http"}}},"externalDocs":{"description":"Docspeed developer portal","url":"https://api.docspeed.ai/docs"},"info":{"contact":{"email":"support@docspeed.ai","name":"Docspeed Support"},"description":"Public `/v1/*` customer API for the hosted Docspeed document intelligence service.","title":"Docspeed Customer API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/v1/ask":{"post":{"description":"Answer questions against a single document or document set with source-linked citations.","operationId":"ask_endpoint_api_v1_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Ask grounded questions on one or more documents","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every Ask request.\n\n## Execution modes\nUse `sync` for interactive Q&A and `async` when Ask should run as a background job.\n\n## Request notes\nPass one or more documents in `inputs`, the user question in `query`, and keep `include_grounding` enabled when reviewers need citations. Document-backed Ask requests first run full-document Parse for every selected document, then index and retrieve over the parsed markdown and regions. When multiple documents are supplied, Docspeed submits those full-document Parse calls in parallel. For follow-up questions, pass the prior response `session_id` with the same ordered `inputs` to reuse prepared parsing and indexing. Generated Ask sessions use the `session_id_...` prefix.\n\n## Response notes\nResponses include the answer text, `doc_ids`, an optional reusable `session_id`, and grounded citations. Each citation maps back to the submitted file id and exposes drawable `regions[]` with `page_index` plus bbox coordinates (`x`, `y`, `width`, `height`); clients do not need internal layout region ids to render grounding.","metadata":{"title":"Ask grounded questions on one or more documents"}}}},"/api/v1/parse":{"post":{"description":"Convert PDFs and images into clean markdown chunks with drawable page regions for downstream extraction and review.","operationId":"parse_endpoint_api_v1_parse_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Parse documents into grounded structure","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every parse request.\n\n## Execution modes\nSet `execution_mode` to `sync` for inline JSON or `async` to receive a `job_id` and poll the jobs endpoints.\n\n## Request notes\nPass either a previously uploaded `file_id` or inline content via the `input` object. Use `profile: grounded` for richer support-aware parse output or `profile: fast` when agents need a faster hosted ingest path. Parse responses always expose region-level evidence through `regions[]` and `chunks[].region_ids`.\n\n## Response notes\nSync mode returns only `doc_id`, `version`, `markdown`, `pages`, `regions`, `chunks`, and customer-meaningful `metadata`. `chunks[]` are the canonical parsed blocks. `regions[]` are the only drawable geometry source, and `chunk.region_ids` maps each block to the page regions. The response does not include OCR implementation metadata, line ids, spans, artifacts, split shims, or top-level grounding objects.","metadata":{"title":"Parse documents into grounded structure"}}}},"/api/v1/synthesize":{"post":{"description":"Create or edit synthetic PDFs from uploaded source documents, local/web layout references, and explicit user instructions.","operationId":"synthesize_endpoint_api_v1_synthesize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Generate synthetic business documents","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every synthesize request.\n\n## Execution modes\nSynthesize is sync-only in this release.\n\n## Request notes\nFor document edits, pass selected documents in `inputs` and describe the exact values to change. For source-to-target generation, pass source documents in `inputs` and name the target document type, such as purchase order, receipt, rate card, freight invoice, or bill of lading. For prompt-only generation, omit `inputs` and name the target document type in `prompt`. Docspeed plans the operation from the prompt and selected-file presence; client-provided source roles are optional hints, not routing controls, and `task` is not accepted. Target-layout references are resolved from the DUS seed index first, then SerpAPI when configured; the repo sample catalog is only an explicit unit-test fixture. Generated financial documents are audited for internal arithmetic and tax consistency before they are returned.\n\n## Response notes\nThe response returns a generated reusable file reference plus rendered page metadata so the generated PDF can be parsed, extracted, or reviewed by other Docspeed endpoints.","metadata":{"title":"Generate synthetic business documents"}}}},"/api/v1/synthesize/one":{"post":{"description":"Create or edit one synthetic PDF from uploaded source documents, local/web layout references, and explicit user instructions.","operationId":"synthesize_endpoint_api_v1_synthesize_one_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Synthesize One","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every Synthesize One request.\n\n## Execution modes\nSynthesize One is sync-only in this release.\n\n## Request notes\nUse this endpoint for single-output document generation or edits. For document edits, pass selected documents in `inputs` and describe the exact values to change. For source-to-target generation, pass source documents in `inputs` and name the target document type, such as purchase order, receipt, rate card, freight invoice, or bill of lading. For prompt-only generation, omit `inputs` and name the target document type in `prompt`. Docspeed plans the operation from the prompt and selected-file presence; client-provided source roles are optional hints, not routing controls, and `task` is not accepted.\n\n## Response notes\nThe response returns one generated reusable file reference plus rendered page metadata so the generated PDF can be parsed, extracted, or reviewed by other Docspeed endpoints.","metadata":{"title":"Synthesize One"}}}},"/api/v1/synthesize/set":{"post":{"description":"Plan and generate reconciliation-oriented synthetic document sets from selected references and matching instructions.","operationId":"synthesize_set_endpoint_api_v1_synthesize_set_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SynthesizeSetResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Synthesize Set","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every Synthesize Set request.\n\n## Execution modes\nSynthesize Set is sync-only in this release.\n\n## Request notes\nUse this endpoint for generic reconciliation test-data workflows. Pass source documents in `inputs` when available and describe the requested document set, matching expectations, and any intentional mismatch directly in `prompt`. Docspeed sends the raw prompt and selected source document images to a Responses API planner, which must produce the full shared set context and ledger before generation: parties, identifiers, dates, line items, quantities, prices, taxes, totals, document-specific values, matching rules, and mismatch instructions. The service then runs independent Synthesize One generations in parallel from that shared plan; dependent calls wait only when a generated member genuinely needs a selected or previously generated document image as evidence.\n\n## Response notes\nThe response returns `documents[]`, where each generated set member includes its reusable file reference, rendered page metadata, source/dependency file IDs, and matching-policy metadata for comparison workflows.","metadata":{"title":"Synthesize Set"}}}},"/api/v1/upload":{"post":{"description":"Upload a PDF or document image once, then reuse the returned `file_id` across parse, extract, schema builder, split, and chat requests.","operationId":"upload_public_files_api_v1_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_public_files_api_v1_upload_post"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFilesResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Upload a reusable file","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with the multipart upload request.\n\n## Execution behavior\nThis endpoint is synchronous. A successful response returns a reusable `file_id` immediately.\n\n## Request notes\nUpload documents as multipart form data using repeated `files` fields. Supported production formats are PDF, PNG, JPEG/JPG, TIFF/TIF, WebP, BMP, and GIF. Multi-page TIFF files are treated as page-indexed documents. Word and Excel files are supported through beta APIs; write to support@docspeed.ai to use native DOCX/XLSX beta workflows. Store returned `file_id` values and pass them into downstream parse, extract, or ask endpoints.\n\n## Response notes\nThe response includes `files[]`, where each entry contains a stable file reference, original filename, content type, size, and creation timestamp.","metadata":{"title":"Upload a reusable file"}}}},"/v1/agents":{"post":{"description":"Persist an agent definition that can call customer-facing Docspeed tools.","operationId":"create_agent_endpoint_v1_agents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Create a public Docspeed agent","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every agent creation request.\n\n## Execution behavior\nThis endpoint is synchronous and returns the stored agent definition inline.\n\n## Request notes\nChoose a focused set of `tool_names` from `POST /v1/agents/tools` and provide instructions that describe how the agent should use them.\n\n## Response notes\nThe response confirms the created agent definition and the tool bindings that were persisted.","metadata":{"title":"Create a public Docspeed agent"}}}},"/v1/agents/tools":{"get":{"description":"Return the customer-facing Docspeed tool registry available to public agents.","operationId":"list_agent_tools_v1_agents_tools_get","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentToolsResponse"}}},"description":"Successful Response"}},"security":[{"bearerAuth":[]}],"summary":"List public agent tools","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every tools request.\n\n## Execution behavior\nThis endpoint is synchronous and returns the available tool definitions inline.\n\n## Request notes\nNo request body is required.\n\n## Response notes\nThe response lists the public tool names, descriptions, and endpoint mappings available for agent definitions.","metadata":{"title":"List public agent tools"}}}},"/v1/charts":{"post":{"description":"Summarize visual charts and diagrams while preserving source-linked page regions.","operationId":"charts_describe_endpoint_v1_charts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartDescribeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartDescribeResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Describe charts, figures, and diagrams","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every chart request.\n\n## Execution modes\nUse `sync` for immediate JSON output or `async` for queued visual workloads.\n\n## Request notes\nChart requests accept the same `input` shapes as parse and OCR.\n\n## Response notes\nResponses include summaries, extracted series data when available, and page/region provenance for the detected visual item.","metadata":{"title":"Describe charts, figures, and diagrams"}}}},"/v1/classify":{"post":{"description":"Classify markdown, PDFs, and images at the document or page level with optional debug detail.","operationId":"classify_endpoint_v1_classify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassificationResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Classify documents or pages","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every classify request.\n\n## Execution modes\nUse `sync` for inline routing results or `async` when classification is part of a larger queue.\n\n## Request notes\nSet `classification_scope` to `document` for one label per file or `page` for packet-routing workflows. Keep `verbosity: none` for production payloads.\n\n## Response notes\nThe response includes the predicted class and, when requested, page-level routing detail that downstream systems can use for automation.","metadata":{"title":"Classify documents or pages"}}}},"/v1/equations":{"post":{"description":"Detect and serialize equations from images and PDFs while preserving source-linked provenance.","operationId":"equations_extract_endpoint_v1_equations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquationExtractRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquationExtractResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Extract equations and formulae","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every equation request.\n\n## Execution modes\nUse `sync` for inline equation payloads or `async` for queued processing.\n\n## Request notes\nProvide either a `file_id` or inline content under `input`.\n\n## Response notes\nResponses include extracted LaTeX, confidence, and any available source grounding for each equation.","metadata":{"title":"Extract equations and formulae"}}}},"/v1/extract":{"post":{"description":"Execute schema-based extraction with grounded values and repeated-row support.","operationId":"extract_endpoint_v1_extract_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionResult"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Run grounded extraction against a schema","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every extraction request.\n\n## Execution modes\nUse `sync` for inline extraction JSON or `async` when extraction should run as a tracked job.\n\n## Request notes\nPass the document in `input`, the extraction contract in `schema`, and choose grounding based on the review experience you want to build.\n\n## Response notes\nResponses include extracted invoice-level fields, line-item structures, and grounding references for values and repeated rows.","metadata":{"title":"Run grounded extraction against a schema"}}}},"/v1/files/{file_id}":{"get":{"description":"Retrieve metadata for a previously uploaded file without re-uploading the payload.","operationId":"get_public_file_v1_files__file_id__get","parameters":[{"in":"path","name":"file_id","required":true,"schema":{"title":"File Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileRef"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Inspect uploaded file metadata","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` on every metadata lookup.\n\n## Execution behavior\nThis endpoint is synchronous and returns the file metadata inline.\n\n## Request notes\nUse the `file_id` returned from `POST /api/v1/upload`.\n\n## Response notes\nThe response confirms the filename, content type, size, and creation timestamp for the stored file.","metadata":{"title":"Inspect uploaded file metadata"}}}},"/v1/files/{file_id}/pages/{page_index}/image":{"get":{"description":"Retrieve a single rendered page image for visual review, debugging, and source-grounded UI workflows.","operationId":"get_public_file_page_image_v1_files__file_id__pages__page_index__image_get","parameters":[{"in":"path","name":"file_id","required":true,"schema":{"title":"File Id","type":"string"}},{"in":"path","name":"page_index","required":true,"schema":{"title":"Page Index","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Fetch a rendered page image","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with the page image request.\n\n## Execution behavior\nThis endpoint is synchronous and returns the rendered image bytes for the requested page.\n\n## Request notes\nUse the `file_id` from the upload response and a zero-based `page_index`.\n\n## Response notes\nA successful response returns the page image directly so your application can render or inspect the source page.","metadata":{"title":"Fetch a rendered page image"}}}},"/v1/jobs/{job_id}":{"get":{"description":"Inspect the status of an async parse, extraction, schema, split, or chat job.","operationId":"get_job_v1_jobs__job_id__get","parameters":[{"in":"path","name":"job_id","required":true,"schema":{"title":"Job Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRef"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Check async job status","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every jobs status request.\n\n## Execution behavior\nThis endpoint is synchronous and returns the current job metadata inline.\n\n## Request notes\nUse the `job_id` returned by any endpoint invoked with `execution_mode: async`.\n\n## Response notes\nThe response reports the operation, execution mode, status, and timestamps you need for polling.","metadata":{"title":"Check async job status"}}}},"/v1/jobs/{job_id}/result":{"get":{"description":"Retrieve the completed result payload for a previously queued async job.","operationId":"get_job_result_v1_jobs__job_id__result_get","parameters":[{"in":"path","name":"job_id","required":true,"schema":{"title":"Job Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Fetch an async job result","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every jobs result request.\n\n## Execution behavior\nThis endpoint is synchronous and returns the completed result once the job has succeeded.\n\n## Request notes\nPoll `GET /v1/jobs/{job_id}` until the job is `completed`, then fetch the final payload here.\n\n## Response notes\nThe response body matches the success payload of the original endpoint you queued.","metadata":{"title":"Fetch an async job result"}}}},"/v1/layout":{"post":{"description":"Return OCR-grounded, detector-assisted layout components in reading order.","operationId":"layout_endpoint_v1_layout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Detect layout regions","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every layout request.\n\n## Execution modes\nUse `execution_mode: sync` for inline region JSON or `async` for durable job tracking.\n\n## Request notes\nUse `mode: non_overlapping` for compact page-level layout components with explicit reading order.\n\n## Response notes\nResponses include page indexes and ordered layout components with stable ids, component types, bounding boxes, and scores.","metadata":{"title":"Detect layout regions"}}}},"/v1/ocr":{"post":{"description":"Extract OCR text plus stable line-level geometry from PDFs and images.","operationId":"ocr_endpoint_v1_ocr_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Run grounded OCR","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every OCR request.\n\n## Execution modes\nUse `sync` for inline OCR JSON and `async` when OCR is part of a queued workflow.\n\n## Request notes\nOCR accepts uploaded files or inline base64 inputs. Keep `language: auto` unless you have a known language constraint.\n\n## Response notes\nThe response returns page text plus line-level boxes and polygons for grounded downstream review.","metadata":{"title":"Run grounded OCR"}}}},"/v1/schema/auto":{"post":{"description":"Build extraction schemas from text instructions, a single document, or a multi-document set with shared and emerging-field visibility.","operationId":"schema_auto_endpoint_v1_schema_auto_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaAutoRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaV2Payload-Output"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Generate schemas from instructions or documents","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every schema builder request.\n\n## Execution modes\nUse `sync` during schema design sessions or `async` when you are generating schemas over larger document sets.\n\n## Request notes\nUse `instructions` for zero-document schema design, `inputs` with one document for single-document schema generation, or multiple `inputs` to build a global schema across a document set.\n\n## Response notes\nResponses return the generated schema object directly so it can be copied and reused as-is in extraction requests.","metadata":{"title":"Generate schemas from instructions or documents"}}}},"/v1/split":{"post":{"description":"Split a multi-document PDF packet into logical child files with reusable file references.","operationId":"split_endpoint_v1_split_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitPlan"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Split mixed document packets","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every split request.\n\n## Execution modes\nUse `sync` for immediate split plans and child file references or `async` for long-running packet workloads.\n\n## Request notes\nPass a packet via `input` and keep `verbosity: none` unless you need debugging detail for evaluation.\n\n## Response notes\nThe response returns the inferred document boundaries and generated child file references that can be reused downstream.","metadata":{"title":"Split mixed document packets"}}}},"/v1/tables":{"post":{"description":"Return HTML tables, per-cell grounding, and page provenance for table-heavy documents.","operationId":"tables_extract_endpoint_v1_tables_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableExtractRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableExtractResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"security":[{"bearerAuth":[]}],"summary":"Extract tables with cell grounding","tags":["customer-api"],"x-mint":{"content":"## Auth\nSend `Authorization: Bearer <DOCSPEED_API_KEY>` with every table extraction request.\n\n## Execution modes\nUse `sync` for inline table JSON or `async` when table extraction is part of a batch workflow.\n\n## Request notes\nChoose `grounding: cell` when reviewers need source-linked cell evidence. This is the best fit for AP and reconciliation workflows.\n\n## Response notes\nResponses include HTML renderings, cell-level structures, page provenance, and grounding regions for each extracted table.","metadata":{"title":"Extract tables with cell grounding"}}}}},"servers":[{"url":"https://api.docspeed.ai"}]}