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.

agent session · reel for @yourbrand
  1. $ PUT /v1/media reel.mp4 14.2 MB
  2. ← 402 Payment Required $0.01 · x402 · stripe-mpp
  3. → paid 0.01 USDC
  4. ← 201 Created
  5. url https://cdn.postcache.dev/m/7f3k/reel.mp4
  6. checks instagram.reels pass 1080×1920 · H.264 · 0:24
  7. expires 24h or on DELETE
  8. $ POST graph.facebook.com/…/media video_url=…
  9. ← 200 OK published
  10. $ DELETE /v1/media/7f3k → gone, nothing stored

Five steps, one of them yours.

  1. 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. 2.0

    Pay

    The agent doesn't need an account. The first answer is 402 Payment Required with a price; the agent pays with x402 (USDC) or Stripe and repeats the request. A free API key skips this step.

    402 Payment Required
    x-price: 0.01 USD
    x-accept: x402, stripe-mpp
  3. 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. 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. 5.0

    Expire

    The URL lives for 24 hours by default, up to 7 days. Call DELETE after 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 https://postcache.dev/mcp to the agent's config and it gets upload_media, check_media, get_media and delete_media.
  • 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.
.mcp.json
{
  "mcpServers": {
    "postcache": {
      "type": "http",
      "url": "https://postcache.dev/mcp"
    }
  }
}

Pay for what the agent posts.

Every option includes the platform checks and 24 hours of hosting per file.

PlanPriceIncludesPays with
Pay per use$0.01 per uploadNo account or API key: the agent pays with each request.USDC via x402 (Base) or MPP (Tempo)
Credit pack$5 for 500 uploadsAn API key with 500 uploads, for agents without a card on a plan. Credits don't expire.USDC via x402 or MPP
Free$0100 uploads a month, API key, MCP, conversionsNo card
Builder$9 / month2,000 uploads a month, 7-day hosting optionCard
Studio$49 / month20,000 uploads a month, 7-day hosting optionCard

Builder and Studio prices exclude VAT. Customers in the EU pay VAT on top at checkout; businesses in another EU country with a valid VAT ID don't (reverse charge).

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.

Start free

100 uploads a month, an API key and MCP, no card. Sign up with your email; the link we send creates your account.

Sign up free

Questions: hello@postcache.dev