---
title: "Preview Agent Batch"
method: POST
path: "/api/v1/agent/batch/preview"
---

# Preview Agent Batch

`POST /api/v1/agent/batch/preview`

## Request

- Base URL: `https://api.mesharc.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mesharc.dev/api/v1/agent/batch/preview`
- Auth: none declared

What POST /agent/batch would do, without starting it or spending
anything: the table as read, the rows that cannot run and why, the first
prompts as their rows ask them, and the estimate against the balance.

## Headers

- `authorization` string, nullable
- `x-mesharc-tenant` string, nullable

## Request body

- AgentBatchRequest
  - `name` string, nullable
  - `rows` object[], nullable
  - `csv` string, nullable
  - `prompt` string, required
  - `urls` string[], nullable
  - `schema` object, nullable
  - `maxCreditsPerRow` integer, nullable
  - `maxSteps` integer, nullable
  - `allowedDomains` string[], nullable
  - `concurrency` integer, nullable
  - `webhook` union
    - object
    - string
  - `connectionId` string, nullable
  - `logins` union
    - string
    - string[]
  - `loginId` string, nullable
  - `dataConnections` string[], nullable

## Response `200`

Successful Response

- AgentBatchPreview
  - `columns` string[], required
  - `outputColumns` string[], required
  - `rows` integer, required
  - `valid` integer, required
  - `invalid` integer, required
  - `invalidRows` AgentBatchInvalid[], required
    - `row` integer, required
    - `error` string, required
  - `examples` AgentBatchExample[], required
    - `row` integer, required
    - `prompt` string, required
    - `urls` string[], required
    - `allowedDomains` string[], required
  - `concurrency` integer, required
  - `maxCreditsPerRow` integer, required
  - `estimate` AgentBatchEstimate, required
    - `rows` integer, required
    - `perRow` integer, required
    - `total` integer, required
    - `most` integer, required
    - `upTo` boolean, required
    - `basis` string, required
    - `balance` integer, nullable
    - `enough` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mesharc/apis/mesharc-api.md) · [All operations](https://skmtc.dev/mesharc/apis/mesharc-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mesharc/apis/mesharc-api/revisions/d63cc02dfec2?raw)
