> ## Documentation Index
> Fetch the complete documentation index at: https://docs.worldlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Media assets

> Upload input media for world generation requests.

Media asset endpoints let you upload images or videos to managed storage before
using them as world-generation inputs.

<CardGroup cols={2}>
  <Card title="Prepare media asset upload" icon="upload-cloud" href="/api/reference/media-assets/prepare-upload">
    **POST** `/marble/v1/media-assets:prepare_upload`

    Create a media asset record and receive the signed upload URL and required
    headers.
  </Card>

  <Card title="Get media asset" icon="image" href="/api/reference/media-assets/get">
    **GET** `/marble/v1/media-assets/{media_asset_id}`

    Retrieve metadata for an uploaded media asset.
  </Card>
</CardGroup>

## Upload flow

<Steps>
  <Step title="Prepare the upload">
    Call [Prepare media asset upload](/api/reference/media-assets/prepare-upload)
    with the file name, extension, and media kind.
  </Step>

  <Step title="Upload bytes">
    Send the file to the returned signed URL with the required headers from the
    response.
  </Step>

  <Step title="Reference the asset">
    Use the returned `media_asset_id` in
    [Generate a world](/api/reference/worlds/generate).
  </Step>
</Steps>
