Get Started > Create Upload URL
Create Upload URL
Create a direct upload URL and target object for a file.
Examples
curl -X POST https://medux-server-api-dev.lingverse.co/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 dot, for example mp4.
Location: BODY
media_typestringoptionalMedia type used to validate extension and build the object path.
. utilityhpb.MediaType:
... enums:
..... MEDIA_TYPE_UNDEFINED
..... 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/jsoncodeint32optionalresponse code enums:
.. 0: ok
.. 12: invalid input
.. 13: unauthenticated
.. 16: rate limit
.. 99: server error
Available options: 0 12 13 16 99
Location: RESPONSE
data.content_typestringoptionalExpected content type for the upload request.
Location: RESPONSE
data.fileobjectoptionalFile reference that should be reused in later media APIs.
Location: RESPONSE
data.upload_urlstringoptionalPre-signed upload URL that the client uploads to directly.
Location: RESPONSE
messagestringoptionalNo description provided.
Available options: ok invalid input unauthenticated rate limit server error
Location: RESPONSE
On this page