API Doc-CometAPI
HomeDashBoardModel_Price
HomeDashBoardModel_Price
Discord_Support
  1. kling (video)
  • GET START
    • Model New Release Announcement
    • Platform notification
    • Help Center
    • Quick Start
    • About Pricing
    • About Grouping
    • Interface Stability
    • Privacy policy
    • Terms of service
    • Error code description
    • Code example
    • Must see for use
    • Common Misconceptions
    • Confusion about use
    • Best Practices
      • CometAPI Account Balance Query API Usage Instructions
      • Retry Logic Documentation for CometAPI and OpenAI Official API
      • Midjourney Best Practices
      • Runway Best Practices
  • OpenAI Compatiable Endpoint
    • gpt-4o-image generates image
    • Chat
    • Recognizing Images
    • Models
    • Embeddings
    • Images
    • Realtime
    • Image Editing (gpt-image-1)
  • Audio
    • Create speech
    • Create transcription
    • Create translation
  • Anthropic Compatiable Endpoint
    • Anthropic Claude
  • Music Generation Endpoint
    • Suno
      • Setting suno Version
      • Generate lyrics
      • Generate music clip
      • Upload clip
      • Submit concatenation
      • Single task query
      • Batch query tasks
    • Udio(Temporarily unavailable)
      • Generate music
      • Task query
  • Image Generation Endpoint
    • Midjourney(images)
      • Quick Tutorial - Complete Process in One Go
      • Task Fetching API
        • List by Condition
        • Fetch Single Task (most recommended)
      • Imagine
      • Action (UPSCALE; VARIATION; REROLL; ZOOM, etc.)
      • Blend (image -> image)
      • Describe (image -> text)
      • Modal (Area Redesign & Zoom)
    • Ideogram(images)
      • Official documentation (updated in real time)
      • Generate 3.0 (text to image)
      • Remix 3.0 (hybrid image)
      • Reframe 3.0(Reconstruction)
      • Replace Background 3.0(Background replacement)
      • Edit 3.0(Editing images)
      • ideogram Text Raw Image
      • ideogram Hybrid image
      • ideogram enlargement HD
      • ideogram describes the image
      • ideogram Edit image
    • Flux(images)
      • Generate image (replicate format)
      • flux fine-tune images(Temporarily unavailable)
      • flux generate image(Temporarily unavailable)
      • flux query
    • Replicate(image)
      • replicate Generate
      • replicate query
    • Recraft(images)
      • Appendix
      • Recraft Generate Image
      • Recraft Vectorize Image
      • Recraft Remove Background
      • Recraft Clarity Upscale
      • Recraft Create style
      • Recraft Generative Upscale
  • Video Generation Ednpoint
    • runway(video)
      • official format
        • runway images raw video
        • runway to get task details
      • Reverse Format
        • generate(text)
        • generate(Reference images)
        • Video to Video Style Redraw
        • Act-one Expression Migration
        • feed-get task
    • kling (video)
      • callback_url
      • Generating images
        POST
      • Text Generation Video
        POST
      • Image Generation Video
        POST
      • Video Extension
        POST
      • virtual try-on
        POST
      • lip sync
        POST
      • Individual queries (videos)
        GET
    • MiniMax Conch(video)
      • MiniMax Conch Official Documentation
      • MiniMax Conch Generation
      • MiniMax Conch Query
      • MiniMax Conch Download
    • luma (video)
      • Official api interface format
        • luma generate
        • luma search
    • PIKA(video)
      • pika feed
      • PIKA Reference Video Generation
      • PIKA Reference Image Generation
      • PIKA reference text generation
    • sora
      • Reverse Format
        • Create Video
        • Query Video Task
        • Create Video
  • Software Integration Guide
    • cometapi Site API Call Testing
    • OpenManus
    • Chatbox
    • CherryStudio
    • Cursor
    • ChatHub
    • COZE
    • FastGPT
    • cline
    • dify
    • gptme
    • Immersive Translation
    • Lobe-Chat
    • Zotero
    • LangChain
    • AnythingLLM
    • Eudic Translation
    • OpenAI Translator
    • ChatAll Translation
    • Pot Translation
    • GPT Academic Optimization (gpt_academic)
    • NEXT CHAT (ChatGPT Next Web)
    • Obsidian's Text Generator Plugin
    • Open WebUI
    • avante.nvim
    • librechat
    • Lazy Customer Service
    • utools-ChatGPT Friend
    • IntelliJ Translation Plugin
    • n8n
  1. kling (video)

Text Generation Video

POST
https://api.cometapi.com/kling/v1/videos/text2video
Maintainer:Not configured
This document is not updated in real time, for the full version please check the official document: https://docs.qingque.cn/d/home/eZQClW07IFEuX1csc-VejdY2M

Request

