{"uid":"cap_aBTfUNHrjRkJqIM_4Rmkj","slug":"webref-time-add-duration-15636143","name":"WebRef Time Add Duration","description":"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.","url":"https://webref.johnaio281.workers.dev/api/time/add_duration?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yoaMDcwSvYXVt59XdL761","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Adds a specified duration (milliseconds, seconds, minutes, hours, days, or weeks) to a given timestamp and returns the resulting datetime","exampleAgentPrompt":"What datetime do I get if I add 72 hours to 2024-06-15T09:00:00Z?","exampleUseCases":[{"title":"Deadline calculation for task scheduling","prompt":"My task started at 2024-07-01T08:00:00Z and needs to be done within 5 days — what's the exact deadline timestamp?"},{"title":"Token expiry window computation","prompt":"If I issued a token at 2024-06-20T14:30:00Z, when does it expire after 3600 seconds?"},{"title":"Meeting reminder offset","prompt":"I have an event at 2024-08-10T15:00:00Z and I want to send a reminder 30 minutes before — what timestamp should I schedule the reminder for? Use a negative amount if needed, or compute 2024-08-10T15:00:00Z minus 30 minutes."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:40:51.954Z","isFirstParty":false,"canonicalSlug":"webref-time-add-duration-15636143"}