{"uid":"cap_N8UCEU2Hh0DtM8M4mxt78","slug":"api-x402node-dev-b5f9f935","name":"Relative Time Formatter","description":"Relative time formatter, time ago, X minutes ago, in 2 hours, human readable time, fuzzy time, relative datetime, social media timestamps. Format a datetime as relative to now or another base (e.g. '3 hours ago', 'in 2 days'). Accepts payment on Base or Solana — either network works.","url":"https://api.x402node.dev/time/format-relative","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"],"type":"string"},"queryParams":{"type":"object","properties":{"base":{"type":"string","description":"Base (optional)"},"time":{"type":"string","description":"Time (optional)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0022","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.0022/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0022","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0022","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vK-FRFp_cNSVdGS6MI4NQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0022","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Formats a datetime as a human-readable relative time string (e.g. '3 hours ago', 'in 2 days') relative to now or a specified base time.","exampleAgentPrompt":"Format this timestamp as a relative human-readable string like '3 hours ago' or 'in 2 days': the datetime is 2025-06-10T08:30:00Z, using now as the base.","exampleUseCases":[{"title":"Social feed comment timestamps","prompt":"I have a list of comment timestamps from our blog and I want to display them in a Twitter-style format like '5 minutes ago' or 'in 3 days'. Can you convert these ISO datetimes to relative human-readable strings for me?"},{"title":"Activity log elapsed time display","prompt":"We have a user activity feed that shows events like logins and file uploads. Instead of showing raw timestamps, I want each event to say something like '2 hours ago' or 'just now'. Can you format these datetimes as relative time strings?"},{"title":"Upcoming event countdown formatting","prompt":"I need to show users how far away their scheduled meetings and deadlines are, using friendly language like 'in 2 days' or 'in 45 minutes' instead of exact timestamps. Can you convert these future datetimes into that kind of relative format?"}],"resultDescription":"A human-readable relative time string such as '3 hours ago', 'in 2 days', 'just now', or '5 minutes ago', representing the input datetime relative to now or a specified base time.","failureModes":["Invalid datetime format returns a 400 error","Missing required datetime field returns validation error","Future or past dates with extreme ranges may produce edge-case labels","Malformed base datetime causes fallback to current time or error"],"whenToPreferThis":"Use this endpoint when you need to display timestamps in a social-media-friendly, human-readable relative format (e.g. blog posts, activity feeds, comment timestamps) and want a simple POST-based utility without building your own date arithmetic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:58:50.732Z","isFirstParty":false}