Skip to main content
Glama

RelaySwitch

Generate an image, video, speech, music or 3D file

generate

Runs any media model id from list_media_models with its settings (see media_model) through POST /v1/generations, waits up to wait_seconds for the files, and returns the generation: a link per file (kept 30 days), a finished image inline, and the charge. A video that is still running when the wait ends is returned as it stands; call generation with its id to keep waiting. Charged to the key in the MCP request's Authorization header when the model accepts the task; a failed generation is refunded in full. To go from an image to a video or an edit, pass the image's URL in image_urls.

Input Schema

NameRequiredDescriptionDefault
inputYesThe model's settings, as media_model lists them under params: prompt, size or aspect_ratio, resolution, duration, image_urls, text, voice... A setting left out takes the model's default.
modelYesA media model id from list_media_models.
previewNoDefault true: a finished image comes back inline as image content besides its link.
wait_secondsNoSeconds to wait for the files before answering with the generation as it stands, 0 to 120. Images usually finish inside the default 60; a video takes minutes, so follow up with generation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources