{
 "spec_version": 1,
 "model": "kwaivgi/kling-v3.0-omni",
 "type": "video",
 "input_modalities": [
  "text"
 ],
 "output_modalities": [
  "video"
 ],
 "context_window": null,
 "max_output_tokens": null,
 "endpoint": {
  "method": "POST",
  "path": "/v1/videos"
 },
 "async": {
  "poll": "GET /v1/videos/{video_id}",
  "download": "GET /v1/videos/{video_id}/content"
 },
 "parameters": [
  {
   "name": "model",
   "type": "string",
   "required": true,
   "description": "This model's ID."
  },
  {
   "name": "prompt",
   "type": "string",
   "required": true,
   "description": "What happens in the clip."
  },
  {
   "name": "duration",
   "type": "integer",
   "description": "Length in whole seconds. `seconds` is accepted too.",
   "minimum": 3,
   "maximum": 15,
   "default": 5
  },
  {
   "name": "resolution",
   "type": "string",
   "enum": [
    "720p",
    "1080p"
   ],
   "description": "Output resolution; lower is faster and cheaper."
  },
  {
   "name": "aspect_ratio",
   "type": "string",
   "enum": [
    "16:9",
    "9:16",
    "1:1"
   ],
   "description": "Output aspect ratio."
  },
  {
   "name": "generate_audio",
   "type": "boolean",
   "description": "`true` for a clip with sound, `false` for a silent one."
  },
  {
   "name": "multi_shot",
   "type": "boolean",
   "default": false,
   "description": "Make a multi-shot video (up to 6 shots in one clip). With `multi_prompt` it is implied."
  },
  {
   "name": "shot_type",
   "type": "string",
   "enum": [
    "customize",
    "intelligence"
   ],
   "description": "`customize`: you list the shots in `multi_prompt`. `intelligence`: the model cuts the shots from `prompt`. Defaults to customize when `multi_prompt` is sent, intelligence otherwise. With a reference video, intelligence only."
  },
  {
   "name": "multi_prompt",
   "type": "array",
   "maxItems": 6,
   "description": "The shots, in order: `[{\"prompt\": \"...\", \"duration\": 2}, ...]` (`index` 1, 2, 3... optional). Each shot is at least 1 second with a prompt of at most 512 characters; the shots' seconds must add up to `duration` (left out, `duration` is their sum)."
  },
  {
   "name": "frame_images",
   "type": "array",
   "maxItems": 2,
   "description": "The first frame and last frame: `{\"type\": \"image_url\", \"frame_type\": \"first_frame\", \"image_url\": {\"url\": ...}}`.",
   "frame_types": [
    "first_frame",
    "last_frame"
   ]
  },
  {
   "name": "input_references",
   "type": "array",
   "description": "Reference media the clip is built from: up to 7 images, up to 1 videos. Each `{\"type\": \"image_url\" | \"video_url\" | \"audio_url\", ...: {\"url\": ...}}`.",
   "limits": {
    "images": 7,
    "videos": 1
   }
  }
 ],
 "response": {
  "fields": [
   {
    "name": "id",
    "type": "string",
    "description": "The job's ID; poll it."
   },
   {
    "name": "status",
    "type": "string",
    "enum": [
     "queued",
     "in_progress",
     "completed",
     "failed"
    ],
    "description": "Where the job is."
   },
   {
    "name": "seconds",
    "type": "string",
    "description": "Length of the clip."
   },
   {
    "name": "size",
    "type": "string",
    "description": "Width x height of the clip."
   },
   {
    "name": "content_url",
    "type": "string",
    "description": "Once completed: the MP4, valid for 24 hours."
   },
   {
    "name": "error",
    "type": "object",
    "description": "On a failed job: `code` and `message`."
   }
  ],
  "example": {
   "id": "video_...",
   "object": "video",
   "status": "completed",
   "model": "kwaivgi/kling-v3.0-omni",
   "seconds": "5",
   "size": "1280x720",
   "created_at": 1792000000,
   "completed_at": 1792000095,
   "content_url": "https://...",
   "error": null
  }
 },
 "examples": [
  {
   "title": "Text to video",
   "request": {
    "model": "kwaivgi/kling-v3.0-omni",
    "prompt": "A paper boat drifting down a rain-soaked street",
    "duration": 5,
    "resolution": "720p"
   }
  }
 ],
 "input_schema": {
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": [
   "model",
   "prompt"
  ],
  "properties": {
   "model": {
    "type": "string",
    "description": "This model's ID."
   },
   "prompt": {
    "type": "string",
    "description": "What happens in the clip."
   },
   "duration": {
    "type": "integer",
    "description": "Length in whole seconds. `seconds` is accepted too.",
    "default": 5,
    "minimum": 3,
    "maximum": 15
   },
   "resolution": {
    "type": "string",
    "description": "Output resolution; lower is faster and cheaper.",
    "enum": [
     "720p",
     "1080p"
    ]
   },
   "aspect_ratio": {
    "type": "string",
    "description": "Output aspect ratio.",
    "enum": [
     "16:9",
     "9:16",
     "1:1"
    ]
   },
   "generate_audio": {
    "type": "boolean",
    "description": "`true` for a clip with sound, `false` for a silent one."
   },
   "multi_shot": {
    "type": "boolean",
    "description": "Make a multi-shot video (up to 6 shots in one clip). With `multi_prompt` it is implied.",
    "default": false
   },
   "shot_type": {
    "type": "string",
    "description": "`customize`: you list the shots in `multi_prompt`. `intelligence`: the model cuts the shots from `prompt`. Defaults to customize when `multi_prompt` is sent, intelligence otherwise. With a reference video, intelligence only.",
    "enum": [
     "customize",
     "intelligence"
    ]
   },
   "multi_prompt": {
    "type": "array",
    "description": "The shots, in order: `[{\"prompt\": \"...\", \"duration\": 2}, ...]` (`index` 1, 2, 3... optional). Each shot is at least 1 second with a prompt of at most 512 characters; the shots' seconds must add up to `duration` (left out, `duration` is their sum).",
    "maxItems": 6
   },
   "frame_images": {
    "type": "array",
    "description": "The first frame and last frame: `{\"type\": \"image_url\", \"frame_type\": \"first_frame\", \"image_url\": {\"url\": ...}}`.",
    "maxItems": 2
   },
   "input_references": {
    "type": "array",
    "description": "Reference media the clip is built from: up to 7 images, up to 1 videos. Each `{\"type\": \"image_url\" | \"video_url\" | \"audio_url\", ...: {\"url\": ...}}`."
   }
  }
 }
}
