Media & Content
Attach media to posts and customize content per platform.
Attaching media
There are three ways to attach media to a post:
1. External URL
Provide a mediaUrl — Crelio downloads the file, stores it in your CDN, and uses the stored copy. This ensures posts don't break if the original URL goes down.
{
"accountIds": ["acc_123"],
"content": "Check this out!",
"mediaUrl": "https://example.com/photo.jpg"
}2. Base64
Send the file contents directly as a base64-encoded string:
{
"accountIds": ["acc_123"],
"content": "New product photo",
"mediaBase64": "iVBORw0KGgoAAAANSUhEUg...",
"mediaFileName": "product.jpg"
}3. Multipart form data
Upload the file as part of a multipart request:
curl -X POST https://crelio.app/api/v1/social-posts \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "accountIds=[\"acc_123\"]" \
-F "content=New product launch!" \
-F "media=@/path/to/photo.jpg" \
-F "autoSchedule=true"Platform-specific content
Use the platformContent object to tailor your message per platform. Any platform not listed falls back to the main content field:
{
"accountIds": ["twitter_acc", "linkedin_acc", "instagram_acc"],
"content": "Default content for all platforms",
"platformContent": {
"twitter": "Short tweet version (280 chars)",
"linkedin": "Professional LinkedIn version with more details and context about our latest announcement."
}
}In this example:
- Twitter gets the short version
- LinkedIn gets the professional version
- Instagram falls back to the default
content
Supported media types
| Type | Formats | Max size |
|---|---|---|
| Image | JPG, PNG, GIF, WebP | 20 MB |
| Video | MP4, MOV, AVI | 500 MB |
Platform-specific limits may apply (e.g., Twitter has a 280-character limit, video duration limits vary by platform).