# JSON Depth Check

> JSON Depth Check 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 nesting depth of a JSON object against a caller-supplied maximum depth budget and returns a bounded validation result with counts and normalized values.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-depth-check
- 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-depth-check-f6988a71
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nSmpKrFh2TtgylPY4Fqe4

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-depth-check-f6988a71 -d '<json body>'
```

Example prompt: Check if this JSON object is within a maximum nesting depth of 5 — I need to know if it'll pass before I send it to the downstream tool that rejects anything deeper.

## When to prefer this

Use this endpoint when an agent needs to programmatically enforce or verify JSON nesting depth constraints before passing structured data or batch plans to downstream tools, APIs, or services that impose strict depth limits. It is ideal for agentic pipelines where self-validation of output shape is required prior to handoff, and where a lightweight, deterministic, versioned result is needed without spinning up a full schema validation framework.

## Known failure modes

- JSON object exceeds maxProperties limit of 128 (input rejected)
- maximum_depth not supplied or not a valid integer
- malformed or non-object value input
- payment not completed via x402 on Base (request blocked)
- nesting depth computation timeout for extremely wide objects

## How this service works

JSON Depth Check: JSON Depth Check measures JSON nesting depth against a caller budget from bounded caller-supplied values without an external provider. Call JSON Depth Check 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 Depth Check as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party…

## Output

Returns a versioned deterministic JSON result containing the measured nesting depth, whether it is within the caller-supplied maximum, counts of nodes at each level, normalized values, and a versioned result contract — all computed in-memory without data retention.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "depth": 3,
   "within_budget": true
  },
  "schema": "delx/util-json-depth-check/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "5e44e9f3ca3a7644d94366cd0375126198b9408327e0f22b573182f0b3a699d3",
   "external_calls": 0
  },
  "operation": "data_batch:json_depth_check"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-depth-check-f6988a71/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)
