Get Started > Create Upload URL
Create Upload URL
Create a pre-signed upload URL and file reference for a direct client upload.
Examples
curl -X POST https://api.medux.io/api/app/v1/upload_urls \
-H 'Authorization: Bearer $MEDUX_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"extension":"png","media_type":"VIDEO"}'Auth Requirements
Authentication is required via Authorization header.
Preconditions
Try it is available after login because the returned upload target is account-scoped.
Use this as the first step in most Playground and agent flows.
Request
Body
application/jsonAuthorizationstringrequiredBearer token or API key.
Location: HEADER
extensionstringoptionalFile extension without a leading dot, such as mp4.
Location: BODY
media_typestringoptionalMedia type used to validate extension and build the object path.
Allowed values:
MEDIA_TYPE_UNDEFINED- Not specified.VIDEO- Video file, such as mp4.AUDIO- Audio file, such as mp3.IMAGE- Image file, such as png.DOCUMENT- Document file, such as md or docx.
Available options: MEDIA_TYPE_UNDEFINED VIDEO AUDIO IMAGE DOCUMENT
Location: BODY
Response
Response
application/jsoncodeint32optionalApplication response code.
| Code | Meaning |
|---|---|
0 | OK |
12 | Invalid input |
13 | Authentication is required |
16 | Rate limit exceeded |
99 | Server error |
Available options: 0 12 13 16 99
Location: RESPONSE
data.content_typestringoptionalContent-Type expected by the direct upload request.
Location: RESPONSE
data.fileobjectoptionalFile reference to pass into later media APIs.
Location: RESPONSE
data.upload_urlstringoptionalPre-signed URL the client should upload the file to.
Location: RESPONSE
messagestringoptionalNo description provided.
Available options: ok invalid input unauthenticated rate limit server error
Location: RESPONSE
On this page