# JSON Number Coerce

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

Coerces an array of string values into numeric types, reporting normalized values and rejected entries with counts in a versioned deterministic result contract.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/json-number-coerce?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-number-coerce-877ae97e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gZFkVwaHjTEWlb21hZLze

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-number-coerce-877ae97e -d '<json body>'
```

Example prompt: Take these string values — ['123', '45.6', 'abc', '7', 'N/A', '0.01'] — and coerce them into numbers, then tell me which ones were rejected and how many came through successfully.

## When to prefer this

Use this endpoint when an agent or pipeline needs to convert a batch of caller-supplied string values into proper numeric types before handing them to a downstream tool with a strict JSON schema. It is especially useful when the source data is untrustworthy or mixed (e.g. scraped, user-entered, or agent-generated), and you need explicit counts of valid vs rejected values plus a normalized output list — all in a versioned, deterministic contract suitable for audit or retry logic.

## Known failure modes

- Empty values array returns zero counts with no normalized values
- All values are non-numeric strings — result contains full rejection list and zero normalized values
- Array exceeds 256-item limit — request rejected with validation error
- Individual string exceeds 8192 character limit — offending item rejected or request fails
- Malformed request body — HTTP 4xx error returned

## How this service works

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

## Output

A versioned deterministic JSON object containing normalized numeric values for successfully coerced inputs, a list of rejected values that could not be parsed, counts of accepted and rejected entries, 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 Number Coerce; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "values": [
    1,
    2.5
   ],
   "rejected": [
    "bad"
   ]
  },
  "schema": "delx/util-json-number-coerce/v1",
  "status": "advisory",
  "evidence": {
   "retained": false,
   "input_sha256": "b08932be9b3a6478f77ce565e226057d6faaec761236079792dd3b4913f103be",
   "external_calls": 0
  },
  "operation": "data_batch:json_number_coerce"
 }
}
```

## More

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