Skip to main content
Glama

text_to_video

Generate videos from text prompts by creating Kling tasks on RunAPI; returns task IDs, status, and output URLs.

Instructions

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

Input Schema

NameRequiredDescriptionDefault
modeNoGeneration mode. Declared type: string. Known values: "std", "pro".
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptNoVideo description. Required for single-shot and automatic storyboarding. Declared type: string.
cfg_scaleNoGuidance scale (0-1). Declared type: number.
shot_typeNoMulti-shot storyboard method: custom or automatic; defaults to custom only when multi_shots is true. Declared type: string. Known values: "custom", "automatic".
timeout_msNo
multi_shotsNoEnable multi-shot generation. Declared type: boolean.
aspect_ratioNoOutput aspect ratio. Declared type: string. Known values: "16:9", "9:16", "1:1".
callback_urlNoWebhook URL for async notifications. Declared type: string.
enable_soundNoEnable sound generation. Declared type: boolean.
multi_promptNoRequired for custom multi-shot mode: 1–6 shots with nonempty prompts up to 500 characters (each @element reference counts as 37), each duration_seconds 1–12, summing to duration_seconds. Declared type: array.
kling_elementsNoElement references with image, video, or audio materials. Declared type: array.
negative_promptNoNegative prompt. Declared type: string.
duration_secondsNoDuration in seconds. Declared type: integer. Known values: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15.
poll_interval_msNo
output_resolutionNoOutput resolution. Declared type: string. Known values: "720p", "1080p", "4k".
reference_video_urlNoPublic HTTP(S) MP4 or MOV reference video URL. Declared type: string.
last_frame_image_urlNoLast frame image URL for single-shot mode. Declared type: string.
reference_image_urlsNoOrdered public HTTP(S) JPG, JPEG, or PNG reference image URLs. Declared type: array.
reference_video_typeNoUse the video as a base edit or feature reference. Declared type: string. Known values: "base", "feature".
first_frame_image_urlNoFirst frame image URL. Declared type: string.
preserve_reference_video_audioNoPreserve the reference video's original audio. Declared type: boolean.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • changedInput schema / properties / multi_prompt / description
      Previous value: -"Prompt segments for multi-shot mode. Declared type: array."New value: +"Required for custom multi-shot mode: 1–6 shots with nonempty prompts up to 500 characters (each @element reference counts as 37), each duration_seconds 1–12, summing to duration_seconds. Declared type: array."
    • changedInput schema / properties / prompt / description
      Previous value: -"Video description. Required unless multi_shots is enabled. Declared type: string."New value: +"Video description. Required for single-shot and automatic storyboarding. Declared type: string."
    • addedInput schema / properties / shot_type
      Added value: +{
      +  "description": "Multi-shot storyboard method: custom or automatic; defaults to custom only when multi_shots is true. Declared type: string. Known values: \"custom\", \"automatic\".",
      +  "type": "string"
      +}
  2. Changed31 schema fields changedv0.3.0
    • addedInput schema / additionalProperties
      Added value: +{}
    • removedInput schema / properties / aspect_ratio / anyOf
      Removed value: -[
      -  {
      -    "const": "16:9",
      -    "type": "string"
      -  },
      -  {
      -    "const": "9:16",
      -    "type": "string"
      -  },
      -  {
      -    "const": "1:1",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / aspect_ratio / description
      Previous value: -"Output aspect ratio."New value: +"Output aspect ratio. Declared type: string. Known values: \"16:9\", \"9:16\", \"1:1\"."
    • addedInput schema / properties / aspect_ratio / type
      Added value: +"string"
    • changedInput schema / properties / callback_url / description
      Previous value: -"Webhook URL for async notifications."New value: +"Webhook URL for async notifications. Declared type: string."
    • changedInput schema / properties / cfg_scale / description
      Previous value: -"Guidance scale (0-1)."New value: +"Guidance scale (0-1). Declared type: number."
    • removedInput schema / properties / duration_seconds / anyOf
      Removed value: -[
      -  {
      -    "const": 3,
      -    "type": "number"
      -  },
      -  {
      -    "const": 4,
      -    "type": "number"
      -  },
      -  {
      -    "const": 5,
      -    "type": "number"
      -  },
      -  {
      -    "const": 6,
      -    "type": "number"
      -  },
      -  {
      -    "const": 7,
      -    "type": "number"
      -  },
      -  {
      -    "const": 8,
      -    "type": "number"
      -  },
      -  {
      -    "const": 9,
      -    "type": "number"
      -  },
      -  {
      -    "const": 10,
      -    "type": "number"
      -  },
      -  {
      -    "const": 11,
      -    "type": "number"
      -  },
      -  {
      -    "const": 12,
      -    "type": "number"
      -  },
      -  {
      -    "const": 13,
      -    "type": "number"
      -  },
      -  {
      -    "const": 14,
      -    "type": "number"
      -  },
      -  {
      -    "const": 15,
      -    "type": "number"
      -  }
      -]
    • changedInput schema / properties / duration_seconds / description
      Previous value: -"Duration in seconds."New value: +"Duration in seconds. Declared type: integer. Known values: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15."
    • addedInput schema / properties / duration_seconds / type
      Added value: +"integer"
    • changedInput schema / properties / enable_sound / description
      Previous value: -"Enable sound generation."New value: +"Enable sound generation. Declared type: boolean."
    • changedInput schema / properties / first_frame_image_url / description
      Previous value: -"First frame image URL."New value: +"First frame image URL. Declared type: string."
    • changedInput schema / properties / kling_elements / description
      Previous value: -"Element references with image, video, or audio materials."New value: +"Element references with image, video, or audio materials. Declared type: array."
    • changedInput schema / properties / last_frame_image_url / description
      Previous value: -"Last frame image URL for single-shot mode."New value: +"Last frame image URL for single-shot mode. Declared type: string."
    • removedInput schema / properties / mode / anyOf
      Removed value: -[
      -  {
      -    "const": "std",
      -    "type": "string"
      -  },
      -  {
      -    "const": "pro",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / mode / description
      Previous value: -"Generation mode."New value: +"Generation mode. Declared type: string. Known values: \"std\", \"pro\"."
    • addedInput schema / properties / mode / type
      Added value: +"string"
    • removedInput schema / properties / model / enum
      Removed 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-omni-reference",
      -  "kling-v3-turbo-text-to-video"
      -]
    • changedInput schema / properties / multi_prompt / description
      Previous value: -"Prompt segments for multi-shot mode."New value: +"Prompt segments for multi-shot mode. Declared type: array."
    • changedInput schema / properties / multi_shots / description
      Previous value: -"Enable multi-shot generation."New value: +"Enable multi-shot generation. Declared type: boolean."
    • changedInput schema / properties / negative_prompt / description
      Previous value: -"Negative prompt."New value: +"Negative prompt. Declared type: string."
    • removedInput schema / properties / output_resolution / anyOf
      Removed value: -[
      -  {
      -    "const": "720p",
      -    "type": "string"
      -  },
      -  {
      -    "const": "1080p",
      -    "type": "string"
      -  },
      -  {
      -    "const": "4k",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / output_resolution / description
      Previous value: -"Output resolution."New value: +"Output resolution. Declared type: string. Known values: \"720p\", \"1080p\", \"4k\"."
    • addedInput schema / properties / output_resolution / type
      Added value: +"string"
    • changedInput schema / properties / preserve_reference_video_audio / description
      Previous value: -"Preserve the reference video's original audio."New value: +"Preserve the reference video's original audio. Declared type: boolean."
    • changedInput schema / properties / prompt / description
      Previous value: -"Video description. Required unless multi_shots is enabled."New value: +"Video description. Required unless multi_shots is enabled. Declared type: string."
    • changedInput schema / properties / reference_image_urls / description
      Previous value: -"Ordered public HTTP(S) JPG, JPEG, or PNG reference image URLs."New value: +"Ordered public HTTP(S) JPG, JPEG, or PNG reference image URLs. Declared type: array."
    • removedInput schema / properties / reference_video_type / anyOf
      Removed value: -[
      -  {
      -    "const": "base",
      -    "type": "string"
      -  },
      -  {
      -    "const": "feature",
      -    "type": "string"
      -  }
      -]
    • changedInput schema / properties / reference_video_type / description
      Previous value: -"Use the video as a base edit or feature reference."New value: +"Use the video as a base edit or feature reference. Declared type: string. Known values: \"base\", \"feature\"."
    • addedInput schema / properties / reference_video_type / type
      Added value: +"string"
    • changedInput schema / properties / reference_video_url / description
      Previous value: -"Public HTTP(S) MP4 or MOV reference video URL."New value: +"Public HTTP(S) MP4 or MOV reference video URL. Declared type: string."
    • addedInput schema / required
      Added value: +[]
  3. Changed19 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / aspect_ratio / anyOf
      Added value: +[
      +  {
      +    "const": "16:9",
      +    "type": "string"
      +  },
      +  {
      +    "const": "9:16",
      +    "type": "string"
      +  },
      +  {
      +    "const": "1:1",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / aspect_ratio / enum
      Removed value: -[
      -  "16:9",
      -  "9:16",
      -  "1:1"
      -]
    • removedInput schema / properties / aspect_ratio / type
      Removed value: -"string"
    • addedInput schema / properties / duration_seconds / anyOf
      Added value: +[
      +  {
      +    "const": 3,
      +    "type": "number"
      +  },
      +  {
      +    "const": 4,
      +    "type": "number"
      +  },
      +  {
      +    "const": 5,
      +    "type": "number"
      +  },
      +  {
      +    "const": 6,
      +    "type": "number"
      +  },
      +  {
      +    "const": 7,
      +    "type": "number"
      +  },
      +  {
      +    "const": 8,
      +    "type": "number"
      +  },
      +  {
      +    "const": 9,
      +    "type": "number"
      +  },
      +  {
      +    "const": 10,
      +    "type": "number"
      +  },
      +  {
      +    "const": 11,
      +    "type": "number"
      +  },
      +  {
      +    "const": 12,
      +    "type": "number"
      +  },
      +  {
      +    "const": 13,
      +    "type": "number"
      +  },
      +  {
      +    "const": 14,
      +    "type": "number"
      +  },
      +  {
      +    "const": 15,
      +    "type": "number"
      +  }
      +]
    • removedInput schema / properties / duration_seconds / enum
      Removed value: -[
      -  3,
      -  4,
      -  5,
      -  6,
      -  7,
      -  8,
      -  9,
      -  10,
      -  11,
      -  12,
      -  13,
      -  14,
      -  15
      -]
    • removedInput schema / properties / duration_seconds / type
      Removed value: -"number"
    • addedInput schema / properties / mode / anyOf
      Added value: +[
      +  {
      +    "const": "std",
      +    "type": "string"
      +  },
      +  {
      +    "const": "pro",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / mode / enum
      Removed value: -[
      -  "std",
      -  "pro"
      -]
    • removedInput schema / properties / mode / type
      Removed value: -"string"
    • changedInput schema / properties / model / enum
      Previous 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"
      -]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-omni-reference",
      +  "kling-v3-turbo-text-to-video"
      +]
    • addedInput schema / properties / output_resolution / anyOf
      Added value: +[
      +  {
      +    "const": "720p",
      +    "type": "string"
      +  },
      +  {
      +    "const": "1080p",
      +    "type": "string"
      +  },
      +  {
      +    "const": "4k",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / output_resolution / enum
      Removed value: -[
      -  "720p",
      -  "1080p",
      -  "4k"
      -]
    • removedInput schema / properties / output_resolution / type
      Removed value: -"string"
    • addedInput schema / properties / poll_interval_ms / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / reference_video_type / anyOf
      Added value: +[
      +  {
      +    "const": "base",
      +    "type": "string"
      +  },
      +  {
      +    "const": "feature",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / reference_video_type / enum
      Removed value: -[
      -  "base",
      -  "feature"
      -]
    • removedInput schema / properties / reference_video_type / type
      Removed value: -"string"
    • addedInput schema / properties / timeout_ms / maximum
      Added value: +9007199254740991
  4. 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"
      +}
  5. 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"
      -]
  6. 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"
  7. First observedv0.1.1

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It usefully discloses that a task is created asynchronously and that the response includes a task id, status, and output URLs, which implies long-running/queued work. However, it omits cost implications, whether generation is billable, rate limits, and what the 'wait' polling semantics imply for latency.

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?

Two compact sentences, front-loaded with the action and resource, then the return value. No filler, no repetition of schema content.

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?

For a 23-parameter tool with no annotations and no output schema, the description does far too little: it never tells the agent when to choose this over the other video-generation siblings, does not explain the polling/async workflow implied by 'wait', and gives only a one-line hint at return shape. The brief mention of task id/status/output URLs partially compensates for the missing output schema but not enough.

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 description coverage is 91%, so the schema already documents nearly all 23 parameters (e.g., multi_prompt shot constraints, duration enums, image URL formats). The description adds nothing about parameters, so the baseline 3 applies; the two undocumented params (timeout_ms, poll_interval_ms) remain unexplained in both places.

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

Purpose4/5

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

States a specific verb ('Create') and resource ('Kling task on RunAPI') with the modality in parentheses ('text to video'), so an agent knows it is a generation task rather than a query or edit. It is distinguishable from image_to_video and extend_video by the explicit text-to-video framing, though it never names those siblings to draw the boundary.

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?

There is no statement of when to use this tool versus image_to_video, motion_control, or edit_video, and no prerequisites (API key, credits, prompt requirement) are given. Usage is only implied by the tool name and the parenthetical.

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