---
title: "List Batches"
method: GET
path: "/api/v2/batches"
tags: ["V2", "Batches"]
---

# List Batches

`GET /api/v2/batches`

List batches for the current project.

## Query parameters

- `project_id` string, uuid, nullable
- `organization_id` string, uuid, nullable
- `page_size` integer, nullable
- `page_token` string, nullable
- `created_at_on_or_after` string, date-time, nullable
- `created_at_on_or_before` string, date-time, nullable
- `status` 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED', nullable
- `source_directory_id` string, nullable

## Cookies

- `session` string, nullable

## Response `200`

Successful Response

- BatchQueryResponse — Paginated list of batches.
  - `items` BatchResponse[], required — The list of items.
    - `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.
  - `next_page_token` string, nullable — A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
  - `total_size` integer, nullable — The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

## 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)
