API resource

Media

Upload a file once and reuse its id in any number of posts. Files stream straight through, so large videos are fine. HEIC, HEIF and AVIF are rejected because the networks don’t accept them.

Upload media

POST/v1/media

Works on: Any network: attach the media when you create a post

Send the raw file as the request body (not multipart) with its Content-Type. The returned id goes in a post’s media; url is a public link to the file.

Or import a file that’s already online: send JSON { "url": "https://…" } (optionally with filename) and Creator OS copies it over. The URL must be public HTTPS, serve the image or video itself (not a web page), and report its size.

Body

(file bytes)binaryrequired

image/jpeg, image/png, image/webp, image/gif, video/mp4, video/quicktime or video/webm.

Content-Typeheaderrequired

The file’s MIME type.

X-Filenameheader

Original file name, kept for display.

curl -X POST "https://creatoros-production-5658.up.railway.app/v1/media" \
  -H "Authorization: Bearer $CREATOROS_API_KEY" \
  -H "Content-Type: video/mp4" \
  -H "X-Filename: clip.mp4" \
  --data-binary @clip.mp4
Response 201
{
  "id": "med_b0Wq7Yx2Rk9LzT4nVs1Pc8Hf3Jd6Gm5Ea2Uo7Ki9Nr0",
  "url": "https://creatoros-production-5658.up.railway.app/v1/media/med_b0Wq7Yx2Rk9LzT4nVs1Pc8Hf3Jd6Gm5Ea2Uo7Ki9Nr0.mp4",
  "type": "video",
  "content_type": "video/mp4",
  "size": 18234567
}

Download media

GET/v1/media/{mediaId}public

Works on: Any network

Public link to an uploaded file, usable directly in <img> or <video> tags. Supports Range requests for video seeking. No API key needed; the id itself is unguessable.

Path parameters

mediaIdstringrequired

The med_ id, optionally with a file extension.

curl -L "https://creatoros-production-5658.up.railway.app/v1/media/med_b0Wq7Yx2Rk9LzT4nVs1Pc8Hf3Jd6Gm5Ea2Uo7Ki9Nr0.mp4" -o clip.mp4
Response 200
(the file bytes, with Content-Type, Content-Length and Accept-Ranges headers)