# JSON Size Budget

> JSON Size Budget is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Measures the compact UTF-8 byte size of a JSON object against a caller-supplied byte budget and returns a pass/fail validation result with counts and normalized values

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-size-budget
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-size-budget-7bd44e2d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_85WzWyIciyWQMpbwtRE6U

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 json-size-budget-7bd44e2d -d '<json body>'
```

Example prompt: Can you check if this JSON object fits within a 512-byte budget? Here's the object: {"user":"alice","items":["apple","banana"],"total":3}

## When to prefer this

Use this endpoint when an AI agent needs to verify that a structured JSON payload or batch plan fits within a downstream tool's strict byte-size contract before handoff, without relying on any external provider or runtime environment. Prefer it over manual size estimation when you need a deterministic, versioned, auditable result with normalized counts.

## Known failure modes

- Input object exceeds maxProperties limit of 128 keys — validation error returned
- maximum_bytes not provided — missing required parameter error
- Value field not a valid JSON object — type validation failure
- Extremely deeply nested objects may be rejected by property limits

## How this service works

JSON Size Budget: JSON Size Budget measures compact UTF-8 JSON size against a byte budget from bounded caller-supplied values without an external provider. Call JSON Size Budget before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Size Budget as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-pa…

## Output

Returns a versioned deterministic JSON object containing the compact UTF-8 byte count of the serialized input, a pass/fail result against the specified maximum_bytes budget, normalized size values, and a versioned result contract identifier.

## 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/json-size-budget-7bd44e2d/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)
