> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contenthero.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate

> Create images, video, audio and boards, upscale them, and check what a generation is doing.

Create images, video, audio and boards, upscale them, and check what a generation is doing. 11 tools.

Every tool below is exposed by the hosted MCP server at `https://mcp.contenthero.ai` and by the `@contenthero/mcp` npm package. A <Badge>write</Badge> tool changes your account; a <Badge>read</Badge> tool does not.

### `generate_image`

<Badge>write</Badge>

Generate one or more images from a text prompt (optionally image-to-image with reference images). Waits for the result and returns the image URLs. Optionally pass projectId to place the generated image onto that project in the same call, controlled by an optional placement: a VIDEO timeline places a clip on a track, a CANVAS design places a layer on a slide (defaulting to the slide the user is focused on). Omit projectId to save a standalone library output. The result LINKS each output so the user sees it inline; to SEE it yourself (judge a face, check legibility, pick between variations) call get\_media with the outputId. SPENDS CREDITS: pass getCost to preview the price first, which runs nothing and charges nothing.

<ParamField body name="modelId" type="string" required>
  The model id. list\_models (contentType image) names every image model and what each is for; get\_model gives one model's options and prompt guide.
</ParamField>

<ParamField body name="aspectRatio" type="string">
  e.g. 16:9, 1:1, 9:16. Validated per model.
</ParamField>

<ParamField body name="avatarId" type="string">
  Optional avatar id from list\_avatars. File the result onto that avatar as a new LOOK (one appearance of a reusable character: same person, different outfit, setting or framing) instead of saving a standalone library output. Combine with a referenceImage of the avatar to keep the subject on-model.
</ParamField>

<ParamField body name="getCost" type="boolean">
  Return the credit cost estimate instead of generating (nothing runs, nothing is charged).
</ParamField>

<ParamField body name="numImages" type="integer">
  Number of variations (1-4).
</ParamField>

<ParamField body name="placement" type="object or object">
  Where the asset lands, interpreted against the project's type. VIDEO TIMELINE: append to the end, at a time, at the playhead, replacing an existing clip, or filling a time range (omitted places it at the playhead when known, else appends). CANVAS DESIGN: a layer on a slide (slideId / slideIndex, default the focused slide; fit contain|cover|none; a nine-point anchor; and design-pixel x/y/width/height).
</ParamField>

<ParamField body name="playheadFrame" type="number">
  The current playhead frame, for playhead-relative timeline placement.
</ParamField>

<ParamField body name="projectId" type="string">
  The project to place the result on. Omit for a standalone library output. The server interprets placement against the project's type (video timeline or canvas design).
</ParamField>

<ParamField body name="prompt" type="string">
  Describe the image to generate. Required for most models; optional for a few that can run from references alone.
</ParamField>

<ParamField body name="referenceImages" type="string[]">
  References for image-to-image / editing. Each may be a URL or a previous output id (e.g. "\<id>" or "\<id>-2") to chain from an earlier generation.
</ParamField>

<ParamField body name="resolution" type="string">
  e.g. 1K, 2K, 4K. get\_model lists the resolutions a model takes; validated per model.
</ParamField>

### `generate_video`

<Badge>write</Badge>

Generate a video from a text prompt (optionally from a start/end frame or reference images/videos/audio). Returns at once with an outputId; get\_generation\_status waits for the render. Some models choose an input mode by which references you pass (a startFrame with an optional endFrame, or references alone); get\_model describes each model's modes. Optionally pass projectId to place the generated video onto that project in the same call, controlled by an optional placement: a VIDEO timeline places a clip on a track, a CANVAS design places a layer on a slide (defaulting to the slide the user is focused on). Omit projectId to save a standalone library output. The result LINKS each output so the user sees it inline; to SEE it yourself (judge a face, check legibility, pick between variations) call get\_media with the outputId. SPENDS CREDITS: pass getCost to preview the price first, which runs nothing and charges nothing.

