Skip to main content
Version: Latest

Create project and export

Exporting projects describes how to synthesize new videos by sending api requests in JSON format. You can see & edit exported video at AI Studio by Deepbrain AI.


1. API endpoint

https://app.aistudios.com/api/odin/v3/editor/project

2. Request parameter

keydesctyperequireddefault
nameProject nameStringfalseDefault Template
orientationProject orientationStringfalselandscape
dictionaryUser additional speech learning dataJsonfalse-
scenesScene dataArray(json)true-
scenes[].sceneIdxSequence of the sceneInttrue-
scenes[].scriptsList of speech data for the scene
(* Although it is an array for future extensibility, only one speech data should be entered.)
Jsontrue-
scenes[].scripts[].orgText of the speech
<p />, <span /> tags are allowed, but it is recommended to enter only plain text.
Stringtrue-
scenes[].scripts[].isTTSWhether to use the avatar's original voice or a TTS synthesized voice
Use false for the avatar's voice, and true for a different voice.
Booleantrue-
scenes[].scripts[].ttsData of the TTS synthesized voice if not using the avatar's voice
Use null for the avatar's voice, and Json for a different voice.
Json|nulltrue-
scenes[].scripts[].modelIdAvatar's model IDStringtrue-
scenes[].scripts[].clothIdAvatar's clothing IDStringtrue-
scenes[].backgroundBackground image information.Jsontrue-
scenes[].clipsFields to add clips such as text, images, and background images.Array(json)true-
scenes[].clips[].scaleXRepresents the size magnification of the clip. Represents the size magnification of x and y, respectively, based on the height and width input.Floatfalse1
scenes[].clips[].scaleYRepresents the size magnification of the clip. Represents the size magnification of x and y, respectively, based on the height and width input.Floatfalse1
scenes[].clips[].heightThe height of the clip.Floattrue-
scenes[].clips[].widthThe width of the clip.Floattrue-
scenes[].clips[].leftThe position of the clip relative to the left side of the scene.Floattrue-
scenes[].clips[].topThe position of the clip based on the top of the scene.Floattrue-
scenes[].clips[].layerAlignment order of clips (the higher the number, the more exposed to the top)Inttrue-
scenes[].clips[].idID of the clipStringtrue-
scenes[].clips[].typeTypes of clips. Learn moreString enum (aiModel, shape, image, textImage, videoImage, audio)true-
webhookUrlUrl address where the synthesis result should be sent.Stringfalse-

scenes[].scripts[] Data Format

In scenes[].scripts[], you must specify some additional information besides the speech (org). If incorrectly specified, the function may not work properly.

isTTS, tts
Indicates whether to use the avatar's original voice or a TTS synthesized voice.
To use the avatar's original voice, set isTTS to false and tts to null.
To use a TTS synthesized voice, set isTTS to true and tts to the corresponding TTS data.
The types of available TTS and the format of the data need to be confirmed through inquiry.

modelId, clothId
Indicates the avatar's model ID and clothing ID.
These values must be specified and must match the avatar clip of the scene.
If not specified or specified differently from the avatar clip, the function may not work properly.

-Avatar Clip PropertyScript Property
Model IDmodel.ai_namemodelId
Clothing IDmodel.emotionclothId

3. Response parameters

keydesctype
projectIdProject Id - Fetching the Chroma-key video data that has been exported.String

4. Sample Request

curl https://app.aistudios.com/api/odin/v3/editor/project  \
-H "Authorization: ${API KEY}" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"scenes": [{
"background": {
"id": "background",
"type": "background",
"source_type": "image",
"source_url": "/images/background/bg_blue_gradient.png",
"source_color": "rgb(54,188,37)"
},
"watermark": false,
"scripts": [
{
"org": "<p>Hello, this is test video.</p>",
"isTTS": false,
"tts": null,
"modelId": "M000045058",
"clothId": "BG00002320"
}
],
"clips": [
{
"id": "aiModel-1h4ij5h8e87",
"type": "aiModel",
"layer": 1,
"top": 146.74129135713008,
"left": 630.2493927359487,
"effects": [
{
"type": "head-only"
}
],
"height": 2229,
"width": 679,
"model": {
"ai_name": "M000045058",
"emotion": "BG00002320",
"language": "en",
"source_url": "https://cdn.aistudios.com/ai/ai_mov_thm/tight_ai_mov_thm_M000045058_BG00002320.png",
"editor": {
"headCenterX": 613.3333333333334,
"headCenterY": 290,
"headWidth": 182,
"headHeight": 185,
"modelTightX": 367.33333333333337,
"modelTightY": 168.16666666666669,
"modelTightS": 1,
"modelTightW": 679,
"modelTightH": 2229,
"modelOriginW": 1374,
"modelOriginH": 2444,
"scale": 0.3,
"adjustX": -0.016860747210092203,
"adjustY": -0.024822695035461,
"spaceB": 46.833333333333314,
"spaceT": 168.16666666666669,
"spaceL": 367.33333333333337,
"spaceR": 327.66666666666663,
"top": 168.16666666666669,
"left": 367.33333333333337,
"height": 2229,
"width": 679
},
"origin": {
"height": 2444,
"width": 1374
},
"deployImage": {
"themb_src": "https://cdn.aistudios.com/ai/model-introduce/thumbnails/M000045058_BG00002320.png",
"themb_width": 384,
"themb_height": 240,
"org_src": "https://cdn.aistudios.com/ai/ai_mov_thm/tight_ai_mov_thm_M000045058_BG00002320_org.png",
"org_width": 1374,
"org_height": 2444,
"edit_src": "https://cdn.aistudios.com/ai/ai_mov_thm/tight_ai_mov_thm_M000045058_BG00002320.png",
"edit_width": 692,
"edit_height": 2277
},
"deploySize": {
"org_width": 1374,
"org_height": 2444,
"edit_width": 679,
"edit_height": 2229
},
"editorValue": {
"headCenterX": 613.3333333333334,
"headCenterY": 290,
"headWidth": 182,
"headHeight": 185,
"modelTightX": 367.33333333333337,
"modelTightY": 168.16666666666669,
"modelTightS": 1,
"modelTightW": 679,
"modelTightH": 2229,
"modelOriginW": 1374,
"modelOriginH": 2444,
"scale": 0.3,
"adjustX": -0.016860747210092203,
"adjustY": -0.024822695035461,
"spaceB": 46.833333333333314,
"spaceT": 168.16666666666669,
"spaceL": 367.33333333333337,
"spaceR": 327.66666666666663
},
"maskFile": "M000045058_BG00002320H_alpha_INV.mp4"
},
"name": "aiModel-1h4ij5h8e87",
"lockScalingFlip": true,
"fill": "rgb(0,0,0)",
"scaleX": 1,
"scaleY": 1,
"opacity": 100,
"lockMovementX": false,
"lockMovementY": false,
"lockRotation": false,
"lockScalingX": false,
"lockScalingY": false,
"lockSkewingX": false,
"lockSkewingY": false,
"lockUniScaling": false,
"headOnly": null,
"voiceOnly": false,
"isDelete": false
},
],
"thumbnailUrl": null,
"sceneIdx": 0
}],
"webhookUrl": ${webhook_delivery_address}
}'