Skip to content

Kling V2.1 Pro ​

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-pro for this endpoint Default:"kling/v2-1-pro"。 Allowed values:kling/v2-1-pro。 Example:kling/v2-1-pro。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. Text prompt describing the video to generate (Max length: 5000 characters) maxLength: 2000. Example:POV shot of a gravity surfer diving between ancient ruins suspended midair, glowing moss lights the path, the board hisses as it carves through thin mist, echoes rise with speed 。
image_urlstringYesURL of the image to be used for the video (File URL after upload, not file content; Accepted types: image/jpeg, image/png; Max size: 10.0MB) Example:https://example.com/your-image.png。
durationstringYesRequired. "5" or "10" (seconds). Allowed values:5 / 10。 Example:5。
negative_promptstringNoTerms 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。
tail_image_urlstringNoURL of the image to be used for the end of the video (File URL after upload, not file content; Accepted types: image/jpeg, image/png; Max size: 10.0MB) Example:``。

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-pro",
  "prompt": "POV shot of a gravity surfer diving between ancient ruins suspended midair, glowing moss lights the path, the board hisses as it carves through thin mist, echoes rise with speed ",
  "image_url": "https://example.com/your-image.png",
  "duration": "5",
  "cfg_scale": 0.5
}'
json
{
  "model": "kling/v2-1-pro",
  "prompt": "POV shot of a gravity surfer diving between ancient ruins suspended midair, glowing moss lights the path, the board hisses as it carves through thin mist, echoes rise with speed ",
  "image_url": "https://example.com/your-image.png",
  "duration": "5",
  "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.