# ISO Date Difference

> ISO Date Difference is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Calculates the structured time delta between two ISO-8601 timestamps, returning the difference in discrete units like days, hours, minutes, and seconds.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/date-diff
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/iso-date-difference-18c52e2d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bRuQb_Yl5P0QdcxSDlU9J

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-date-difference-18c52e2d -d '<json body>'
```

Example prompt: How many days, hours, and minutes elapsed between 2024-01-15T08:30:00Z and 2024-03-22T17:45:00Z?

## When to prefer this

Prefer this endpoint when you need a deterministic, structured breakdown of the time delta between two ISO timestamps without writing date math logic yourself. Ideal for agents handling ticket aging, SLA enforcement, session duration reporting, or any workflow where the elapsed time between two precise moments must be decomposed into named units (days, hours, minutes, seconds). Particularly useful in serverless or no-code agent pipelines where shipping a date library is impractical. At $0.001 USDC per call with no API key or subscription required, it suits high-frequency, low-overhead date arithmetic in agentic systems.

## Known failure modes

- Invalid ISO-8601 format for start or end — returns a structured validation error (not billed)
- End timestamp earlier than start timestamp — may return negative delta or an error
- Missing required start or end field — returns a structured validation error (not billed)
- Malformed JSON body — returns a structured validation error (not billed)
- Payment failure via x402 — call is not executed

## How this service works

Difference between two dates. Use for aging tickets, session duration, or SLA breach math. Returns the delta between two ISO timestamps in structured units. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.

## Output

A structured JSON object containing the computed difference between the two ISO timestamps, broken into discrete units such as total days, hours, minutes, and seconds — suitable for direct use in SLA calculations, aging reports, and duration displays without further parsing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "end": {
   "type": "string",
   "format": "date-time",
   "description": "Ending ISO-8601 timestamp for a date range."
  },
  "start": {
   "type": "string",
   "format": "date-time",
   "description": "Starting ISO-8601 timestamp for a date range."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "end": "2026-08-10T12:00:00+00:00",
  "days": 6,
  "start": "2026-08-04T12:00:00+00:00",
  "schema": "delx/date-diff/v1",
  "seconds": 518400
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/iso-date-difference-18c52e2d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
