Skip to content

Kling V2.1 Master Text to Video ​

Endpoint ​

POST /videos/generations

Full URL: https://modelfold.ai/v1/videos/generations

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.

Input parameters for the generation task

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe model name to use for generation. Required field.
- Must be kling/v2-1-master-text-to-video for this endpoint Default:"kling/v2-1-master-text-to-video"。 Allowed values:kling/v2-1-master-text-to-video。 Example:kling/v2-1-master-text-to-video。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. The text prompt describing the video you want to generate (Max length: 5000 characters) maxLength: 2000. Example:First-person view from a soldier jumping from a transport plane — the camera shakes with turbulence, oxygen mask reflections flicker — as the clouds part, the battlefield below pulses with anti-air fire and missile trails.。
durationstringYesRequired. "5" or "10" (seconds). Allowed values:5 / 10。 Example:5。
aspect_ratiostringNoThe aspect ratio of the generated video frame Default:"16:9"。 Allowed values:16:9 / 9:16 / 1:1。 Example:16:9。
negative_promptstringNoElements to avoid in the generated video (Max length: 500 characters) maxLength: 500. Example:blur, distort, and low quality。
cfg_scalenumberNoThe CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt (Min: 0, Max: 1, Step: 0.1) (step: 0.1) Default:0.5。 minimum: 0. maximum: 1. Example:0.5。

Request Example ​

bash
curl -X POST "https://modelfold.ai/v1/videos/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kling/v2-1-master-text-to-video",
  "prompt": "First-person view from a soldier jumping from a transport plane — the camera shakes with turbulence, oxygen mask reflections flicker — as the clouds part, the battlefield below pulses with anti-air fire and missile trails.",
  "duration": "5",
  "aspect_ratio": "16:9",
  "cfg_scale": 0.5
}'
json
{
  "model": "kling/v2-1-master-text-to-video",
  "prompt": "First-person view from a soldier jumping from a transport plane — the camera shakes with turbulence, oxygen mask reflections flicker — as the clouds part, the battlefield below pulses with anti-air fire and missile trails.",
  "duration": "5",
  "aspect_ratio": "16:9",
  "cfg_scale": 0.5
}

Response ​

200 — Generation completed. usage contains actual billing details; result URLs are illustrative. ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.mp4"
    }
  ],
  "usage": {}
}

ModelFold — one API for all the best AI models.