curl --request POST \
--url https://omnimux.ai/api/social/v1/media/presign \
--header 'Authorization: Bearer <access_token>' \
--header 'New-Api-User: <user_id>' \
--header 'Content-Type: application/json' \
--data '{"filename":"clip.mp4","content_type":"video/mp4","size_bytes":10485760}'
{
"success": true,
"data": {
"upload_url": "<upload_url>",
"upload_method": "PUT",
"headers": { "Content-Type": "video/mp4" },
"public_url": "<public_url>",
"key": "<object_key>",
"expires_in": 900,
"filename": "clip.mp4",
"content_type": "video/mp4"
}
}
{
"success": false,
"message": "SOCIAL_MEDIA_INVALID: filename and content_type are required",
"code": "SOCIAL_MEDIA_INVALID"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "social ops is disabled",
"code": "SOCIAL_OPS_DISABLED"
}
curl --request POST \
--url https://omnimux.ai/api/social/v1/media/presign \
--header 'Authorization: Bearer <access_token>' \
--header 'New-Api-User: <user_id>' \
--header 'Content-Type: application/json' \
--data '{"filename":"clip.mp4","content_type":"video/mp4","size_bytes":10485760}'
{
"success": true,
"data": {
"upload_url": "<upload_url>",
"upload_method": "PUT",
"headers": { "Content-Type": "video/mp4" },
"public_url": "<public_url>",
"key": "<object_key>",
"expires_in": 900,
"filename": "clip.mp4",
"content_type": "video/mp4"
}
}
{
"success": false,
"message": "SOCIAL_MEDIA_INVALID: filename and content_type are required",
"code": "SOCIAL_MEDIA_INVALID"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "social ops is disabled",
"code": "SOCIAL_OPS_DISABLED"
}
Media
Media Presign
Media Presign — request an upload ticket
curl --request POST \
--url https://omnimux.ai/api/social/v1/media/presign \
--header 'Authorization: Bearer <access_token>' \
--header 'New-Api-User: <user_id>' \
--header 'Content-Type: application/json' \
--data '{"filename":"clip.mp4","content_type":"video/mp4","size_bytes":10485760}'
{
"success": true,
"data": {
"upload_url": "<upload_url>",
"upload_method": "PUT",
"headers": { "Content-Type": "video/mp4" },
"public_url": "<public_url>",
"key": "<object_key>",
"expires_in": 900,
"filename": "clip.mp4",
"content_type": "video/mp4"
}
}
{
"success": false,
"message": "SOCIAL_MEDIA_INVALID: filename and content_type are required",
"code": "SOCIAL_MEDIA_INVALID"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "social ops is disabled",
"code": "SOCIAL_OPS_DISABLED"
}
POST
/
api
/
social
/
v1
/
media
/
presign
curl --request POST \
--url https://omnimux.ai/api/social/v1/media/presign \
--header 'Authorization: Bearer <access_token>' \
--header 'New-Api-User: <user_id>' \
--header 'Content-Type: application/json' \
--data '{"filename":"clip.mp4","content_type":"video/mp4","size_bytes":10485760}'
{
"success": true,
"data": {
"upload_url": "<upload_url>",
"upload_method": "PUT",
"headers": { "Content-Type": "video/mp4" },
"public_url": "<public_url>",
"key": "<object_key>",
"expires_in": 900,
"filename": "clip.mp4",
"content_type": "video/mp4"
}
}
{
"success": false,
"message": "SOCIAL_MEDIA_INVALID: filename and content_type are required",
"code": "SOCIAL_MEDIA_INVALID"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "social ops is disabled",
"code": "SOCIAL_OPS_DISABLED"
}
Request an upload ticket from the gateway’s object storage. After uploading, set
Base URL:
The object key is generated server-side and cannot be chosen by the client.
Do not submit the post when the upload failed, the ticket expired, or the object is unreadable; request a new ticket instead.
media_items[].url in the create-post request to the returned public_url.
Identity
| Field | Value |
|---|---|
| Series | Publishing |
| Group | Media |
| Capability | Request upload |
Endpoint
| Method | Path |
|---|---|
POST | /api/social/v1/media/presign |
https://omnimux.ai
Authorization
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Authorization | header | string | yes | Bearer <access_token> (user access token) |
New-Api-User | header | string | yes | Current user id |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
filename | string | yes | Original filename; only the extension shapes the object key |
content_type | string | yes | MIME type; contentType is also accepted |
size_bytes | integer | no | Single-file limit check; defaults to 512 MiB |
Response 200
| Field | Type | Description |
|---|---|---|
upload_url | string | Target for the direct PUT |
upload_method | string | Usually PUT |
headers | object | Headers to send verbatim with the upload (Content-Type) |
public_url | string | Platform-readable URL. Use it as media_items[].url when creating the post |
key | string | Server-generated object key |
expires_in | integer | Remaining ticket lifetime in seconds |
filename / content_type | string | Echo of the request values |
Upload
Upload directly toupload_url and do not attach gateway credentials:
curl --request PUT --upload-file ./clip.mp4 \
--header 'Content-Type: video/mp4' \
'<upload_url>'