Skip to main content
POST
Create a World Labs media asset record and receive an upload URL for an image or video. Upload the binary file to upload_info.upload_url, then reference the returned media_asset.media_asset_id from world_prompt with source: "media_asset". The asset is available only in the Workspace that created it.

Request Body

string
required
Original file name, up to 64 characters.
string
required
Media type: image or video.
string | null
Optional extension such as png, jpg, or mp4.
object | null
Custom metadata stored with the asset.

Response

object
Prepared World Labs media asset metadata.
string
Signed URL for uploading the file.
string
HTTP method to use when uploading the binary file to upload_info.upload_url, when returned.
object
Headers to include with the binary upload, when returned.

Authorizations

Authorization
string
header
required

API Key authentication. Create or manage API keys in Dashboard > API > API Keys.

Body

application/json
file_name
string
required

File name, such as landscape.jpg.

Maximum string length: 64
kind
enum<string>
required

High-level media type.

Available options:
image,
video
extension
string | null

File extension without dot, such as jpg, png, or mp4.

metadata
object | null

Optional application metadata.

Response

Upload prepared

media_asset
object
required
upload_info
object
required