Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: postcache M API
version: 1.0.0
description: Public, short-lived media URLs for AI agents that post to Instagram, Threads and Facebook. Files are checked against the target platform's media rules; with convert, fixable files are converted in the background.
contact:
email: hello@postcache.dev
x-guidance: 'Upload an image or video for Instagram, Threads or a Facebook Page and get a public HTTPS URL that passes the platform''s media checks. PUT /v1/media with the file as the body and the X-Target header (instagram.feed, instagram.carousel, instagram.reels, instagram.story, threads, facebook.page), or POST /v1/media/from-url with {source_url, target}. Without an API key the first answer is 402: pay 0.01 USD in USDC (x402 on Base or MPP on Tempo) and repeat the request. Add dry_run=1 to check a file for free. Delete the file after posting with DELETE /v1/media/{id} and the x-delete-token from the answer.'
servers:
- url: https://postcache.dev
security:
- bearer: []
tags:
- name: M
paths:
/m/{id}/{name}:
parameters:
- name: id
in: path
required: true
description: Media id
schema:
type: string
- name: name
in: path
required: true
description: File name from the upload answer
schema:
type: string
get:
summary: The public file (media host)
operationId: getFile
security: []
servers:
- url: https://cdn.postcache.dev
description: 'Served only on cdn.postcache.dev; no key needed. Supports single byte ranges (Range: bytes=start-end).'
parameters:
- name: Range
in: header
required: false
schema:
type: string
responses:
'200':
description: The file
'206':
description: Partial content
'404':
description: Unknown id or name
'410':
description: Expired or deleted
'416':
description: 'Range starts past the end (Content-Range: bytes */size)'
tags:
- M
components:
securitySchemes:
bearer:
type: http
scheme: bearer
description: pc_live_... early-access key
deleteToken:
type: apiKey
in: header
name: x-delete-token
description: One-time token from a pay-per-use upload answer; reads and deletes that one file