Gemini Media

v1.1.0
io.github.mordor-forge/gemini-media-mcp Checked 5 days ago Published 1 month ago

Generate images (Nano Banana), video (Veo, Gemini Omni), speech and music (Lyria) with Google models

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

edit_image Edit image

Change an existing image with an instruction (add/remove/replace elements, restyle, relight, change aspect ratio, fix text) while keeping everything else. Accepts extra reference images to insert or match. Say what must stay unchanged. Saves a new file; the original is kept.

ParameterTypeDescription
image *stringThe image to edit: file path, gemini-media:// URI from an earlier result, or data: URI.
prompt *stringThe change to make, stated specifically, plus what must stay the same (e.g. 'Replace the sky with a sunset; keep the people, framing and lighting on faces unchanged').
approvedCostUsdnumberOnly needed above the confirmation threshold: the cost in USD the user approved.
aspectRatiostringChange the aspect ratio (outpainting). Omit to keep the source ratio.
imageSizestringOutput size: 1K, 2K or 4K (512 only on the deprecated gemini-3.1-flash-image).
modelstringModel ID or alias. Defaults to the model that created the source image, else nb2.
outputNamestringOptional base file name for the saved file. Defaults to the source name plus -edit.
referenceImagesnull | arrayOptional extra images to pull elements or style from (e.g. 'put the logo from image 2 on the mug').

edit_video Edit video

Change an existing clip with an instruction (add, remove or replace objects, restyle, relight, change the background) with Gemini Omni Flash, keeping everything else. Pass the jobId of a finished clip (Omni clips are edited in conversation) or a video file of at most 10 s. Asynchronous like generate_video; about $0.10 per second of video at 720p.

ParameterTypeDescription
prompt *stringThe change, stated simply, ending with 'Keep everything else the same.' (e.g. 'Make the phone invisible. Keep everything else the same.')
approvedCostUsdnumberOnly needed above the confirmation threshold: the cost in USD the user approved.
jobIdstringA completed video job to edit. Omni clips are edited in conversation (Google keeps the context); other clips are sent as their saved file. Pass jobId or video.
modelstringModel ID or alias; default omni (the only model that edits videos).
outputNamestringOptional base file name for the saved video. Defaults to the source name plus -edit.
referenceImagesnull | arrayOptional images to bring into the clip; refer to them as <IMAGE_REF_0>, <IMAGE_REF_1>... in the prompt.
resolutionstring360p, 720p (default), 1080p or 4k (1080p and 4k are upscaled).
videostringOr a video file to edit: file path, gemini-media:// URI or data: URI. At most 10 seconds and 20 MB.
waitSecondsintegerBlock up to this many seconds for the result (default 0 = return a job handle immediately). Keep under your client's tool timeout.

estimate_cost Estimate cost

Estimate the cost of an image, video, speech or music request before running it, optionally comparing all models; also reports remaining budget and whether approval is needed.

ParameterTypeDescription
mediaType *stringimage, video, speech or music
comparebooleanAlso estimate the same request on every other active model of this media type
countintegerNumber of images/clips/songs (default 1)
durationSecondsintegerVideo: clip length (default 8)
generateAudionull | booleanVideo on Vertex AI: false for the cheaper silent rate
imageSizestringImages: 512, 1K, 2K or 4K
inputImagesintegerImages: number of reference/source images
modelstringModel ID or alias (default model when omitted)
resolutionstringVideo: 720p, 1080p or 4k (Omni also 360p)
textstringSpeech: the text to be spoken (length drives cost)

extend_video Extend video

Continue a completed clip from its end: omni adds up to 10 s (40 s total, keeping characters and audio coherent); Veo fast/standard add about 7 s (720p, up to 148 s, within 2 days). Asynchronous like generate_video.

ParameterTypeDescription
jobId *stringJob handle of a completed generate_video or extend_video call (operation names from older versions also work).
prompt *stringWhat happens next. Veo adds about 7 seconds (720p) from the last second; omni adds up to 10 seconds using the last 10 seconds as context.
approvedCostUsdnumberOnly needed above the confirmation threshold.
negativePromptstring
outputNamestring
seednull | integerVertex AI only.
waitSecondsintegerBlock up to this many seconds for the result (default 0).

generate_image Generate image

Create images from a text prompt, optionally guided by up to 14 reference images (subjects, products, style). Default model nb2 (Nano Banana 2.1, ~$0.04 per 1K image); pro for the densest scenes and final renders (~$0.15); nb2-lite for bulk drafts. Returns saved files with URIs you can pass to edit_image, generate_video (image) or other tools.

