# Delx Commerce Duration Parse API

> Delx Commerce Duration Parse API 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-02).

Parses natural language or structured duration strings into standardized duration values

## Facts

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

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-duration-parse-api-f888af68 -d '<json body>'
```

Example prompt: Parse the duration string '2h 45m 30s' and give me its total value in seconds.

## When to prefer this

Choose this endpoint when you need to normalize varied human-readable or shorthand duration strings (e.g. '2h30m', 'one hour', 'P1DT2H') into a machine-usable format without setting up your own parsing logic. It's especially useful in agent workflows where user-supplied time expressions need to be converted to numeric values for scheduling, deadlines, or interval calculations. At $0.001 USDC per call with no signup required, it's practical for lightweight, pay-per-use agent pipelines using x402 on Base or Solana.

## Known failure modes

- Unparseable or ambiguous duration string returns an error response
- Empty or missing input body fields cause validation errors
- Malformed JSON body returns 400-level error
- Ambiguous expressions like 'a while' or 'soon' may fail or return unexpected results
- Non-English duration expressions may not be supported

## 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 containing the parsed duration, likely including the total duration in a numeric unit (such as seconds or milliseconds) and possibly structured fields for hours, minutes, seconds, and the canonical representation of the input duration string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-duration-parse-api-f888af68/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)
