Import media

Add an image, video or audio file to the account's media library, so assemble_video and edit_asset can use it: a file the user attached in this conversation (file, where the client passes attachments), a public https link to the file itself (url), or a local file uploaded through create_upload_url (url set to its mediaUrl). Returns the library url. Putting an attached logo in the corner of a video or a picture is this, then edit_asset on the video or picture with an overlay operation whose inputs.image is the returned url and whose config.position names the corner (a picture comes back a PNG). Images up to 25 MB, audio 100 MB, video 200 MB; the type is read from the file, and anything else (SVG, PDF, a web page) is refused. When the user attached a file you cannot pass on (you see it but have no file or link to give), ask them to drop it into their Treza library at https://www.trezalabs.com/chat/assets and find it with list_assets. Needs the pipelines:write scope. Spends no credits.

post/api/v1/tools/import_media

Request

  • Base URL: https://www.trezalabs.com
  • URL: https://www.trezalabs.com/api/v1/tools/import_media
  • Auth: HTTP bearer

Request body

urlstring

A public https link to an image, video or audio file, when there is no attachment. Pass file or url, not both.

namestring

What to call it in the library, e.g. "Logo"; list_assets query matches it. Defaults to the file name.

Response

The tool's result.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.