Skip to main content
Glama

generate_video

Create or edit videos from text descriptions, starting images, or existing clips. Customize duration, aspect ratio, and resolution.

Instructions

Generate or edit videos with Grok Imagine.

Args: prompt: Video description, or the edit instruction for video editing. model: Video model (default grok-imagine-video). image_path: Local image to use as the starting frame. image_url: Public image URL to use as the starting frame. video_path: Local video to edit (max 20 MB, .mp4, ≤ 8.7s). video_url: Public video URL to edit (.mp4, ≤ 8.7s). reference_image_paths: Local images used as style/subject references. reference_image_urls: Public image URLs used as style/subject references. duration: Video length in seconds (1–15, ignored when editing). aspect_ratio: Aspect ratio like "16:9" or "9:16". resolution: "480p" or "720p".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNogrok-imagine-video
promptYes
durationNo
image_urlNo
video_urlNo
image_pathNo
resolutionNo
video_pathNo
aspect_ratioNo
reference_image_urlsNo
reference_image_pathsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoHuman-formatted output (includes footers, citations, cost summary).
modelYesActual executing model ID (e.g. 'grok-4.5').
planeNoAPI
routeYesHigh-level route (fast/agentic/research/etc.).
imagesNoGrok Imagine image URLs.
tokensNoTotal tokens consumed.
profileNoInternal routing profile.
summaryNoLegacy/duplicate formatted summary of the media generation.
cost_usdNoExact USD cost from xAI billing metadata.
responseYesRaw model output or primary content.
citationsNoNative xAI/X citations with URL + snippet.
video_urlNo
latency_secNo
duration_secNo
finish_reasonNounknown
imagine_paramsNoOriginal prompt + seed for reproducibility.
reasoning_effortNoGrok 4.5+ native reasoning level.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses some behavioral details like file size and duration constraints for video editing. However, it lacks information on permissions, rate limits, side effects, or whether the operation is synchronous, which are important for an agent deciding to invoke the tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured as a bulleted list of parameters, which is easy to parse. It is somewhat lengthy but every line adds value. It could be slightly more concise by grouping similar parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers parameter details comprehensively but omits broader context like the output format, error handling, or prerequisites. Since an output schema exists, the agent might infer return values, but the description should ideally mention what the tool returns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the schema for all 11 parameters, such as clarifying that 'prompt' can be a video description or edit instruction, and specifying constraints like 'max 20 MB, .mp4, ≤ 8.7s' for video_path. Schema coverage is 0%, so the description carries the full burden and does so well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Generate or edit videos with Grok Imagine,' providing a specific verb and resource. It distinguishes itself from sibling tools like 'extend_video' and 'generate_image' by focusing on video generation and editing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. It does not mention when not to use it or recommend other tools for specific scenarios, leaving the agent to infer based on sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/djtelicloud/grok-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server