Post a video
Permissions used: posts:write, plus posts:schedule to schedule.
Get the file in
Section titled “Get the file in”For a public https link straight to the file (not a web page):
Import https://example.com/demo.mp4 and draft it as an Instagram Reel and a LinkedIn video post.import_media_from_url copies it in (images up to 20 MB, video up to 300 MB) and returns an asset.
Agents that can run commands, such as Claude Code, upload in three steps:
create_media_uploadreturns a presigneduploadUrland the headers to send.PUTthe file to it within 15 minutes:Terminal window curl -X PUT -H 'content-type: video/mp4' --upload-file clip.mp4 '<uploadUrl>'complete_media_uploadreturns theasset.
Draft and publish
Section titled “Draft and publish”Pass the asset as media to create_draft_post. After approval:
- X, LinkedIn (MP4 only), Instagram, TikTok and YouTube finish processing on the platform within a few minutes, so the post shows
awaiting_platformuntil it’s live. - Instagram posts videos as Reels. Facebook Pages post vertical videos of 3 to 90 seconds as Reels.
- YouTube uploads use the copy as the description and
youtube.titleas the title; vertical or square videos up to 3 minutes post as Shorts. - TikTok drafts land in your TikTok inbox to finish in the TikTok app.
Uploaded files count toward your workspace storage, and the largest video you can upload depends on your plan. get_usage shows both.