「KlingAI」APISpecification
UpdateTime
UpdateNotes
2025.3.25
SelectingFaceasreference:youcankeepthefaceconsistentwiththereferenceimage,anduseprompttochangeothercomponentsliketheoutfitandthebackground;greatforsingle-characterconsistencyacrossdifferentlooks
SelectingSubjectasreference:youcansettheentiresubjectasreference,andevenfine-tunethereferencelevelonthefaceandthesubject;greatforkeepingtheappearanceofthecharacterconsistentacrossdifferentscenes
2025.3.18
Launchof"SingleImageEffects":fuzzyfuzzy
Includescreatetask,querytask(single),andquerytask(list)interfaces
2025.3.12
Launchof"SingleImageEffects":2typesavailable,squish,expansion
Includescreatetask,querytask(single),andquerytask(list)interfaces
V1.5ModelPROmodesupportsstart/endframe,endframe,motionbrush,cameracontrol(simpleonly)
V1.6ModelPROmodesupportsstart/endframe
Supportslip-syncingforany1080por720pvideowithin10s
Added8newChineseandEnglishtonesthatcanbeuseddirectlytodublip-syncvideos
Improvedaesthetics:bettercompositionandlighting,especiallymoreaestheticallypleasinginportraits
Improvedimagequality:enhancedfidelityindetails,morenaturalrendering,andstrongertonalcontrast
Support21:9aspectratio
2025.3.5
【VideoGeneration】NewFeature:CreativeVideoEffects
Launchof"Dual-characterEffects":3typesavailable,"hug","kiss",and"heart_gesture".
Includescreatetask,querytask(single),andquerytask(list)interfaces
ComparedtothegeneralvideogenerationAPI,thevideoeffectsAPIprovidesmoreflexiblecallingparametersandintegratespre-andpost-processingfunctionalitiestailoredforspecialeffects(e.g.,dual-charactereffects).Forexample,itallowsuserstoinputtwoportraitimages,automaticallystitchesthemintoasinglecompositeimage,andgeneratesthevideousingthestitchedimage.ThismakestheAPImoreflexibleandefficient.
2025.2.14
【ImageGeneration】The"model"fieldhasbeenchangedto"model_name"
Pleasenotethatinordertomaintainnamingconsistency,theoriginalmodelfieldhasbeenchangedtomodel_name,sointhefuture,pleaseusethisfieldtospecifytheversionofthemodelthatneedstobecalled.
Atthesametime,wekeepthebehaviorforward-compatible,ifyoucontinuetousetheoriginalmodelfield,itwillnothaveanyimpactontheinterfacecall,therewillnotbeanyexception,whichisequivalenttothedefaultbehaviorwhenmodel_nameisempty(i.e.,calltheV1model).
2025.1.7
Supportstext-to-videoSTDmode,image-to-videoSTDmode,andimage-to-videoPROmode
Currentlydoesnotsupporttailframe,motionbrushes,cameracontrol,andothercontrolfeatures
Pleasenotethatinordertomaintainnamingconsistency,theoriginalmodelfieldhasbeenchangedtomodel_name,sointhefuture,pleaseusethisfieldtospecifytheversionofthemodelthatneedstobecalled.
Atthesametime,wekeepthebehaviorforward-compatible,ifyoucontinuetousetheoriginalmodelfield,itwillnothaveanyimpactontheinterfacecall,therewillnotbeanyexception,whichisequivalenttothedefaultbehaviorwhenmodel_nameisempty(i.e.,calltheV1model).
2024.12.30
【VirtualTry-On】NewV1.5model
V1.5modelisacomprehensiveupgradeofV1.0model
V1.5modelsupportssingleclothing(upper,lower,anddressdress)try-on,aswellas"upper+lower"combinationtry-on
2024.12.23
【VideoGeneration】NewFeature:Lip-Sync
VideosgeneratedbytheKlingV1.0modelandKlingV1.5modelsupportlip-syncaslongasthevideomeetsthefacialrequirements
Includescreatetask,querytask(single),andquerytask(list)interfaces
2024.12.9
【VideoGeneration】KlingV1.5StdModelNowOpenforVideoGeneration:Image-to-VideoFunctionalityEnabled,Text-to-VideoUnsupported
Supportsstandardmode
Tailframecontrolisnotsupported
Allotherparametersaresupported
Pleasenotethatinordertomaintainnamingconsistency,theoriginalmodelfieldhasbeenchangedtomodel_name,sointhefuture,pleaseusethisfieldtospecifytheversionofthemodelthatneedstobecalled.
Atthesametime,wekeepthebehaviorforward-compatible,ifyoucontinuetousetheoriginalmodelfield,itwillnothaveanyimpactontheinterfacecall,therewillnotbeanyexception,whichisequivalenttothedefaultbehaviorwhenmodel_nameisempty(i.e.,calltheV1model).
2024.12.2
【VideoGeneration】CapabilityMap
Withmultipleversionsofthevideogenerationmodel(V1,V1.5)andvariousplugincapabilities(e.g.,cameracontrol,start/endframe,motionbrush,videoextension,etc.),wehavecreateda"CapabilityMap"tomakeiteasierforeveryonetovisuallychecktheavailabilityofdifferentversionsandfeatures.Fordetails,pleaserefertothe"3-0CapabilityMap."
2024.11.29
【VideoGeneration-ImageToVideo】NewFeature:MotionBrush
ThisfeatureisonlysupportedinStandardMode5sandProfessionalMode5sfortheV1.0model,andiscurrentlynotavailablefortheV1.5model.
2024.11.15
【VideoGeneration】KlingV1.5ProModelNowOpenforVideoGeneration:Image-to-VideoFunctionalityEnabled,Text-to-VideoUnsupported
Onlysupportsprofessionalmode
Tailframecontrolisnotsupported
Allotherparametersaresupported
【VideoGeneration】NewFeature:VideoExtension
SupportsextendingvideosgeneratedbytheV1.0modeldirectly,adding4-5secondsofvideolengthperextension
Includescreatetask,querytask(single),andquerytask(list)interfaces
【VideoGeneration】OtherUpdates
Added"external_task_id"field,allowingyoutocustomizeataskIDwhencreatingatask,andquerythevideousingthiscustomIDwhenneeded
Pleasenotethatinordertomaintainnamingconsistency,theoriginalmodelfieldhasbeenchangedtomodel_name,sointhefuture,pleaseusethisfieldtospecifytheversionofthemodelthatneedstobecalled.
Atthesametime,wekeepthebehaviorforward-compatible,ifyoucontinuetousetheoriginalmodelfield,itwillnothaveanyimpactontheinterfacecall,therewillnotbeanyexception,whichisequivalenttothedefaultbehaviorwhenmodel_nameisempty(i.e.,calltheV1model).
2024.10.30
Addedthe"QueryResourcePackageListandRemainingQuantity"interfaceforyourconvenience.See"SectionVI:AccountInformationQuery".
2024.10.25
Toclarifythestoragedurationofmodel-generatedcontent(images/videos):
Toensureinformationsecurity,generatedimages/videoswillbeclearedafter30days.Pleasemakesuretosavethempromptly.
2024.10.15
AddasampleJavacodeforgeneratingtheAPI_Token.
2024.9.19
VideoGeneration
Whencreatingatask,thecharacterlimitforthepromptandnegative_promptintherequestparametershasbeenupdatedto:cannotexceed2500characters.
2024.9.19
Officiallysupportingthe"AIVirtualTry-on"relatedAPI(kolors-virtual-try-on).
 
I.GeneralInformation
1.APIDomain
💎
https://api.klingai.com
 
2.APIAuthentication
Step-1:ObtainAccessKey+SecretKey
Step-2:EverytimeyourequesttheAPI,youneedtogenerateanAPITokenaccordingtotheFixedEncryptionMethod,Authorization=Bearer<APIToken>inRequsetHeader
EncryptionMethod:FollowJWT(JsonWebToken,RFC7519)standard
JWTconsistsofthreeparts:Header、Payload、Signature
Samplecode(Python)
Samplecode(Java):
Step-3:UsetheAPITokengeneratedinStep2toassembletheAuthorizationandincludeitintheRequestHeader.