This API now generates videos with our New AI Studio backend.

Request Body

FieldTypeDescription
captionbool (optional)Whether to add a caption to the video. Default is False. Only text input supports caption
titlestr (optional)Title for the video.
callback_idstr (optional)A custom ID for callback purposes.
video_inputsList of video input settings (scenes). Must contain between 1 to 50 items.
dimensionThe dimensions of the output video.
callback_urlstr(optional)An optional callback url. This is useful if your callback endpoint is dynamic and each video have it's separate callback url.
Using webhook endpoint is still recommended because those offers more customizations on the callback endpoint such as secrets, and event filtering, etc

VideoInput

FieldTypeDescription
characterAvatarSettings or TalkingPhotoSettings (optional)Character settings.
voiceTextVoiceSettings or AudioVoiceSettings or SilenceVoiceSettingsVoice settings.
backgroundColorBackground or ImageBackground or VideoBackground (optional)Background settings.

Character Settings

AvatarSettings

FieldTypeDescription
typeLiteral["avatar"]Indicates that this is an avatar character setting.
avatar_idstrAvatar ID.
scalefloatAvatar scale, value between 0 and 2.0. Default is 1.0.
avatar_styleCharacterRenderType (optional)Avatar style. Supported values are: circle, normal, closeUp.
offsetOffsetAvatar offset. Default is { "x": 0.0, "y": 0.0 }.
mattingbool (optional)Whether to do matting
circle_background_colorstr (optional)background color in the circle when using circle style

TalkingPhotoSettings

FieldTypeDescription
typeLiteral["talking_photo"]Indicates that this is a talking photo character setting.
talking_photo_idstrTalking Photo ID.
scalefloatTalking Photo scale, value between 0 and 2.0. Default is 1.0.
talking_photo_styleTACropStyle (optional)Talking Photo crop style. Supported values are: square, circle.
offsetOffsetTalking Photo offset.
Default is { "x": 0.0, "y": 0.0 }.
talking_styleTPExpressionTalking Photo talking style. Default is TPExpression.stable. Supported values are: stable, expressive.
expressionTPExpressionStyleTalking Photo expression style. Default is TPExpressionStyle.default. Supported values are: default, happy.
super_resolutionbool (optional)Whether to enhance this photar image.
mattingbool (optional)Whether to do matting.
circle_background_colorstr (optional)background color in the circle/square when using circle/square style

Voice Settings

TextVoiceSettings

FieldTypeDescription
typeLiteral["text"]Indicates that this is a text voice setting.
voice_idstrVoice ID.
input_textstrInput text.
speedfloat (optional)Voice speed, value between 0.5 and 1.5. Default is 1.
pitchint (optional)Voice pitch, value between -50 and 50. Default is 0.
emotionstr (optional)Voice emotion, if voice support emotion. value are ['Excited','Friendly','Serious','Soothing','Broadcaster']

AudioVoiceSettings

FieldTypeDescription
typeLiteral["audio"]Indicates that this is an audio voice setting.
audio_urlstr (optional)Audio URL.
audio_asset_idstr (optional)Audio asset ID. Either audio_url or audio_asset_id must be provided.

SilenceVoiceSettings

FieldTypeDescription
typeLiteral["silence"]Indicates that this is a silence voice setting.
durationfloatDuration of silence, value between 1.0 and 100.0. Default is 1.0.

Background Settings

ColorBackground

FieldTypeDescription
typeLiteral["color"]Indicates that this is a color background setting. Default is color.
valuestrColor value in hex format. Default is #f6f6fc.

ImageBackground

FieldTypeDescription
typeLiteral["image"]Indicates that this is an image background setting.
urlstr (optional)Image URL.
image_asset_idstr (optional)Image asset ID. Either url or image_asset_id must be provided.
fitstr (optional)Background image fit to the screen. Choose among cover , crop, contain and none. Default is cover

VideoBackground

FieldTypeDescription
typeLiteral["video"]Indicates that this is a video background setting.
urlstr (optional)Video URL.
video_asset_idstr (optional)Video asset ID. Either url or video_asset_id must be provided.
play_styleVideoPlaybackVideo play style. Supported values are: fit_to_scene, freeze, loop, once. More Info
fitstr (optional)Background video fit to the screen. Choose among cover , crop, contain and none. Default is cover

Response

FieldTypeDescription
video_idstrID of the generated video.
Language
Credentials
Header
Click Try It! to start a request and see the response here!