<ParamField body name="modelId" type="string" required>
  The model id. list\_models (contentType video) names every video model and what each is for; get\_model gives one model's options, input modes and prompt guide.
</ParamField>

<ParamField body name="aspectRatio" type="string">
  e.g. 16:9, 9:16. Validated per model.
</ParamField>

<ParamField body name="audioEnabled" type="boolean">
  Generate audio (only for models that support it).
</ParamField>

<ParamField body name="duration" type="number">
  Clip length in seconds. Model-dependent; some models lock it.
</ParamField>

<ParamField body name="elements" type="object[]">
  Deprecated alias for `klingElements`, accepted for one release window.
</ParamField>

<ParamField body name="endFrame" type="string">
  Last frame: an image URL or a previous output id.
</ParamField>

<ParamField body name="getCost" type="boolean">
  Return the credit cost estimate instead of generating (nothing runs, nothing is charged).
</ParamField>

<ParamField body name="keepInputLength" type="boolean">
  Video edit only, on models that offer it: keep the input video's full length instead of a set duration. Charged for that length.
</ParamField>

<ParamField body name="klingElements" type="object[]">
  Kling elements: each is a saved Kling element (\{ klingElementId }) or an inline group (\{ name, description, images }), addressable in the prompt as @name. Only for models that take them (get\_model promptReferences, named\_tag scheme). Requires a startFrame.
</ParamField>

<ParamField body name="multiShot" type="boolean">
  Enable multi-shot mode (one longer sequence of several shots) on a model that offers it; get\_model says which do. On a model that takes per-shot prompts, pass `shots` instead, which turns multi-shot on.
</ParamField>

<ParamField body name="negativePrompt" type="string">
  What to avoid (models that support it).
</ParamField>

<ParamField body name="numGenerations" type="integer">
  Number of variations (1-4).
</ParamField>

<ParamField body name="placement" type="object or object">
  Where the asset lands, interpreted against the project's type. VIDEO TIMELINE: append to the end, at a time, at the playhead, replacing an existing clip, or filling a time range (omitted places it at the playhead when known, else appends). CANVAS DESIGN: a layer on a slide (slideId / slideIndex, default the focused slide; fit contain|cover|none; a nine-point anchor; and design-pixel x/y/width/height).
</ParamField>

<ParamField body name="playheadFrame" type="number">
  The current playhead frame, for playhead-relative timeline placement.
</ParamField>

<ParamField body name="projectId" type="string">
  The project to place the result on. Omit for a standalone library output. The server interprets placement against the project's type (video timeline or canvas design).
</ParamField>

<ParamField body name="prompt" type="string">
  Describe the video to generate. Required for most models; optional for some (e.g. motion-control), where it is an auxiliary motion hint.
</ParamField>

<ParamField body name="referenceAudio" type="string[]">
  Reference audio (audio-driven video): each a URL or a previous output id. Only used by models that accept audio references; get\_model says which do.
</ParamField>

<ParamField body name="referenceImages" type="string[]">
  Reference images: each a URL or a previous output id to chain.
</ParamField>

<ParamField body name="referenceVideos" type="string[]">
  Reference videos: each a URL or a previous output id to chain.
</ParamField>

<ParamField body name="resolution" type="string">
  e.g. 720p, 1080p, 4K. Model-dependent.
</ParamField>

<ParamField body name="shots" type="object[]">
  Multi-shot mode with per-shot prompts, on a model that takes them (get\_model gives its shot limits): an ordered list of shots, each with its own prompt and duration in seconds. When provided, the video runs in multi-shot mode; only startFrame attaches as an image (it becomes the first frame of shot 1), all other shots are text-only.
</ParamField>

<ParamField body name="startFrame" type="string">
  First frame: an image URL or a previous output id (e.g. "\<id>-2") to chain (e.g. animate an image you just generated).
</ParamField>

### `generate_audio`

<Badge>write</Badge>

