Chillin Render API 允許您透過定義如下的 JSON 結構來指定要渲染的視頻內容和參數。
聯繫 [email protected] 以獲取 Render API 積分
前往儀表板生成您的 Render API 金鑰
向 Render API 端點 (https://api.chillin.online/render/v1) 發送一個 POST 請求,請求主體為 JSON 結構,並將您的 API 金鑰放在 Authorization
標頭中
1{
2 "compositeWidth": 1920,
3 "compositeHeight": 1080,
4 "fps": 30,
5 "projectData": {
6 "type": "",
7 "width": 1920,
8 "height": 1080,
9 "fill": "#000000",
10 "view": [
11 {
12 "id": "8ecf7475-2c6c-47f9-827b-a09c7913f4c0",
13 "type": "Image",
14 "start": 0,
15 "duration": 5,
16 "trackIndex": 0,
17 "x": -570.0335392757963,
18 "y": -170.90659033307685,
19 "blendMode": "normal",
20 "anchorX": 1302,
21 "anchorY": 2312,
22 "rotation": 0,
23 "scaleX": 0.23356401384083045,
24 "scaleY": 0.23356401384083045,
25 "alpha": 1,
26 "skewX": 0,
27 "skewY": 0,
28 "keyframes": [],
29 "externalUrl": "https://images.pexels.com/photos/30465303/pexels-photo-30465303.jpeg",
30 "ext": "jpeg"
31 }
32 ],
33 "audio": [],
34 "effect": [],
35 "transition": [],
36 "version": 0,
37 "duration": 5
38 }
39};
40
所有 JSON 對象都包含一個視頻項目對象,指定視頻的合成寬度、合成高度和解析度。
項目對象包含渲染視頻的基本參數,如寬度、高度、持續時間、背景顏色等。
該項目還包括一個或多個元素,每個元素代表一個視頻組件,如視頻、圖像、文本、形狀、音頻或效果。
每個元素包含該組件的特定參數,如位置、大小、顏色、內容等。
1{
2 "compositeWidth": 1920,
3 "compositeHeight": 1080,
4 "fps": 30,
5 "projectData": {
6 "type": "",
7 "width": 1920,
8 "height": 1080,
9 "fill": "#000000",
10 "view": [
11 {
12 "id": "8ecf7475-2c6c-47f9-827b-a09c7913f4c0",
13 "type": "Image",
14 "start": 0,
15 "duration": 5,
16 "trackIndex": 0,
17 "x": -570.0335392757963,
18 "y": -170.90659033307685,
19 "blendMode": "normal",
20 "anchorX": 1302,
21 "anchorY": 2312,
22 "rotation": 0,
23 "scaleX": 0.23356401384083045,
24 "scaleY": 0.23356401384083045,
25 "alpha": 1,
26 "skewX": 0,
27 "skewY": 0,
28 "keyframes": [],
29 "externalUrl": "https://images.pexels.com/photos/30465303/pexels-photo-30465303.jpeg",
30 "ext": "jpeg"
31 }
32 ],
33 "audio": [],
34 "effect": [],
35 "transition": [],
36 "version": 0,
37 "duration": 5
38 }
39};
40
您的請求 JSON 必須嚴格遵循本文件中定義的 JSON 架構。您可以在 Chillin 視頻編輯器中測試和生成相應的請求 JSON。