---
title: "get batch · RUAL Documentation"
description: "Poll a batch by id. Fires `ended` and returns all results (text/usage/cost per custom_id) once processing finishes."
canonical: https://docs.rual.nl/block-types/anthropic/anthropicconnection_batch_get
language: en
---

# get batch

This block is part of the [`anthropic`](https://docs.rual.nl/block-types/anthropic) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

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

- flow `flow`

- connection required `anthropicconnection`

- batch id required `value` The id returned by the create batch block.

- 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 ` 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 ` 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](https://docs.rual.nl/block-types/anthropic/anthropicconnection_batch_get): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `batch_id` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the get batch block: typical wiring for get batch.](https://docs.rual.nl/canvas-examples/anthropicconnection_batch_get.png)

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
