{"uid":"cap_PSJU_JwS2k7WKY7hAOHmk","slug":"postcache-media-url-proxy-22d0ebf7","name":"PostCache Media URL Proxy","description":"Instagram, Threads and Facebook only take media from a public URL. postcache gives your agent one, checks the file against the platform's rules, and deletes it after the post.","url":"https://postcache.dev/v1/media/from-url?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["source_url","target"],"properties":{"ttl":{"type":"integer","maximum":604800,"minimum":3600},"target":{"enum":["instagram.feed","instagram.carousel","instagram.reels","instagram.story","threads","facebook.page"],"type":"string"},"convert":{"enum":["crop","pad"],"type":"string"},"dry_run":{"type":"boolean"},"filename":{"type":"string"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL; private and internal addresses are refused"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"size":{"type":"integer"},"checks":{"type":"object","properties":{"kind":{"enum":["image","video","unknown","unreadable"],"type":"string"},"pass":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}},"target":{"enum":["instagram.feed","instagram.carousel","instagram.reels","instagram.story","threads","facebook.page"],"type":"string"},"problems":{"type":"array","items":{"type":"object","properties":{"fix":{"type":"string"},"rule":{"type":"string"},"message":{"type":"string"}}}}}},"status":{"enum":["ready"],"type":"string"},"target":{"enum":["instagram.feed","instagram.carousel","instagram.reels","instagram.story","threads","facebook.page"],"type":"string"},"expires_at":{"type":"string","format":"date-time"},"content_type":{"type":"string"}}}}}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4zshuCJkoRPlSNFFCAPss","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches media from a source URL, validates it against platform-specific rules for Instagram/Threads/Facebook, hosts it at a temporary public URL, and auto-deletes it after posting.","exampleAgentPrompt":"I need to post this image at https://myserver.internal/product-shot.jpg to my Instagram feed — can you run it through PostCache to get a public URL and make sure it passes Instagram's rules first?","exampleUseCases":[{"title":"Instagram feed post from private server","prompt":"I want to post this image at https://assets.mybrand.com/launch-photo.jpg to my Instagram feed. Can you get me a public URL for it and verify it meets Instagram's requirements? Set it to expire in 4 hours."},{"title":"Validate video before Reels upload","prompt":"Before I publish this video to Instagram Reels, can you check if it passes all the platform rules? The file is at https://cdn.example.com/promo-reel.mp4 — flag any problems so I can fix them with a dry run first."},{"title":"Threads post with auto-cropped image","prompt":"I have a landscape image at https://storage.myapp.com/banner.jpg that I want to post to Threads, but I'm not sure it's the right aspect ratio. Can you proxy it through PostCache with crop conversion applied so it fits properly?"}],"resultDescription":"Returns a JSON object containing a temporary public URL for the media, a unique media ID, file size in bytes, content type, expiry timestamp, target platform, and a checks object detailing whether the file passes platform rules — including the media kind (image/video), pass/fail status, any notes, and specific problems with suggested fixes.","failureModes":["Source URL is private, localhost, or internal address — refused with an error","Media file fails platform validation checks (wrong aspect ratio, file size too large, unsupported codec)","Source URL returns a non-200 response or times out","Unsupported target platform value provided","TTL out of range (below 3600 or above 604800 seconds)","Payment not received or insufficient USDC balance","Media type unreadable or corrupted at source URL"],"whenToPreferThis":"Use PostCache when an AI agent needs to post media to Instagram, Threads, or Facebook and the source file is not already at a publicly accessible URL, or when you need to pre-validate media against platform rules before attempting an upload. It is specifically designed for Meta platforms and handles temporary hosting plus rule-checking in a single call, making it ideal for automated social media posting workflows where the agent must ensure compliance before spending API quota on a failed post.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T22:56:11.803Z","isFirstParty":false,"canonicalSlug":"postcache-media-url-proxy-22d0ebf7"}