get batch

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

get batch v15.0.0

Poll a batch by id. Fires `ended` and returns all results (text/usage/cost per custom_id) once processing finishes.

In pins 2 + flow
  • flow
  • connection anthropicconnection required
  • batch id value required

    The id returned by the create batch block.

Out pins 9 + flow
  • flow
  • connection anthropicconnection
  • success condition
  • ended condition

    True when the batch finished; results are populated.

  • status value

    in_progress | canceling | ended.

  • counts object

    processing, succeeded, errored, canceled, expired.

  • results array<object>

    One object per request (when ended): {custom_id, status, text?, stop_reason?, usage?, cost?}.

  • total cost (USD) number

    Summed USD cost of all succeeded results.

  • errors array<value>

    Error codes when the call fails (success=false): config_error, transport_error.

  • error detail value
batch status
poll batch
batch results
fetch batch

A typical wiring for get batch: a function trigger starts the flow; value feeds the batch_id pin; the flow out pin feeds debug.

Studio canvas example for the get batch block: typical wiring for get batch.

Used in these guides

These documentation pages use or explain this block:

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