Publishing
Media
Upload images and video, or import them from a URL.
Upload a file, or import one from a URL, then attach its ID to a post. You can attach up to 20 files to one post.
Upload a file
POST /api/v1/media as multipart/form-data with a file field, and optional alt_text (up to 1,000 characters). Files sent this way can be up to 60 MB; send larger videos with a direct upload.
curl https://socialhelper.app/api/v1/media \
-H "Authorization: Bearer $SOCIALHELPER_API_KEY" \
-F "[email protected]" \
-F "alt_text=A tray of fresh cinnamon rolls"
Large videos: direct upload
For videos over 60 MB (up to 1 GB), send the file straight to storage in three steps:
POST /api/v1/media/uploadswith thefilename,content_typeand exactsizein bytes. You get anupload_idand a presignedurl, valid for an hour.PUTthe file’s bytes to thaturlin one request, with the returnedheaders. The size and type must match what you declared.POST /api/v1/mediawith theupload_id(and optionalalt_text). SocialHelper checks the file like any other and returns the media.
curl https://socialhelper.app/api/v1/media/uploads \
-H "Authorization: Bearer $SOCIALHELPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filename": "launch.mp4",
"content_type": "video/mp4",
"size": 734003200
}'
curl -X PUT "$UPLOAD_URL" \
-H "Content-Type: video/mp4" \
--upload-file launch.mp4
curl https://socialhelper.app/api/v1/media \
-H "Authorization: Bearer $SOCIALHELPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"upload_id": "eyJpdiI6…"
}'
An upload that isn’t turned into media within a day is deleted. If direct uploads are unavailable you get 503 direct_uploads_unavailable.
Import from a URL
Send url instead of file and SocialHelper downloads it. The URL must be public (http or https); every redirect is checked too, up to 3 redirects.
curl https://socialhelper.app/api/v1/media \
-H "Authorization: Bearer $SOCIALHELPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/cinnamon-rolls.jpg",
"alt_text": "A tray of fresh cinnamon rolls"
}'
Types and sizes
- Accepted types: JPG, PNG, WEBP, GIF, MP4, MOV, WEBM.
- Videos up to 1 GB, images up to 60 MB.
- The type is detected from the file’s contents, not its name or headers.
- Each platform then applies its own limits when you post, such as fewer images, smaller files or no video. They’re checked before anything is sent and listed on each platform page.
The media object
Both calls return 201 with the media. GET /api/v1/media/{id} fetches it again.
-
idstring - Attach it to a post with media: ["…"].
-
typestring - image or video.
-
mime_type, sizestring, integer - The detected type, and the size in bytes.
-
width, heightinteger - For images.
-
alt_textstring - Description for screen readers, sent to platforms that support it.
-
urlstring - Where the file is served from.