Commands

tracee media

Upload files, generate images and videos with AI.

media upload

Upload a photo or video.

tracee media upload <file> [--alt <text>]

Calls uploadMedia.

media from-url

Add an image or video from a link.

tracee media from-url <url> [--alt <text>]

Calls addMediaFromUrl.

media list

List media, page by page.

tracee media list [--kind image|video] [--limit <n>]

Calls listMedia.

library

Search the media library. Uploads, AI images and videos, designs and imports, newest first, with names, brand roles and how many posts use each. GET /media pages through every file with a cursor.

tracee media library [--query <query>] [--kind <kind>] [--limit <limit>]
  • --querystring

    Search names and descriptions

    up to 100 characters

  • --kindstring

    Only images or videos

    Available options:imagevideo

  • --limitinteger

    The limit

    1–100

Example
tracee media library --query dashboard --kind image --limit 10
Calls GET /api/v1/media/library

generate-image

Generate an image with AI. An on-brand image sized for one platform (a LinkedIn post 1080×1350, a Story 1080×1920, a YouTube thumbnail 1280×720…). Write the prompt like an art director; words that must appear go in quotes. About 40 seconds: the answer has the media_id when done, or status running and a generation_id to follow.

tracee media generate-image --prompt <prompt> [--platform <platform>] [--aspect-ratio <aspect_ratio>] [--logo] [--reference-media-ids <reference_media_ids>] [--brand] [--wait <seconds>]
  • --promptstringrequired

    3–4,000 characters

  • --platformstring

    Where it will be posted. The channel's platform (linkedin, instagram, facebook, x, threads, tiktok, youtube, pinterest, reddit, google_business, devto, hashnode) or a placement: instagram_story, facebook_story, youtube_short. youtube alone is a thumbnail (image) or a landscape video

    Available options:linkedininstagraminstagram_storyfacebookfacebook_storyxthreadstiktokyoutubeyoutube_short

  • --aspect-ratiostring

    Only without platform: 1:1 square (default for images), 4:5 portrait, 9:16 vertical (default for video), 16:9 landscape

    Available options:1:14:53:49:1616:9

  • --logo / --no-logoboolean

    Put the brand's real logo in the bottom-right corner

  • --reference-media-idsstring[]

    Library images to work from, from GET /api/v1/media/library Repeat the flag or separate values with commas.

    up to 6 itemseach uuid

  • --brand / --no-brandboolean

    Follow the brand profile; default true. false for an off-brand image

--data <json|@file|-> sends the whole body instead of flags.--wait <seconds> waits for the job (0–290). See Background jobs.

Example
tracee media generate-image \
  --prompt "A laptop on an oak desk showing a clean analytics dashboard, soft morning light" \
  --platform linkedin \
  --logo
Calls POST /api/v1/media/images

generate-video

Generate a video with AI. A short clip with sound for one platform (vertical 1080×1920 or landscape 1920×1080). Describe one continuous shot; video models can't write text. One to three minutes: follow it with GET /media/generations/{generation_id}.

tracee media generate-video --prompt <prompt> [--platform <platform>] [--aspect-ratio <aspect_ratio>] [--duration <duration>] [--first-frame-media-id <first_frame_media_id>] [--audio] [--brand] [--wait <seconds>]
  • --promptstringrequired

    3–4,000 characters

  • --platformstring

    Where it will be posted. The channel's platform (linkedin, instagram, facebook, x, threads, tiktok, youtube, pinterest, reddit, google_business, devto, hashnode) or a placement: instagram_story, facebook_story, youtube_short. youtube alone is a thumbnail (image) or a landscape video

    Available options:linkedininstagraminstagram_storyfacebookfacebook_storyxthreadstiktokyoutubeyoutube_short

  • --aspect-ratiostring

    Only without platform: 1:1 square (default for images), 4:5 portrait, 9:16 vertical (default for video), 16:9 landscape

    Available options:1:14:53:49:1616:9

  • --durationinteger

    Seconds, default 8

    2–15

  • --first-frame-media-idstring

    An image to start from and bring to life. From POST /api/v1/media/images

    uuid

  • --audio / --no-audioboolean

    With sound; default true

  • --brand / --no-brandboolean

    Follow the brand profile; default true. false for an off-brand image

