Skip to main content
POST
Upload Media

Authorizations

Authorization
string
header
required

Your OmniX API key, e.g. omnix_live_.... Billed per call.

Body

application/json
auth_token
string
required

The X account auth_token cookie the action runs as.

Example:

"YOUR_X_AUTH_TOKEN"

media_url
string

URL of the media to upload.

Example:

"https://picsum.photos/800/600"

media_data
string

Base64 media (optionally a data: URI). Use instead of media_url.

media_type
string

MIME type, e.g. image/jpeg, video/mp4. Required with media_data if not a data: URI.

proxy
string

Optional outbound proxy for this call (http:// or https://, optionally user:pass@host:port). The X request runs through it — useful for geo-routing or spreading calls across IPs. SOCKS proxies are not supported.

Example:

"http://user:pass@host:8080"

Response

The uploaded media reference.

status
boolean
Example:

true

data
object
error
string | null
Example:

null