# Duration Calculator – Time Difference & Elapsed Time

> Duration Calculator – Time Difference & Elapsed Time is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.0022/call, status unknown (last checked 2026-09-14).

Computes the duration between two timestamps, returning a human-readable breakdown of years, months, days, hours, minutes, and seconds.

## Facts

- Endpoint: GET https://api.x402node.dev/time/duration
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-607e65a6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gC-XwW538hLIZAut4lwjM

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 api-x402node-dev-607e65a6
```

Example prompt: How long is it from January 15, 2000 at 9:00 AM to March 22, 2024 at 6:30 PM — give me the breakdown in years, months, days, hours, minutes, and seconds?

## When to prefer this

Use this endpoint when you need a precise, multi-unit human-readable breakdown of the time span between two specific timestamps — especially when you need all components (years through seconds) rather than just total seconds or days. Ideal for age calculators, event duration displays, countdowns, and elapsed-time reporting.

## Known failure modes

- Invalid or unparseable timestamp format returns an error
- End timestamp earlier than start timestamp may return zero or negative duration
- Missing required start or end timestamp returns a 400-level error
- Malformed JSON body results in a parse error
- Timestamps in unsupported timezone formats may cause incorrect calculations

## How this service works

Duration calculator, time difference, elapsed time, days between dates, hours between times, age calculator, how long ago, countdown, time span. Compute the duration between two timestamps with human-readable breakdown (years, months, days, hours, minutes, seconds). Accepts payment on Base or Solana — either network works.

## Output

A structured, human-readable breakdown of the duration between the two provided timestamps, split into component parts: years, months, days, hours, minutes, and seconds.

## 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",
     "properties": {
      "end": {
       "type": "string",
       "description": "End (optional)"
      },
      "start": {
       "type": "string",
       "description": "Start (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-607e65a6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
