# Delx Parse Int Safe

> Delx Parse Int Safe 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-13).

Safely parses a string to an integer, returning a default value on failure instead of throwing an error

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/parse-int-safe
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-parse-int-safe-9f0b8c7e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_biiVDdp3Kp2WEH8mptVWr

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 delx-parse-int-safe-9f0b8c7e -d '<json body>'
```

Example prompt: Parse the string '42abc' as an integer for me, and if it fails just use 0 as the default.

## When to prefer this

Choose this endpoint when you need fail-safe integer parsing inside an agent pipeline and cannot afford a hard crash or exception on bad input. It is ideal for sanitizing untrusted user-supplied strings, scraped numeric data, or config values that may be non-numeric, providing a safe default without writing custom parsing logic.

## Known failure modes

- Text is null or missing — may return default with ok=false
- Default field not provided — behavior may be undefined or return an error
- Input is a float string like '3.14' — likely parsed as failure depending on strictness
- Very large numbers exceeding integer bounds — may fail or truncate
- Network or payment failure via x402 — call does not complete

## How this service works

Parse int with default on failure. Call when you need fail-soft integer parsing for agent inputs. Returns value and ok for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns a JSON object with the parsed integer value and an 'ok' boolean indicating whether parsing succeeded. If parsing fails, the value field contains the supplied default integer and ok is false.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Input field: text."
  },
  "default": {
   "type": "integer",
   "description": "Input field: default."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "value": 42,
  "schema": "delx/util-parse-int-safe/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-parse-int-safe-9f0b8c7e/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)
