# Delx Commerce — Parse Float Safe

> Delx Commerce — Parse Float Safe is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Safely parses a string into a floating-point number, returning a default integer value if parsing fails

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/parse-float-safe?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-parse-float-safe-52468aae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OCUiiZJLmD96nxB9kQsBw

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-commerce-parse-float-safe-52468aae -d '<json body>'
```

Example prompt: Parse the text '12.5kg' into a float for me, and if it can't be parsed, return 0 as the default.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call float parsing utility that handles malformed or invalid numeric strings gracefully without throwing exceptions, especially in agent pipelines where unreliable user input or scraped text must be converted to numbers safely. It is preferable to implementing custom parsing logic when reliability and a verifiable result schema matter.

## Known failure modes

- Text is empty or null — may return default value with ok:false
- Default value not provided — API may reject or use a built-in fallback
- Non-numeric text with complex formatting may fail to parse and return default
- Payment failure via x402 — call not processed

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with an 'ok' boolean indicating success, a 'value' field containing the parsed float (or the provided default if parsing failed), and a 'schema' identifier string ('delx/util-parse-float-safe/v1').

## 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-commerce-parse-float-safe-52468aae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