Generate audio: speech (TTS), music, or a sound effect. Returns the audio URL directly (synchronous, no polling). Optionally pass projectId to place the generated audio onto that editor project's timeline in the same call, controlled by an optional placement; omit projectId to save a standalone library output. The result LINKS each output so the user sees it inline; to SEE it yourself (judge a face, check legibility, pick between variations) call get\_media with the outputId. SPENDS CREDITS: pass getCost to preview the price first, which runs nothing and charges nothing.

<ParamField body name="modelId" type="string" required>
  The model id. list\_models (contentType audio) names every audio model and what each is for; get\_model gives one model's inputs.
</ParamField>

<ParamField body name="durationSeconds" type="number">
  For music / sfx: length in seconds.
</ParamField>

<ParamField body name="getCost" type="boolean">
  Return the credit cost estimate instead of generating (nothing runs, nothing is charged).
</ParamField>

<ParamField body name="placement" type="object or object">
  Where the asset lands, interpreted against the project's type. VIDEO TIMELINE: append to the end, at a time, at the playhead, replacing an existing clip, or filling a time range (omitted places it at the playhead when known, else appends). CANVAS DESIGN: a layer on a slide (slideId / slideIndex, default the focused slide; fit contain|cover|none; a nine-point anchor; and design-pixel x/y/width/height).
</ParamField>

<ParamField body name="playheadFrame" type="number">
  The current playhead frame, for playhead-relative timeline placement.
</ParamField>

<ParamField body name="projectId" type="string">
  The project to place the result on. Omit for a standalone library output. The server interprets placement against the project's type (video timeline or canvas design).
</ParamField>

<ParamField body name="prompt" type="string">
  For music / sfx: what to generate.
</ParamField>

<ParamField body name="promptInfluence" type="number">
  For sfx: how literally to follow the prompt (0 to 1).
</ParamField>

<ParamField body name="text" type="string">
  For a speech model: the words to speak. Read the model's promptGuide with get\_model before writing directions into it.
</ParamField>

<ParamField body name="voiceId" type="string">
  For a speech model: the voice id (list\_voices names them).
</ParamField>

<ParamField body name="voiceName" type="string">
  For TTS: human-readable voice name (display only).
</ParamField>

### `generate_board`

<Badge>write</Badge>

Generate a Reference Board: a dense multi-panel reference sheet (3:4, 4K) built from a source image and/or a written description, used to keep a subject on-model across later generations (feed the board back in as a referenceImage). Provide referenceImages and/or a prompt (at least one is required). Waits up to \~40s; boards render slowly (minutes), so it usually returns an outputId to poll with get\_generation\_status. SPENDS CREDITS: pass getCost to preview the price first, which runs nothing and charges nothing.

<ParamField body name="boardType" type="string" required>
  One of the board types listed by get\_model('reference-boards').
</ParamField>

<ParamField body name="avatarId" type="string">
  Optional avatar id from list\_avatars. Associate the board with that avatar, so a character sheet built for an avatar stays filed against it.
</ParamField>

<ParamField body name="boardName" type="string">
  Optional name for the board.
</ParamField>

<ParamField body name="getCost" type="boolean">
  Return the credit cost estimate instead of generating (nothing runs, nothing is charged).
</ParamField>

<ParamField body name="numImages" type="integer">
  Number of board variations (1-4). Defaults to 1.
</ParamField>

<ParamField body name="prompt" type="string">
  Describe the subject or how you will use the board. Required when no referenceImages are given (text-only boards); otherwise optional context (the source image leads).
</ParamField>

<ParamField body name="referenceImages" type="string[]">
  Source images the board is built from: each a URL or a previous output id (e.g. "\<id>" or "\<id>-2") to chain from an earlier generation.
</ParamField>

### `generate_lip_sync`

<Badge>write</Badge>

Animate a portrait image so the subject speaks. Provide imageUrl (the face) plus a voice source: either audioUrl (an existing speech clip) or script + voiceId (we synthesize the speech). Optional motionPrompt nudges expression/motion. Returns at once with an outputId; get\_generation\_status waits for the render. SPENDS CREDITS: pass getCost to preview the price first, which runs nothing and charges nothing.

