-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
1583 lines (1583 loc) · 67.1 KB
/
Copy pathopenapi.json
File metadata and controls
1583 lines (1583 loc) · 67.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.0",
"servers": [
{
"url": "https://api.shotstack.io/{version}",
"variables": {
"version": {
"default": "v1",
"description": "Set the stage to `v1` for production usage without watermarks. Set to `stage` to use the development sandbox.",
"enum": [
"v1",
"stage"
]
}
}
},
{
"url": "https://api.shotstack.io/serve/{version}",
"variables": {
"version": {
"default": "v1",
"description": "Set the stage to `v1` for production usage. Set to `stage` to use the development sandbox.",
"enum": [
"v1",
"stage"
]
}
}
}
],
"info": {
"description": "Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API.\n\nYou arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete.\n\nFor more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.\nThere are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API).\n\nThe Edit API base URL is: <b>https://api.shotstack.io/{version}</b>\n\nThe Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>",
"title": "Shotstack",
"version": "v1",
"x-apisguru-categories": [
"media"
],
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/shotstack/oas-api-definition/main/api.oas3.yaml",
"version": "3.0"
}
],
"x-providerName": "shotstack.io",
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_apis.guru_assets_images_no-logo.svg"
}
},
"paths": {
"/assets/render/{id}": {
"get": {
"description": "A render may generate more than one file, such as a video, thumbnail and poster image. When the assets are created the only known id is the render id returned by the original [render request](#render-video), status request or webhook. This endpoint lets you look up one or more assets by the render id.\n\n**base URL:** https://api.shotstack.io/serve/{version}",
"operationId": "getAssetByRenderId",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"response": {
"data": [
{
"attributes": {
"created": "2021-05-06T03:33:48.600Z",
"filename": "2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7.mp4",
"id": "a4482cbf-e321-42a2-ac8b-947d26886840",
"owner": "5ca6hu7s9k",
"region": "au",
"renderId": "2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7",
"status": "ready",
"updated": "2021-05-06T03:33:49.521Z",
"url": "https://cdn.shotstack.io/au/v1/msgtwx8iw6/2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7.mp4"
},
"type": "asset"
}
]
}
},
"schema": {
"$ref": "#/components/schemas/AssetRenderResponse"
}
}
},
"description": "Get one or more assets by render id"
}
},
"security": [
{
"DeveloperKey": []
}
],
"summary": "Get Asset by Render ID",
"tags": [
"Serve"
]
},
"parameters": [
{
"description": "The render id associated with the asset in UUID format",
"in": "path",
"name": "id",
"required": true,
"schema": {
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"type": "string"
}
}
]
},
"/assets/{id}": {
"delete": {
"description": "Delete an asset by its asset id. If a render creates multiple assets, such as thumbnail and poster images, each asset must be deleted individually by the asset id.\n\n**base URL:** https://api.shotstack.io/serve/{version}",
"operationId": "deleteAsset",
"responses": {
"204": {
"description": "An empty response signifying the asset has been deleted"
}
},
"security": [
{
"DeveloperKey": []
}
],
"summary": "Delete Asset",
"tags": [
"Serve"
]
},
"get": {
"description": "The Serve API is used to interact with, and delete hosted assets including videos, images, audio files, thumbnails and poster images. Use this endpoint to fetch an asset by asset id. Note that an asset id is unique for each asset and different from the render id.\n\n**base URL:** https://api.shotstack.io/serve/{version}",
"operationId": "getAsset",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"response": {
"data": {
"attributes": {
"created": "2021-05-06T03:33:48.600Z",
"filename": "2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7.mp4",
"id": "a4482cbf-e321-42a2-ac8b-947d26886840",
"owner": "5ca6hu7s9k",
"region": "au",
"renderId": "2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7",
"status": "ready",
"updated": "2021-05-06T03:33:49.521Z",
"url": "https://cdn.shotstack.io/au/v1/msgtwx8iw6/2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7.mp4"
},
"type": "asset"
}
}
},
"schema": {
"$ref": "#/components/schemas/AssetResponse"
}
}
},
"description": "Get asset by asset id"
}
},
"security": [
{
"DeveloperKey": []
}
],
"summary": "Get Asset",
"tags": [
"Serve"
]
},
"parameters": [
{
"description": "The id of the asset in UUID format",
"in": "path",
"name": "id",
"required": true,
"schema": {
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"type": "string"
}
}
]
},
"/render": {
"post": {
"description": "Queue and render the contents of a timeline as a video, image or audio file.",
"operationId": "postRender",
"requestBody": {
"content": {
"application/json": {
"example": {
"output": {
"format": "mp4",
"resolution": "sd"
},
"timeline": {
"background": "#000000",
"soundtrack": {
"effect": "fadeInFadeOut",
"src": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/music.mp3"
},
"tracks": [
{
"clips": [
{
"asset": {
"style": "minimal",
"text": "Hello World",
"type": "title"
},
"effect": "slideRight",
"length": 4,
"start": 0,
"transition": {
"in": "fade",
"out": "fade"
}
},
{
"asset": {
"src": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/my-image.jpg",
"type": "image"
},
"effect": "zoomIn",
"filter": "greyscale",
"length": 4,
"start": 3
}
]
},
{
"clips": [
{
"asset": {
"src": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/my-clip-1.mp4",
"trim": 10.5,
"type": "video"
},
"length": 4.5,
"start": 7
},
{
"asset": {
"src": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/my-clip-2.mp4",
"type": "video",
"volume": 0.5
},
"length": 5,
"start": 11.5,
"transition": {
"out": "wipeLeft"
}
}
]
}
]
}
},
"schema": {
"$ref": "#/components/schemas/Edit"
}
}
},
"description": "The video, image or audio edit specified using JSON.\n\n**base URL:** https://api.shotstack.io/{version}",
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"example": {
"message": "Created",
"response": {
"id": "2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7",
"message": "Render Successfully Queued"
},
"success": true
},
"schema": {
"$ref": "#/components/schemas/QueuedResponse"
}
}
},
"description": "The queued render details"
}
},
"security": [
{
"DeveloperKey": []
}
],
"summary": "Render Asset",
"tags": [
"Edit"
]
}
},
"/render/{id}": {
"get": {
"description": "Get the rendering status, temporary asset url and details of a render by ID.\n\n**base URL:** https://api.shotstack.io/{version}",
"operationId": "getRender",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"message": "OK",
"response": {
"created": "2020-10-30T09:42:29.446Z",
"data": {
"output": {
"format": "mp4",
"resolution": "sd"
},
"timeline": {
"background": "#000000",
"soundtrack": {
"effect": "fadeInFadeOut",
"src": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/music.mp3"
},
"tracks": [
{
"clips": [
{
"asset": {
"style": "minimal",
"text": "Hello World",
"type": "title"
},
"effect": "slideRight",
"length": 4,
"start": 0,
"transition": {
"in": "fade",
"out": "fade"
}
},
{
"asset": {
"src": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/my-image.jpg",
"type": "image"
},
"effect": "zoomIn",
"filter": "greyscale",
"length": 4,
"start": 3
}
]
},
{
"clips": [
{
"asset": {
"src": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/my-clip-1.mp4",
"trim": 10.5,
"type": "video"
},
"length": 4.5,
"start": 7
},
{
"asset": {
"src": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/my-clip-2.mp4",
"type": "video",
"volume": 0.5
},
"length": 5,
"start": 11.5,
"transition": {
"out": "wipeLeft"
}
}
]
}
]
}
},
"id": "2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7",
"owner": "5ca6hu7s9k",
"status": "rendering",
"updated": "2020-10-30T09:42:39.168Z",
"url": "https://shotstack-api-v1-output.s3-ap-southeast-2.amazonaws.com/5ca6hu7s9k/2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7.mp4"
},
"success": true
},
"schema": {
"$ref": "#/components/schemas/RenderResponse"
}
}
},
"description": "The render status details"
}
},
"security": [
{
"DeveloperKey": []
}
],
"summary": "Get Render Status",
"tags": [
"Edit"
]
},
"parameters": [
{
"description": "The id of the timeline render task in UUID format",
"in": "path",
"name": "id",
"required": true,
"schema": {
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"type": "string"
}
}
]
}
},
"components": {
"callbacks": {},
"examples": {},
"headers": {},
"links": {},
"parameters": {},
"requestBodies": {},
"responses": {},
"schemas": {
"AssetRenderResponse": {
"description": "The response returned by the Serve API [get asset by render id](#get-asset-by-render-id) request. The response is an array of asset resources, including video, image, audio, thumbnail and poster image. The response follows the [json:api](https://jsonapi.org/) specification.",
"properties": {
"data": {
"description": "An array of asset resources grouped by render id.",
"items": {
"$ref": "#/components/schemas/AssetResponseData"
},
"type": "array"
}
},
"type": "object"
},
"AssetResponse": {
"description": "The response returned by the Serve API [get asset](#get-asset) request. Includes details of a hosted video, image, audio file, thumbnail or poster image. The response follows the [json:api](https://jsonapi.org/) specification.",
"properties": {
"data": {
"$ref": "#/components/schemas/AssetResponseData",
"description": "An asset resource."
}
},
"type": "object"
},
"AssetResponseAttributes": {
"description": "The list of asset attributes and their values.",
"properties": {
"created": {
"description": "The time the asset was created.",
"example": "2021-06-30T09:42:29.446Z",
"type": "string"
},
"filename": {
"description": "The asset file name.",
"example": "2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7.mp4",
"type": "string"
},
"id": {
"description": "The unique id of the hosted asset in UUID format.",
"example": "a4482cbf-e321-42a2-ac8b-947d26886840",
"type": "string"
},
"owner": {
"description": "The owner id of the render task.",
"example": "5ca6hu7s9k",
"type": "string"
},
"region": {
"description": "The region the asset is hosted, currently only `au` (Australia).",
"example": "au",
"type": "string"
},
"renderId": {
"description": "The original render id that created the asset in UUID format. Multiple assets can share the same render id.",
"example": "2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7",
"type": "string"
},
"status": {
"description": "The status of the asset. <ul>\n <li>`importing` - the asset is being copied to the hosting service</li>\n <li>`ready` - the asset is ready to be served to users</li>\n <li>`failed` - the asset failed to copy or delete</li>\n <li>`deleted` - the asset has been deleted</li>\n</ul>",
"enum": [
"importing",
"ready",
"failed",
"deleted"
],
"example": "ready",
"type": "string"
},
"updated": {
"description": "The time the asset status was last updated.",
"example": "2021-06-30T09:42:30.168Z",
"type": "string"
},
"url": {
"description": "The asset file name.",
"example": "https://cdn.shotstack.io/au/v1/5ca6hu7s9k/2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7.mp4",
"type": "string"
}
},
"type": "object"
},
"AssetResponseData": {
"description": "The type of resource (an asset) and attributes of the asset.",
"properties": {
"attributes": {
"$ref": "#/components/schemas/AssetResponseAttributes",
"description": "The asset attributes including render id, url, filename, file size, etc..."
},
"type": {
"description": "The type of resource, in this case it is an assets.",
"example": "asset",
"type": "string"
}
},
"type": "object"
},
"AudioAsset": {
"description": "The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file.",
"properties": {
"effect": {
"description": "The effect to apply to the audio asset <ul>\n <li>`fadeIn` - fade volume in only</li>\n <li>`fadeOut` - fade volume out only</li>\n <li>`fadeInFadeOut` - fade volume in and out</li>\n</ul>",
"enum": [
"fadeIn",
"fadeOut",
"fadeInFadeOut"
],
"type": "string"
},
"src": {
"description": "The audio source URL. The URL must be publicly accessible or include credentials.",
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3",
"type": "string"
},
"trim": {
"description": "The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached.",
"type": "number"
},
"type": {
"default": "audio",
"description": "The type of asset - set to `audio` for audio assets.",
"type": "string"
},
"volume": {
"default": 1,
"description": "Set the volume for the audio clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1).",
"type": "number"
}
},
"required": [
"type",
"src"
],
"type": "object"
},
"Clip": {
"description": "A clip is a container for a specific type of asset, i.e. a title, image, video, audio or html. You use a Clip to define when an asset will display on the timeline, how long it will play for and transitions, filters and effects to apply to it.",
"properties": {
"asset": {
"description": "The type of asset to display for the duration of this Clip. Value must be one of <b>TitleAsset</b>, <b>ImageAsset</b>, <b>VideoAsset</b>, <b>HtmlAsset</b>, <b>AudioAsset</b> or <b>LumaAsset</b>",
"oneOf": [
{
"$ref": "#/components/schemas/VideoAsset"
},
{
"$ref": "#/components/schemas/ImageAsset"
},
{
"$ref": "#/components/schemas/TitleAsset"
},
{
"$ref": "#/components/schemas/HtmlAsset"
},
{
"$ref": "#/components/schemas/AudioAsset"
},
{
"$ref": "#/components/schemas/LumaAsset"
}
]
},
"effect": {
"description": "A motion effect to apply to the Clip. <ul>\n <li>`zoomIn` - slow zoom in</li>\n <li>`zoomOut` - slow zoom out</li>\n <li>`slideLeft` - slow slide (pan) left</li>\n <li>`slideRight` - slow slide (pan) right</li>\n <li>`slideUp` - slow slide (pan) up</li>\n <li>`slideDown` - slow slide (pan) down</li>\n</ul>",
"enum": [
"zoomIn",
"zoomOut",
"slideLeft",
"slideRight",
"slideUp",
"slideDown"
],
"type": "string"
},
"filter": {
"description": "A filter effect to apply to the Clip. <ul>\n <li>`boost` - boost contrast and saturation</li>\n <li>`contrast` - increase contrast</li>\n <li>`darken` - darken the scene</li>\n <li>`greyscale` - remove colour</li>\n <li>`lighten` - lighten the scene</li>\n <li>`muted` - reduce saturation and contrast</li>\n <li>`invert` - invert colors</li>\n</ul>",
"enum": [
"boost",
"contrast",
"darken",
"greyscale",
"lighten",
"muted",
"negative"
],
"example": "greyscale",
"type": "string"
},
"fit": {
"default": "crop",
"description": "Set how the asset should be scaled to fit the viewport using one of the following options: \n <ul>\n <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li>\n <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li>\n <li>`crop` - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li>\n <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li>\n </ul>",
"enum": [
"cover",
"contain",
"crop",
"none"
],
"type": "string"
},
"length": {
"description": "The length, in seconds, the Clip should play for.",
"example": 5,
"type": "number"
},
"offset": {
"$ref": "#/components/schemas/Offset",
"description": "Offset the location of the asset relative to its position on the viewport. The offset distance is relative to the width of the viewport - for example an x offset of 0.5 will move the asset half the viewport width to the right."
},
"opacity": {
"default": 1,
"description": "Sets the opacity of the Clip where 1 is opaque and 0 is transparent.",
"type": "number"
},
"position": {
"default": "center",
"description": "Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position. <ul>\n <li>`top` - top (center)</li>\n <li>`topRight` - top right</li>\n <li>`right` - right (center)</li>\n <li>`bottomRight` - bottom right</li>\n <li>`bottom` - bottom (center)</li>\n <li>`bottomLeft` - bottom left</li>\n <li>`left` - left (center)</li>\n <li>`topLeft` - top left</li>\n <li>`center` - center</li>\n</ul>",
"enum": [
"top",
"topRight",
"right",
"bottomRight",
"bottom",
"bottomLeft",
"left",
"topLeft",
"center"
],
"type": "string"
},
"scale": {
"description": "Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks.",
"example": 0,
"type": "number"
},
"start": {
"description": "The start position of the Clip on the timeline, in seconds.",
"example": 2,
"type": "number"
},
"transition": {
"$ref": "#/components/schemas/Transition"
}
},
"required": [
"asset",
"start",
"length"
],
"type": "object"
},
"Crop": {
"description": "Crop the sides of an asset by a relative amount. The size of the crop is specified using a scale between 0 and 1, relative to the screen width - i.e a left crop of 0.5 will crop half of the asset from the left, a top crop of 0.25 will crop the top by quarter of the asset.",
"properties": {
"bottom": {
"description": "Crop from the bottom of the asset",
"example": 0.15,
"format": "float",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"left": {
"description": "Crop from the left of the asset",
"format": "float",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"right": {
"description": "Crop from the left of the asset",
"format": "float",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"top": {
"description": "Crop from the top of the asset",
"example": 0.15,
"format": "float",
"maximum": 1,
"minimum": 0,
"type": "number"
}
},
"type": "object"
},
"Edit": {
"description": "An edit defines the arrangement of a video on a timeline, an audio edit or an image design and the output format.",
"properties": {
"callback": {
"description": "An optional webhook callback URL used to receive status notifications when a render completes or fails. See [webhooks](https://shotstack.gitbook.io/docs/guides/architecting-an-application/webhooks) for more details.",
"example": "https://my-server.com/callback.php",
"type": "string"
},
"disk": {
"default": "local",
"description": "The disk type to use for storing footage and assets for each render. See [disk types](https://shotstack.gitbook.io/docs/guides/architecting-an-application/disk-types) for more details. <ul>\n <li>`local` - optimized for high speed rendering with up to 512MB storage</li>\n <li>`mount` - optimized for larger file sizes and longer videos with 5GB for source footage and 512MB for output render</li>\n</ul>",
"enum": [
"local",
"mount"
],
"type": "string"
},
"output": {
"$ref": "#/components/schemas/Output"
},
"timeline": {
"$ref": "#/components/schemas/Timeline"
}
},
"required": [
"timeline",
"output"
],
"type": "object"
},
"Font": {
"description": "Download a custom font to use with the HTML asset type, using the font name in the CSS or font tag. See our [custom fonts](https://shotstack.io/learn/html-custom-fonts/) getting started guide for more details.",
"properties": {
"src": {
"description": "The URL of the font file. The URL must be publicly accessible or include credentials.",
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/open-sans.ttf",
"type": "string"
}
},
"required": [
"src"
],
"type": "object"
},
"HtmlAsset": {
"description": "The HtmlAsset clip type lets you create text based layout and formatting using HTML and CSS. You can also set the height and width of a bounding box for the HTML content to sit within. Text and elements will wrap within the bounding box.",
"properties": {
"background": {
"default": "transparent",
"description": "Apply a background color behind the HTML bounding box using. Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency.",
"type": "string"
},
"css": {
"description": "The CSS text string to apply styling to the HTML. See list of [support CSS properties](https://shotstack.gitbook.io/docs/guides/architecting-an-application/html-support#supported-html-tags).",
"example": "p { color: #ffffff; } b { color: #ffff00; }",
"type": "string"
},
"height": {
"description": "Set the width of the HTML asset bounding box in pixels. Text and elements will be masked if they exceed the height of the bounding box.",
"example": 200,
"type": "integer"
},
"html": {
"description": "The HTML text string. See list of [supported HTML tags](https://shotstack.gitbook.io/docs/guides/architecting-an-application/html-support#supported-html-tags).",
"example": "<p>Hello <b>World</b></p>",
"type": "string"
},
"position": {
"default": "center",
"description": "Place the HTML in one of nine predefined positions within the HTML area. <ul>\n <li>`top` - top (center)</li>\n <li>`topRight` - top right</li>\n <li>`right` - right (center)</li>\n <li>`bottomRight` - bottom right</li>\n <li>`bottom` - bottom (center)</li>\n <li>`bottomLeft` - bottom left</li>\n <li>`left` - left (center)</li>\n <li>`topLeft` - top left</li>\n <li>`center` - center</li>\n</ul>",
"enum": [
"top",
"topRight",
"right",
"bottomRight",
"bottom",
"bottomLeft",
"left",
"topLeft",
"center"
],
"type": "string"
},
"type": {
"default": "html",
"description": "The type of asset - set to `html` for HTML.",
"type": "string"
},
"width": {
"description": "Set the width of the HTML asset bounding box in pixels. Text will wrap to fill the bounding box.",
"example": 400,
"type": "integer"
}
},
"required": [
"type",
"html"
],
"type": "object"
},
"ImageAsset": {
"description": "The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file.",
"properties": {
"crop": {
"$ref": "#/components/schemas/Crop"
},
"src": {
"description": "The image source URL. The URL must be publicly accessible or include credentials.",
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg",
"type": "string"
},
"type": {
"default": "image",
"description": "The type of asset - set to `image` for images.",
"type": "string"
}
},
"required": [
"type",
"src"
],
"type": "object"
},
"LumaAsset": {
"description": "The LumaAsset is used to create luma matte masks, transitions and effects between other assets. A luma matte is a grey scale image or animated video where the black areas are transparent and the white areas solid. The luma matte animation should be provided as an mp4 video file. The src must be a publicly accessible URL to the file.",
"properties": {
"src": {
"description": "The luma matte source URL. The URL must be publicly accessible or include credentials.",
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/mask.mp4",
"type": "string"
},
"trim": {
"description": "The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached.",
"type": "number"
},
"type": {
"default": "luma",
"description": "The type of asset - set to `luma` for luma mattes.",
"type": "string"
}
},
"required": [
"type",
"src"
],
"type": "object"
},
"Offset": {
"description": "Offsets the position of an asset horizontally or vertically by a relative distance.",
"properties": {
"x": {
"default": 0,
"description": "Offset an asset on the horizontal axis (left or right), range varies from -1 to 1. Positive numbers move the asset right, negative left. For all assets except titles the distance moved is relative to the width of the viewport - i.e. an X offset of 0.5 will move the asset half the screen width to the right.",
"example": 0.1,
"format": "float",
"maximum": 1,
"minimum": -1,
"type": "number"
},
"y": {
"default": 0,
"description": "Offset an asset on the vertical axis (up or down), range varies from -1 to 1. Positive numbers move the asset up, negative down. For all assets except titles the distance moved is relative to the height of the viewport - i.e. an Y offset of 0.5 will move the asset up half the screen height.",
"example": -0.2,
"format": "float",
"maximum": 1,
"minimum": -1,
"type": "number"
}
},
"type": "object"
},
"Output": {
"description": "The output format, render range and type of media to generate.",
"properties": {
"aspectRatio": {
"description": "The aspect ratio (shape) of the video or image. Useful for social media output formats. Options are: <ul>\n <li>`16:9` - regular landscape/horizontal aspect ratio (default)</li>\n <li>`9:16` - vertical/portrait aspect ratio</li>\n <li>`1:1` - square aspect ratio</li>\n <li>`4:5` - short vertical/portrait aspect ratio</li>\n <li>`4:3` - legacy TV aspect ratio</li>\n</ul>",
"enum": [
"16:9",
"9:16",
"1:1",
"4:5",
"4:3"
],
"example": "16:9",
"type": "string"
},
"destinations": {
"description": "A destination is a location where output files can be sent to for serving or hosting. By default all rendered assets are automatically sent to the Shotstack hosting destination. [DestinationShotstack](/#tocs_shotstackdestination) is currently the only option with plans to add more in the future such as S3, YouTube, Vimeo and Mux. If you do not require hosting you can opt-out using the `exclude` property.",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/ShotstackDestination"
}
]
},
"type": "array"
},
"format": {
"description": "The output format and type of media file to generate. <ul>\n <li>`mp4` - mp4 video file</li>\n <li>`gif` - animated gif</li>\n <li>`jpg` - jpg image file</li>\n <li>`png` - png image file</li>\n <li>`bmp` - bmp image file</li>\n <li>`mp3` - mp3 audio file (audio only)</li>\n</ul>",
"enum": [
"mp4",
"gif",
"mp3",
"jpg",
"png",
"bmp"
],
"example": "mp4",
"type": "string"
},
"fps": {
"default": 25,
"description": "Override the default frames per second. Useful for when the source footage is recorded at 30fps, i.e. on mobile devices. Lower frame rates can be used to add cinematic quality (24fps) or to create smaller file size/faster render times or animated gifs (12 or 15fps). Default is 25fps. <ul>\n <li>`12` - 12fps</li>\n <li>`15` - 15fps</li>\n <li>`24` - 24fps</li>\n <li>`25` - 25fps</li>\n <li>`30` - 30fps</li>\n</ul>",
"enum": [
12,
15,
24,
25,
30
],
"example": 25,
"type": "integer"
},
"poster": {
"$ref": "#/components/schemas/Poster",
"description": "Generate a poster image from a specific point on the timeline."
},
"quality": {
"default": "medium",
"description": "Adjust the output quality of the video, image or audio. Adjusting quality affects render speed, download speeds and storage requirements due to file size. The default `medium` provides the most optimized choice for all three factors. <ul>\n <li>`low` - slightly reduced quality, smaller file size</li>\n <li>`medium` - optimized quality, render speeds and file size</li>\n <li>`high` - slightly increased quality, larger file size</li>\n</ul>",
"enum": [
"low",
"medium",
"high"
],
"example": "medium",
"type": "string"
},
"range": {
"$ref": "#/components/schemas/Range"
},
"resolution": {
"description": "The output resolution of the video or image. <ul>\n <li>`preview` - 512px x 288px @ 15fps</li>\n <li>`mobile` - 640px x 360px @ 25fps</li>\n <li>`sd` - 1024px x 576px @ 25fps</li>\n <li>`hd` - 1280px x 720px @ 25fps</li>\n <li>`1080` - 1920px x 1080px @ 25fps</li>\n</ul>",
"enum": [
"preview",
"mobile",
"sd",
"hd",
"1080"
],
"example": "sd",
"type": "string"
},
"scaleTo": {
"description": "Override the resolution and scale the video or image to render at a different size. When using scaleTo the asset should be edited at the resolution dimensions, i.e. use font sizes that look best at HD, then use scaleTo to output the file at SD and the text will be scaled to the correct size. This is useful if you want to create multiple asset sizes. <ul>\n <li>`preview` - 512px x 288px @ 15fps</li>\n <li>`mobile` - 640px x 360px @ 25fps</li>\n <li>`sd` - 1024px x 576px @25fps</li>\n <li>`hd` - 1280px x 720px @25fps</li>\n <li>`1080` - 1920px x 1080px @25fps</li>\n</ul>",
"enum": [
"preview",
"mobile",
"sd",
"hd",
"1080"
],
"type": "string"
},
"size": {
"$ref": "#/components/schemas/Size"
},
"thumbnail": {
"$ref": "#/components/schemas/Thumbnail",
"description": "Generate a thumbnail image from a specific point on the timeline."
}
},
"required": [
"format"
],
"type": "object"
},
"Poster": {
"description": "Generate a poster image for the video at a specific point from the timeline. The poster image size will match the size of the output video.",
"properties": {
"capture": {
"description": "The point on the timeline in seconds to capture a single frame to use as the poster image.",
"example": 1,
"type": "number"
}
},
"required": [
"capture"
],
"type": "object"