# WebRef Time Until

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

Calculates the duration or time remaining from one moment to another, returning deadline arithmetic results like how long until a target datetime.

## Facts

- Endpoint: GET https://webref.johnaio281.workers.dev/api/time/time_until?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-until-5ff71dff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7iXoVUC_Txhc4rbRTsyaN

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-until-5ff71dff
```

Example prompt: How long is it from now until Friday December 31st at midnight? I need the duration broken down so I can plan my deadline.

## When to prefer this

Choose this endpoint when you need precise deadline arithmetic — computing the exact duration between two points in time — without building custom date math. It is ideal for SLA tracking, countdown timers, scheduling logic, and any agent workflow that must reason about how much time remains until or has passed since a specific moment. Prefer it over general-purpose date libraries when you want a pay-per-call, no-signup, serverless utility with no authentication overhead.

## Known failure modes

- Missing or malformed 'to' query parameter returns an error
- Invalid datetime format in 'from' or 'to' causes a 400-level response
- 'from' datetime after 'to' datetime may return negative duration or an error
- Payment failure via x402/MPP blocks the request with a 402 response
- Rate limiting or server errors return 5xx responses

## 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 structured result containing the computed duration between the 'from' and 'to' datetimes, expressed as human-readable intervals (e.g. days, hours, minutes, seconds) and possibly raw seconds or a formatted string indicating time remaining or elapsed.

## 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": "string"
      },
      "type": "string"
     },
     "from": {
      "def": {
       "type": "string"
      },
      "type": "string"
     },
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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