Skip to main content
Glama

text_to_video

Generate videos from text descriptions by creating Kling tasks on RunAPI. Returns a task ID, status, and output URLs for tracking.

Instructions

Create a Kling task on RunAPI (text to video). Returns a task id, status, and output URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoGeneration mode.
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptNoVideo description. Required unless multi_shots is enabled.
cfg_scaleNoGuidance scale (0-1).
timeout_msNo
multi_shotsNoEnable multi-shot generation.
aspect_ratioNoOutput aspect ratio.
callback_urlNoWebhook URL for async notifications.
enable_soundNoEnable sound generation.
multi_promptNoPrompt segments for multi-shot mode.
kling_elementsNoElement references with image, video, or audio materials.
negative_promptNoNegative prompt.
duration_secondsNoDuration in seconds.
poll_interval_msNo
output_resolutionNoOutput resolution.
reference_video_urlNoPublic HTTP(S) MP4 or MOV reference video URL.
last_frame_image_urlNoLast frame image URL for single-shot mode.
reference_image_urlsNoOrdered public HTTP(S) JPG, JPEG, or PNG reference image URLs.
reference_video_typeNoUse the video as a base edit or feature reference.
first_frame_image_urlNoFirst frame image URL.
preserve_reference_video_audioNoPreserve the reference video's original audio.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changedv0.1.13
    • addedInput schema / properties / aspect_ratio / description
      Added value: +"Output aspect ratio."
    • addedInput schema / properties / callback_url / description
      Added value: +"Webhook URL for async notifications."
    • addedInput schema / properties / cfg_scale / description
      Added value: +"Guidance scale (0-1)."
    • addedInput schema / properties / duration_seconds / description
      Added value: +"Duration in seconds."
    • addedInput schema / properties / enable_sound / description
      Added value: +"Enable sound generation."
    • addedInput schema / properties / first_frame_image_url / description
      Added value: +"First frame image URL."
    • addedInput schema / properties / kling_elements / description
      Added value: +"Element references with image, video, or audio materials."
    • addedInput schema / properties / last_frame_image_url / description
      Added value: +"Last frame image URL for single-shot mode."
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "Generation mode.",
      +  "enum": [
      +    "std",
      +    "pro"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "kling-3.0",
      -  "kling-v2.1-master-text-to-video",
      -  "kling-v2.5-turbo-text-to-video-pro",
      -  "kling-v3-turbo-text-to-video"
      -]New value: +[
      +  "kling-3.0",
      +  "kling-o1",
      +  "kling-v2.1-master-text-to-video",
      +  "kling-v2.5-turbo-text-to-video-pro",
      +  "kling-v2.6",
      +  "kling-v3-omni",
      +  "kling-v3-turbo-text-to-video"
      +]
    • addedInput schema / properties / multi_prompt / description
      Added value: +"Prompt segments for multi-shot mode."
    • addedInput schema / properties / multi_shots / description
      Added value: +"Enable multi-shot generation."
    • addedInput schema / properties / negative_prompt / description
      Added value: +"Negative prompt."
    • addedInput schema / properties / output_resolution / description
      Added value: +"Output resolution."
    • addedInput schema / properties / output_resolution / enum
      Added value: +[
      +  "720p",
      +  "1080p",
      +  "4k"
      +]
    • addedInput schema / properties / preserve_reference_video_audio
      Added value: +{
      +  "description": "Preserve the reference video's original audio.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / prompt / description
      Added value: +"Video description. Required unless multi_shots is enabled."
    • addedInput schema / properties / reference_image_urls
      Added value: +{
      +  "description": "Ordered public HTTP(S) JPG, JPEG, or PNG reference image URLs.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / reference_video_type
      Added value: +{
      +  "description": "Use the video as a base edit or feature reference.",
      +  "enum": [
      +    "base",
      +    "feature"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / reference_video_url
      Added value: +{
      +  "description": "Public HTTP(S) MP4 or MOV reference video URL.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.1.9
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "kling-3.0",
      -  "kling-v2.1-master-text-to-video",
      -  "kling-v2.5-turbo-text-to-video-pro"
      -]New value: +[
      +  "kling-3.0",
      +  "kling-v2.1-master-text-to-video",
      +  "kling-v2.5-turbo-text-to-video-pro",
      +  "kling-v3-turbo-text-to-video"
      +]
    • removedInput schema / properties / output_resolution / enum
      Removed value: -[
      -  "720p",
      -  "1080p",
      -  "4k"
      -]
  3. Changed5 schema fields changedv0.1.2
    • addedInput schema / properties / callback_url / type
      Added value: +"string"
    • addedInput schema / properties / first_frame_image_url / type
      Added value: +"string"
    • addedInput schema / properties / last_frame_image_url / type
      Added value: +"string"
    • addedInput schema / properties / negative_prompt / type
      Added value: +"string"
    • addedInput schema / properties / prompt / type
      Added value: +"string"
  4. First observedv0.1.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations provided; description mentions returning task id, status, and output URLs but does not disclose async behavior, polling (via wait parameter), or side effects. Lacks detail on what happens behind the scenes.

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

Conciseness5/5

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

Single sentence, 15 words, directly states purpose. No unnecessary information.

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

Completeness2/5

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

With 22 parameters, no output schema, and no annotations, the description is too sparse to fully inform an agent. Lacks explanation of which parameters are essential, how the task lifecycle works, or common use patterns.

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

Parameters3/5

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

Schema coverage is 91% with descriptions on most parameters; the description adds no extra meaning beyond 'create a task'. Baseline of 3 is appropriate.

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 the tool creates a Kling text-to-video task on RunAPI, which distinguishes it from siblings like image_to_video and extend_video.

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 guidance on when to use this tool vs alternatives (e.g., image_to_video, motion_control). No context about prerequisites or exclusions.

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