Documents

Create a visual component

Changed on

Creates a new visual component for a document.

post/api/v0/documents/{document_id}/visual-components

Request

Path parameters

document_idstring uuid required

Request body

typestring required

Component type (text, table, image, etc.)

page_numberinteger required

0-indexed page number

bbox_dpiinteger

DPI the bbox coordinates are expressed in. Stored VC bboxes are canonical BASE_DPI (72); a client that draws on the rendered page image passes the dpi the page-image endpoint reports for that page (PAGE_IMAGE_DPI, or lower for a sheet over the raster budget) and the server converts to BASE_DPI before persisting.

labelstring nullable

Optional label

Response

Successful Response

idstring uuid required

The ID of the visual component

typestring required

The type of the visual component, as stored

kind'text' | 'image' | 'chart' | 'table' | 'flowchart' | 'schematic' | 'untagged' | 'merged_table_part' | 'title_block' | 'zone_grid' | 'viewbox' | 'dimension' | 'callout' | 'legend' | 'footnote' required

Type of a visual component.

content_format'table_html' | 'mermaid' | 'json' | 'program' | 'rich_text' required

The notation a component's content is written in.

render_codestring nullable

The matplotlib program that redraws a chart; null for every other kind

confidencenumber nullable

The generation confidence (0.0-1.0) of a flowchart's graph; null when none was recorded

document_idstring uuid required

The ID of the document

page_numberinteger required

The page number of the visual component

sequence_numberinteger nullable

The sequence number for ordering within a page

labelstring required

The label of the visual component

descriptionstring required

The description of the visual component

contentstring nullable

The structured content of the component (e.g., HTML table)

created_atstring date-time required

The date and time the visual component was created

updated_atstring date-time required

The date and time the visual component was last updated

mask_urlstring nullable required

The URL of the mask image

metadataobject nullable required

The metadata of the visual component

render_svgstring nullable

SVG rendering of the component (for charts/graphs)

groundingobject nullable

Grounding metadata (bounding boxes, detections)

job_status_idstring uuid nullable

Job status ID when async processing is queued (e.g., chart regeneration)

job_statusstring nullable

Job status when async processing is queued

needs_reprocessingboolean

Whether this component needs reprocessing after bbox edit

parent_idstring uuid nullable

Public id of the parent visual component, when this component is nested

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the optional property to the response with the status