Create upload URL

A one-time link to upload a local file into the media library, for a client that can run a command (Claude Code, Codex, Cursor): PUT the file to uploadUrl with the returned Content-Type (the result includes the curl command), then call import_media with url set to the returned mediaUrl. The link expires in 15 minutes and signs one content type. If you cannot run a command, do not call this: ask the person to drop the file into their Treza library in the web app and find it with list_assets. Needs the pipelines:write scope. Spends no credits.

post/api/v1/tools/create_upload_url

Request

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

Request body

contentType'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'video/mp4' | 'video/quicktime' | 'video/webm' | 'audio/mpeg' | 'audio/mp4' | 'audio/wav' | 'audio/ogg' required

The type of the file you will upload, e.g. "image/png" for a PNG logo. The PUT must send exactly this Content-Type.

Response

The tool's result.

object required

Changes

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