MeduxMedux

Infra > Create Asset

Create Asset

Record an uploaded file as an asset.

POST/api/app/v1/assets

Examples

curl -X POST https://medux-server-api-dev.lingverse.co/api/app/v1/assets \
  -H 'Authorization: Bearer $MEDUX_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"category":"MEDIA","file_size_bytes":1,"name":"NAME","storage_object":{"key":"STORAGE_OBJECT_KEY","url":"https://example.com/callback"}}'

Auth Requirements

Authentication is required via Authorization header.

Preconditions

Requires reusable asset metadata.

Uploaded MEDIA files use file_id directly and do not need this endpoint.

Request

Body

application/json
Authorizationstringrequired

Bearer token or API key.

Location: HEADER

categorystringoptional

Asset category, used for validation and later rendering.

. assethpb.Category:
... enums:
..... CATEGORY_UNDEFINED
..... MEDIA
..... AVATAR
..... VOICE

Available options: CATEGORY_UNDEFINED MEDIA AVATAR VOICE

Location: BODY

file_size_bytesint64optional

Original file size in bytes.

Location: BODY

namestringoptional

User-provided display name. It may be empty.

Location: BODY

storage_object.keystringoptional

No description provided.

Location: BODY

storage_object.urlstringoptional

No description provided.

Location: BODY

Response

Response

application/json
codeint32optional

response code enums:
.. 0: ok
.. 12: invalid input
.. 1406: asset limit reached
.. 13: unauthenticated
.. 16: rate limit
.. 99: server error

Available options: 0 12 1406 13 16 99

Location: RESPONSE

data.assetobjectoptional

No description provided.

Location: RESPONSE

messagestringoptional

No description provided.

Available options: ok invalid input asset limit reached unauthenticated rate limit server error

Location: RESPONSE