Header Params
Authorization
string 
required
Example:
{{api-key}}
Content-Type
string 
optional
Example:
application/json
Body Params application/json
model_name
string 
optional
Default value: kling-v1,Example values:kling-v1,kling-v1-5,kling-v1-6
prompt
string 
required
Positive text alert, mandatory, can't exceed 500 characters
negative_prompt
string 
optional
Negative text alert, optional, cannot exceed 200 characters
cfg_scale
number 
optional
Degree of freedom of the generated video, optional, the larger the value, the stronger the correlation, value range: [0,1]
mode
enum<string> 
optional
Mode of video generation, optional, enumeration value: std (high performance) or pro (high performance)
Allowed values:
stdpro
camera_control
object 
optional
Protocol for controlling camera motion, optional, unspecified then smart match
type
enum<string> 
optional
Enumerated values:simple,down_back,forward_up,right_turn_forward,left_turn_forward
Allowed values:
simpledown_backforward_upright_turn_forwardleft_turn_forward
config
object 
optional
Contains six fields to specify camera movement or changes
aspect_ratio
string 
optional
Aspect ratio of the generated image, optional, enumeration values: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3
duration
string 
optional
Generate video duration in seconds, optional, enumeration value: 5, 10
callback_url
string 
optional
Address for callback notification of the results of this task, optional
external_task_id
string 
optional
Customized Task ID
● User-defined task ID, passed in will not overwrite the system-generated task ID, but support task query by this ID
● Please note that uniqueness needs to be guaranteed under single user.
Example
{
    "prompt": "A happy scene of a vacation on the beach.",
    "image": "iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAABFFBMVEUAAAABFBYFZWoHeoMHd4MFXmsBFhoAeGUC1MYI+fsP+P8P8f8N5v8K1/8Hq9wDXHwAUDEA6KQA/80E990J9e4R9/8K1vkHyPYEsfgBk9sAKy0AkUsA/5YA/aQA+rkG+NEN+egFgvoAP/0AMf8ARv8AGFsBn0YG/3wA/YQF/aoQ/MQInv8AUP8BW/8CYf8AdS8Y+m0g/5wo/rMd5OcCTqMAEEIBJEoDadEAGC8AEwcR/WIs92FU+2xT/XpP/o1U/6ctwqMAABEFhc4Fn/YBFyQlpT5l/1+G+F6Z+2SW/4BUuG8COEcIwvpmpzzP/17c+VyIz3EGmqqkqTz//1nS+oIAACEZrpkATUkAwrbg+nSWzmECZ//nXTRpAAABDklEQVR4AbXQA0+wYRjF8XO9RjaGPGU3Ztv4mtnmEKZsDtk4PUZrXv/pbL+HN74mcW6tp8/wtwK6X35EH1G6+38n/0TpyIXhonYq+B4gApF1B8aJ3HjKqedZpCgGyrKNSYJ7+Ss7Ci0gU86A4FkTc8wvkRGo5Qtk0EQUicbd0KuQ8SvYVVXX1NTCyqMOzuobGptg9TcMbm22d0sr3LW22Lu53m1hAfZuamtwa52HvdtraqqrnMcXjPQu6JWTIDlgYSHBYajlkdR1xsTsUyCI88gg73ntwb/gEkxEx0oCsMKg6X8e/K8o12BjLN9EXm+v8Z+KkIdwIMKodEfyP5Uu4ELA2/qUR8BEu1/U/at7B7OBbYeTZaCnAAAAAElFTkSuQmCC"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.cometapi.com/kling/v1/videos/text2video' \
--header 'Authorization: {{api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "A happy scene of a vacation on the beach.",
    "image": "iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAABFFBMVEUAAAABFBYFZWoHeoMHd4MFXmsBFhoAeGUC1MYI+fsP+P8P8f8N5v8K1/8Hq9wDXHwAUDEA6KQA/80E990J9e4R9/8K1vkHyPYEsfgBk9sAKy0AkUsA/5YA/aQA+rkG+NEN+egFgvoAP/0AMf8ARv8AGFsBn0YG/3wA/YQF/aoQ/MQInv8AUP8BW/8CYf8AdS8Y+m0g/5wo/rMd5OcCTqMAEEIBJEoDadEAGC8AEwcR/WIs92FU+2xT/XpP/o1U/6ctwqMAABEFhc4Fn/YBFyQlpT5l/1+G+F6Z+2SW/4BUuG8COEcIwvpmpzzP/17c+VyIz3EGmqqkqTz//1nS+oIAACEZrpkATUkAwrbg+nSWzmECZ//nXTRpAAABDklEQVR4AbXQA0+wYRjF8XO9RjaGPGU3Ztv4mtnmEKZsDtk4PUZrXv/pbL+HN74mcW6tp8/wtwK6X35EH1G6+38n/0TpyIXhonYq+B4gApF1B8aJ3HjKqedZpCgGyrKNSYJ7+Ss7Ci0gU86A4FkTc8wvkRGo5Qtk0EQUicbd0KuQ8SvYVVXX1NTCyqMOzuobGptg9TcMbm22d0sr3LW22Lu53m1hAfZuamtwa52HvdtraqqrnMcXjPQu6JWTIDlgYSHBYajlkdR1xsTsUyCI88gg73ntwb/gEkxEx0oCsMKg6X8e/K8o12BjLN9EXm+v8Z+KkIdwIMKodEfyP5Uu4ELA2/qUR8BEu1/U/at7B7OBbYeTZaCnAAAAAElFTkSuQmCC"
}'

Responses

🟢200Successful Response
application/json
Body
code
integer 
optional
Error code; specifically define the error code
message
string 
optional
error message
request_id
string 
optional
Request ID, system-generated, for tracking requests, troubleshooting issues
data
object 
optional
task_id
string 
optional
Task ID, system generated
task_status
string 
optional
Task status, enumerated values: submitted, processing, succeed, failed.
created_at
integer 
optional
Task creation time, Unix timestamp, in ms.
updated_at
integer 
optional
Task update time, Unix timestamp, in ms.
Example
{
    "code": 0,
    "message": "string",
    "request_id": "string",
    "data": {
        "task_id": "string",
        "task_status": "string",
        "created_at": 0,
        "updated_at": 0
    }
}
Previous
Generating images
Next
Image Generation Video
Built with