Guides
Media Uploads
Upload images, videos, and other media to include in your posts.
Overview
RelayAPI supports media uploads through pre-signed URLs. Upload media first, then reference it in your posts.
Upload Flow
- Request a pre-signed upload URL via
POST /v1/media/upload - Upload your file directly to the pre-signed URL
- Reference the media ID in your post's content
# Step 1: Get upload URL
curl -X POST https://api.relayapi.dev/v1/media/upload \
-H "Authorization: Bearer rlay_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"filename": "photo.jpg", "mime_type": "image/jpeg", "size": 1048576}'
# Step 2: Upload to the pre-signed URL
curl -X PUT "https://media.relayapi.dev/upload/..." \
-H "Content-Type: image/jpeg" \
--data-binary @photo.jpgSupported Formats
| Type | Formats | Max Size |
|---|---|---|
| Image | JPEG, PNG, GIF, WebP | 10 MB |
| Video | MP4, MOV, AVI | 100 MB |
| Document | 25 MB |
Platform-Specific Limits
Each platform has its own media requirements. RelayAPI automatically validates and, where possible, converts media to meet platform specifications. See individual platform pages for details.
Found something wrong? Help us improve this page.