postcache: public media URLs for AI agents that post to Instagram
Back to Blog
GeneralNovember 12, 20265 min read

postcache: public media URLs for AI agents that post to Instagram

Instagram's API won't take a file, only a link to one. Our social media agent needed somewhere to put files for a while. That became postcache, our first app for agents.

In our first post we wrote that we build software whose user is an AI agent rather than a person. postcache is the first one. It started as a problem our own social media agent had. We use it ourselves first and only then offer it to others.

In short: Instagram, Threads and Facebook Pages won't accept a file through their APIs, only a public URL to it. postcache gives the agent that URL, checks up front whether the file passes the platform's rules, and deletes it after the post goes up. 100 uploads a month are free, no card needed.

Instagram wants a URL, not a file

When an agent posts to Instagram through the API, it doesn't send the photo or video. It sends an address Instagram downloads it from. Threads and Facebook Pages work the same way. X and LinkedIn take the file directly, so you don't need postcache there.

So the agent needs somewhere to put the file, public for a while, and then clean it up. Our social media agent first used our own storage for this. On 7 October 2026 Pavel proposed turning it into a service.

What we threw out

We started from "storage for agents" and dropped it before building anything. There is a lot of storage, and some of it already takes payments from agents: x402.storage, Cloudflare R2, Tigris, Pinata. We narrowed it to one thing: media for agents that post to social networks. What postcache adds over plain storage is the check. Before it returns a URL, it verifies that the file passes the target platform's rules.

How an agent uses it

  1. The agent sends the file with one PUT /v1/media request and says where it's going, for example x-target: instagram.reels.
  2. postcache checks aspect ratio, format, codec, length and size. If the file fails, it returns the reason and the fix, for example "aspect 2.1:1, max 1.91:1" and the parameter ?convert=crop-4x5.
  3. The agent gets the URL and hands it to Instagram.
  4. The URL lives for 24 hours, up to 7 days on a paid plan. The agent can delete the file right after the post is published (DELETE).

An agent that speaks MCP adds https://postcache.dev/mcp and gets the tools upload_media, check_media, get_media and delete_media. On 10 October we listed postcache in the official MCP server registry.

Used here first

The first live test ran on 7 October. postcache rejected a PNG meant for the Instagram feed and told us to re-encode it as JPEG; Threads accepted the same file. That's exactly the kind of error we want to catch before Instagram sends it back to the agent. A Reel shot at 120 frames per second was converted to a ready MP4 in 6 seconds.

The same day our publishing script moved to postcache. It uploads each image with the target instagram.feed or instagram.carousel and gives Instagram the postcache URL. All 47 approved images passed the check. Reels get the instagram.reels check before they go into the queue. A person then approves each post before it's published, like everything else that goes out from us.

Every stage went through code review before it was deployed. In the upload-by-URL feature it found one critical bug, which we fixed before it went live.

What didn't work

  • On 13 October uploads failed between 19:30 and 20:45. We had put a new gateway for access keys in front of the publishing script, and it refused connections to our own internal address. Now only the calls to Meta go through the gateway. The post went out at 21:00.
  • We wanted to settle per-upload USDC payments through Coinbase. Its business accounts are only available in the US and Singapore, so x402 payments are settled by another service, PayAI. After 1,000 free settlements each one costs about $0.0023, roughly 23% of a one-cent upload.
  • We removed card payments for credit packs again. Stripe's payment tokens for agents only work in the US. Packs are now paid in USDC only.

Pricing

  • Free: 100 uploads a month, API key, MCP and conversions, no card.
  • Builder: $9 a month, 2,000 uploads, URLs for up to 7 days.
  • Studio: $49 a month, 20,000 uploads, URLs for up to 7 days.
  • Pay per use: $0.01 per upload, no account and no key. The agent pays in USDC with each request (x402 on Base or MPP on Tempo).
  • Credit pack: $5 for 500 uploads, credits don't expire.

Builder and Studio prices exclude VAT. Current pricing is on postcache.dev.

Why we build this

Each of our apps for agents starts with something our own Jarvis needed. postcache solves one narrow problem we had ourselves. What Jarvis does in an ordinary week is in Jarvis at work.

An AI on our team wrote this post. A person read and approved it before it went up.

Building an agent that posts to Instagram, Threads or Facebook Pages? Try postcache for free. Need a custom agent or automation? Book a call with Matej.