---
title: "Estimate Batch Cost (pre-flight, dry-run)"
method: POST
path: "/v1/buckets/{bucket_identifier}/batches/{batch_id}/estimate-cost"
tags: ["Bucket Batches"]
---

# Estimate Batch Cost (pre-flight, dry-run)

`POST /v1/buckets/{bucket_identifier}/batches/{batch_id}/estimate-cost`

## Request

- Base URL: `https://api.mixpeek.com`
- URL: `https://api.mixpeek.com/v1/buckets/{bucket_identifier}/batches/{batch_id}/estimate-cost`
- Auth: HTTP bearer and API key in header `X-Namespace`

Pre-flight estimate of the credits a DRAFT batch will consume on submit, plus how many of its objects were already extracted — so a force/replace re-run that re-pays GPU extraction surfaces its cost BEFORE submitting. Does not consume credits or change the batch's contents/status; it DOES refresh a DRAFT batch's activity timestamp so the draft-TTL reaper grants a fresh grace window while you confirm the cost.

## Path parameters

- `bucket_identifier` string, required: The unique identifier of the bucket.
- `batch_id` string, required: The unique identifier of the batch.

## Response `200`

Successful Response

- BatchCostEstimate: Dry-run estimate of what submitting a DRAFT batch will cost + re-pay.
  - `batch_id` string, required
  - `collection_ids` string[]
  - `dedup_strategy` string: skip | replace | force — controls re-extraction
  - `object_count` integer: Objects this batch will process
  - `already_extracted_count` integer: Objects in this batch already extracted before (re-paid under force/replace)
  - `estimated_credits` integer: Credits submitting this batch will consume (same calc as submit)
  - `estimated_usd` number, nullable: Dollar cost of this batch under live v2 pricing (file type × amount × search-by features). Credits are milli-dollars of this value.
  - `estimated_repay_credits` integer: ~credits re-paying already-extracted objects (force/replace only; linear approx)
  - `features` string[]: What this batch searches by (dimension 3 of pricing): feature keys billed per file type; custom plugins as 'custom:<name>'.
  - `extractors` string[]: Internal implementation of `features` — prefer rendering `features`; extractor names are the deeper disclosure layer.
  - `content_summary` object, nullable: Dimensions 1+2 of pricing: file types and how much of each (counts, video minutes, pages, tokens…)
  - `documents_to_remove` integer, nullable: OPTIONAL. For dedup_strategy replace: the documents the batch's objects have now in its collections. A replace removes each of these that its re-run does not overwrite in place, after the new documents are written, so this is the most it removes. Absent for skip and force.
  - `warnings` string[]

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-09** `61a175e8eb9a`: 1 warning, 5 info
  - removed the optional property `detail` from the response with the `422` status
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
  - added the optional property `success` to the response with the `422` status
  - …2 more
- **2026-10-06** `b75474e978ff`: 1 info
  - added the optional property `documents_to_remove` to the response with the `200` status
- **2026-08-09** `5d4c905106b4`: 1 info
  - the endpoint scheme security `BearerAuth AND NamespaceHeader` was added to the API

[Operation history](https://skmtc.dev/mixpeek/apis/mixpeek-api/changes/v1/buckets/:bucket_identifier/batches/:batch_id/estimate-cost/post.md)

---

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