Uploads a media file (image, video, or PDF, max ~90 MB). Send the
raw file bytes as the request body with the file's MIME type in the
Content-Type header. The returned id goes into a post's
data.<PLATFORM>.uploadIds.
Authorization
apiKey *Bearer <token>
Akarso API key from the dashboard. Token in: header
Query Parameters
filename *string
Original filename, including extension
Min length:1
Response
200
id *string
Upload ID, referenced by post data.<PLATFORM>.uploadIds
url?string | null
Public URL of the uploaded file
thumbnailUrl?string | null
type?"image" | "video" | "document"
width?number | null
height?number | null
fileSize?number | null
videoLength?number | null
mime?string | null
ext?string | null
createdAt?string | null
400 · Invalid request body, path, or query parameters
error *string
Human-readable error message
code?string
Machine-readable error code
message?string
Additional error details
401 · Missing or invalid API key
error *string
Human-readable error message
code?string
Machine-readable error code
message?string
Additional error details
502 · Upstream platform request failed
error *string
Human-readable error message
code?string
Machine-readable error code
message?string
Additional error details
Ask AI about this page
Request example
curl -X POST "https://akarso.co/api/v1/media/upload?filename=%3Cfilename%3E" \
-H "Authorization: Bearer <token>"