Zernio
Zernio
API Reference

Media

Get upload URLPOST
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Media

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.


POST
/v1/media/presign

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

{  "uploadUrl": "<presigned-upload-url>",  "publicUrl": "https://media.zernio.com/temp/1234567890_abc123_my-video.mp4",  "key": "temp/1234567890_abc123_my-video.mp4",  "expiresIn": 3600}
Was this page helpful?

Preview upcoming slots

Returns the next N upcoming queue slot times for a profile as ISO datetime strings.

Validate media URL

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.

filename*string

Name of the file to upload

contentType*MediaContentType

MIME type of the file to upload. Rejected with a 400 (INVALID_FIELD_VALUE on contentType) when it is not one of these values, so generic types such as application/octet-stream are not accepted here.

Value in

  • "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"
  • "audio/mpeg"
  • "audio/mp4"
  • "audio/aac"
  • "audio/ogg"
  • "audio/wav"
  • "audio/webm"
  • "audio/x-m4a"
size?integer

Optional file size in bytes for pre-validation (max 5GB)