Tools

Tool Doc Analysis

Performs comprehensive document analysis to extract and parse text, tables, and figures from images or PDFs.

Args: data (DocAnalysisRequest): The form data containing the following fields: - image (UploadFile, optional): Image file to analyze (max 50MB). Cannot be provided together with PDF. - pdf (UploadFile, optional): PDF file to analyze (max 50MB, max 2 pages). Cannot be provided together with image. - parse_text (bool, optional): Whether to parse and analyze text content. Defaults to True. - parse_tables (bool, optional): Whether to parse and analyze table structures. Defaults to True. - parse_figures (bool, optional): Whether to parse and analyze figures and images. Defaults to True. - summary_verbosity (Verbosity, optional): Level of detail in AI-generated summaries. Options: none, brief, normal, detailed. Defaults to normal. - return_chunk_crops (bool, optional): Whether to return cropped images of each chunk. Defaults to False. - return_page_crops (bool, optional): Whether to return cropped images of each page. Defaults to False. - caption_format (OutputFormat, optional): Format for chunk captions. Options: markdown, json, xml, text. Defaults to json. - response_format (OutputFormat, optional): Format for the overall response. Options: markdown, json, xml, text. Defaults to json. - filename (str, optional): Optional filename for integration into API output. baseten_inference_sender: Dependency Injection for sending inference requests to the Baseten model server for document analysis.

Returns: DocAnalysisResponse | JSONResponse Success: DocAnalysisResponse containing parsed document structure and content. Error: JSONResponse with error details and appropriate status code.

post/v1/tools/document-analysis

Query parameters

timeoutinteger nullable

Response

Successful Response

dataobject nullable required

Changes