---
title: "Get Batch"
method: GET
path: "/api/v2/batches/{batch_id}"
tags: ["V2", "Batches"]
---

# Get Batch

`GET /api/v2/batches/{batch_id}`

Get a batch by ID.

## Path parameters

- `batch_id` string, required

## Query parameters

- `expand` string[], nullable — Fields to expand. Supported value: results.
- `project_id` string, uuid, nullable
- `organization_id` string, uuid, nullable

## Cookies

- `session` string, nullable

## Response `200`

Successful Response

- BatchResponse — A top-level batch. Example: { "id": "bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "config": { "job": { "type": "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } }, "status": "COMPLETED", "results": [ { "source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "job_reference": { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }, "error_message": null } ] } Batch-level ``FAILED`` means the orchestration failed and cannot provide a reliable per-file result set. ``results`` is only populated when explicitly requested with ``expand=results`` and may be ``null`` while a batch is still running.
  - `id` union, required — Unique identifier
    - string
    - string, uuid
  - `created_at` string, date-time, nullable — Creation datetime
  - `updated_at` string, date-time, nullable — Update datetime
  - `project_id` string, required — Project this batch belongs to.
  - `source_directory_id` string, required — Directory being processed.
  - `config` BatchConfiguration, required — Configuration for a batch. Example: { "job": { "type": "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } } This wraps the product configuration ID to run over the source directory. Use a built-in preset ID when available, or create/reuse a product configuration through the generic configurations API before creating the batch.
    - `job` BatchJobConfig, required — Job to run for each file in the source directory. Example: { "type": "parse_v2", "configuration_id": "cfg-PARSE_AGENTIC" } Batch V2 references product configuration IDs so the underlying directory-sync flow can resolve a stable config ID for every file-level job. IDs may refer to saved project configurations or built-in presets for the requested product type.
      - `type` union, required — Product job type to run for each source directory file.
        - 'parse_v2'
        - 'extract_v2'
      - `configuration_id` string, required — Product configuration ID or built-in preset ID matching the job type.
  - `status` 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED', required — Current batch status.
  - `results` BatchResult[], nullable — Expanded per-file result mappings. Null unless requested with expand=results, or while the batch is still running.
    - `source_directory_file_id` string, required — Source directory file processed by this batch.
    - `job_reference` BatchJobReference — Reference to a job produced by a batch. Example: { "type": "parse_v2", "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" }
      - `type` union, required — Type of job produced for the file.
        - 'parse_v2'
        - 'extract_v2'
      - `id` string, required — Job ID, such as a parse job ID.
    - `error_message` string, nullable — Batch-level mapping error if the system could not create or associate a job for this source file.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.net/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/run-llama/llama-platform/versions/b17341164de9/schema)
