Skip to content

Kling 2.6 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
modelstringYesName of the model used for the generation task. Required field.
- This endpoint must use the kling-2.6/text-to-video model Default:"kling-2.6/text-to-video"。 Allowed values:kling-2.6/text-to-video。 Example:kling-2.6/text-to-video。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. Text prompt (max 2,500 characters). maxLength: 2000. Example:Scene: A fashion live-streaming sales setting, with clothes hanging on racks and the host's figure reflected in a full-length mirror. Lines: [African female host] turns around to showcase the hoodie's cut. [African female host, in a cheerful tone] says: "360-degree flawless tailoring, slimming and versatile." She then [African female host] leans closer to the camera. [African female host, in a lively tone] says: "Double-sided fleece fabric, $30 off immediately when you order now."。
soundbooleanYesRequired. This parameter specifies whether the generated video contains sound (boolean: true/false) Example:false。
aspect_ratiostringYesRequired. This parameter defines the video aspect ratio Allowed values:1:1 / 16:9 / 9:16。 Example:1:1。
durationstringYesRequired. Video duration (unit: seconds) Allowed values:5 / 10。 Example: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-2.6/text-to-video",
  "prompt": "Scene: A fashion live-streaming sales setting, with clothes hanging on racks and the host'\''s figure reflected in a full-length mirror. Lines: [African female host] turns around to showcase the hoodie'\''s cut. [African female host, in a cheerful tone] says: \"360-degree flawless tailoring, slimming and versatile.\" She then [African female host] leans closer to the camera. [African female host, in a lively tone] says: \"Double-sided fleece fabric, $30 off immediately when you order now.\"",
  "sound": false,
  "aspect_ratio": "1:1",
  "duration": "5"
}'
json
{
  "model": "kling-2.6/text-to-video",
  "prompt": "Scene: A fashion live-streaming sales setting, with clothes hanging on racks and the host's figure reflected in a full-length mirror. Lines: [African female host] turns around to showcase the hoodie's cut. [African female host, in a cheerful tone] says: \"360-degree flawless tailoring, slimming and versatile.\" She then [African female host] leans closer to the camera. [African female host, in a lively tone] says: \"Double-sided fleece fabric, $30 off immediately when you order now.\"",
  "sound": false,
  "aspect_ratio": "1:1",
  "duration": "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.