--data <json|@file|-> sends the whole body instead of flags.--wait <seconds> waits for the job (0–290). See Background jobs.

Example
tracee media generate-video \
  --prompt "Slow push-in on a laptop showing a live dashboard, soft office light, quiet keyboard sounds" \
  --platform linkedin \
  --duration 8
Calls POST /api/v1/media/videos

generation

Follow an AI image or video. Waits for it (see ?wait); returns its media_id once done.

tracee media generation <generation_id> [--wait <seconds>]
  • <generation_id>argumentrequired

    From POST /api/v1/media/images or generate_video.

    uuid

--wait <seconds> waits for the job (0–290). See Background jobs.

Example
tracee media generation $GENERATION_ID
Calls GET /api/v1/media/generations/{generation_id}

app-files

Browse a connected app's files. Folders, pictures, videos and docs in a connected Google Drive, Dropbox, OneDrive, Box, Canva, Figma, Google Docs, Notion or Confluence. Without folder_id: the top folder; query searches by name. Figma: pass a file link as folder_id.

tracee media app-files <app> [--folder-id <folder_id>] [--query <query>] [--cursor <cursor>]
  • <app>argumentrequired

    The connected app

    Available options:googledrivedropboxone_driveboxcanvafigmagoogledocsnotionconfluence

  • --folder-idstring

    A folder's id from an earlier browse (figma: a file link). From GET /api/v1/media/apps/{app}/files (an item with kind=folder)

    up to 500 characters

  • --querystring

    up to 100 characters

  • --cursorstring

    Next_cursor from the last page

    up to 4,000 characters

Example
tracee media app-files googledrive
Calls GET /api/v1/media/apps/{app}/files

import-from-app

Import files from a connected app. Brings pictures and videos (Canva designs and Figma frames as PNG) into the media library like an upload; each file's media_ids attach to posts. A file imported before isn't copied again.

tracee media import-from-app <app> --file-ids <file_ids>
  • <app>argumentrequired

    The connected app

    Available options:googledrivedropboxone_driveboxcanvafigmagoogledocsnotionconfluence

  • --file-idsstring[]required

    Ids from browse_app_files. From GET /api/v1/media/apps/{app}/files (items[].id) Repeat the flag or separate values with commas.

    1–20 itemseach 1–500 characters

--data <json|@file|-> sends the whole body instead of flags.

Example
tracee media import-from-app googledrive --file-ids $FILE_ID
Calls POST /api/v1/media/apps/{app}/import

read-doc

Read a doc from a connected app. A Google Doc, a doc or text file in Drive, a Notion or a Confluence page, as plain text.

tracee media read-doc <app> <doc_id>
  • <app>argumentrequired

    The connected app

    Available options:googledrivedropboxone_driveboxcanvafigmagoogledocsnotionconfluence

  • <doc_id>argumentrequired

    The doc's id from browse_app_files. From GET /api/v1/media/apps/{app}/files (an item with kind=doc)

    up to 500 characters

Example
tracee media read-doc googledrive $DOC_ID
Calls GET /api/v1/media/apps/{app}/docs/{doc_id}

add-many

Add several images or videos from links. Up to 20 links; each answers with its media_id or its own error.

tracee media add-many --urls <urls> [--alt-text <alt_text>]
  • --urlsstring[]required

    Several images or videos at once; each gets its own media_id or error Repeat the flag or separate values with commas.

    1–20 itemseach uri

  • --alt-textstring

    The alt text

    up to 1,000 characters

--data <json|@file|-> sends the whole body instead of flags.

Example
tracee media add-many --urls https://acme.com
Calls POST /api/v1/media/from-urls

describe

Rename a file or set its alt text.

tracee media describe <media_id> [--name <name>] [--alt-text <alt_text>]
  • <media_id>argumentrequired

    The file to change. From GET /api/v1/media/library (or the media_id POST /api/v1/media/from-url / generate_image returns)

    uuid

  • --namestring

    The file's new name

    up to 120 characters

  • --alt-textstring

    The alt text

    up to 1,000 characters

--data <json|@file|-> sends the whole body instead of flags.

Example
tracee media describe $MEDIA_ID --name "Launch week"
Calls PATCH /api/v1/media/{media_id}