# WebRef Time Add Duration

> WebRef Time Add Duration 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).

Adds a specified duration (milliseconds, seconds, minutes, hours, days, or weeks) to a given timestamp and returns the resulting datetime

## Facts

- Endpoint: GET https://webref.johnaio281.workers.dev/api/time/add_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-time-add-duration-15636143
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aBTfUNHrjRkJqIM_4Rmkj

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-time-add-duration-15636143
```

Example prompt: What datetime do I get if I add 72 hours to 2024-06-15T09:00:00Z?

## When to prefer this

Choose this endpoint when an AI agent needs to perform reliable, server-side datetime arithmetic — adding a precise duration to a known base timestamp — without relying on the agent's own clock or date math, especially in contexts where deadline precision matters or when the agent's local time handling is unreliable.

## Known failure modes

- Missing required 'amount' parameter returns a validation error
- Invalid or missing 'at' timestamp format causes a parse error
- Unrecognized 'unit' value outside the enum returns a bad request
- Non-finite or non-numeric 'amount' causes a validation failure
- Payment not provided or insufficient USDC triggers a 402 Payment Required 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 a computed datetime representing the original timestamp advanced by the specified amount and unit — typically as an ISO 8601 string and/or Unix timestamp, usable directly for scheduling, deadline tracking, or further time comparisons.

## 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": {
     "at": {
      "def": {
       "type": "string"
      },
      "type": "string"
     },
     "type": "object",
     "unit": {
      "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"
     },
     "amount": {
      "def": {
       "type": "number",
       "checks": []
      },
      "type": "number",
      "isFinite": true
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/webref-time-add-duration-15636143/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)
