---
title: "Submit 2–10 prompts against the same video (batch discount)"
method: POST
path: "/v1/analyses/batch"
tags: ["analyses"]
---

# Submit 2–10 prompts against the same video (batch discount)

`POST /v1/analyses/batch`

## Request

- Base URL: `https://api.primateintelligence.ai`
- URL: `https://api.primateintelligence.ai/v1/analyses/batch`
- Auth: HTTP bearer

Pricing: first prompt billed at full price; each additional prompt billed at 50% (a 50% discount — config-driven; read the live value from GET /v1/credit-pricing batch_discount_pct). Credits are reserved per-prompt at the discounted rate so the ledger shows the discount directly. Returns an `analysis_batch` containing all analysis DTOs plus a `pricing` summary. Each analysis can be polled individually via `GET /v1/analyses/{id}`. Pass `validate_only: true` for a cost-estimate dry-run (HTTP 200, no credits reserved).

## Request body

- CreateAnalysisBatchRequest
  - `video_id` string, required: Video resource id (prefixed ULID). Immutable.
  - `prompts` string[], required: 2–10 prompts to run against the video. First prompt is full price; each additional is billed at 50% (default — the live discount is served by GET /v1/credit-pricing as batch_discount_pct).
  - `model` string
  - `options` object
    - `narrative` boolean
  - `metadata` object: Free-form key/value metadata. ≤16 keys, key ≤40 chars [a-zA-Z0-9_.-], value ≤500 chars.
  - `validate_only` boolean: Dry-run mode. When true, parses all prompts and returns an analysis_batch_preview (HTTP 200) with per-prompt cost estimates. No credits are reserved and no jobs are created.

## Response `200`

Dry-run preview (validate_only: true). Prompts parsed; cost estimated; no credits reserved, no jobs created.

- AnalysisBatchPreview
  - `object` 'analysis_batch_preview', required
  - `video_id` string, required: Video resource id (prefixed ULID). Immutable.
  - `prompts` AnalysisBatchPreviewPrompt[], required
    - `index` integer, required: Zero-based prompt index.
    - `query` object, required: Compiled query structure.
    - `parse_mode` 'heuristic' | 'llm' | 'client', required
    - `assessable` boolean, required: True when the query type can produce a yes/no/count answer.
    - `estimated_seconds` integer, nullable, required: Estimated ledger credits for this prompt. Null when video has no known duration.
    - `estimated_cost_usd` number, nullable, required: Estimated cost in USD. Null when video has no known duration.
    - `discount_pct` union, required: 0 for the first (full-price) prompt; the configured batch discount (GET /v1/credit-pricing batch_discount_pct) for additional prompts.
      - 0
      - 50
  - `pricing` AnalysisBatchPricing, required
    - `full_price_prompts` integer, required
    - `discounted_prompts` integer, required
    - `discount_pct` integer, required: Config-driven batch discount percent — the same value GET /v1/credit-pricing serves as batch_discount_pct.
    - `estimated_total_seconds` integer, nullable, required: Estimated total ledger credits for all prompts combined (full + discounted). Null when the video has no known duration.
    - `estimated_total_cost_usd` number, nullable, required: Estimated total cost in USD. Null when duration unknown.

## Other responses

- `202`: Batch queued. All analyses dispatched; poll each `id` individually.
- `400`: validation_failed / url_forbidden / prompt errors (§15)
- `401`: invalid_api_key / key_revoked / key_expired
- `402`: insufficient_credits / grant_exhausted
- `404`: resource_not_found (account-scoped; no existence oracle)
- `409`: resource_conflict / idempotency_key_reused / idempotency_unavailable
- `429`: rate_limit_exceeded / concurrency_limit_exceeded / quota_exceeded (always with Retry-After)
- `503`: capacity_exhausted / inference_unavailable

---

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