Skip to content
Log in

Edit

POSThttps://platform.reducto.ai/edit

Body

  • document_urlstring | UploadResponseRequired

    The URL of the document to be processed. You can provide one of the following:

    1. A publicly available URL
    2. A presigned S3 URL
    3. A reducto:// prefixed URL obtained from the /upload endpoint after directly uploading a document
    UploadResponse properties
    • file_idstringRequired
    • presigned_urlstring
  • edit_instructionsstringRequired

    The instructions for the edit.

  • edit_optionsEditOptions
    5 properties
    • colorstring

      The color to use for edits, in hex format.

      Default
      "#FF0000"
    • font_sizenumber

      The font size (in points) to use for filled text fields. If not specified, font size is automatically calculated based on field dimensions.

    • llm_provider_preferencestring

      The LLM provider to use for edit processing. If not specified, defaults to 'google'

    • enable_overflow_pagesboolean

      If True, creates overflow pages for text that doesn't fit in form fields. Defaults to False.

      Default
      false
    • flattenboolean

      If True, flattens form fields after filling, converting them to static content. Defaults to False.

      Default
      false
  • form_schemaEditWidget[]

    Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes. Only works for PDFs.

    EditWidget[] properties
    • bboxBoundingBoxRequired

      Bounding box coordinates of the widget

      6 properties
      • leftnumberRequired
      • topnumberRequired
      • widthnumberRequired
      • heightnumberRequired
      • pagenumberRequired

        The page number of the bounding box (1-indexed).

      • original_pagenumber

        The page number in the original document of the bounding box (1-indexed).

    • descriptionstringRequired

      Description of the widget extracted from the document

    • typestringRequired

      Type of the form widget

      Allowed
      textcheckboxradiodropdownbarcode
    • fillboolean

      If True (default), the system will attempt to fill this widget. If False, the widget will be created but intentionally left unfilled.

      Default
      true
    • valuestring

      If provided, this value will be used directly instead of attempting to intelligently determine the field value.

    • font_sizenumber

      Font size in points for this specific field. Takes priority over the global font_size in EditOptions. If not set, falls back to the global font_size, then to auto-calculated sizing.

    • filledboolean

      Response only. True if Reducto wrote a value to this widget, False if it was left empty. Ignored in requests.

  • priorityboolean

    Workers poll the priority queue ahead of the standard queue, so priority jobs start sooner when there is queued work; sync jobs are prioritized above async jobs by default.

    Default
    true

Response

  • response_typestring
    Default
    "edit"
  • job_idstring

    The unique identifier for the edit job.

  • document_urlstringRequired

    Presigned URL to download the edited document.

  • form_schemaEditWidget[]

    Form schema for PDF forms. List of widgets with their types, descriptions, and bounding boxes.

    EditWidget[] properties
    • bboxBoundingBoxRequired

      Bounding box coordinates of the widget

      6 properties
      • leftnumberRequired
      • topnumberRequired
      • widthnumberRequired
      • heightnumberRequired
      • pagenumberRequired

        The page number of the bounding box (1-indexed).

      • original_pagenumber

        The page number in the original document of the bounding box (1-indexed).

    • descriptionstringRequired

      Description of the widget extracted from the document

    • typestringRequired

      Type of the form widget

      Allowed
      textcheckboxradiodropdownbarcode
    • fillboolean

      If True (default), the system will attempt to fill this widget. If False, the widget will be created but intentionally left unfilled.

      Default
      true
    • valuestring

      If provided, this value will be used directly instead of attempting to intelligently determine the field value.

    • font_sizenumber

      Font size in points for this specific field. Takes priority over the global font_size in EditOptions. If not set, falls back to the global font_size, then to auto-calculated sizing.

    • filledboolean

      Response only. True if Reducto wrote a value to this widget, False if it was left empty. Ignored in requests.

  • usageParseUsage

    Usage information for the edit operation, including number of pages and credits charged.

    ParseUsage properties
    • num_pagesnumberRequired
    • creditsnumber
    • credit_breakdownobject
    • page_billing_breakdownobject

      Per-page breakdown of features used. Maps 1-indexed page numbers (as strings) to the list of billing features applied on that page (e.g. 'page', 'complex', 'chart_agent').

    • non_empty_cell_countnumber

      Total non-empty cells across all sheets. Only set for spreadsheet inputs.

    • usage_breakdownParseUsageBreakdown | SplitUsageBreakdown | EditUsageBreakdown

      Raw usage quantities. Only set for accounts on the new pricing model; credit fields are omitted for those accounts.

      3 variants
      • parse_modelstringRequired
        Allowed
        R-1R-1 MiniLegacy
      • tierstringRequired
        Allowed
        DefaultBatch
      • parse_pagesnumber
        Default
        0
      • parse_native_pagesnumber
        Default
        0
      • legacy_parse_creditsnumber
        Default
        0
      • ocr_pagesnumber
        Default
        0
      • chartsnumber
        Default
        0
      • prompted_blocksnumber
        Default
        0
      • split_modelstringRequired
        Allowed
        SplitDeep Split
      • split_pagesnumber
        Default
        0
      • ocr_pagesnumber
        Default
        0
      • chartsnumber
        Default
        0
      • prompted_blocksnumber
        Default
        0
      • edit_modelstringRequired
        Allowed
        NormalPrefill
      • edit_pagesnumber
        Default
        0
      • prefill_pagesnumber
        Default
        0
  • warningsstring[]

    Warnings about the edit, for example when no form fields were filled.

  • detailValidationError[]
    5 properties
    • loc(string | number)[]Required
    • msgstringRequired
    • typestringRequired
    • inputunknown
    • ctxobject

Type to search…

escClose