{"uid":"cap_EddIiaJDQ1xMuFvF4ZKgS","slug":"webref-duration-converter-a6a8c792","name":"WebRef Duration Converter","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/convert_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":{"to":{"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"},"from":{"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"},"type":"object","value":{"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_NkhxKtV-qwd9sYc149iP_","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":"Converts a numeric duration value between time units (milliseconds, seconds, minutes, hours, days, weeks)","exampleAgentPrompt":"Convert 7200 seconds into hours for me — use the WebRef duration converter.","exampleUseCases":[{"title":"Deadline math in a scheduling agent","prompt":"I have a task that takes 90 minutes — how many seconds is that? Convert 90 minutes to seconds."},{"title":"Normalizing API timeout values","prompt":"Our API returns timeouts in milliseconds, but I need to display them in seconds — convert 45000 milliseconds to seconds."},{"title":"Log analysis duration normalization","prompt":"Convert 2 weeks into days so I can compare it against an integer day-count I got from another API."}],"resultDescription":"Returns the converted numeric duration in the requested target unit, e.g. given value=3600, from=seconds, to=hours the result is 1.","failureModes":["Missing required 'value' query parameter returns an error","Invalid or unsupported unit enum value for 'from' or 'to' returns a validation error","Non-numeric value parameter causes a schema validation failure","Network or worker downtime results in a 5xx response"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to programmatically convert a duration between standard time units (milliseconds through weeks) without writing custom arithmetic, especially in agentic pipelines where consistent unit normalization is needed and you want a pay-per-call model with no API key setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:41:04.874Z","isFirstParty":false,"canonicalSlug":"webref-duration-converter-a6a8c792"}