Get upload URL
Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
API key authentication - use your Zernio API key as a Bearer token
In: header
Name of the file to upload
MIME type of the file
"image/jpeg" | "image/jpg" | "image/png" | "image/webp" | "image/gif" | "video/mp4" | "video/mpeg" | "video/quicktime" | "video/avi" | "video/x-msvideo" | "video/webm" | "video/x-m4v" | "application/pdf"Optional file size in bytes for pre-validation (max 5GB)
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.media.getMediaPresignedUrl({ body: { filename: 'my-video.mp4', contentType: 'video/mp4', },});console.log(data);{
"uploadUrl": "<presigned-upload-url>",
"publicUrl": "https://media.zernio.com/temp/1234567890_abc123_my-video.mp4",
"key": "temp/1234567890_abc123_my-video.mp4",
"type": "video"
}{
"error": "filename and contentType are required"
}{
"error": "Unauthorized"
}Preview upcoming slots GET
Returns the next N upcoming queue slot times for a profile as ISO datetime strings.
Validate media URL POST
Check if a media URL is accessible and return metadata (content type, file size) plus per-platform size limit comparisons. Performs a HEAD request (with GET fallback) to detect content type and size. Rejects private/localhost URLs for SSRF protection. Platform limits are sourced from each platform's actual upload constraints.