# Delx Parse Float Safe

> Delx Parse Float 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).

Parses a string as a floating-point number, returning a default integer value on failure instead of throwing an error

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/parse-float-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-float-safe-f6a568c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__VObe-cMIj18Mv5J-ltY5

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-float-safe-f6a568c3 -d '<json body>'
```

Example prompt: Try to parse '3.14abc' as a float, and if it fails use 0 as the default value.

## When to prefer this

Choose this endpoint when you need guaranteed fail-safe float parsing in an agent pipeline where malformed, missing, or user-supplied numeric strings are expected and crashing is unacceptable. Prefer it over native language parsing when you want a remote, stateless, auditable utility with a consistent JSON contract and no language-specific exception handling.

## Known failure modes

- If 'text' is missing or empty, likely returns the default value with ok=false
- If 'default' is omitted, behavior may be undefined or return an error
- Non-string 'text' fields may cause a 400 validation error
- Network timeouts or payment failures (x402) return no result
- Extremely large or special float strings (Infinity, NaN) may or may not parse as ok=true depending on implementation

## How this service works

Parse float with default on failure. Call when you need fail-soft float 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 a numeric 'value' field (the parsed float if successful, or the caller-supplied default integer if parsing fails) and an 'ok' boolean indicating whether parsing succeeded.

## 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": 12.5,
  "schema": "delx/util-parse-float-safe/v1"
 }
}
```

## More

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