media_id (a UUID), then reference that ID in the media_ids array when you create a post. There is no image_url or video_url field on a post: a raw public URL placed in media_ids is silently ignored, and the post publishes with no media.
Uploading and verifying media does not cost credits. A credit is charged only when the post publishes or is scheduled.
Choosing an upload path
There are two ways to get a file into SocialAPI. Both return amedia_id that you use the same way.
If a file is larger than 50 MB, use the presigned-URL path.
Server-side upload
Send the file as multipart form data in a single request. Thefile field is required.
ready. Pass the media_id in media_ids on your next POST /v1/posts call (see Using media in posts).
Presigned URL upload
Use this path for large files. It has three steps: request a signed URL, upload the bytes to it, then verify. Step 1: Request a signed upload URL. Bothmedia_type (the file’s MIME type) and filename are required.
upload_url is valid for 15 minutes.
Step 2: Upload the file with an HTTP PUT to upload_url. The Content-Type must match the media_type you declared in step 1.
pending to ready.
Using media in posts
Pass one or moremedia_id values in the media_ids array on POST /v1/posts. Order is preserved. A single entry produces an image or video; multiple entries produce a carousel, subject to each platform’s limits.
Managing your library
List media. Returns yourready files, newest first, with cursor pagination (default 50 per page, max 100). Each item includes a short-lived url for previewing the file.
X-Storage-Used and X-Storage-Limit response headers on media requests (-1 means unlimited).
Storage limits
An upload that would exceed your quota returns
413. On the presigned path the object is removed and the media is marked failed.
Constraints and gotchas
- A raw public URL in
media_idsis silently ignored. Upload first, then pass themedia_id. - The verify step is mandatory on the presigned path. Without it, media stays
pendingand publishing fails withMedia not found. - The server-side upload endpoint caps files at 50 MB. Use the presigned path for anything larger.
- Media has three states:
pending(created, bytes not yet confirmed),ready(usable in posts), andfailed(quota exceeded, or the object was missing at verify). - Video duration is detected automatically at verify or upload time. You do not need to send it.
- Per-platform format, size, and count rules are enforced when you publish. See each platform’s posts page.