HTTP 400validation

Batch too large

batch_too_large

What it means

`/v1/check/batch` enforces a 100-ingredient maximum per call. You sent more.

Common causes

How to fix

  1. Chunk the array client-side into ≤100-item batches.
  2. Reuse a single `Idempotency-Key` per chunk so retries are safe.

Example

// Chunk in TypeScript
for (let i = 0; i < items.length; i += 100) {
  const chunk = items.slice(i, i + 100);
  await fetch("…/v1/check/batch", { … body: { region, ingredients: chunk } });
}