Add media
add_mediaAdds an image or video to a brand. With url: we fetch the file (public https only, up to 100 MB; JPEG, PNG, WebP, MP4 or MOV) and it is ready at once. With file (a photo or video the person attached in ChatGPT, which ChatGPT fills in): the same, from its download link. Without url or file: returns upload_url (PUT the raw bytes with Content-Type) and upload_page_url, a page the person can open on their phone to pick the file; both work once, for an hour. get_media shows when status turns ready. aspect is worked out from an image when left out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public https URL of the file. Leave out to get an upload link instead. | |
| file | No | A file the person attached in ChatGPT. ChatGPT fills this in; leave it out elsewhere. | |
| brand | No | Brand id from get_workspace. Optional when the workspace has one brand. | |
| aspect | No | ||
| filename | No | File name, e.g. launch.jpg. Defaults to the url file name. | |
| duration_s | No | A video length in seconds, if known. | |
| variant_of | No | media_id this is a crop or edit of. | |
| source_note | Yes | Where the media came from (provenance), e.g. "photo the owner shared" or the render tool. | |
| content_type | No | image/jpeg, image/png, image/webp, video/mp4 or video/quicktime. Optional. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| media_id | Yes |