# Get Kling v4 Flash task status

> Video Generation

Use output.task_id from the submit response. On success, output.urls contains the generated video URL.

## Endpoint

`GET https://api.modelverse.cn/v1/tasks/status`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| task_id | query | string | Yes | output.task_id from the submit response. |

## Responses

- **200** — Task status.
- **400** — 
- **default** — 

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "ModelVerse Kling v4 Flash Video Task API",
    "version": "1.0.0",
    "description": "ModelVerse exposes text-to-video, image-to-video, and Omni video generation under the public model ID `kling-v4-flash`.\nSubmit tasks with `POST /v1/tasks/submit` and retrieve results with `GET /v1/tasks/status`.\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "Mainland China"
    },
    {
      "url": "https://api.umodelverse.ai",
      "description": "Global"
    },
    {
      "url": "https://api-us-ca.umodelverse.ai",
      "description": "Los Angeles, US"
    },
    {
      "url": "https://api-sg.umodelverse.ai",
      "description": "Singapore"
    },
    {
      "url": "https://api-ge-fra.umodelverse.ai",
      "description": "Frankfurt"
    }
  ],
  "tags": [
    {
      "name": "Kling/v4-flash",
      "description": "Asynchronous Kling v4 Flash video tasks."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/tasks/submit": {
      "post": {
        "tags": [
          "Kling/v4-flash"
        ],
        "operationId": "submitKlingV4FlashTask",
        "summary": "Submit a Kling v4 Flash video task",
        "description": "kling_type accepts t2v, i2v, or omni_video. If omitted, videos or Omni-specific resources select Omni first,\notherwise images select i2v, and requests without media select t2v.\nT2V uses input.prompt and rejects contents and image/video media. I2V accepts exactly one first_frame and rejects aspect_ratio.\nFor Omni, assign unique media IDs and cite them as @id in the prompt. Describe each reference's purpose, the scene, and audio requirements.\nPrefer either input media fields or contents. If both are supplied, media must match item by item or the request fails.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KlingV4FlashSubmitRequest"
              },
              "examples": {
                "textToVideo": {
                  "summary": "Text-to-video",
                  "value": {
                    "model": "kling-v4-flash",
                    "input": {
                      "prompt": "An orange cat walking along a rain-soaked street, cinematic lighting"
                    },
                    "parameters": {
                      "kling_type": "t2v",
                      "duration": 5,
                      "resolution": "720p",
                      "aspect_ratio": "16:9"
                    }
                  }
                },
                "imageToVideo": {
                  "summary": "Image-to-video with a single first frame",
                  "value": {
                    "model": "kling-v4-flash",
                    "input": {
                      "prompt": "The camera moves forward as the subject turns naturally",
                      "first_frame_url": "https://example.com/first-frame.png"
                    },
                    "parameters": {
                      "kling_type": "i2v",
                      "duration": 5
                    }
                  }
                },
                "omniReferenceImage": {
                  "summary": "Omni with a reference image",
                  "value": {
                    "model": "kling-v4-flash",
                    "input": {
                      "prompt": "Keep the face, hairstyle and clothing from @image_1. The person turns slowly on a city street at night, with footsteps."
                    },
                    "parameters": {
                      "kling_type": "omni_video",
                      "duration": 5,
                      "aspect_ratio": "adaptive",
                      "audio": false,
                      "contents": [
                        {
                          "type": "refer_image",
                          "url": "https://example.com/character.png",
                          "id": "image_1"
                        }
                      ]
                    }
                  }
                },
                "omniEditOriginalAudio": {
                  "summary": "Omni video editing with original input audio",
                  "value": {
                    "model": "kling-v4-flash",
                    "input": {
                      "prompt": "Keep the person and motion from @video_1, replace the background with a rain-soaked street, and preserve the input video's original audio"
                    },
                    "parameters": {
                      "kling_type": "omni_video",
                      "duration": 5,
                      "audio": true,
                      "contents": [
                        {
                          "type": "base_video",
                          "url": "https://example.com/source-video.mp4",
                          "id": "video_1"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task submitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KlingV4FlashSubmitResponse"
                },
                "example": {
                  "output": {
                    "task_id": "task_id"
                  },
                  "request_id": "request_id"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/TaskError"
          },
          "default": {
            "$ref": "#/components/responses/TaskError"
          }
        }
      }
    },
    "/v1/tasks/status": {
      "get": {
        "tags": [
          "Kling/v4-flash"
        ],
        "operationId": "getKlingV4FlashTaskStatus",
        "summary": "Get Kling v4 Flash task status",
        "description": "Use output.task_id from the submit response. On success, output.urls contains the generated video URL.",
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "description": "output.task_id from the submit response.",
            "schema": {
              "type": "string"
            },
            "example": "task_id"
          }
        ],
        "responses": {
          "200": {
            "description": "Task status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KlingV4FlashStatusResponse"
                },
                "example": {
                  "output": {
                    "task_id": "task_id",
                    "task_status": "Success",
                    "urls": [
                      "https://example.com/result.mp4"
                    ],
                    "submit_time": 1756959000,
                    "finish_time": 1756959050
                  },
                  "usage": {
                    "duration": 5
                  },
                  "request_id": ""
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/TaskError"
          },
          "default": {
            "$ref": "#/components/responses/TaskError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Send your ModelVerse API key as Authorization: Bearer <YOUR_API_KEY>."
      }
    },
    "responses": {
      "TaskError": {
        "description": "Invalid parameters or task request failure.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/KlingV4FlashErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "KlingV4FlashSubmitRequest": {
        "type": "object",
        "required": [
          "model",
          "input"
        ],
        "properties": {
          "model": {
            "type": "string",
            "const": "kling-v4-flash"
          },
          "input": {
            "$ref": "#/components/schemas/KlingV4FlashInput"
          },
          "parameters": {
            "$ref": "#/components/schemas/KlingV4FlashParameters"
          }
        }
      },
      "KlingV4FlashInput": {
        "type": "object",
        "description": "The input object is required. T2V requires prompt; I2V requires exactly one first frame. Omni requires a prompt in input.prompt or a contents prompt item.",
        "properties": {
          "prompt": {
            "type": "string",
            "description": "Generation prompt; cite media using @id. If a contents prompt is also supplied, the text must match."
          },
          "first_frame_url": {
            "type": "string",
            "description": "First-frame image URL; may trigger I2V inference. Alternatively, supply a first_frame item in contents.",
            "example": "https://example.com/first-frame.png"
          }
        }
      },
      "KlingV4FlashParameters": {
        "type": "object",
        "properties": {
          "kling_type": {
            "type": "string",
            "enum": [
              "t2v",
              "i2v",
              "omni_video"
            ],
            "description": "Generation variant; omit for media-based inference. Explicit variants must match the supplied resources."
          },
          "duration": {
            "type": "integer",
            "minimum": 3,
            "maximum": 20,
            "description": "Requested output duration in seconds. Optional; omitting it does not guarantee a fixed output duration."
          },
          "resolution": {
            "type": "string",
            "enum": [
              "720p"
            ],
            "description": "Only 720p is supported. Optional; the upstream default is 720p."
          },
          "aspect_ratio": {
            "type": "string",
            "enum": [
              "21:9",
              "16:9",
              "9:16",
              "1:1",
              "4:3",
              "3:4",
              "adaptive"
            ],
            "description": "T2V supports the six ratios other than adaptive; Omni additionally supports adaptive. I2V rejects this parameter."
          },
          "audio": {
            "type": "boolean",
            "description": "Omni audio control. false or omission selects native generated audio; true selects original to preserve the input video's audio and requires base_video or feature_video. This is not a mute switch."
          },
          "contents": {
            "type": "array",
            "description": "Content items for I2V / Omni; rejected by T2V. Media IDs must be unique and may be cited as @id in the prompt.",
            "items": {
              "$ref": "#/components/schemas/KlingV4FlashContent"
            }
          }
        }
      },
      "KlingV4FlashContent": {
        "type": "object",
        "required": [
          "type"
        ],
        "description": "I2V accepts prompt and exactly one first_frame. Omni supports all types below; middle_frame, last_frame and voice are unsupported.\nOmni accepts up to 10 images, 5 videos (at most one base_video), and 7 elements, with at most 15 resources total, and requires a prompt.\n",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "prompt",
              "first_frame",
              "refer_image",
              "feature_video",
              "base_video",
              "element"
            ]
          },
          "text": {
            "type": "string",
            "description": "Required and nonblank for type=prompt."
          },
          "url": {
            "type": "string",
            "description": "Required resource URL for first_frame, refer_image, feature_video and base_video."
          },
          "id": {
            "type": "string",
            "description": "Resource identifier unique within a task; required for element, optional for other media. Cite it as @id in the prompt."
          },
          "element_id": {
            "type": "string",
            "description": "Required for type=element, together with id."
          }
        }
      },
      "KlingV4FlashSubmitResponse": {
        "$ref": "Kling-v4.yaml#/components/schemas/KlingV4SubmitResponse"
      },
      "KlingV4FlashStatusResponse": {
        "$ref": "Kling-v4.yaml#/components/schemas/KlingV4StatusResponse"
      },
      "KlingV4FlashErrorResponse": {
        "$ref": "Kling-v4.yaml#/components/schemas/KlingV4ErrorResponse"
      }
    }
  }
}
```
