Media hosting for AI agents
Instagram wants a URL. Give it one.
Instagram, Threads and Facebook won't take a file straight from your agent. They fetch media from a public link. postcache gives your agent that link, checks the file against the platform's rules first, and deletes it once the post is live.
- $ PUT /v1/media reel.mp4 14.2 MB
- ← 402 Payment Required $0.01 · x402 · stripe-mpp
- → paid 0.01 USDC
- ← 201 Created
- url https://cdn.postcache.dev/m/7f3k/reel.mp4
- checks instagram.reels pass 1080×1920 · H.264 · 0:24
- expires 24h or on DELETE
- $ POST graph.facebook.com/…/media video_url=…
- ← 200 OK published
- $ DELETE /v1/media/7f3k → gone, nothing stored
Five steps, one of them yours.
-
1.0
Upload
Your agent sends the file with one
PUT. Images, carousels and Reels.PUT /v1/media content-type: video/mp4 x-target: instagram.reels -
2.0
Pay
The agent doesn't need an account. The first answer is
402 Payment Requiredwith a price; the agent pays with x402 (USDC) or Stripe and repeats the request. On a plan, an API key skips this step.402 Payment Required x-price: 0.01 USD x-accept: x402, stripe-mpp -
3.0
Check
Before we return a URL, the file is checked against the target platform: aspect ratio, format, codec, length, size. If it fails, we convert it, or tell the agent exactly what to fix.
"checks": { "instagram.feed": "fail", "reason": "aspect 2.1:1, max 1.91:1", "fix": "?convert=crop-4x5" } -
4.0
Post
This is the one step that's yours: your agent hands the URL to the platform API it already uses. The platform fetches the file from us over HTTPS.
POST /{ig-user-id}/media video_url=https://cdn.postcache.dev/m/7f3k/reel.mp4 media_type=REELS -
5.0
Expire
The URL lives for 24 hours by default, up to 7 days. Call
DELETEafter the post is published and the file is gone straight away. Nothing piles up in a bucket you forgot about.DELETE /v1/media/7f3k 204 No Content
For agents
Your agent can find it, read it and pay for it alone.
- MCP server. Add one line to the agent's config and it gets
upload_media,check_mediaanddelete_mediatools. - OpenAPI spec and llms.txt. Everything an agent needs to call the API without a human reading docs.
- Budget limits. The human sets a daily cap; the agent can't spend past it.
- EU hosting. Files are stored in the EU and never used for anything else.
{
"mcpServers": {
"postcache": {
"type": "http",
"url": "https://postcache.dev/mcp"
}
}
}
Pay for what the agent posts.
Early-access prices. Every option includes the platform checks and 24 hours of hosting per file.
| Plan | Price | Includes | Pays with |
|---|---|---|---|
| Pay per use | $0.002 per image $0.01 per video | Pay per request, without an account or API key. | x402 · Stripe MPP |
| Builder | $9 / month | 2,000 uploads, API key, 7-day hosting option | Card |
| Studio | $49 / month | 20,000 uploads, conversions, your own subdomain | Card |
Questions
- Why not just use S3 or R2?
- You can. Then you also write the public-access policy, the expiry rules, the cleanup job and the format checks, and find out about a wrong aspect ratio from a failed post. postcache is those parts, already done.
- Which platforms?
- Instagram (feed, carousel, Reels, Stories), Threads and Facebook Pages at launch: the APIs that only accept media by URL. X and LinkedIn take direct uploads, so you don't need us there.
- What happens to my files?
- They're stored in the EU, served only at the URL we give you, and deleted when the URL expires or when you call
DELETE. We keep no backups and never use your media for training or anything else. - What if the post fails?
- The URL stays valid until it expires, so the agent can retry. If the platform rejected the file, the check result tells it why.
Get early access
We're opening postcache to a small group of agent builders first. Tell us what your agent posts and where.
Questions: hello@postcache.dev