Media · Robopost Docs

Media

On this page

There are two ways to put media in a post: upload the file first and use its ID, or pass a public URL in the post and let Robopost download it.

You need: an API key.

Upload a file

curl -X POST https://public-api.robopost.app/v1/medias/upload \
  -H "Authorization: Bearer $ROBOPOST_API_KEY" \
  -F "[email protected]"
{ "id": "…", "name": "launch", "extension": "mp4", "storage_object_id": "b1e3…" }

Use storage_object_id in a post: image_object_ids: ["…"], video_object_id: "…" or gif_object_id: "…". Videos are converted to MP4 when needed and get thumbnails; images are optimized. The file also appears in the dashboard's media library.

Kind Extensions
Images jpg, jpeg, png, bmp, heic, tiff, webp
Videos mp4, mov, webm, mpeg, avi, flv, wmv, 3gp, m4v

Other extensions get 415.

Or pass a URL

Put image_urls, video_url or gif_url in the create request. The URL must be public and point straight at the file (no login page, no HTML preview). The post stays in status preparing_media until the download finishes. If it fails, the post becomes failed with MEDIA_DOWNLOAD_FAILED and the reason.

Next

Channels and collections