---
title: "Wait briefly for an async batch job to reach a terminal state"
method: GET
path: "/api/agents/review-batch/{jobId}/wait"
tags: ["Agent API"]
---

# Wait briefly for an async batch job to reach a terminal state

`GET /api/agents/review-batch/{jobId}/wait`

## Request

- Base URL: `https://klinepic.com`
- URL: `https://klinepic.com/api/agents/review-batch/{jobId}/wait`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-KLine-Agent-Key`

## Path parameters

- `jobId` string, required

## Query parameters

- `timeoutMs` integer
- `intervalMs` integer

## Headers

- `X-Agent-Request-Id` string

## Response `200`

Latest batch job status, with wait metadata

- AgentReviewBatchWaitResponse
  - `ok` true, required
  - `requestId` string, required
  - `job` AgentBatchJob, required
    - `id` string
    - `status` 'queued' | 'running' | 'completed' | 'failed' | 'cancelled'
    - `total` integer
    - `completed` integer
    - `success` integer
    - `failed` integer
    - `retryRequestAvailable` boolean: True when the underlying batch job retained a safe retry payload. Public Agent retry requests still send a full batch payload; the server uses the source job to rerun failed trades only.
    - `callback` object
      - `configured` true
      - `attempts` integer
      - `maxAttempts` integer
      - `lastAttemptAt` string, date-time
      - `nextAttemptAt` string, date-time
      - `deliveredAt` string, date-time
      - `error` string
    - `results` object[]
      - `tradeId` string
      - `status` string
      - `fileName` string
      - `imageUrl` string, uri: Absolute URL for downloading this PNG.
      - `signedImageUrl` string, uri: Temporary signed URL for downloading this PNG without sending an API key.
  - `links` AgentBatchLinks, required
    - `status` string, uri, required
    - `wait` string, uri, required
    - `events` string, uri, required
    - `manifest` string, uri, required
    - `archive` string, uri, required
  - `signedLinks` AgentSignedBatchLinks
    - `manifest` string, uri, required: Temporary signed manifest URL that can be fetched without an API key.
    - `archive` string, uri, required: Temporary signed ZIP archive URL that can be fetched without an API key.
    - `expiresAt` string, date-time, required
    - `expiresAtUnix` integer, required
  - `account` object, required
  - `apiKey` object
  - `commercialState` object
  - `wait` object, required
    - `terminal` boolean, required: True when the returned job is completed, failed, or cancelled.
    - `timedOut` boolean, required: True when timeoutMs elapsed before a terminal state.
    - `elapsedMs` integer, required
    - `timeoutMs` integer, required
    - `intervalMs` integer, required

## Other responses

- `401`: Authentication or policy failure
- `403`: Authentication or policy failure
- `404`: Structured error

---

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