Skip to main content

Estimate Smart Batch cost

Calculate a pre-flight credit estimate for all non-terminal rows remaining on a SmartBatch. The response breaks down pricing per enabled step in the batch's BatchConfiguration and compares the projected cost against your client account's available credit balance.

Calling this endpoint performs no catalog lookups and spends zero credits.

Endpoint​

GET https://api.verifik.co/v2/smart-batches/{id}/estimate

This endpoint is also reachable through the Smart-Agent proxy at https://ai.verifik.co/v2/smart-batches/{id}/estimate using your own per-client Authorization: Bearer <VERIFIK_JWT>. Shared x402 execution is blocked with 403 Forbidden.

Headers​

NameValueDescription
Content-Typeapplication/jsonRequest payload format.
AuthorizationBearer <VERIFIK_JWT>Client-scoped JWT (authUser.clientId).

Parameters​

NameTypeRequiredDescription
idstringYesSmartBatch ObjectId to estimate.

Request​

import axios from "axios";

const run = async () => {
const batchId = "6801a2b3c4d5e6f7a8b9c0d3";

const { data } = await axios.get(`https://api.verifik.co/v2/smart-batches/${batchId}/estimate`, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});

console.log(data);
};

run();

Response​

{
"data": {
"itemCount": 25,
"creditsPerItem": 0.12,
"totalCredits": 3,
"breakdown": [
{
"sequence": 1,
"featureCode": "co-cedula",
"price": 0.04,
"total": 1
},
{
"sequence": 2,
"featureCode": "co-procuraduria",
"price": 0.08,
"total": 2
}
],
"pendingRows": 25,
"totalRows": 25,
"availableCredits": 10.5,
"sufficientCredits": true,
"shortfall": 0
}
}

Notes​

  • itemCount and pendingRows reflect only rows not yet in a terminal row status (completed, failed, or partial).
  • availableCredits combines your client account's credits and extraCredits; when sufficientCredits is false, shortfall indicates the additional credits needed.
  • Per-step pricing uses your client account's ClientFeature snapshot pricing where applicable.