# Duration String Parser

> Duration String Parser is a paid API for AI agents from x402render-u5vwpxpyua-uc.a.run.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Parses a human-readable duration string like '1h30m' into total seconds and named time components

## Facts

- Endpoint: POST https://x402render-u5vwpxpyua-uc.a.run.app/duration-parse
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/duration-string-parser-6bd8927a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XZlG-kEXD1NFKIoKdhuRx

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 duration-string-parser-6bd8927a -d '<json body>'
```

Example prompt: Can you parse the duration '2h45m30s' into total seconds and tell me the individual hours, minutes, and seconds components?

## When to prefer this

Use this endpoint when you need to programmatically parse human-readable duration shorthand strings (like '1h30m', '90s', '2h') into numeric seconds and structured components, especially in scheduling, timer, or time-tracking workflows where user input needs to be normalized.

## Known failure modes

- Invalid or unrecognized duration format returns an error response
- Empty or missing 'duration' field may return a validation error
- Extremely large or malformed values may fail parsing
- Ambiguous formats not following standard shorthand notation (e.g. '1 hour') may not be recognized

## How this service works

Parse a duration like "1h30m" into seconds and components

## Output

Returns the parsed duration broken down into total seconds as a number and individual named components (hours, minutes, seconds), derived from the input shorthand duration string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "duration": {
   "type": "string",
   "description": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/duration-string-parser-6bd8927a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402render-u5vwpxpyua-uc.a.run.app](https://www.zero.xyz/host/x402render-u5vwpxpyua-uc.a.run.app/llms.txt)