<ParamField body name="imageUrl" type="string" required>
  The portrait to animate (the speaking subject): an image URL or a previous output id (e.g. "\<id>-1") to chain.
</ParamField>

<ParamField body name="modelId" type="string" required>
  The model id: a lip-sync model. list\_models (contentType video) names them; get\_model gives one model's resolutions and inputs.
</ParamField>

<ParamField body name="audioDurationSeconds" type="number">
  Length of audioUrl in seconds (audio mode only; improves cost accuracy).
</ParamField>

<ParamField body name="audioUrl" type="string">
  An existing speech clip: an audio URL or a previous output id. Use this OR script + voiceId.
</ParamField>

<ParamField body name="getCost" type="boolean">
  Return the credit cost estimate instead of generating (nothing runs, nothing is charged).
</ParamField>

<ParamField body name="motionPrompt" type="string">
  Optional motion / expression hint for the animation.
</ParamField>

<ParamField body name="resolution" type="string">
  e.g. 480p, 720p, 1080p. Model-dependent.
</ParamField>

<ParamField body name="script" type="string">
  Text for the subject to speak. Requires voiceId; synthesized to speech. Use this OR audioUrl. Before writing directions into the script, read the speech model's promptGuide with get\_model.
</ParamField>

<ParamField body name="voiceId" type="string">
  The voice to speak the script (list\_voices names them; required with script).
</ParamField>

<ParamField body name="voiceName" type="string">
  Human-readable voice name (display only).
</ParamField>

### `upscale`

<Badge>write</Badge>

Upscale an existing image or video to a higher resolution. Provide the source media URL and a model-supported factor. Waits for the result; if the job is still running it returns an outputId to poll with get\_generation\_status. SPENDS CREDITS: pass getCost to preview the price first, which runs nothing and charges nothing.

<ParamField body name="factor" type="string" required>
  Upscale factor, e.g. 2x, 4x. Model-dependent; validated per model.
</ParamField>

<ParamField body name="modelId" type="string" required>
  The model id: an upscaler. list\_models names them, each one's contentType saying whether it takes an image or a video; get\_model gives its factors.
</ParamField>

<ParamField body name="sourceUrl" type="string" required>
  The source image (image upscalers) or video (video upscalers): a URL or a previous output id (e.g. "\<id>-1") to upscale an earlier generation.
</ParamField>

<ParamField body name="durationSeconds" type="number">
  Required for video upscalers: the source video length in seconds (used for pricing).
</ParamField>

<ParamField body name="getCost" type="boolean">
  Return the credit cost estimate instead of upscaling (nothing runs, nothing is charged).
</ParamField>

### `edit_audio`

<Badge>write</Badge>

Transform existing audio with an audio-processing model, in one of TWO shapes. FILE mode: pass sourceUrl to process a standalone file into a new library asset. Voice isolation removes background noise and music and returns the processed URL directly; audio enhancement levels loudness and cleans up background noise, is asynchronous, and returns an outputId to poll with get\_generation\_status. Optionally pass projectId to place the result onto that editor project's timeline in the same call, controlled by an optional placement. IN-PLACE mode: pass projectId with clipIds (or enhanceClips for the whole timeline) to enhance the audio OF EXISTING CLIPS instead of producing a new asset, which is how you clean up a recording already on a timeline. In-place returns a LIST of jobs, one per SOURCE, because the vendor estimates a noise profile per production: one recording's clips are concatenated and enhanced together so the level and noise floor stay consistent across cuts, while separate recordings stay separate jobs. Poll every job's outputId. The enhanced audio is applied to the clips automatically when each job lands: an audio clip has its source swapped, and a video clip is muted with the enhanced audio placed on its own clip. Silenced clips are skipped. In-place mode is enhancement only and needs no sourceUrl. SPENDS CREDITS: pass getCost to preview the price first, which runs nothing and charges nothing.

<ParamField body name="clipIds" type="string[]">
  IN-PLACE mode: enhance the audio of these clips on projectId. Omit with enhanceClips:true to enhance every audible clip on the timeline.
