Skip to main content
A post takes media only from your PostQueen media library. A file on your disk or a link to another site is refused, so every image and video goes through postqueen upload first. The upload returns a path, and that path is what -m takes.

Upload a file

The answer is the new media item. You need two fields: path, which goes into a post, and id, which you use to check a video. The file also appears in the app’s media library.

Attach it to a post

tail -n +2 drops the status line so jq gets JSON. For several files, separate the paths with commas: -m "$IMG1,$IMG2". In a --json file, each image is an object with the id and path from the upload.

What you can upload

PostQueen reads the file’s contents to tell its type, so renaming a file does not change what it is. AVIF, BMP and TIFF upload fine but a post refuses them with File must have a valid extension: .png, .jpg, .jpeg, .gif, .webp, or .mp4: convert them to JPEG or PNG before you upload. Each network also has its own, much smaller limits on what it publishes; postqueen integrations:settings <channel-id> lists them under rules.

Wait for a video

An image is ready as soon as the upload returns. A video comes back with "status": "processing" while PostQueen checks it and, when needed, converts it into an MP4 the networks accept. That takes from a few seconds to a few minutes.
  • An MP4 can go into a post right away, with the path from the upload answer. When the post publishes, PostQueen uses the converted file.
  • A MOV is converted to MP4 first, and a post takes no MOV, so wait until it is ready and use the new path.
The CLI has no command for the wait. Ask the API’s media status route until the status changes, then take the path from its answer:
The API takes the key as it is in the Authorization header, with no Bearer in front. When the status is failed, processingError says why. A MOV that fails is removed from the library. The CLI uploads files from your disk only. To bring in an image or video from a public link, call the API’s upload from URL route, or ask an agent connected over MCP.

Limits

A workspace can upload 300 files an hour, counted apart from its 30 posts:create runs an hour. Limits and errors has the details.

If an upload fails

Next steps

Posts and channels

Create, list, change and delete posts.

Examples by network

Video posts for TikTok and YouTube, image posts for Instagram, and more.
Last modified on September 23, 2026