media
generate images and videos with ai, browse the workspace media library, and attach media to posts. visual platforms like instagram, tiktok, and pinterest require at least one media file.
generate_image
generate an image with ai (gemini) and automatically save it to the workspace media library. do not call upload_media after this — the returned url is already stored. use attach_media with the returned url to add the image to a post. supports iteration via reference_image_url.
> create a hero image for my product launch using antwork.generate_image [done] image generated [info] saved to media library · url: https://...
generate_video
generate a short video with veo 3.1 lite and automatically save it to the workspace media library. supports 4–8 second clips at 16:9 (landscape) or 9:16 (portrait). generation takes ~30–120 seconds — the call blocks until the video is ready and uploaded.
> create a 6-second portrait video for my reels announcement using antwork.generate_video [done] video generated [info] saved to media library · model: veo-3.1-lite
list_media
list media files in the workspace media library. returns uploaded images and videos with urls that can be attached to posts.
> show me my uploaded images using antwork.list_media [done] 8 media files found [info] 6 images, 2 videos
get_media
get a single media item by id. returns the media url, name, type, size, and upload date.
> show me details for that image using antwork.get_media [done] media found [info] type: image, size: 2.4 MB
attach_media
attach media (images or videos) to an existing post. replaces any existing media on the post. required for visual platforms like instagram, tiktok, and pinterest.
> attach our latest product image to that post using antwork.attach_media [done] media attached [info] 1 image added to post
upload_media
upload an image to the workspace media library from a url or base64 data. the image is stored in firebase storage and added to the media library.
> upload this product screenshot to my media library using antwork.upload_media [done] image uploaded [info] url: https://storage.googleapis.com/...
delete_media
delete a media item from the workspace media library. removes the firestore record.
> delete that old banner image using antwork.delete_media [done] media deleted [info] id: abc123