ParameterTypeDescription
prompt *stringWhat to create. Describe subject, setting, composition, lighting and style in full sentences. Put any exact text to render in quotes.
approvedCostUsdnumberOnly needed when a call exceeds the configured confirmation threshold: the cost in USD the user approved.
aspectRatiostringe.g. 1:1, 3:2, 2:3, 4:3, 3:4, 4:5, 16:9, 9:16, 21:9 (nb2 also 1:4, 4:1, 1:8, 8:1). Defaults to 1:1 when there are no reference images; with them the model usually follows the first image's ratio.
countintegerNumber of variations to generate in parallel (1-4, default 1). Each is billed.
googleSearchbooleanGround the image in Google Search results (current events, real places, data for infographics).
imageSizestringOutput size: 1K (default), 2K or 4K. Larger costs more. 512 only on the deprecated gemini-3.1-flash-image.
modelstringModel ID or alias. nb2 (default: Nano Banana 2.1, fast and cheap), pro (Nano Banana Pro, highest fidelity for dense scenes), nb2-lite (cheapest inputs). See list_models.
outputNamestringOptional base file name (without extension) for the saved file(s).
referenceImagesnull | arrayOptional images to guide the result (subjects, products, characters, style): file paths, gemini-media:// URIs from earlier results, or data: URIs. Up to 14 for nb2/pro.

generate_music Generate music

Compose music with Lyria: 30-second clips (clip, $0.04) or full songs of a few minutes with vocals and lyrics (full, $0.08). Control genre, mood, instruments, tempo and structure in the prompt; returns lyrics/structure text when available.

ParameterTypeDescription
prompt *stringDescribe the music: genre, mood, instruments, tempo, key, production style and song structure. Use [Intro]/[Verse]/[Chorus]/[Bridge]/[Outro] tags or [0:00-0:15] timestamps to control sections.
approvedCostUsdnumberOnly needed above the confirmation threshold.
bpmintegerOptional tempo hint in beats per minute.
durationSecondsintegerOptional target length hint for full songs (clip is always 30s).
formatstringmp3 (default) or wav (full model only).
imagesnull | arrayOptional images (up to 10) whose mood or scene should inspire the music.
instrumentalbooleanAsk for no vocals.
lyricsstringOptional lyrics with section tags; they are sung in the language they are written in.
modelstringclip (default: 30-second MP3, cheapest) or full (complete song up to about 3 minutes, vocals, WAV option). See list_models.
outputNamestringOptional base file name.

generate_speech Generate speech

Turn text into natural speech (WAV) with one voice, or a dialogue between two speakers. Control delivery with style. About $0.01-0.02 per minute of audio. For podcasts, voiceovers, narration and dialogue.

ParameterTypeDescription
approvedCostUsdnumberOnly needed above the confirmation threshold.
dialoguenull | arrayAlternative to text: a conversation between up to 2 named speakers, one entry per line.
formatstringwav (default) or pcm (raw 16-bit little-endian).
languageCodestringOptional BCP-47 code (e.g. en-US, it-IT). Usually auto-detected from the text.
modelstringModel ID or alias: tts (default, Gemini 3.8 Flash TTS), tts-lite (cheaper). See list_models.
outputNamestringOptional base file name.
speakersnull | arrayVoice per dialogue speaker; unlisted speakers get distinct defaults.
stylestringHow to deliver the lines, e.g. 'warm and enthusiastic', 'whispered urgently', 'slow, calm narrator'.
textstringThe exact words to speak (single speaker). Newer models read it verbatim, so put delivery directions in style, not here. Inline tags like <sigh> or <short pause> are allowed.
voicestringVoice for single-speaker text, e.g. Kore (firm), Puck (upbeat), Charon (informative), Aoede (breezy, default), Zephyr (bright). list_models shows all 30.

generate_video Generate video

Start a video clip with native audio from a text prompt, optionally from a first frame, first+last frames, or reference images. Default omni (Gemini Omni Flash: 3-10s, cheap 360p drafts up to 4K, up to 10 references). On Vertex AI the default is Veo lite; fast/standard add Veo 4K and ingredients. Veo is leaving the Gemini API (list_models has the date). estimate_cost prices any option. Asynchronous: returns a jobId; then call get_video.

