🎉 Cyber Week: 30% off your first payment — ends Sunday, Dec 7Claim 30% off
Docs
/v1/media · Media

Media API

Upload an image or video to XBeast storage. Use the returned HTTPS url as tweets[].media_url when creating a post. You can also skip this endpoint and pass any public HTTPS media URL directly.

Upload a file

POST/api/v1/media
Send multipart/form-data with a single field named file.

Limits

KindMax sizeFormats
Image5 MBPNG, JPEG, GIF, WebP
Video100 MBMP4, MOV (QuickTime), WebM

Response (201)

{
  "url": "https://....supabase.co/storage/v1/object/public/images/USER_ID/uuid.jpg",
  "type": "image"
}
type is image or video.
curl
curl -X POST "https://xbeast.io/api/v1/media" \
  -H "Authorization: Bearer xb_live_YOUR_KEY" \
  -F "file=@/path/to/image.jpg"

Upload from a URL

POST/api/v1/media/from-url
Fetch a public HTTPS file and store it in XBeast. Body: { "url": "https://example.com/image.jpg" }. The server blocks localhost, private and link-local addresses, follows at most 2 redirects, and enforces the same size and content-type limits.

Related