Eranol LogoEranol
BlogCommunityDocumentationPricingSign In

General

OverviewGet Started

MCP Connectors

ClaudeChatGPTGeminiGrok
Instagram PublishInstagram Scheduled — CancelInstagram Scheduled — ListLinkedIn Cancel ScheduledLinkedIn PublishLinkedIn Scheduled PostsLinkedIn StatusTikTokTikTok Scheduled — CancelTikTok Scheduled — ListTikTok StatusX PublishX Scheduled — CancelX Scheduled — ListYouTube PublishYouTube Scheduled — CancelYouTube Scheduled — List
Add IntroAdd OutroAnimateAudio to VideoBackground AudioCaptions ApiComposeConcatConvert a video file to MP4Convert Audio to Mp3Convert Audio to wavConvert to JPGConvert to WebMConvert to WebPCreate Teleprompter ScriptCutDenoiseEnhanceExtract audio track from a videoExtract images from a videoGenerate a GIF from a videoHighlightsImage RenderImages to PDFMedia UploadMergeNotifyOverlayProgress BarReframeRemove SilenceThumbnailTrimVerifyWatermarkZoom
DeleteImage StatusStatusFFmpeg Results

Need help?

Contact Support

Media Upload

POST

Upload an image (jpg, png, gif, webp, up to 20 MB) to your Media Library and get back a public URL to use in other APIs, e.g. LinkedIn media_urls

Overview

Uploads an image to your Media Library and returns a public URL. The file is stored in your account's Media Library (it also appears in Dashboard → Media Library) and the URL can be passed straight to other APIs — for example media_urls on the LinkedIn publish endpoint.

Cost: 1 credit per successful upload. Failed uploads are not charged.

The Media Library is available to accounts that have added credits at least once (same rule as the dashboard). Other accounts get 403.

Endpoint

POST https://eranol.com/api/v1/media/upload

Headers: x-api-key: <your key>. Send the body as multipart/form-data — do not set Content-Type manually if your HTTP client builds the multipart boundary for you.

Request body (multipart/form-data)

FieldTypeRequiredNotes
filefileYesThe image. Extensions: jpg, jpeg, png, gif, webp. Max 20 MB

The file type is decided by the file name's extension, so name the file correctly (photo.png, not photo).

Example — cURL

curl -X POST https://eranol.com/api/v1/media/upload \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@./photo.jpg"

Example — JavaScript

const form = new FormData()
form.append('file', fileInput.files[0])

const res = await fetch('https://eranol.com/api/v1/media/upload', {
  method: 'POST',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
  body: form,
})
const { url } = await res.json()

Example response

{
  "success": true,
  "id": "a1b2c3d4-...",
  "url": "https://.../media-library/<user_id>/<uuid>-photo.jpg",
  "file_name": "photo.jpg",
  "content_type": "image/jpeg",
  "size_bytes": 482113
}

Using the URL with LinkedIn

Files uploaded here are in your Media Library, so the returned url is accepted by the LinkedIn publish endpoint:

{
  "text": "Our new dashboard is live.",
  "media_urls": ["https://.../media-library/<user_id>/<uuid>-photo.jpg"]
}

LinkedIn accepts JPG, PNG and GIF images (up to 9 per post, ideally under 5 MB each). webp can be uploaded and stored but is not accepted by LinkedIn — convert it with the Convert to JPG API first.

Errors

StatusMeaning
400No file field, empty file, or unsupported extension
401Missing or invalid API key
402Insufficient credits (1 credit required)
403The Media Library isn't unlocked for this account yet — add credits first
413Image is larger than 20 MB
500Storage error — try again or contact support