Kling V2.1 Standard
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)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name to use for generation. Required field. - Must be kling/v2-1-standard for this endpoint Default:"kling/v2-1-standard"。 Allowed values:kling/v2-1-standard。 Example:kling/v2-1-standard。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. Text prompt describing the desired video content (Max length: 5000 characters) maxLength: 2000. Example:Begin with the uploaded image as the first frame. Gradually animate the scene: steam rises and drifts upward from the train; lantern lights flicker subtly; cloaked figures begin to move slowly — walking, turning, adjusting their belongings. Floating dust or magical particles catch the light. The text “KLING 2.1 STANDARD API — Now on modelfold.ai” softly pulses with a golden glow. The camera pushes forward slightly, then slowly fades to black.。 |
image_url | string | Yes | URL 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。 |
duration | string | Yes | Required. "5" or "10" (seconds). Allowed values:5 / 10。 Example:5。 |
negative_prompt | string | No | Description of elements to avoid in the generated video (Max length: 500 characters) maxLength: 500. Example:blur, distort, and low quality。 |
cfg_scale | number | No | The 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-standard",
"prompt": "Begin with the uploaded image as the first frame. Gradually animate the scene: steam rises and drifts upward from the train; lantern lights flicker subtly; cloaked figures begin to move slowly — walking, turning, adjusting their belongings. Floating dust or magical particles catch the light. The text “KLING 2.1 STANDARD API — Now on ModelFold” softly pulses with a golden glow. The camera pushes forward slightly, then slowly fades to black.",
"image_url": "https://example.com/your-image.png",
"duration": "5",
"cfg_scale": 0.5
}'json
{
"model": "kling/v2-1-standard",
"prompt": "Begin with the uploaded image as the first frame. Gradually animate the scene: steam rises and drifts upward from the train; lantern lights flicker subtly; cloaked figures begin to move slowly — walking, turning, adjusting their belongings. Floating dust or magical particles catch the light. The text “KLING 2.1 STANDARD API — Now on ModelFold” softly pulses with a golden glow. The camera pushes forward slightly, then slowly fades to black.",
"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": {}
}