# ISO 8601 Duration Converter

> ISO 8601 Duration Converter is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-18).

Converts ISO 8601 duration strings (e.g. P1DT2H30M) to seconds, minutes, hours, days, and plain English, or converts seconds back to an ISO duration string

## Facts

- Endpoint: GET https://saylorinnovations.com/api/time/iso-duration?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/iso-8601-duration-converter-c0d03814
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uuleDbDL5PcGwUsTnH3Ja

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 iso-8601-duration-converter-c0d03814
```

Example prompt: Can you convert the ISO 8601 duration P1DT2H30M into total seconds, total minutes, and plain English for me?

## When to prefer this

Use this endpoint when you need to programmatically parse or convert ISO 8601 duration strings into numeric time units or human-readable text, or when you need to serialize a number of seconds back into a standard ISO 8601 duration string. Prefer this over manual parsing logic or general-purpose date libraries when operating in a lightweight agent context without code execution.

## Known failure modes

- Invalid or malformed ISO 8601 duration string returns an error
- Missing required 'duration' query parameter causes a 400-level error
- Durations involving years or months marked as approximate due to variable lengths
- Very large durations may produce null component fields where not applicable

## How this service works

Convert an ISO 8601 duration like P1DT2H30M or PT90M to seconds, minutes, hours, days and plain words, or turn seconds into a duration string

## Output

Returns a JSON object with the conversion direction, total_seconds, total_minutes, total_hours, total_days, a components object breaking the duration into years/months/weeks/days/hours/minutes/seconds, a human-readable plain English description, the ISO 8601 string, an approximate boolean (true when years or months are involved), and optional notes about caveats.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "duration"
     ],
     "properties": {
      "duration": {
       "type": "string",
       "description": "ISO 8601 duration such as P1DT2H30M"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "direction",
      "total_seconds",
      "iso"
     ],
     "properties": {
      "iso": {
       "type": "string",
       "description": "ISO 8601 duration string"
      },
      "note": {
       "description": "Caveat or context for reading the result"
      },
      "human": {
       "type": "string",
       "description": "Duration in plain words"
      },
      "source": {
       "type": "string",
       "description": "Data source the values come from"
      },
      "direction": {
       "type": "string",
       "description": "Conversion direction"
      },
      "components": {
       "type": "object",
       "properties": {
        "days": {
         "type": [
          "number",
          "null"
         ],
         "description": "Number of days"
        },
        "hours": {
         "type": [
          "number",
          "null"
         ],
         "description": "Whole hours"
        },
        "weeks": {
         "type": [
          "number",
          "null"
         ],
         "description": "Whole weeks"
        },
        "years": {
         "type": [
          "number",
          "null"
         ],
         "description": "Years covered"
        },
        "months": {
         "type": [
          "number",
          "null"
         ],
         "description": "Number of months"
        },
        "minutes": {
         "type": [
          "number",
          "null"
         ],
         "description": "Whole minutes"
        },
        "seconds": {
         "type": [
          "number",
          "null"
         ],
         "description": "Seconds"
        }
       },
       "descri
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/iso-8601-duration-converter-c0d03814/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