ParameterTypeDescription
prompt *stringWhat happens in the clip: subject and action, camera movement, setting, lighting, style, and sound (dialogue in quotes, sound effects, ambience, music).
approvedCostUsdnumberOnly needed above the confirmation threshold: the cost in USD the user approved.
aspectRatiostring16:9 (default) or 9:16
durationSecondsintegerClip length: Veo 4, 6 or 8 seconds; omni 3-10 seconds (default 8).
generateAudionull | booleanVertex AI only: set false for silent video at a lower price. The Gemini API always generates audio.
imagestringOptional first frame (image-to-video): file path, gemini-media:// URI or data: URI.
lastFramestringOptional last frame; requires image. Veo interpolates between the two.
modelstringModel ID or alias: omni (default on the Gemini API: Gemini Omni Flash, best prompt adherence, editable and extendable to 40 s), lite (cheapest Veo; the default on Vertex AI), fast (Veo 4K, ingredients…
negativePromptstringWhat to avoid, as plain nouns (e.g. 'text overlays, blur'). For omni it is appended to the prompt.
outputNamestringOptional base file name for the saved video.
personGenerationstringallow_all, allow_adult or dont_allow. The Gemini API requires allow_all for text-to-video and allow_adult for image-based modes.
referenceImagesnull | arrayImages of characters, objects, products or styles to keep consistent: Veo fast/standard up to 3 (forces 8s, not with image/lastFrame); omni up to 10 including frames (name them <IMAGE_REF_0>... in the…
resolutionstring720p (default), 1080p or 4k (not lite); omni also 360p for fast drafts. Veo 1080p and 4k require 8-second clips.
seednull | integerSeed for more repeatable results (Vertex AI only; ignored on the Gemini API).
waitSecondsintegerBlock up to this many seconds for the result (default 0 = return a job handle immediately). Keep under your client's tool timeout.

get_config Get configuration

Show the active backend and how it was chosen, output directory, default models, budgets, input-file policy and configuration warnings. Use it to troubleshoot credentials or missing files.

get_usage Get usage and spend

Report estimated spend for this session, today, this month or all time, broken down by model and tool, with budget remaining, recent calls and running video jobs.

ParameterTypeDescription
periodstringsession (since this server started), today (default), month or all
recentintegerHow many recent entries to include (default 10, max 100)

get_video Get video job

Check a video job and wait for it (default up to 45s). When the job completes, the video is downloaded and returned; calling again is safe and returns the same files.

ParameterTypeDescription
jobId *stringJob handle returned by generate_video, extend_video or edit_video.
waitSecondsnull | integerBlock up to this many seconds for completion (default 45, 0 = check once). The video is downloaded automatically when ready.

list_models List models

List current models per media type with aliases, status (GA/preview/deprecated), prices and a short guide to when to use each. detail: true adds supported aspect ratios, sizes, durations and voices; live: true checks what your API key can actually call.

ParameterTypeDescription
detailbooleanInclude full capabilities (aspect ratios, voices, rules).
includeInactivebooleanAlso list retired models and their replacements.
livebooleanAlso query the Gemini API for the models this key can use, flagging unavailable ones and media models missing from the catalog.
mediaTypestringFilter: image, video, speech or music.

stitch_tiles Stitch upscaled tiles

Upscale step 3: align each edited tile from tile_image with the image, match its broad color, blend the overlaps and save one large PNG (default 8192 px long edge). Free and local. Reports tiles it rejected (their area keeps the prior pixels) and returns a preview plus 100% crops of the seams to inspect.

ParameterTypeDescription
job *stringThe job uri returned by tile_image.
tiles *null | arrayThe edited tiles. Tiles left out keep the underlying image.
colorMatchnull | booleanMatch each tile's broad exposure and color to the image (default true). Fine texture is never transferred.
detailsnull | arrayUp to 6 points to return as 100% crops for inspection. Default: where grid tiles meet, or each region's center.
feathernumberBlend width as a fraction of each tile's shorter side (default 0.2, 0.05-0.4). Between neighboring tiles it is capped at half their overlap.
outputNamestringOptional base name for the stitched PNG.

tile_image Tile image for upscaling

Upscale step 1: cut an image into crops shaped to the edit model's aspect ratios. longEdge sets the target (1K-16K, default 8K); with grid and imageSize omitted it picks the cheapest plan that covers it (one tile up to about 4K, a 2x2-4x4 grid beyond). regions re-render faces or text in a later pass. Free and local; reports the edit cost. Step 2: edit_image each crop as the result says. Step 3: stitch_tiles. Detail is invented, not recovered.

ParameterTypeDescription
image *stringThe image to cut: the original photo for the first pass, or the previous stitch_tiles result for a refinement pass. File path, gemini-media:// URI or data: URI.
gridintegerCut a grid x grid layout covering the whole image (1-4). Omit it on a first pass to let tile_image pick the cheapest grid that covers longEdge (explained in planNote); a later full-grid pass defaults…
imageSizestringSize the tiles will be edited at (1K, 2K or 4K, as the model supports). Omit it on a first pass to pick it with the grid; otherwise it defaults to the model's largest size.
longEdgeintegerLong edge in pixels of the image stitch_tiles will produce (default 8192, 1024-16384, at most 70 megapixels). First pass only; later passes keep their input's size.
modelstringImage model the tiles will be edited with (default: the server's default image model; a refinement pass defaults to the model of the pass before). Sets the supported aspect ratios and the cost estimat…
originalstringFirst pass only: the untouched original, sent with every tile as context (as a copy of at most 2048 px). Defaults to image. Refinement passes edit crops alone and keep the first pass's original, so it…
outputNamestringOptional base name for the crops and the stitched result. Defaults to the original's name.
paddingnumberContext added around each cell or region, as a fraction of its size (default 0.2, 0.05-0.5). Tiles then grow to the nearest aspect ratio the model supports.
regionsnull | arrayRefinement pass: up to 12 areas to re-render (faces, hands, text, materials), as fractions of the image. Omit for a full grid.