# JSON Boolean Coerce

> JSON Boolean Coerce 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).

Coerces string values into JSON booleans, reporting normalized results and rejected values with counts and a versioned result contract

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-boolean-coerce
- 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-boolean-coerce-a3d0a892
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GDAqLr1t98PvKkwR0jxPF

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-boolean-coerce-a3d0a892 -d '<json body>'
```

Example prompt: Coerce these string values into proper JSON booleans for me and tell me which ones get rejected: ['true', 'yes', '1', 'false', 'no', 'maybe', '0', 'True', 'FALSE', 'nope'].

## When to prefer this

Use this endpoint when an agent needs to normalize boolean-like strings (e.g. 'yes', '1', 'True', 'on') into strict JSON booleans before handing structured data to a downstream tool with a strict schema contract. Prefer this over ad-hoc boolean parsing when you need a versioned, auditable result with explicit rejection reporting and counts — particularly useful in data pipelines, batch plan validation, or before calling APIs that do not accept truthy string equivalents.

## Known failure modes

- Empty values array returns empty normalized output with zero counts
- Values exceeding 8192 characters each are rejected or truncated
- More than 256 values in a single call exceeds the maxItems limit and is rejected
- Ambiguous tokens that are neither clearly truthy nor falsy are reported as rejected rather than coerced
- Malformed request body returns a 4xx error

## How this service works

JSON Boolean Coerce: JSON Boolean Coerce coerces explicit boolean tokens while reporting rejected values from bounded caller-supplied values without an external provider. Call JSON Boolean Coerce 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 Boolean Coerce as versioned deterministic JSON. Price: $0.001 USDC via x…

## Output

Returns a versioned deterministic JSON object containing normalized boolean values for each coercible input, a list of rejected values that could not be coerced, counts of accepted and rejected items, and a versioned result contract identifier.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "values": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 8192
   },
   "maxItems": 256,
   "description": "Values supplied to JSON Boolean Coerce; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "values": [
    true,
    false,
    true
   ],
   "rejected": [
    "bad"
   ]
  },
  "schema": "delx/util-json-boolean-coerce/v1",
  "status": "advisory",
  "evidence": {
   "retained": false,
   "input_sha256": "b0d8a970d8b95be459de90bd542fe2e952d9487c3b0d629f128cb547e47f6fa2",
   "external_calls": 0
  },
  "operation": "data_batch:json_boolean_coerce"
 }
}
```

## More

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