MeduxMedux

Get Started > Create Upload URL

Create Upload URL

Create a pre-signed upload URL and file reference for a direct client upload.

POST/api/app/v1/upload_urls

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/json
Authorizationstringrequired

Bearer token or API key.

Location: HEADER

extensionstringoptional

File extension without a leading dot, such as mp4.

Location: BODY

media_typestringoptional

Media 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/json
codeint32optional

Application response code.

CodeMeaning
0OK
12Invalid input
13Authentication is required
16Rate limit exceeded
99Server error

Available options: 0 12 13 16 99

Location: RESPONSE

data.content_typestringoptional

Content-Type expected by the direct upload request.

Location: RESPONSE

data.fileobjectoptional

File reference to pass into later media APIs.

Location: RESPONSE

data.upload_urlstringoptional

Pre-signed URL the client should upload the file to.

Location: RESPONSE

messagestringoptional

No description provided.

Available options: ok invalid input unauthenticated rate limit server error

Location: RESPONSE