Documents

Upload and process a document

Changed on

Creates a document from a file upload. Use multipart/form-data.

post/api/v0/documents

Request

Request body multipart/form-data

namestring nullable

The name of the document

filestring binary nullable

The file to upload

folder_idstring uuid nullable

The ID of the folder to create the document in

knowledge_base_idstring uuid nullable

Collection whose persisted processing settings apply to the upload and that receives every created document.

generate_contentboolean

Whether to generate structured content (e.g., HTML tables)

generate_descriptionboolean

Whether to generate human-readable descriptions for visual components

generate_summaryboolean

Whether to generate a document summary

skip_page_processingboolean nullable

When True, skip per-page visual processing entirely (no layout detection, OCR, or component extraction). The document is stored, converted to PDF, and its page count recorded.

update_if_existsboolean

When True and a document with the same name already exists in the target folder, replace that document's file and reprocess it instead of creating a duplicate. Returns 409 if more than one existing document matches. Only applies to file uploads.

text_mode'auto' | 'extract'

Per-upload text-source override accepted at the HTTP boundary.

processing_preset'full' | 'text_and_tables' | 'layout_only' | 'existing_text' | 'disabled'

Named template for page-processing options.

batch_modeboolean nullable

Run the deferrable pipeline stages (table reading, component descriptions, page descriptions) through the provider's batch API at reduced cost: the document completes with those artifacts empty and they fill in asynchronously, minutes to hours later. Omit to use the deployment default. Stages whose configured model has no batch transport run live either way.

Response

Successful Response

job_status_idstring uuid required

The ID of the job status.

statusstring required

The status of the job. Options: pending, done, error.

error_messagestring nullable required

The error message if the job failed.

document_idstring uuid nullable required

The ID of the document that was uploaded.

Changes

    • info

      added the new optional request property

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property default value false was removed

    • info

      request property list-of-types was widened by adding types null to media type multipart/form-data