preflight documents

This block is part of the anthropic group and was last modified in core v15.0.0.

preflight documents v15.0.0

Convert several documents to clean Markdown with a cheap model, in parallel. Returns one .md file per input plus the concatenated Markdown; run before sending an upload set to an expensive model.

In pins 4 + flow
  • flow
    flow
  • connection required
    anthropicconnection
  • files required
    file

    The documents to convert (multiple). Text and spreadsheets convert for free; PDFs/images/HTML use a cheap model.

  • model
    value

    Model for the conversion. Defaults to claude-haiku-4-5 (cheap). • Suggestions: claude-haiku-4-5 claude-sonnet-4-6

  • max tokens
    number

    Max Markdown tokens per document. Defaults to 16000.

Out pins 11 + flow
  • flow
    flow
  • connection
    anthropicconnection
  • success
    condition
  • files
    file

    One cleaned .md file per input; wire straight into a message block's attachments pin.

  • markdown
    value

    All documents' Markdown concatenated.

  • cost
    number

    Total USD cost of the conversions (0 for text/spreadsheet).

  • usage
    object
  • count
    number

    Number of documents processed.

  • partial
    value
  • warnings
    array<value>

    Non-fatal notices: unsupported_format (a file type can't be converted), cost_unknown.

  • errors
    array<value>

    Error codes when a conversion fails (success=false): config_error, internal_error, model_not_allowed, budget_exceeded, concurrency_limit_exceeded, rate_limited, refused, max_tokens, transport_error.

  • error detail
    value
preflight files
documents to markdown
bulk preflight
clean documents
batch ocr

A typical wiring for preflight documents: a function trigger starts the flow; get file from assets feeds the files pin; the flow out pin feeds debug.

Studio canvas example for the preflight documents block: typical wiring for preflight documents.

Version history

Introduced in v15.0.0.


Back to anthropic Return to the main group to view all sub-groups Back to anthropic Return to the group to view all blocks within this group