# WebRef Duration Converter

> WebRef Duration Converter is a paid API for AI agents from webref.johnaio281.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-22).

Converts a numeric duration value between time units (milliseconds, seconds, minutes, hours, days, weeks)

## Facts

- Endpoint: GET https://webref.johnaio281.workers.dev/api/time/convert_duration?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/webref-duration-converter-a6a8c792
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EddIiaJDQ1xMuFvF4ZKgS

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 webref-duration-converter-a6a8c792
```

Example prompt: Convert 7200 seconds into hours for me — use the WebRef duration converter.

## When to prefer this

Choose this endpoint when an AI agent needs to programmatically convert a duration between standard time units (milliseconds through weeks) without writing custom arithmetic, especially in agentic pipelines where consistent unit normalization is needed and you want a pay-per-call model with no API key setup.

## Known failure modes

- Missing required 'value' query parameter returns an error
- Invalid or unsupported unit enum value for 'from' or 'to' returns a validation error
- Non-numeric value parameter causes a schema validation failure
- Network or worker downtime results in a 5xx response

## How this service works

Web standards and time reference for AI agents: HTTP status codes with what the client should do, retry semantics, MIME types and content-type matching, request-method safety and idempotency, plus deadline arithmetic - time until a moment, weekday and business-day checks, duration conversion and Unix timestamps. Pay per call in USDC on Base via x402 or USDC on Tempo via MPP. No signup, no API key, no KYC.

## Output

Returns the converted numeric duration in the requested target unit, e.g. given value=3600, from=seconds, to=hours the result is 1.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "to": {
      "def": {
       "type": "default",
       "innerType": {
        "def": {
         "type": "enum",
         "entries": {
          "days": "days",
          "hours": "hours",
          "weeks": "weeks",
          "minutes": "minutes",
          "seconds": "seconds",
          "milliseconds": "milliseconds"
         }
        },
        "enum": {
         "days": "days",
         "hours": "hours",
         "weeks": "weeks",
         "minutes": "minutes",
         "seconds": "seconds",
         "milliseconds": "milliseconds"
        },
        "type": "enum",
        "options": [
         "milliseconds",
         "seconds",
         "minutes",
         "hours",
         "days",
         "weeks"
        ]
       },
       "defaultValue": "seconds"
      },
      "type": "default"
     },
     "from": {
      "def": {
       "type": "default",
       "innerType": {
        "def": {
         "type": "enum",
         "entries": {
          "days": "days",
          "hours": "hours",
          "weeks": "weeks",
          "minutes": "minutes",
          "seconds": "seconds",
          "milliseconds": "milliseconds"
         }
        },
        "enum": {
         "days": "days",
         "hours": "hours",
         "weeks": "weeks",
         "minutes": "minutes",
         "seconds": "seconds",
         "milliseconds": "milliseconds"
        },
        "type": "enum",
        "options": [
         "milliseconds",
         "seconds",
         "minutes",
         "hours",
         "days",
         "weeks"
        ]
       },
       "defaultValue": "seconds"
      },
      "type": "default"
     },
     "type": "object",
     "value": {
      "def": {
       "type": "number",
       "checks": []
      },
      "type": "number",
      "isFinite": true
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/webref-duration-converter-a6a8c792/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from webref.johnaio281.workers.dev](https://www.zero.xyz/host/webref.johnaio281.workers.dev/llms.txt)
