Skip to content

Images and videos

Any public URL works in media. If the file is on your machine or in private storage, upload it to Marsial in two steps:

Terminal window
curl -X POST "https://api.marsial.dev/v1/media/upload-url" \
-H "Authorization: Bearer $MARSIAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filename": "jacket.mp4",
"contentType": "video/mp4",
"size": 48211234
}'
200 OK
{
"data": {
"uploadUrl": "https://…",
"publicUrl": "https://…/jacket.mp4",
"kind": "video",
"expiresIn": 900
}
}
Terminal window
curl -X PUT "$UPLOAD_URL" \
-H "Content-Type: video/mp4" \
--data-binary @jacket.mp4

Then use publicUrl in the post’s media.

Type Formats Max
Image JPEG, PNG, WebP 20 MB
GIF GIF 20 MB
Video MP4, MOV, WebM 1 GB

Each media item has a type (image, video, gif or document), a url and, optionally, altText for accessibility. Up to 35 per post. Each network applies its own limits (for example 10 images in an Instagram carousel, 4 on X).

© 2026 Marsial by TWOFACES ·marsial.dev ·Dashboard ·soporte@twofacesco.com