# Delx Commerce — JSON Size Budget

> Delx Commerce — JSON Size Budget is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Checks whether a JSON object's serialized byte size falls within a specified maximum budget and returns the exact byte count.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/json-size-budget?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-json-size-budget-4cbbe21b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_asGH0-8L3MqTaxfpL1tB4

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-commerce-json-size-budget-4cbbe21b -d '<json body>'
```

Example prompt: Check if this JSON object is within a 1000-byte budget: {"name": "Alice", "role": "admin", "active": true} — tell me the exact byte size and whether it fits.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call, trustless utility to measure and validate the byte size of a JSON payload with no signup or API key required. It is ideal for agents that need cryptographically verifiable, auditable proof that input was not retained — particularly useful in privacy-sensitive pipelines, or when you want deterministic, exact byte counts rather than estimates.

## Known failure modes

- Missing or invalid 'value' field returns a validation error
- Missing 'maximum_bytes' field may cause the budget check to fail or return an error
- JSON object exceeds the 128-property maxProperties limit and is rejected
- Malformed JSON input results in a parse error
- Payment not completed causes a 402 response before processing begins

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns the exact serialized byte size of the JSON object, a boolean indicating whether it is within the specified maximum_bytes budget, the operation schema identifier, a pass/fail status, and a verifiability envelope including the SHA-256 hash of the input and confirmation that no data was retained or sent to external services.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "value": {
   "type": "object",
   "description": "Value supplied to JSON Size Budget; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  },
  "maximum_bytes": {
   "type": "integer",
   "description": "Maximum Bytes supplied to JSON Size Budget; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "bytes": 19,
   "within_budget": true
  },
  "schema": "delx/util-json-size-budget/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "293a834474416653f334e4892f6eb0f0f2c98b11baddda224806b004dd8fbfba",
   "external_calls": 0
  },
  "operation": "data_batch:json_size_budget"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-json-size-budget-4cbbe21b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
