# Delx Batch Size Plan

> Delx Batch Size Plan is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Recommends an optimal batch size given item count, hard item cap, hard byte cap, and average item bytes

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/batch-size-plan
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-batch-size-plan-085368f5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qWTA5iUUrAXjh5Nf6UAh9

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-batch-size-plan-085368f5 -d '<json body>'
```

Example prompt: I need to batch 8000 items where each item is about 512 bytes — the hard cap is 1000 items per batch and 400000 bytes per batch. What batch size should I use?

## When to prefer this

Use this endpoint when you need a fast, stateless, deterministic batch size recommendation that respects both item count and byte size caps simultaneously. Prefer it over manual calculation in multi-step agent workflows where you need machine-readable JSON output before executing side-effecting batch operations. It is especially useful when both an item cap and a byte cap are active constraints, as naive item-only division may still violate byte limits.

## Known failure modes

- Missing required fields (item_count, max_batch, max_bytes, avg_item_bytes) return a 400 validation error
- Non-positive or zero values for counts or bytes may return an error or edge-case result
- Payment failure or insufficient USDC balance returns a 402 response
- avg_item_bytes larger than max_bytes results in a batch size of zero or one

## How this service works

Recommend a batch size from item count, hard cap, and average item bytes — call when batching micro-calls under item and byte caps. Use before side effects when composing multi-step agent jobs—the same loyalty/workflow demand band agents already pay for on Bazaar, but fully local. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no claim of live chain tip,…

## Output

Returns a deterministic JSON object containing the recommended batch size (constrained by both item count and byte limits), the resulting number of batches, and the individual item-capped and byte-capped batch size values used to derive the recommendation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "max_batch": {
   "type": "number",
   "description": "Hard maximum items per batch."
  },
  "max_bytes": {
   "type": "number",
   "description": "Hard maximum bytes per batch."
  },
  "item_count": {
   "type": "number",
   "description": "Number of items to batch."
  },
  "avg_item_bytes": {
   "type": "number",
   "description": "Average bytes per item used for the byte-limited batch size."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-batch-size-plan/v1",
  "max_batch": 50,
  "item_count": 1000,
  "estimated_batches": 25,
  "byte_limited_batch": 40,
  "recommended_batch_size": 40
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-batch-size-plan-085368f5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
