Create Asset

Register a media URL as a reusable asset and get back its id. Use the id in generation inputs (input[].assetId) or as a voice clone sample. To upload a local file, first request a presigned URL via POST /v2/assets/upload, PUT the file there, then register the returned url here. Registration verifies the upload happened and enforces plan limits on the actual file size.

Authentication

x-api-keystring
API Key authentication via header

Request

This endpoint expects an object.
urlstringRequired

The public URL of the media to register — e.g. the url returned by POST /v2/assets/upload. Registration verifies the upload happened and enforces plan limits on the actual file size.

typeenumRequired
The type of asset.
namestringOptional
An optional display name for the asset.
projectIdstringOptional

Optionally attach the asset to a project (created via POST /v2/projects) so it appears in Studio under that project’s media. Must reference a project in your organization — otherwise the request is rejected with 422.

Response

Asset registered successfully
idstring
A unique identifier for an asset.
createdAtdatetime
The date and time the asset was created.
updatedAtdatetime
The date and time the asset was last updated.
typeenum
The type of asset file.
visibilityenum
Visibility scope for the asset.
namestring
The filename of the asset.
urlstring
The URL to access the asset media.
sizelong
File size in bytes.
formatstring

File format/extension (e.g., “mp4”, “wav”).

inputTypeenum
The source type of the asset.
durationSecondsdouble

Duration of the media in seconds (for audio/video).

thumbnailUrlstring
URL to the asset's thumbnail image.
widthinteger

Width in pixels (for video/image).

heightinteger

Height in pixels (for video/image).

projectIdstring
The id of the project this asset is attached to, or null when it belongs to no project.

Errors

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error
500
Internal Server Error