Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.
Kling 4.0 supports text-to-video, keyframe-based image-to-video, and Omni reference generation/editing. Its API currently exposes 720p and 1080p, not 4k. Kling 4.0 Flash is a separate offering and is not implied by this model ID.Authenticate with a MixRoute Bearer key. Put kling-4.0 in the endpoint path, not a body model field. Keep the native prompt/contents, settings and options structure; do not wrap it in metadata. These endpoints do not establish support for Kling 4.0 on motion-control.
720p or 1080p. The provider default is 1080p; specify the value explicitly on MixRoute instead of relying on older gateway defaults.
settings.duration
Integer 3-30 seconds. Provider precedence: explicit setting, then a duration stated in the prompt, then 10 seconds. Omni editing uses rounded base_video duration before the 10-second fallback. Explicit settings avoid ambiguity.
options
Common options remain options.callback_url, options.external_task_id and options.watermark_info.enabled. A custom task ID is not a MixRoute polling ID or an idempotency guarantee.
English-only: up to 26,000 characters; non-English-only: up to 11,000. Mixed input must satisfy E / 26000 + N / 11000 <= 1. Describe action order and camera movement in the prompt; do not copy the older multi_shot switch. E is the number of English characters and N is the number of non-English characters.
Text/image endpoints have no 4.0 audio or multi_shot switch. Omit settings.audio and settings.multi_shot rather than sending the older audio=off configuration.
Use a prompt item plus first_frame, middle_frame and/or last_frame image items. Each image uses url; an optional unique id lets the prompt refer to it as @id. Keep keyframes and prompt references in timeline order. No timestamp field is required by this schema.At most 10 images. JPG/JPEG/PNG, at most 30 MB each, both dimensions at least 300 px, aspect ratio 2:5 to 5:2. Use public URLs or Base64. Image-to-video has no settings.aspect_ratio; use Omni for videos, Elements or voice references.
A prompt item is required. Supported inputs: first_frame, middle_frame, last_frame, refer_image, feature_video, base_video, element and voice. Image/video items use url; Elements use element_id and voices use voice_id. Assign unique id values and refer to them as @id; element/voice IDs must be accessible to the routed upstream account.For element and voice items, id is required as well as element_id or voice_id.Image id is required when multiple middle_frame or refer_image inputs are provided to Omni. If first_frame, last_frame and refer_image are combined, put the first frame first and last frame last among the image items.
Field
Description
settings.aspect_ratio
21:9, 16:9, 9:16, 1:1 or adaptive (provider default). An explicit ratio wins. Adaptive uses the prompt, then base_video, then keyframes, then feature_video; multiple reference videos or no applicable source fall back to 16:9.
settings.audio
native (provider default) or original. original requires base_video or feature_video and excludes voice references. Prefer base_video audio; otherwise use the first feature_video. off and multi_shot are not 4.0 settings.
Combined images, videos, Elements and voices: at most 15 inputs. Images: at most 10. Reference videos: at most 5, counting video-character Elements toward that limit. Elements: at most 7, including at most 3 video-character Elements. Voices: at most 3. At most one base_video.JPG/JPEG/PNG, at most 30 MB per image, both dimensions at least 300 px, aspect ratio 2:5 to 5:2. Use public URLs or Base64.MP4/MOV, at most 300 MB each; each video and the combined video duration must be 3-30 seconds, including video-character Elements. Dimensions 700-4553 px, total pixels at most 8,294,400; aspect ratio 2:5 to 5:2; input 24-60 fps, output 24 fps.
curl --request POST "https://api.mixroute.ai/kling/omni-video/kling-4.0" \ --header "Authorization: Bearer $MIXROUTE_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "contents": [ { "type": "prompt", "text": "A slow camera move around the ceramic mug in @mug on a white tabletop." }, { "type": "refer_image", "id": "mug", "url": "https://example.com/mug.png" } ], "settings": { "resolution": "720p", "duration": 5, "aspect_ratio": "adaptive", "audio": "native" }}'
Check HTTP status and code=0, save submission data.id, and query that single MixRoute task ID. After succeeded, read the video URL from data[0].outputs where type=video. Keep API keys away from the result CDN.
Task resultsFor Kling 4.0, upstream billing distinguishes input_duration and output_duration; input includes reference videos and video-character Elements. Gateway usage may be absent or empty. Do not infer final MixRoute charges solely from outputs[].duration or apply older model rates. Use the Model Marketplace and console bill.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MixRoute","colors":{"primary":"#7B1FA2","light":"#9C27B0","dark":"#7B1FA2"},"logo":{"light":"https://mintcdn.com/personal-a5418d9f/gmsYcyD3CEVDrHlx/logo/mixroute_logo_light.svg?fit=max\u0026auto=format\u0026n=gmsYcyD3CEVDrHlx\u0026q=85\u0026s=265a1a46d074895bd39b660678e01cd8","dark":"https://mintcdn.com/personal-a5418d9f/gmsYcyD3CEVDrHlx/logo/mixroute_logo_dark.svg?fit=max\u0026auto=format\u0026n=gmsYcyD3CEVDrHlx\u0026q=85\u0026s=98fd320a3e678bc64086c7d2f0dc84c1","href":"https://mixroute.ai/"},"favicon":"https://mintcdn.com/personal-a5418d9f/gmsYcyD3CEVDrHlx/mixroute.svg?fit=max\u0026auto=format\u0026n=gmsYcyD3CEVDrHlx\u0026q=85\u0026s=0f5f32b1b26993bc7cedaee3e45d2eb0","api":{"mdx":{"server":"https://api.mixroute.ai"}},"navbar":{"links":[],"primary":{"type":"button","label":"Get Started","href":"https://console.mixroute.ai"}},"footer":{"socials":{}},"seo":{"metatags":{"canonical":"https://mixroute.ai/docs"}},"integrations":{"gtm":{"tagId":"GTM-W54W5KHJ"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"introduction"},{"language":"zh-Hans","href":"zh-Hans/introduction"},{"language":"zh-Hant","href":"zh-Hant/introduction"},{"language":"ja","href":"ja/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"personal-a5418d9f","hasAudioNarration":false,"actualSubdomain":"personal-a5418d9f","customDomains":["mixroute.ai"],"gitSource":{"type":"github","owner":"cherish-cherry","repo":"mixroute-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aec2d0c518b0eadab00be20","collectionId":"c409e8f4-43d7-460f-91f8-4ee6f91275c2","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aec2d0c518b0eadab00be20"},"feedback":{"thumbs":false},"entitlements":{},"buildId":"6aec6d49a93f970ede8cf67b","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"en","tag":"Home","count":255},{"language":"ja","tag":"ホーム","count":255},{"language":"zh-Hans","tag":"首页","count":255},{"language":"zh-Hant","tag":"首頁","count":255},{"language":"en","tag":"Model Introduction","count":237},{"language":"ja","tag":"モデル紹介","count":237},{"language":"zh-Hans","tag":"模型介绍","count":237},{"language":"zh-Hant","tag":"模型介紹","count":237},{"language":"en","tag":"OpenAI","count":58},{"language":"ja","tag":"OpenAI","count":58},{"language":"zh-Hans","tag":"OpenAI","count":58},{"language":"zh-Hant","tag":"OpenAI","count":58},{"language":"en","tag":"API Reference","count":42},{"language":"ja","tag":"APIリファレンス","count":42},{"language":"zh-Hans","tag":"API 手册","count":42},{"language":"zh-Hant","tag":"API 手冊","count":42},{"language":"en","tag":"Google","count":32},{"language":"ja","tag":"Google","count":32},{"language":"zh-Hans","tag":"Google","count":32},{"language":"zh-Hant","tag":"Google","count":32},{"language":"en","tag":"Alibaba","count":26},{"language":"ja","tag":"Alibaba","count":26},{"language":"zh-Hans","tag":"Alibaba","count":26},{"language":"zh-Hant","tag":"Alibaba","count":26},{"language":"en","tag":"Zhipu","count":24},{"language":"ja","tag":"Zhipu","count":24},{"language":"zh-Hans","tag":"Zhipu","count":24},{"language":"zh-Hant","tag":"Zhipu","count":24},{"language":"en","tag":"xAI","count":20},{"language":"ja","tag":"xAI","count":20},{"language":"zh-Hans","tag":"xAI","count":20},{"language":"zh-Hant","tag":"xAI","count":20},{"language":"en","tag":"Integrations","count":18},{"language":"ja","tag":"連携","count":18},{"language":"zh-Hans","tag":"开发工具 \u0026 平台","count":18},{"language":"zh-Hant","tag":"開發工具 \u0026 平台","count":18},{"language":"en","tag":"Anthropic","count":16},{"language":"ja","tag":"Anthropic","count":16},{"language":"zh-Hans","tag":"Anthropic","count":16},{"language":"zh-Hant","tag":"Anthropic","count":16}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"header img,#navbar img,[class*=\"logo\"] img,[class*=\"Logo\"] img,a[href=\"/\"] img,a[href=\"/cn\"] img,a[href=\"/en\"] img,a[href=\"/zh-Hant\"] img{max-height:32px!important;height:32px!important;width:auto!important}.card,[class*=\"Card\"]{position:relative!important;background-color:#f5f5f7!important;border:none!important;overflow:visible!important}.card::before,[class*=\"Card\"]::before{content:\"\";position:absolute;inset:-2px;border-radius:14px;z-index:-1;padding:2px;background:linear-gradient(135deg, #ff8a65 0%, #e91e63 35%, #9c27b0 70%, #673ab7 100%);-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}html.dark .card,html.dark [class*=\"Card\"],.dark .card,.dark [class*=\"Card\"],[data-theme=\"dark\"] .card,[data-theme=\"dark\"] [class*=\"Card\"]{background-color:#2d2d2d!important;color:#e5e5e5}html.dark .card::before,html.dark [class*=\"Card\"]::before,.dark .card::before,.dark [class*=\"Card\"]::before,[data-theme=\"dark\"] .card::before,[data-theme=\"dark\"] [class*=\"Card\"]::before{background:linear-gradient(135deg, #ff9a56 0%, #ff6b9d 35%, #c44dff 70%, #6b7aff 100%)}html.dark .card a,html.dark [class*=\"Card\"] a,.dark .card a,.dark [class*=\"Card\"] a,[data-theme=\"dark\"] .card a,[data-theme=\"dark\"] [class*=\"Card\"] a{color:#a78bfa}html.dark #content img[src=\"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/openai.svg\"],html.dark #content img[src=\"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/grok.svg\"]{filter:invert(1)}"}],"page":{"pagePath":"model-api/kuaishou/kling-4.0","slug":"/model-api/kuaishou/kling-4.0","pageMetadata":{"title":"Kling 4.0","sidebarTitle":"Kling 4.0","description":"Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/kling-color.svg","og:title":"Kling 4.0 API Documentation - MixRoute","href":"/model-api/kuaishou/kling-4.0"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Kling 4.0 supports text-to-video, keyframe-based image-to-video, and Omni reference generation/editing. Its API currently exposes 720p and 1080p, not 4k. Kling 4.0 Flash is a separate offering and is not implied by this model ID.`}),`\n`,_jsxs(_components.p,{children:[`Authenticate with a MixRoute Bearer key. Put `,_jsx(_components.code,{children:`kling-4.0`}),` in the endpoint path, not a body model field. Keep the native prompt/contents, settings and options structure; do not wrap it in metadata. These endpoints do not establish support for Kling 4.0 on motion-control.`]}),`\n`,_jsx(Heading,{level:`2`,id:`model-specifications`,children:`Model specifications`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ID`})}),_jsx(_components.td,{children:`kling-4.0`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST`})}),_jsxs(_components.td,{children:[_jsx(_components.a,{href:`/api-reference/endpoint/kling-text-to-video`,children:`Text-to-video`}),` / `,_jsx(_components.a,{href:`/api-reference/endpoint/kling-image-to-video`,children:`Image-to-video`}),` / `,_jsx(_components.a,{href:`/api-reference/endpoint/kling-omni-video`,children:`Omni reference and editing`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`shared-settings-and-options`,children:`Shared settings and options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settings.resolution`})}),_jsx(_components.td,{children:`720p or 1080p. The provider default is 1080p; specify the value explicitly on MixRoute instead of relying on older gateway defaults.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settings.duration`})}),_jsx(_components.td,{children:`Integer 3-30 seconds. Provider precedence: explicit setting, then a duration stated in the prompt, then 10 seconds. Omni editing uses rounded base_video duration before the 10-second fallback. Explicit settings avoid ambiguity.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`options`})}),_jsx(_components.td,{children:`Common options remain options.callback_url, options.external_task_id and options.watermark_info.enabled. A custom task ID is not a MixRoute polling ID or an idempotency guarantee.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`English-only: up to 26,000 characters; non-English-only: up to 11,000. Mixed input must satisfy `,_jsx(_components.code,{children:`E / 26000 + N / 11000 \u003c= 1`}),`. Describe action order and camera movement in the prompt; do not copy the older multi_shot switch. E is the number of English characters and N is the number of non-English characters.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Text/image endpoints have no 4.0 audio or multi_shot switch. Omit settings.audio and settings.multi_shot rather than sending the older audio=off configuration.`})}),`\n`,_jsx(Heading,{level:`2`,id:`text-to-video`,children:`Text-to-video`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`Required root prompt. Text-to-video does not accept media inputs.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settings.aspect_ratio`})}),_jsx(_components.td,{children:`21:9, 16:9, 9:16 or 1:1; provider default 16:9. Do not send adaptive on the text-to-video endpoint.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Set MIXROUTE_API_KEY. Replace example.com media URLs with accessible files. Submit once; a timeout is not proof that a task was not created.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.mixroute.ai/kling/text-to-video/kling-4.0\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MIXROUTE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A red ceramic mug slowly rotates on a white tabletop. Static camera, soft studio lighting.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"settings\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\": \"720p\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\": 3,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspect_ratio\": \"16:9\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`image-to-video`,children:`Image-to-video`}),`\n`,_jsx(_components.p,{children:`Use a prompt item plus first_frame, middle_frame and/or last_frame image items. Each image uses url; an optional unique id lets the prompt refer to it as @id. Keep keyframes and prompt references in timeline order. No timestamp field is required by this schema.`}),`\n`,_jsx(_components.p,{children:`At most 10 images. JPG/JPEG/PNG, at most 30 MB each, both dimensions at least 300 px, aspect ratio 2:5 to 5:2. Use public URLs or Base64. Image-to-video has no settings.aspect_ratio; use Omni for videos, Elements or voice references.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.mixroute.ai/kling/image-to-video/kling-4.0\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MIXROUTE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"prompt\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\": \"The scene moves smoothly from @start through @middle to @end.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"first_frame\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"start\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\": \"https://example.com/first-frame.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"middle_frame\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"middle\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\": \"https://example.com/middle-frame.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"last_frame\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"end\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\": \"https://example.com/last-frame.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"settings\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\": \"720p\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\": 5`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`omni-reference-and-editing`,children:`Omni reference and editing`}),`\n`,_jsx(_components.p,{children:`A prompt item is required. Supported inputs: first_frame, middle_frame, last_frame, refer_image, feature_video, base_video, element and voice. Image/video items use url; Elements use element_id and voices use voice_id. Assign unique id values and refer to them as @id; element/voice IDs must be accessible to the routed upstream account.`}),`\n`,_jsx(_components.p,{children:`For element and voice items, id is required as well as element_id or voice_id.`}),`\n`,_jsx(_components.p,{children:`Image id is required when multiple middle_frame or refer_image inputs are provided to Omni. If first_frame, last_frame and refer_image are combined, put the first frame first and last frame last among the image items.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settings.aspect_ratio`})}),_jsx(_components.td,{children:`21:9, 16:9, 9:16, 1:1 or adaptive (provider default). An explicit ratio wins. Adaptive uses the prompt, then base_video, then keyframes, then feature_video; multiple reference videos or no applicable source fall back to 16:9.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settings.audio`})}),_jsx(_components.td,{children:`native (provider default) or original. original requires base_video or feature_video and excludes voice references. Prefer base_video audio; otherwise use the first feature_video. off and multi_shot are not 4.0 settings.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`media-limits`,children:`Media limits`}),`\n`,_jsx(_components.p,{children:`Combined images, videos, Elements and voices: at most 15 inputs. Images: at most 10. Reference videos: at most 5, counting video-character Elements toward that limit. Elements: at most 7, including at most 3 video-character Elements. Voices: at most 3. At most one base_video.`}),`\n`,_jsx(_components.p,{children:`JPG/JPEG/PNG, at most 30 MB per image, both dimensions at least 300 px, aspect ratio 2:5 to 5:2. Use public URLs or Base64.`}),`\n`,_jsx(_components.p,{children:`MP4/MOV, at most 300 MB each; each video and the combined video duration must be 3-30 seconds, including video-character Elements. Dimensions 700-4553 px, total pixels at most 8,294,400; aspect ratio 2:5 to 5:2; input 24-60 fps, output 24 fps.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.mixroute.ai/kling/omni-video/kling-4.0\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MIXROUTE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"prompt\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\": \"A slow camera move around the ceramic mug in @mug on a white tabletop.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"refer_image\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"id\": \"mug\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"url\": \"https://example.com/mug.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"settings\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\": \"720p\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"duration\": 5,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspect_ratio\": \"adaptive\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"audio\": \"native\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`task-results`,children:`Task results`}),`\n`,_jsx(_components.p,{children:`Check HTTP status and code=0, save submission data.id, and query that single MixRoute task ID. After succeeded, read the video URL from data[0].outputs where type=video. Keep API keys away from the result CDN.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --get`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.mixroute.ai/kling/tasks\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MIXROUTE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-urlencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"task_ids=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$KLING_TASK_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`/api-reference/endpoint/kling-tasks`,children:`Task results`})}),`\n`,_jsx(_components.p,{children:`For Kling 4.0, upstream billing distinguishes input_duration and output_duration; input includes reference videos and video-character Elements. Gateway usage may be absent or empty. Do not infer final MixRoute charges solely from outputs[].duration or apply older model rates. Use the Model Marketplace and console bill.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Kling 4.0","sidebarTitle":"Kling 4.0","description":"Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/kling-color.svg","og:title":"Kling 4.0 API Documentation - MixRoute","href":"/model-api/kuaishou/kling-4.0"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Model specifications","slug":"model-specifications","depth":2,"children":[]},{"title":"Shared settings and options","slug":"shared-settings-and-options","depth":2,"children":[]},{"title":"Text-to-video","slug":"text-to-video","depth":2,"children":[]},{"title":"Image-to-video","slug":"image-to-video","depth":2,"children":[]},{"title":"Omni reference and editing","slug":"omni-reference-and-editing","depth":2,"children":[{"title":"Media limits","slug":"media-limits","depth":3,"children":[]}]},{"title":"Task results","slug":"task-results","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"personal-a5418d9f","siteName":"MixRoute","title":"Kling 4.0 API Documentation - MixRoute","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/model-api/kuaishou/kling-4.0","matchLevel":0},"zh-Hans":{"href":"/zh-Hans/model-api/kuaishou/kling-4.0","matchLevel":1},"zh-Hant":{"href":"/zh-Hant/model-api/kuaishou/kling-4.0","matchLevel":1},"ja":{"href":"/ja/model-api/kuaishou/kling-4.0","matchLevel":1}}},"lastModified":"2026-11-05T11:49:46.591Z","originalFileLocation":"model-api/kuaishou/kling-4.0.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MixRoute\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Kling 4.0 API Documentation - MixRoute\">\u003cmeta data-mint-head property=\"og:description\" content=\"Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MixRoute\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://personal-a5418d9f.mintlify.app/_mintlify/api/og/v2?division=Kuaishou\u0026amp;title=Kling+4.0\u0026amp;description=Kling+4.0+video+generation+with+3-30+second+output%2C+multiple+keyframes+and+Omni+references.\u0026amp;theme=0f0ddeb91370bb454b089cc9\u0026amp;signature=866c6a72a0842361b97064e54cec8410aa6cfe5441181631989bdcda91c0a4ab\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Kling 4.0 API Documentation - MixRoute\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://personal-a5418d9f.mintlify.app/_mintlify/api/og/v2?division=Kuaishou\u0026amp;title=Kling+4.0\u0026amp;description=Kling+4.0+video+generation+with+3-30+second+output%2C+multiple+keyframes+and+Omni+references.\u0026amp;theme=0f0ddeb91370bb454b089cc9\u0026amp;signature=866c6a72a0842361b97064e54cec8410aa6cfe5441181631989bdcda91c0a4ab\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/personal-a5418d9f/dv2IYF4xw-oEMCIM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MixRoute\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7B1FA2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/model-api/kuaishou/kling-4.0.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://mixroute.ai/docs/zh-Hans/model-api/kuaishou/kling-4.0\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://mixroute.ai/docs/zh-Hant/model-api/kuaishou/kling-4.0\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://mixroute.ai/docs/ja/model-api/kuaishou/kling-4.0\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://mixroute.ai/#organization\",\"name\":\"MixRoute\",\"url\":\"https://mixroute.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/personal-a5418d9f/gmsYcyD3CEVDrHlx/logo/mixroute_logo_light.svg?fit=max\u0026auto=format\u0026n=gmsYcyD3CEVDrHlx\u0026q=85\u0026s=265a1a46d074895bd39b660678e01cd8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://mixroute.ai/docs#website\",\"name\":\"MixRoute\",\"url\":\"https://mixroute.ai/docs\",\"publisher\":{\"@id\":\"https://mixroute.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0#webpage\",\"url\":\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0\",\"name\":\"Kling 4.0\",\"description\":\"Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.\",\"dateModified\":\"2026-11-05T11:49:46.591Z\",\"isPartOf\":{\"@id\":\"https://mixroute.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Model Introduction\",\"item\":\"https://mixroute.ai/docs/model-api/anthropic/claude-opus-5-5\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kling 4.0\",\"item\":\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0#article\",\"headline\":\"Kling 4.0\",\"name\":\"Kling 4.0\",\"description\":\"Kling 4.0 video generation with 3-30 second output, multiple keyframes and Omni references.\",\"url\":\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0\",\"mainEntityOfPage\":{\"@id\":\"https://mixroute.ai/docs/model-api/kuaishou/kling-4.0#webpage\"},\"dateModified\":\"2026-11-05T11:49:46.591Z\",\"publisher\":{\"@id\":\"https://mixroute.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://mixroute.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MixRoute\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"MixRoute","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Home","groups":[{"group":"Home","pages":[{"title":"Introduction","icon":"book-open","href":"/introduction"},{"title":"Quick Start","icon":"rocket","href":"/quickstart"},{"title":"Video Tutorials","sidebarTitle":"Video Tutorials","icon":"circle-play","tag":"New","href":"/video-tutorials"},{"title":"Redeem Code","icon":"ticket","href":"/redeem-code"},{"icon":"bullhorn","title":null,"href":"/changelog"},{"title":"Contact Us","icon":"headset","href":"/contact"},{"title":"Terms of Service","icon":"file-lines","href":"/service-term"},{"title":"Privacy Policy","icon":"file-lines","href":"/privacy"},{"title":"Top-up and Refund Terms","icon":"file-lines","href":"/refund-policy"}]},{"group":"Model Introduction","pages":[{"group":"Anthropic","icon":"https://api.iconify.design/simple-icons/anthropic.svg?color=%23D97757","pages":[{"title":"Claude Opus 5.5","sidebarTitle":"Claude Opus 5.5","href":"/model-api/anthropic/claude-opus-5-5"},{"title":"Claude Fable 5.1","sidebarTitle":"Claude Fable 5.1","href":"/model-api/anthropic/claude-fable-5-1"},{"title":"Claude Opus 5","href":"/model-api/anthropic/claude-opus-5"},{"title":"Claude Sonnet 5.5","sidebarTitle":"Claude Sonnet 5.5","href":"/model-api/anthropic/claude-sonnet-5-5"},{"title":"Claude Sonnet 5","href":"/model-api/anthropic/claude-sonnet-5"},{"title":"Claude Fable 5","href":"/model-api/anthropic/claude-fable-5"},{"title":"Claude Opus 4.8","href":"/model-api/anthropic/claude-opus-4-8"},{"title":"Claude Opus 4.7","href":"/model-api/anthropic/claude-opus-4-7"},{"title":"Claude Sonnet 4.6","href":"/model-api/anthropic/claude-sonnet-4-6"},{"title":"Claude Opus 4.6","href":"/model-api/anthropic/claude-opus-4-6"},{"title":"Claude Opus 4.5","href":"/model-api/anthropic/claude-opus-4-5"},{"title":"Claude Haiku 5.5","sidebarTitle":"Claude Haiku 5.5","href":"/model-api/anthropic/claude-haiku-5-5"},{"title":"Claude Haiku 4.5","href":"/model-api/anthropic/claude-haiku-4-5"},{"title":"Claude Sonnet 4.5","href":"/model-api/anthropic/claude-sonnet-4-5"},{"title":"Claude Opus 4.1","href":"/model-api/anthropic/claude-opus-4-1"},{"title":"Claude Sonnet 4","href":"/model-api/anthropic/claude-sonnet-4"}]},{"group":"ByteDance","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/bytedance-color.svg","pages":[{"title":"Dreamina Seedance 2.5","sidebarTitle":"Dreamina Seedance 2.5","href":"/model-api/bytedance/dreamina-seedance-2-5"},{"title":"Dola Seed SC","href":"/model-api/volcengine/dola-seed-sc"},{"title":"Doubao Seedance 2.5","sidebarTitle":"Doubao Seedance 2.5","href":"/model-api/bytedance/doubao-seedance-2-5"},{"title":"Dreamina Seedance 2.0 Mini","href":"/model-api/bytedance/dreamina-seedance-2-0-mini"},{"title":"Dreamina Seedance 2.0 Fast","href":"/model-api/bytedance/dreamina-seedance-2-0-fast"},{"title":"Dreamina Seedance 2.0","href":"/model-api/bytedance/dreamina-seedance-2-0"},{"title":"Seedance 1.5 Pro","href":"/model-api/bytedance/seedance-1-5-pro"},{"title":"Seedance 1.0 Pro Fast","href":"/model-api/bytedance/seedance-1-0-pro-fast"},{"title":"Seedance 1.0 Pro","href":"/model-api/bytedance/seedance-1-0-pro"}]},{"group":"Zhipu","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/zhipu-color.svg","pages":[{"title":"GLM-5.3 FlashX","sidebarTitle":"GLM-5.3 FlashX","href":"/model-api/zhipu/glm-5.3-flashx"},{"title":"GLM-5.3 Flash","sidebarTitle":"GLM-5.3 Flash","href":"/model-api/zhipu/glm-5.3-flash"},{"title":"GLM-5.3","sidebarTitle":"GLM-5.3","href":"/model-api/zhipu/glm-5.3"},{"title":"GLM-5.2","href":"/model-api/zhipu/glm-5.2"},{"title":"GLM-5.1","href":"/model-api/zhipu/glm-5.1"},{"title":"GLM-5 Turbo","href":"/model-api/zhipu/glm-5-turbo"},{"title":"GLM-5","href":"/model-api/zhipu/glm-5"},{"title":"GLM-4.7 FlashX","href":"/model-api/zhipu/glm-4.7-flashx"},{"title":"GLM-4.7","href":"/model-api/zhipu/glm-4.7"},{"title":"GLM-4.6","href":"/model-api/zhipu/glm-4.6"},{"title":"GLM-4.5 X","href":"/model-api/zhipu/glm-4.5-x"},{"title":"GLM-4.5 Flash","href":"/model-api/zhipu/glm-4.5-flash"},{"title":"GLM-4.5 AirX","href":"/model-api/zhipu/glm-4.5-airx"},{"title":"GLM-4.5 Air","href":"/model-api/zhipu/glm-4.5-air"},{"title":"GLM-4.5","href":"/model-api/zhipu/glm-4.5"},{"title":"GLM-4v Plus","href":"/model-api/zhipu/glm-4v-plus"},{"title":"GLM-4 Plus","href":"/model-api/zhipu/glm-4-plus"},{"title":"GLM-4 Flash","href":"/model-api/zhipu/glm-4-flash"},{"title":"GLM-4 AirX","href":"/model-api/zhipu/glm-4-airx"},{"title":"GLM-4 Air","href":"/model-api/zhipu/glm-4-air"},{"title":"GLM-4","href":"/model-api/zhipu/glm-4"},{"title":"GLM-4v","href":"/model-api/zhipu/glm-4v"},{"title":"GLM-4 Long","href":"/model-api/zhipu/glm-4-long"},{"title":"GLM-3 Turbo","href":"/model-api/zhipu/glm-3-turbo"}]},{"group":"DeepSeek","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/deepseek-color.svg","pages":[{"title":"DeepSeek V4.1 Flash 1017","sidebarTitle":"DeepSeek V4.1 Flash 1017","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/deepseek-color.svg","href":"/model-api/deepseek/deepseek-v4.1-flash-1017"},{"title":"DeepSeek V4.1 Flash","sidebarTitle":"DeepSeek V4.1 Flash","href":"/model-api/deepseek/deepseek-v4.1-flash"},{"title":"DeepSeek V3.2 Speciale","sidebarTitle":"DeepSeek V3.2 Speciale","href":"/model-api/deepseek/deepseek-v3.2-speciale"},{"title":"DeepSeek V4 Pro","href":"/model-api/deepseek/deepseek-v4-pro"},{"title":"DeepSeek V4 Flash","href":"/model-api/deepseek/deepseek-v4-flash"},{"title":"DeepSeek V4 Flash Vision Exp","sidebarTitle":"DeepSeek V4 Flash Vision Exp","href":"/model-api/deepseek/deepseek-v4-flash-vision-exp"},{"title":"DeepSeek V3.2 Thinking","href":"/model-api/deepseek/deepseek-v3.2-thinking"},{"title":"DeepSeek V3.2","href":"/model-api/deepseek/deepseek-v3.2"},{"title":"DeepSeek V3.2 Exp","href":"/model-api/deepseek/deepseek-v3.2-exp"},{"title":"DeepSeek V3.1 Terminus","href":"/model-api/deepseek/deepseek-v3.1-terminus"},{"title":"DeepSeek V3.1","href":"/model-api/deepseek/deepseek-v3.1"},{"title":"DeepSeek R1","href":"/model-api/deepseek/deepseek-r1"},{"title":"DeepSeek V3","href":"/model-api/deepseek/deepseek-v3"}]},{"group":"Alibaba","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/alibaba-color.svg","pages":[{"title":"Wan 3.0 Video Prime","sidebarTitle":"Wan 3.0 Video Prime","href":"/model-api/alibaba/wan3.0-video-prime"},{"title":"Wan 2.6 I2V Flash","sidebarTitle":"Wan 2.6 I2V Flash","href":"/model-api/alibaba/wan2.6-i2v-flash"},{"title":"Wan 2.6 R2V Flash","sidebarTitle":"Wan 2.6 R2V Flash","href":"/model-api/alibaba/wan2.6-r2v-flash"},{"title":"Wan 3.0 Video","sidebarTitle":"Wan 3.0 Video","href":"/model-api/alibaba/wan3.0-video"},{"title":"Wan 2.7 T2V","sidebarTitle":"Wan 2.7 T2V","href":"/model-api/alibaba/wan2.7-t2v"},{"title":"Wan 2.7 I2V","sidebarTitle":"Wan 2.7 I2V","href":"/model-api/alibaba/wan2.7-i2v"},{"title":"Wan 2.7 R2V","sidebarTitle":"Wan 2.7 R2V","href":"/model-api/alibaba/wan2.7-r2v"},{"title":"Wan 2.7 VideoEdit","sidebarTitle":"Wan 2.7 VideoEdit","href":"/model-api/alibaba/wan2.7-videoedit"},{"title":"Wan 2.6 T2V","sidebarTitle":"Wan 2.6 T2V","href":"/model-api/alibaba/wan2.6-t2v"},{"title":"Wan 2.6 I2V","sidebarTitle":"Wan 2.6 I2V","href":"/model-api/alibaba/wan2.6-i2v"},{"title":"Wan 2.6 R2V","sidebarTitle":"Wan 2.6 R2V","href":"/model-api/alibaba/wan2.6-r2v"},{"title":"Qwen3.8-Max","sidebarTitle":"Qwen3.8-Max","href":"/model-api/alibaba/qwen3.8-max"},{"title":"Qwen3.7-Max","href":"/model-api/alibaba/qwen3.7-max"},{"title":"Qwen3.6-27B","href":"/model-api/alibaba/qwen3.6-27b"},{"title":"Qwen3.6-Max-Preview","href":"/model-api/alibaba/qwen3.6-max-preview"},{"title":"Qwen3.6-Flash","href":"/model-api/alibaba/qwen3.6-flash"},{"title":"Qwen3.6-35B-A3B","href":"/model-api/alibaba/qwen3.6-35b-a3b"},{"title":"Qwen3.6-Plus","href":"/model-api/alibaba/qwen3.6-plus"},{"title":"Qwen3.5-Flash","href":"/model-api/alibaba/qwen3.5-flash"},{"title":"Qwen3.5-35B-A3B","href":"/model-api/alibaba/qwen3.5-35b-a3b"},{"title":"Qwen3.5-27B","href":"/model-api/alibaba/qwen3.5-27b"},{"title":"Qwen3.5-122B-A10B","href":"/model-api/alibaba/qwen3.5-122b-a10b"},{"title":"Qwen3.5-Plus","href":"/model-api/alibaba/qwen3.5-plus"},{"title":"Qwen3.5-397B-A17B","href":"/model-api/alibaba/qwen3.5-397b-a17b"},{"title":"Qwen3-Max","href":"/model-api/alibaba/qwen3-max"},{"title":"Qwen3-Max-Preview","href":"/model-api/alibaba/qwen3-max-preview"}]},{"group":"MiniMax","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/minimax-color.svg","pages":[{"title":"MiniMax H3","sidebarTitle":"MiniMax H3","href":"/model-api/minimax/minimax-h3"},{"title":"MiniMax M3","href":"/model-api/minimax/minimax-m3"},{"title":"MiniMax M2.7","href":"/model-api/minimax/minimax-m2.7"},{"title":"MiniMax M2.5","href":"/model-api/minimax/minimax-m2.5"},{"title":"MiniMax M2","href":"/model-api/minimax/minimax-m2"}]},{"group":"Xiaomi","icon":"https://api.iconify.design/simple-icons/xiaomi.svg?color=%23FF6900","pages":[{"title":"MiMo V2.5 Pro","sidebarTitle":"MiMo V2.5 Pro","href":"/model-api/xiaomi/mimo-v2.5-pro"}]},{"group":"Tencent","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/tencent-color.svg","pages":[{"title":"Hy4 Preview","sidebarTitle":"Hy4 Preview","href":"/model-api/tencent/hy4-preview"},{"title":"Hy3","sidebarTitle":"Hy3","href":"/model-api/tencent/hy3"},{"title":"Hy-MT2 Pro","sidebarTitle":"Hy-MT2 Pro","href":"/model-api/tencent/hy-mt2-pro"},{"title":"Hy-MT2 Plus","sidebarTitle":"Hy-MT2 Plus","href":"/model-api/tencent/hy-mt2-plus"},{"title":"Hy-MT2 Lite","sidebarTitle":"Hy-MT2 Lite","href":"/model-api/tencent/hy-mt2-lite"}]},{"group":"Moonshot","icon":"https://api.iconify.design/simple-icons/moonshotai.svg?color=%231783FF","pages":[{"title":"Kimi K3.1 Pro","sidebarTitle":"Kimi K3.1 Pro","icon":"https://api.iconify.design/simple-icons/moonshotai.svg?color=%231783FF","href":"/model-api/moonshot/kimi-k3.1-pro"},{"title":"Kimi K3","sidebarTitle":"Kimi K3","href":"/model-api/moonshot/kimi-k3"},{"title":"Kimi K2.7 Code","href":"/model-api/moonshot/kimi-k2.7-code"},{"title":"Kimi K2.6","href":"/model-api/moonshot/kimi-k2.6"},{"title":"Kimi K2.5","href":"/model-api/moonshot/kimi-k2.5"},{"title":"Moonshot V1 8K Vision Preview","href":"/model-api/moonshot/moonshot-v1-8k-vision-preview"},{"title":"Moonshot V1 32K Vision Preview","href":"/model-api/moonshot/moonshot-v1-32k-vision-preview"},{"title":"Moonshot V1 128K Vision Preview","href":"/model-api/moonshot/moonshot-v1-128k-vision-preview"},{"title":"Moonshot V1 8K","href":"/model-api/moonshot/moonshot-v1-8k"},{"title":"Moonshot V1 32K","href":"/model-api/moonshot/moonshot-v1-32k"},{"title":"Moonshot V1 128K","href":"/model-api/moonshot/moonshot-v1-128k"}]},{"group":"xAI","icon":"https://api.iconify.design/simple-icons/x.svg?color=%236B7280","pages":[{"title":"Grok 4.7","sidebarTitle":"Grok 4.7","href":"/model-api/xai/grok-4.7"},{"title":"Grok Imagine Image 2.0","sidebarTitle":"Grok Imagine Image 2.0","href":"/model-api/xai/grok-imagine-image-2.0"},{"title":"Grok 4.6","sidebarTitle":"Grok 4.6","href":"/model-api/xai/grok-4.6"},{"title":"Grok 4.5","href":"/model-api/xai/grok-4.5"},{"title":"Grok 4.3","href":"/model-api/xai/grok-4.3"},{"title":"Grok 4.20 Multi-Agent","sidebarTitle":"Grok 4.20 Multi-Agent","href":"/model-api/xai/grok-4.20-multi-agent-0309"},{"title":"Grok Imagine Image Quality","href":"/model-api/xai/grok-imagine-image-quality"},{"title":"Grok 4.20 0309 Reasoning","href":"/model-api/xai/grok-4.20-0309-reasoning"},{"title":"Grok 4.20 0309 Non-Reasoning","href":"/model-api/xai/grok-4.20-0309-non-reasoning"},{"title":"Grok 4.2","href":"/model-api/xai/grok-4.2"},{"title":"Grok 4.20 Beta 0309 Reasoning","href":"/model-api/xai/grok-4.20-beta-0309-reasoning"},{"title":"Grok 4.20 Beta 0309 Non-Reasoning","href":"/model-api/xai/grok-4.20-beta-0309-non-reasoning"},{"title":"Grok Imagine Image","href":"/model-api/xai/grok-imagine-image"},{"title":"Grok 4.1 Fast Reasoning","href":"/model-api/xai/grok-4-1-fast-reasoning"},{"title":"Grok 4 Fast Reasoning","href":"/model-api/xai/grok-4-fast-reasoning"},{"title":"Grok 4 Fast Non-Reasoning","href":"/model-api/xai/grok-4-fast-non-reasoning"},{"title":"Grok Code Fast 1","href":"/model-api/xai/grok-code-fast-1"},{"title":"Grok 4","href":"/model-api/xai/grok-4"},{"title":"Grok 3 Mini","href":"/model-api/xai/grok-3-mini"},{"title":"Grok 3","href":"/model-api/xai/grok-3"}]},{"group":"Google","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/google-color.svg","pages":[{"title":"Gemini 4 Argon","sidebarTitle":"Gemini 4 Argon","href":"/model-api/google/gemini-4-argon"},{"title":"Lyria 3.5","sidebarTitle":"Lyria 3.5","href":"/model-api/google/lyria-3.5"},{"title":"Gemini 3.8 Flash","sidebarTitle":"Gemini 3.8 Flash","href":"/model-api/google/gemini-3.8-flash"},{"title":"Gemini Omni 1.1 Flash","sidebarTitle":"Gemini Omni 1.1 Flash","href":"/model-api/google/gemini-omni-1.1-flash"},{"title":"Gemini 3.7 Flash","sidebarTitle":"Gemini 3.7 Flash","href":"/model-api/google/gemini-3.7-flash"},{"title":"Gemini 3.6 Flash","href":"/model-api/google/gemini-3.6-flash"},{"title":"Gemini 3.5 Flash Lite","href":"/model-api/google/gemini-3.5-flash-lite"},{"title":"Gemini 3.1 Flash Lite Image","href":"/model-api/google/gemini-3.1-flash-lite-image"},{"title":"Gemini Nano Banana 2.1","sidebarTitle":"Nano Banana 2.1","href":"/model-api/google/gemini-nano-banana-2.1"},{"title":"Gemini 3.1 Flash Image","href":"/model-api/google/gemini-3.1-flash-image"},{"title":"Gemini 3 Pro Image","href":"/model-api/google/gemini-3-pro-image"},{"title":"Gemini 3.5 Flash","href":"/model-api/google/gemini-3.5-flash"},{"title":"Gemini Flash Latest","href":"/model-api/google/gemini-flash-latest"},{"title":"Gemini 3.1 Flash Lite","href":"/model-api/google/gemini-3.1-flash-lite"},{"title":"Gemini Flash Lite Latest","href":"/model-api/google/gemini-flash-lite-latest"},{"title":"Gemini 3.8 Flash TTS","sidebarTitle":"Gemini 3.8 Flash TTS","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/google-color.svg","href":"/model-api/google/gemini-3.8-flash-tts"},{"title":"Gemini 3.8 Flash-Lite TTS","sidebarTitle":"Gemini 3.8 Flash-Lite TTS","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/google-color.svg","href":"/model-api/google/gemini-3.8-flash-lite-tts"},{"title":"Gemini 3.1 Flash TTS Preview","href":"/model-api/google/gemini-3.1-flash-tts-preview"},{"title":"Gemini Embedding 2 Preview","href":"/model-api/google/gemini-embedding-2-preview"},{"title":"Gemini 3.1 Flash Lite Preview","href":"/model-api/google/gemini-3.1-flash-lite-preview"},{"title":"Gemini 3.1 Flash Image Preview","href":"/model-api/google/gemini-3.1-flash-image-preview"},{"title":"Gemini 3.1 Pro Preview Custom Tools","href":"/model-api/google/gemini-3.1-pro-preview-customtools"},{"title":"Gemini 3.1 Pro Preview","href":"/model-api/google/gemini-3.1-pro-preview"},{"title":"Gemini Pro Latest","href":"/model-api/google/gemini-pro-latest"},{"title":"Gemini 3 Flash Preview","href":"/model-api/google/gemini-3-flash-preview"},{"title":"Gemini 3 Pro Image Preview","href":"/model-api/google/gemini-3-pro-image-preview"},{"title":"Gemini 2.5 Flash Image","href":"/model-api/google/gemini-2.5-flash-image"},{"title":"Gemini 2.5 Flash Lite Preview 09-2025","href":"/model-api/google/gemini-2.5-flash-lite-preview-09-2025"},{"title":"Gemini 2.5 Flash Lite","href":"/model-api/google/gemini-2.5-flash-lite"},{"title":"Gemini Embedding 001","href":"/model-api/google/gemini-embedding-001"},{"title":"Gemini 2.5 Pro","href":"/model-api/google/gemini-2.5-pro"},{"title":"Gemini 2.5 Flash","href":"/model-api/google/gemini-2.5-flash"},{"title":"Gemini 2.5 Pro Preview TTS","href":"/model-api/google/gemini-2.5-pro-preview-tts"},{"title":"Gemini 2.5 Flash Preview TTS","href":"/model-api/google/gemini-2.5-flash-preview-tts"}]},{"group":"OpenAI","icon":"https://api.iconify.design/simple-icons/openai.svg?color=%2310A37F","pages":[{"title":"GPT 6 Astra","sidebarTitle":"GPT 6 Astra","href":"/model-api/openai/gpt-6-astra"},{"title":"GPT 6.1 Sol","sidebarTitle":"GPT 6.1 Sol","href":"/model-api/openai/gpt-6.1-sol"},{"title":"GPT 6.1 Terra","sidebarTitle":"GPT 6.1 Terra","icon":"https://api.iconify.design/simple-icons/openai.svg?color=%2310A37F","href":"/model-api/openai/gpt-6.1-terra"},{"title":"GPT 6 Sol","sidebarTitle":"GPT 6 Sol","href":"/model-api/openai/gpt-6-sol"},{"title":"GPT 6 Luna","sidebarTitle":"GPT 6 Luna","href":"/model-api/openai/gpt-6-luna"},{"title":"GPT Image 2.5 Flare","sidebarTitle":"GPT Image 2.5 Flare","href":"/model-api/openai/gpt-image-2.5-flare"},{"title":"GPT Image 2.5 Sunburst","sidebarTitle":"GPT Image 2.5 Sunburst","href":"/model-api/openai/gpt-image-2.5-sunburst"},{"title":"GPT-5.6 Sol","href":"/model-api/openai/gpt-5.6-sol"},{"title":"GPT-5.6 Terra","href":"/model-api/openai/gpt-5.6-terra"},{"title":"GPT-5.6 Luna","href":"/model-api/openai/gpt-5.6-luna"},{"title":"GPT-Realtime-2","sidebarTitle":"GPT-Realtime-2","href":"/model-api/openai/gpt-realtime-2"},{"title":"GPT Chat Latest","href":"/model-api/openai/gpt-chat-latest"},{"title":"GPT-5.5","href":"/model-api/openai/gpt-5.5"},{"title":"GPT Image 2","href":"/model-api/openai/gpt-image-2"},{"title":"GPT-5.4 Mini","href":"/model-api/openai/gpt-5.4-mini"},{"title":"GPT-5.4 Nano","sidebarTitle":"GPT-5.4 Nano","href":"/model-api/openai/gpt-5.4-nano"},{"title":"GPT-5.4 Pro","href":"/model-api/openai/gpt-5.4-pro"},{"title":"GPT Audio 1.5","href":"/model-api/openai/gpt-audio-1.5"},{"title":"GPT-5.4","href":"/model-api/openai/gpt-5.4"},{"title":"GPT-5.3 Codex","href":"/model-api/openai/gpt-5.3-codex"},{"title":"GPT-5.2 Codex","href":"/model-api/openai/gpt-5.2-codex"},{"title":"GPT-5.2 Pro","href":"/model-api/openai/gpt-5.2-pro"},{"title":"GPT-5.2","href":"/model-api/openai/gpt-5.2"},{"title":"GPT-5.2 Chat Latest","href":"/model-api/openai/gpt-5.2-chat-latest"},{"title":"GPT-5.1 Codex Max","href":"/model-api/openai/gpt-5.1-codex-max"},{"title":"GPT-5.1 Codex Mini","href":"/model-api/openai/gpt-5.1-codex-mini"},{"title":"GPT-5.1 Codex","href":"/model-api/openai/gpt-5.1-codex"},{"title":"GPT-5.1","href":"/model-api/openai/gpt-5.1"},{"title":"GPT-4o Transcribe Diarize","href":"/model-api/openai/gpt-4o-transcribe-diarize"},{"title":"GPT-5.1 Chat Latest","href":"/model-api/openai/gpt-5.1-chat-latest"},{"title":"Sora 2","href":"/model-api/openai/sora-2"},{"title":"GPT-5 Pro","href":"/model-api/openai/gpt-5-pro"},{"title":"GPT Audio","href":"/model-api/openai/gpt-audio"},{"title":"GPT-5 Codex","href":"/model-api/openai/gpt-5-codex"},{"title":"GPT-5 Nano","href":"/model-api/openai/gpt-5-nano"},{"title":"GPT-5 Mini","href":"/model-api/openai/gpt-5-mini"},{"title":"GPT-5","href":"/model-api/openai/gpt-5"},{"title":"o3 Pro","href":"/model-api/openai/o3-pro"},{"title":"o4 Mini","href":"/model-api/openai/o4-mini"},{"title":"o3","href":"/model-api/openai/o3"},{"title":"GPT-4.1 Nano","href":"/model-api/openai/gpt-4.1-nano"},{"title":"GPT-4.1 Mini","href":"/model-api/openai/gpt-4.1-mini"},{"title":"GPT-4.1","href":"/model-api/openai/gpt-4.1"},{"title":"GPT-4o Transcribe","href":"/model-api/openai/gpt-4o-transcribe"},{"title":"GPT-4o Mini Transcribe","href":"/model-api/openai/gpt-4o-mini-transcribe"},{"title":"GPT-4o Mini TTS","href":"/model-api/openai/gpt-4o-mini-tts"},{"title":"o3 Mini","href":"/model-api/openai/o3-mini"},{"title":"o1","href":"/model-api/openai/o1"},{"title":"GPT-4o","href":"/model-api/openai/gpt-4o"},{"title":"GPT-4o Mini","href":"/model-api/openai/gpt-4o-mini"},{"title":"GPT-4 Turbo","href":"/model-api/openai/gpt-4-turbo"},{"title":"GPT-3.5 Turbo","href":"/model-api/openai/gpt-3.5-turbo"},{"title":"Text Embedding 3 Small","href":"/model-api/openai/text-embedding-3-small"},{"title":"Text Embedding 3 Large","href":"/model-api/openai/text-embedding-3-large"},{"title":"GPT-4","href":"/model-api/openai/gpt-4"},{"title":"GPT-3.5 Turbo 16K","href":"/model-api/openai/gpt-3.5-turbo-16k"},{"title":"Whisper 1","href":"/model-api/openai/whisper-1"},{"title":"Text Embedding Ada 002","description":"Text Embedding Ada 002: text embedding model. Request examples and parameters for MixRoute.","href":"/model-api/openai/text-embedding-ada-002"}]},{"group":"Kuaishou","icon":"film","pages":[{"title":"Kling 4.0","sidebarTitle":"Kling 4.0","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/kling-color.svg","href":"/model-api/kuaishou/kling-4.0"},{"title":"Kling 3.0","sidebarTitle":"Kling 3.0","description":"Text-to-video, first/last-frame generation and motion control. Standard generation supports native audio and multi-shot prompts; motion control is limited to 720p/1080p.","href":"/model-api/kuaishou/kling-3.0"},{"title":"Kling 3.0 Turbo","sidebarTitle":"Kling 3.0 Turbo","href":"/model-api/kuaishou/kling-3.0-turbo"},{"title":"Kling 3.0 Omni","sidebarTitle":"Kling 3.0 Omni","href":"/model-api/kuaishou/kling-3.0-omni"},{"title":"Kling O1","sidebarTitle":"Kling O1","href":"/model-api/kuaishou/kling-o1"},{"title":"Kling 2.6","sidebarTitle":"Kling 2.6","href":"/model-api/kuaishou/kling-2.6"},{"title":"Kling 2.5 Turbo","sidebarTitle":"Kling 2.5 Turbo","href":"/model-api/kuaishou/kling-2.5-turbo"}]},{"group":"TypeSafe","icon":"code","pages":[{"title":"Jev 1.13","sidebarTitle":"Jev 1.13","href":"/model-api/typesafe/jev-1.13.0"}]},{"group":"Cohere","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/cohere-color.svg","pages":[{"title":"Command A+","sidebarTitle":"Command A+","href":"/model-api/cohere/command-a-plus-05-2026"},{"title":"Command A","sidebarTitle":"Command A","href":"/model-api/cohere/command-a-03-2025"},{"title":"Embed v4.0","sidebarTitle":"Embed v4.0","href":"/model-api/cohere/embed-v4.0"},{"title":"Embed English v3.0","sidebarTitle":"Embed English v3.0","href":"/model-api/cohere/embed-english-v3.0"},{"title":"Embed Multilingual v3.0","sidebarTitle":"Embed Multilingual v3.0","href":"/model-api/cohere/embed-multilingual-v3.0"},{"title":"Rerank v4.0 Pro","sidebarTitle":"Rerank v4.0 Pro","href":"/model-api/cohere/rerank-v4.0-pro"},{"title":"Rerank v4.0 Fast","sidebarTitle":"Rerank v4.0 Fast","href":"/model-api/cohere/rerank-v4.0-fast"}]},{"group":"Meta","icon":"https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@1.91.0/icons/meta-color.svg","pages":[{"title":"Llama 3.3 70B Instruct","sidebarTitle":"Llama 3.3 70B Instruct","href":"/model-api/meta/llama-3.3-70b-instruct"},{"title":"Llama 4 Maverick FP8","sidebarTitle":"Llama 4 Maverick FP8","href":"/model-api/meta/llama-4-maverick-17b-128e-instruct-fp8"},{"title":"Llama 4 Scout","sidebarTitle":"Llama 4 Scout","href":"/model-api/meta/llama-4-scout-17b-16e-instruct"}]}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/models"}]},{"tab":"Smart Routing","pages":[{"title":"Smart Routing","href":"/api-reference/smart-routing"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/lobehub"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/faq/model-changing"}]}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/zh-Hans/model-api/kuaishou/kling-4.0"}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-Hant/model-api/kuaishou/kling-4.0"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/model-api/kuaishou/kling-4.0"}]}]},"basePath":"","title":"Kling 4.0 API Documentation - MixRoute","buildId":"dpl_9yaRmq8qi7yyMZn9oEWmKEdYMvGZ","deploymentId":"dpl_9yaRmq8qi7yyMZn9oEWmKEdYMvGZ","dynamics":[],"chunks":[]}