Guides

Media & images

Upload media once to get an id, then attach it to a post. Each network has its own limits — a media set that isn't valid for one target fails just that target.

Upload

POST the raw bytes with the correct Content-Type. You get back a MediaAsset.

curl -X POST https://api.postlake.dev/v1/media \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: image/jpeg" \
  --data-binary @photo.jpg
{ "id": "med_abc", "url": "https://…", "contentType": "image/jpeg", "size": 208134 }

Supported: JPEG, PNG, WebP images; MP4 video. Video-only networks (YouTube, TikTok) require a video asset.

Attach — globally or per platform

Put ids in media to attach to every account, or use mediaOverrides to give each platform its own set (a square image for Instagram, a video for TikTok).

{
  "text": "Launch day",
  "media": ["med_abc"],
  "mediaOverrides": { "tiktok": ["med_video"] },
  "accounts": ["acc_ig", "acc_tt"]
}

Per-platform media limits

PlatformMedia
BlueskyUp to 4 images, or 1 video
ThreadsImage carousel, or video
InstagramImage or video (Reels)
TikTok / YouTubeVideo only
X, LinkedIn, FacebookImages and video
PinterestImage or video (needs a boardId)

These are the practical rules today; call GET /v1/platforms/{platform} for the live, authoritative limits (max count, size, aspect) so you — or an agent — can validate before posting.

Alt text

Provide accessibility alt text per media item through platformOptions / media alt overrides. If a media set is invalid for a target, that target fails with a clear error and the others still publish — see Errors.