# JSON Array Length Check

> JSON Array Length 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-10-20).

Validates that specified array fields within a JSON object have lengths within caller-supplied minimum and maximum bounds, returning counts and normalized values.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-array-length-check?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-array-length-check-15bd74ce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l4T_MaChKWKRr18Hxe5Wq

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-array-length-check-15bd74ce -d '<json body>'
```

Example prompt: Before sending this payload to the downstream tool, check that the 'items' and 'tags' arrays are both between 1 and 50 entries — here's the object: {"items":[...],"tags":[...]}.

## When to prefer this

Choose this endpoint when an AI agent needs to enforce item-count contracts on array fields in a JSON object before passing structured data to a downstream tool or API with stricter requirements. It is ideal for pre-flight checks in agentic pipelines where batch sizes, list lengths, or array cardinality must be bounded. Prefer this over ad-hoc code execution when you need a deterministic, versioned, auditable validation result without retaining data.

## Known failure modes

- Field names in 'fields' array do not exist in the provided object — returns counts of 0 or field-not-found findings
- Provided 'minimum' exceeds 'maximum' — may return an error or vacuous failure
- Non-array field specified — returns a type mismatch or zero-count finding
- Object exceeds 128 properties limit — request rejected
- Fields array exceeds 256 items — request rejected
- Missing required 'object' or 'fields' input — returns validation error

## How this service works

JSON Array Length Check: JSON Array Length Check checks selected array fields against caller item-count bounds from bounded caller-supplied values without an external provider. Call JSON Array Length 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 Array Length Check as versioned deterministic JSON. Price: $0.…

## Output

Returns a versioned deterministic JSON object containing: per-field array length counts, a pass/fail validation finding indicating whether each field is within the specified minimum and maximum bounds, normalized values, and a versioned result contract identifier.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fields": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 8192
   },
   "maxItems": 256,
   "description": "Fields supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."
  },
  "object": {
   "type": "object",
   "description": "Object supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  },
  "maximum": {
   "type": "integer",
   "description": "Maximum supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."
  },
  "minimum": {
   "type": "integer",
   "description": "Minimum supplied to JSON Array Length Check; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "passed": true,
   "invalid_fields": []
  },
  "schema": "delx/util-json-array-length-check/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "95a21205d9c6d659623a8ea762303c79e2d75f8c4ff1455041af6261652db58d",
   "external_calls": 0
  },
  "operation": "data_batch:json_array_length_check"
 }
}
```

## More

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