Skip to main content
POST
/
v1
/
publishing
/
transfer-asset
Transfer Asset to CDN
curl --request POST \
  --url https://app.uselamina.ai/v1/publishing/transfer-asset \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "sourceUrl": "https://fal.media/files/generated/output-001.png",
  "mediaType": "image",
  "filename": "campaign-hero-image.png"
}
'
{
  "data": {
    "url": "https://media.getmason.io/api/assetlib/abc123-campaign-hero-image.png"
  }
}
Transfer a generated asset from an external URL to the Lamina CDN for reliable, long-term access. AI model providers often host generated assets on temporary URLs that expire. Use this endpoint to copy the asset to Lamina’s CDN before the source URL goes away. Returns the permanent CDN URL. Supports image, video, and audio assets.

Authorizations

x-api-key
string
header
required

Workspace API key. Prefix: lma_. Example: lma_abc123...

Body

application/json
sourceUrl
string<uri>
required

The URL of the asset to transfer. Must be publicly accessible.

mediaType
enum<string>
required

The type of media being transferred.

Available options:
image,
video,
audio
filename
string

Optional filename for the CDN asset. Auto-generated if omitted.

Response

CDN URL for the transferred asset

data
object