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.
https://traceeai.com/api/v1/media/imagesCLI:tracee media generate-image·MCP:mediaaction generate_image
Authorizations
AuthorizationstringheaderrequiredBearer <key>: a personal key (tracee loginor Settings → Personal keys), a workspace key, or an MCP client's OAuth token. See Authentication.
Headers
Tracee-WorkspacestringFor 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
waitintegerSeconds 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
promptstringrequired3–4,000 characters
platformstringWhere 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_shortaspect_ratiostringOnly 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:9logobooleanPut 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
brandbooleanFollow 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
nextfield, 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
nextfield, when present, names the endpoint that follows up.