Skip to main content
Glama

text_to_video

Generate a Kling AI video from a text prompt, returning a task id, status, and output URLs for polling or webhook pickup.

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. 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 unless multi_shots is enabled. Declared type: string.
cfg_scaleNoGuidance scale (0-1). Declared type: number.
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_promptNoPrompt segments for multi-shot mode. 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. 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: +[]
  2. 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
  3. 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"
      +}
  4. 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"
      -]
  5. 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"
  6. First observedv0.1.1

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It notes the response shape (task id, status, output URLs), which is useful given there is no output schema, but says nothing about polling/`wait` behavior, cost, async callback semantics, or what happens with the many optional reference params. For a 22-parameter generation tool this is thin.

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?

Two sentences, both front-loaded and waste-free: purpose first, then the return contract. Nothing is redundant, though it is arguably under-informative rather than truly concise.

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, zero annotations, and no output schema, the description should at minimum explain the wait/polling default and the interaction between multi_shots, multi_prompt, and the reference-* fields. The return-shape sentence partially compensates for the missing output schema, but the behavior of a complex async generation task is left unexplained.

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 every parameter (including enum-like known values and defaults). The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies.

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 and resource ('Create a Kling task'), plus the modality '(text to video)', which distinguishes it from siblings like image_to_video and edit_video. It does not name those siblings explicitly, but the modality label is enough for an agent to route correctly.

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 when-to-use guidance, no mention of when to prefer image_to_video/extend_video/motion_control, and no prerequisites (e.g. that reference image URLs push work toward the image_to_video path). The agent must infer usage from the tool name alone.

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