</ParamField>

<ParamField body name="durationSeconds" type="number">
  Source audio length in seconds. Required for getCost, and for enhancement pricing when the source is not a stored ContentHero asset.
</ParamField>

<ParamField body name="enhanceClips" type="boolean">
  IN-PLACE mode for the whole timeline, without naming clips. Implied when clipIds is given.
</ParamField>

<ParamField body name="getCost" type="boolean">
  Return the credit cost estimate instead of running (nothing runs, nothing is charged).
</ParamField>

<ParamField body name="modelId" type="string">
  Instead of operation: an audio model that takes one audio file and returns audio (it resolves to the operation it performs). list\_models (contentType audio) names them; get\_model gives one model's inputs and whether it finishes at once or is polled with get\_generation\_status.
</ParamField>

<ParamField body name="operation" type="`isolate` \| `enhance`">
  isolate: voice isolation. enhance: loudness leveling and noise cleanup. The server picks the model that performs it. Omitted: enhance in in-place mode, else isolate.
</ParamField>

<ParamField body name="placement" type="object or object">
  Where the clip lands: append to the end, at a time, at the playhead, replacing an existing clip, or filling a time range. Omitted places it at the playhead when known, else appends.
</ParamField>

<ParamField body name="playheadFrame" type="number">
  The current playhead frame, for playhead-relative placement.
</ParamField>

<ParamField body name="projectId" type="string">
  The editor project: where to PLACE the result in file mode, or which timeline to enhance in in-place mode. Omit for a standalone library output.
</ParamField>

<ParamField body name="sourceUrl" type="string">
  FILE mode: the audio file to process, as a URL or a previous output id. Omit in in-place mode, where the sources come from the clips.
</ParamField>

### `transcribe`

<Badge>write</Badge>

Transcribe an audio URL to text (speech-to-text). Returns the transcript directly (synchronous, no polling). SPENDS CREDITS, metered per minute of audio, and the cost cannot be previewed: the result reports the credits it cost after the fact. Zero only when the account runs on its own ElevenLabs key.

<ParamField body name="audioUrl" type="string" required>
  Public URL of the audio file to transcribe.
</ParamField>

<ParamField body name="diarize" type="boolean">
  Label each speaker (diarization).
</ParamField>

<ParamField body name="languageCode" type="string">
  ISO language hint, e.g. "en". Auto-detected when omitted.
</ParamField>

### `get_generation_status`

<Badge>read</Badge>

Check one or more in-progress generations (outputIds from generate\_image / generate\_video / upscale / generate\_lip\_sync / generate\_board) and get their final URLs. BY DEFAULT THIS BLOCKS until they finish, up to \~40s per call, because that is almost always what you want after starting a render; if one is still running it comes back with the current status and a poll\_after\_seconds hint, so call again. Pass wait:false for an instant snapshot with no blocking. Accepts 1-8 outputIds in one call.

<ParamField body name="outputIds" type="string[]" required>
  1-8 outputIds to check (each from a prior generate\_\* call).
</ParamField>

<ParamField body name="wait" type="boolean">
  Block until terminal (up to \~40s), the default. false = an instant snapshot.
</ParamField>

### `list_models`

<Badge>read</Badge>

List the generation models available to this account (the discovery catalog): which models exist, their content type and operation, and a compact capability summary. Use this to pick a model, then call get\_model for its full request shape before generating. Source of truth for valid model ids; do not hardcode them.

<ParamField body name="contentType" type="`image` \| `video` \| `audio`">
  Filter to one content type.
</ParamField>

### `get_model`

<Badge>read</Badge>

Get one model's full request shape by id: the exact parameters it accepts (input types, prompt mode and char cap, duration range, resolutions, aspect ratios, max references, generation count, audio, features). Ground a generation against this instead of guessing the parameters, then preview cost with the matching generate tool's getCost option before running it.

<ParamField body name="modelId" type="string" required>
  The model id, as list\_models names it.
</ParamField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.