{
  "components": {
    "schemas": {
      "TaskResponse": {
        "description": "Standard async task creation response",
        "properties": {
          "code": {
            "description": "Status code returned by the service",
            "example": "success",
            "type": "string"
          },
          "data": {
            "description": "Response payload containing task details",
            "properties": {
              "task_id": {
                "description": "Identifier of the created task",
                "type": "string"
              }
            },
            "required": [
              "task_id"
            ],
            "type": "object"
          },
          "fail_code": {
            "description": "Failure code if the task submission did not succeed",
            "type": "string"
          },
          "message": {
            "description": "Additional information about the request result",
            "type": "string"
          }
        },
        "required": [
          "data",
          "code",
          "message"
        ],
        "type": "object"
      },
      "TaskStatusResponse": {
        "description": "Async task status query response",
        "example": {
          "code": "success",
          "data": {
            "fail_code": "",
            "fail_reason": "",
            "finish_time": 1763274838,
            "outputs": [
              "https://api.siray.ai/redirect/example-output"
            ],
            "progress": "100%",
            "start_time": 1763274702,
            "status": "SUCCESS",
            "submit_time": 1763274672,
            "task_id": "video_69196fafcc9c8190acccf32e9b560c3f0da8a6d1948cfaa5"
          },
          "message": ""
        },
        "properties": {
          "code": {
            "description": "Status code returned by the service",
            "example": "success",
            "type": "string"
          },
          "data": {
            "description": "Task execution details",
            "properties": {
              "fail_code": {
                "description": "Failure code if the task did not succeed",
                "type": "string"
              },
              "fail_reason": {
                "description": "Explanation of the failure if the task did not succeed",
                "type": "string"
              },
              "finish_time": {
                "description": "Unix timestamp when task processing finished",
                "format": "int64",
                "type": "integer"
              },
              "outputs": {
                "description": "URLs for generated assets",
                "items": {
                  "description": "Public URL to the generated asset",
                  "format": "uri",
                  "type": "string"
                },
                "type": "array"
              },
              "progress": {
                "description": "Human-readable task progress indicator",
                "example": "100%",
                "type": "string"
              },
              "start_time": {
                "description": "Unix timestamp when task processing began",
                "format": "int64",
                "type": "integer"
              },
              "status": {
                "description": "Current task status",
                "enum": [
                  "NOT_START",
                  "SUBMITTED",
                  "QUEUED",
                  "IN_PROGRESS",
                  "FAILURE",
                  "SUCCESS"
                ],
                "type": "string"
              },
              "submit_time": {
                "description": "Unix timestamp when the task was submitted",
                "format": "int64",
                "type": "integer"
              },
              "task_id": {
                "description": "Identifier of the task",
                "type": "string"
              }
            },
            "required": [
              "task_id",
              "status"
            ],
            "type": "object"
          },
          "message": {
            "description": "Additional information or error details",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "data"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "API Key",
        "description": "Bearer authentication using API key",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Kling 3.0 i2v by Kuaishou is a image-to-video AI model for image animation and cinematic video. It delivers high-quality results for rapid iteration and dependable production workflows.",
    "summary": "API for Kling 3.0 i2v model",
    "title": "Kling 3.0 i2v API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/video/generations": {
      "post": {
        "description": "Generate a video using the Kling 3.0 i2v model",
        "operationId": "video_model-vlxe8ugax0frnolp",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "aspect_ratio": "16:9",
                "audio_enable": false,
                "cfg_scale": 0.5,
                "duration": 3,
                "elements": [
                  {
                    "frontal_image": "example_value",
                    "reference_images": [
                      "example_value"
                    ],
                    "video": "example_value"
                  }
                ],
                "end_image": "example_value",
                "image": "example_value",
                "model": "kuaishou/kling-3.0-i2v",
                "negative_prompt": "example_value",
                "prompt": "example_value"
              },
              "schema": {
                "description": "Request format for video generation models",
                "properties": {
                  "aspect_ratio": {
                    "description": "Aspect ratio",
                    "enum": [
                      "16:9",
                      "9:16",
                      "1:1"
                    ],
                    "type": "string"
                  },
                  "audio_enable": {
                    "description": "Whether to generate audio along with video",
                    "type": "boolean"
                  },
                  "cfg_scale": {
                    "default": 0.5,
                    "description": "Generation guidance strength (0-1)",
                    "maximum": 1,
                    "minimum": 0,
                    "type": "number"
                  },
                  "duration": {
                    "description": "Fixed duration",
                    "enum": [
                      3,
                      4,
                      5,
                      6,
                      7,
                      8,
                      9,
                      10,
                      11,
                      12,
                      13,
                      14,
                      15
                    ],
                    "type": "integer"
                  },
                  "elements": {
                    "description": "Character/object elements for video generation",
                    "items": {
                      "properties": {
                        "frontal_image": {
                          "description": "Frontal image URL of the character/object",
                          "type": "string"
                        },
                        "reference_images": {
                          "description": "Reference images for the character/object",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "video": {
                          "description": "Reference video URL for the character/object",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "end_image": {
                    "description": "End frame image URL for image-to-video generation",
                    "type": "string"
                  },
                  "image": {
                    "description": "Input image for generation, it can be data URL or image URL",
                    "type": "string"
                  },
                  "model": {
                    "description": "Model name to use for the request",
                    "enum": [
                      "kuaishou/kling-3.0-i2v"
                    ],
                    "type": "string"
                  },
                  "negative_prompt": {
                    "description": "Negative prompt to specify what should not appear in the generation",
                    "type": "string"
                  },
                  "prompt": {
                    "description": "Text prompt for generation",
                    "type": "string"
                  }
                },
                "required": [
                  "model",
                  "prompt",
                  "image",
                  "duration",
                  "aspect_ratio"
                ],
                "title": "Video Generation Request",
                "type": "object"
              }
            }
          },
          "description": "Request payload",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskResponse"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Generate video",
        "tags": [
          "Kling 3.0 i2v"
        ]
      }
    },
    "/v1/video/generations/{task_id}": {
      "get": {
        "description": "Query the status and result of a video generation task",
        "operationId": "query_video_task_model-vlxe8ugax0frnolp",
        "parameters": [
          {
            "description": "Task ID returned from the video generation request",
            "in": "path",
            "name": "task_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskStatusResponse"
                }
              }
            },
            "description": "Task status and result"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Query video generation task",
        "tags": [
          "Kling 3.0 i2v"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Model Verse API Server",
      "url": "https://api.siray.ai"
    }
  ],
  "tags": [
    {
      "description": "Kling 3.0 i2v - Kling 3.0 i2v by Kuaishou is a image-to-video AI model for image animation and cinematic video. It delivers high-quality results for rapid iteration and dependable production workflows.",
      "name": "Kling 3.0 i2v"
    }
  ]
}