API to Post Images and Videos to Social Media
Get your API key → Images and video to nine networks, one API.
Upload the file, get a media ID back, attach it to a post — three steps to publish images or video to all nine networks — X/Twitter, LinkedIn, Instagram, Facebook, TikTok, YouTube, Threads, Bluesky, and Pinterest — programmatically.
Step 1 — upload
curl -X POST https://api.schedpilot.com/developers/v1/media/upload \
-H "X-API-KEY: $SCHEDPILOT_KEY" \
-F "file=@promo.mp4"
Multipart form data, field name file. Returns 201:
{ "media_id": "video-7", "type": "video", "mime_type": "video/mp4" }
Step 2 — attach and schedule
curl -X POST https://api.schedpilot.com/developers/v1/post \
-H "X-API-KEY: $SCHEDPILOT_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "New demo is live.",
"date": "2026-08-11",
"time": "09:30",
"attachments": ["video-7"],
"accounts": [{"id": 1234, "type": "instagram"}]
}'
What you can send
| Formats | |
|---|---|
| Images | JPG, PNG, GIF, WebP |
| Video | MP4, MOV, AVI, MKV, WEBM, MPEG |
| Max file size | 5 GB per file |
The rules that will bite you
- A single post cannot mix images and videos. Send one or the other in
attachments. - Upload before you post.
attachmentsonly accepts IDs that already exist — there is no inline upload on the create call. - Media upload counts as a write. It shares the 30 writes/hour budget with post creation, so a carousel of five images plus the post is six writes, not one.
- Per-network rules still apply. Each platform has its own duration, aspect ratio, and codec constraints; failures come back through error handling rather than being silently swallowed.
Managing what you have uploaded
GET /developers/v1/media/list returns your library; DELETE /developers/v1/media/delete removes an item. Both are documented in the Media Library reference.
From an AI agent
The schedpilot-mcp package exposes upload_media as a tool alongside create_post, so an agent can attach an image it generated and schedule the post in the same run.
Included on every plan, from $21/month. Seven-day free trial, no charge during the trial.
SchedPilot