Media

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.

POSThttps://traceeai.com/api/v1/media/images

CLI:tracee media generate-image·MCP:mediaaction generate_image

Authorizations

  • Authorizationstringheaderrequired

    Bearer <key>: a personal key (tracee login or Settings → Personal keys), a workspace key, or an MCP client's OAuth token. See Authentication.

Headers

  • Tracee-Workspacestring

    For a personal key or OAuth token that reaches several workspaces: the workspace id to act on. Workspace keys don't need it.

    uuid

Query parameters

  • waitinteger

    Seconds to wait for the job before answering (0-290; default 50). If it isn't done by then the answer is 202 with its id to follow.

    0–290

Body

application/json
  • 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

  • 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

    up to 6 itemseach uuid

  • brandboolean

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

Response

  • 200Already done.

    The action's result, exactly as the MCP tool returns it to agents. A next field, when present, names the endpoint that follows up.

  • 202Started or still running: follow it with the id in the answer.

    The action's result, exactly as the MCP tool returns it to agents. A next field, when present, names the endpoint that follows up.