-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
3670 lines (3670 loc) · 170 KB
/
openapi.json
File metadata and controls
3670 lines (3670 loc) · 170 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.1.0",
"info": {
"title": "RunwayML API",
"version": "2024-11-06",
"description": "The API makes generative AI models available, at the same credits prices listed here ($0.01 per credit): https://help.runwayml.com/hc/en-us/articles/15124877443219-How-do-credits-work"
},
"paths": {
"/v1/tasks/{id}": {
"get": {
"tags": [
"Task management"
],
"summary": "Get task detail",
"description": "Return details about a task. Consumers of this API should not expect updates more frequent than once every five seconds for a given task.",
"x-codeSamples": [
{
"lang": "TypeScript",
"label": "Node SDK",
"source": "// npm install --save @runwayml/sdk\nimport RunwayML from '@runwayml/sdk';\n\n// The env var RUNWAYML_API_SECRET is expected to contain your API key.\nconst client = new RunwayML();\n\n// Fetch the current state of the task:\nconst task = await client.tasks.retrieve(\n '17f20503-6c24-4c16-946b-35dbbce2af2f'\n);\n\n// Or, wait for the task to succeed or fail:\nconst task = await client.tasks\n .retrieve('17f20503-6c24-4c16-946b-35dbbce2af2f')\n .waitForTaskOutput();"
},
{
"lang": "Python",
"label": "Python SDK",
"source": "# pip install runwayml\nfrom runwayml import RunwayML\n\n# The env var RUNWAYML_API_SECRET is expected to contain your API key.\nclient = RunwayML()\n\ntask_id = '17f20503-6c24-4c16-946b-35dbbce2af2f'\n\n# Fetch the current state of the task:\ntask = client.tasks.retrieve(id=task_id)\nprint(task)\n\n# Or, wait for the task to succeed or fail:\ntask = client.tasks.retrieve(id=task_id).wait_for_task_output()\nprint(task)"
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
},
"description": "The ID of a previously-submitted task that has not been canceled or deleted."
},
{
"$ref": "#/components/parameters/X-Runway-Version"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"description": "A pending task",
"type": "object",
"properties": {
"id": {
"description": "The ID of the task being returned.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
},
"createdAt": {
"description": "The timestamp that the task was submitted at.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"status": {
"type": "string",
"const": "PENDING"
}
},
"required": [
"id",
"createdAt",
"status"
],
"additionalProperties": false
},
{
"description": "A throttled task",
"type": "object",
"properties": {
"id": {
"description": "The ID of the task being returned.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
},
"createdAt": {
"description": "The timestamp that the task was submitted at.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"status": {
"type": "string",
"const": "THROTTLED"
}
},
"required": [
"id",
"createdAt",
"status"
],
"additionalProperties": false
},
{
"description": "A cancelled or deleted task",
"type": "object",
"properties": {
"id": {
"description": "The ID of the task being returned.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
},
"createdAt": {
"description": "The timestamp that the task was submitted at.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"status": {
"type": "string",
"const": "CANCELLED"
}
},
"required": [
"id",
"createdAt",
"status"
],
"additionalProperties": false
},
{
"description": "A running task",
"type": "object",
"properties": {
"id": {
"description": "The ID of the task being returned.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
},
"createdAt": {
"description": "The timestamp that the task was submitted at.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"status": {
"type": "string",
"const": "RUNNING"
},
"progress": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"id",
"createdAt",
"status",
"progress"
],
"additionalProperties": false
},
{
"description": "A failed task",
"type": "object",
"properties": {
"id": {
"description": "The ID of the task being returned.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
},
"createdAt": {
"description": "The timestamp that the task was submitted at.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"status": {
"type": "string",
"const": "FAILED"
},
"failure": {
"description": "A human-friendly reason for the failure. We do not recommend returning this to users directly without adding context.",
"type": "string"
},
"failureCode": {
"description": "A machine-readable error code for the failure. See https://docs.dev.runwayml.com/errors/task-failures/ for more information.",
"type": "string"
}
},
"required": [
"id",
"createdAt",
"status",
"failure"
],
"additionalProperties": false
},
{
"description": "A succeeded task",
"type": "object",
"properties": {
"id": {
"description": "The ID of the task being returned.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
},
"createdAt": {
"description": "The timestamp that the task was submitted at.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
},
"status": {
"type": "string",
"const": "SUCCEEDED"
},
"output": {
"description": "An array of URLs that return the output of the task. These URLs will expire within 24-48 hours; fetch the task again to get fresh URLs. It is expected that you download the assets at these URLs and store them in your own storage system.",
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
}
},
"required": [
"id",
"createdAt",
"status",
"output"
],
"additionalProperties": false
}
],
"discriminator": {
"propertyName": "status"
}
},
"examples": {
"pending": {
"title": "Pending task",
"summary": "An example of a pending task",
"value": {
"id": "17f20503-6c24-4c16-946b-35dbbce2af2f",
"status": "PENDING",
"createdAt": "2024-06-27T19:49:32.334Z"
}
},
"throttled": {
"title": "Throttled task",
"summary": "An example of a throttled task",
"value": {
"id": "355e42da-b3f9-4b65-9be2-fb10bda026fc",
"status": "THROTTLED",
"createdAt": "2024-06-27T19:49:32.335Z"
}
},
"running": {
"title": "Running task",
"summary": "An example of a running task",
"value": {
"id": "08388106-1b46-4f5c-bd46-1c1d7ee86892",
"status": "RUNNING",
"createdAt": "2024-06-27T19:49:32.335Z",
"progress": 0.2
}
},
"succeeded": {
"title": "Succeeded task",
"summary": "An example of a succeeded task",
"value": {
"id": "d2e3d1f4-1b3c-4b5c-8d46-1c1d7ee86892",
"status": "SUCCEEDED",
"createdAt": "2024-06-27T19:49:32.335Z",
"output": [
"https://example.com/output1.jpg",
"https://example.com/output2.jpg"
]
}
},
"failed": {
"title": "Failed task",
"summary": "An example of a failed task",
"value": {
"id": "6da960dd-ef88-40fc-9628-02e9b6a6a008",
"status": "FAILED",
"createdAt": "2024-06-27T19:49:32.335Z",
"failure": "The provided image was flagged by content moderation.",
"failureCode": "SAFETY.INPUT.IMAGE"
}
}
}
}
}
},
"404": {
"description": "The task does not exist, or was deleted or canceled.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
}
}
},
"delete": {
"tags": [
"Task management"
],
"summary": "Cancel or delete a task",
"description": "Tasks that are running, pending, or throttled can be canceled by invoking this method. Invoking this method for other tasks will delete them.\n\nThe output data associated with a deleted task will be deleted from persistent storage in accordance with our data retention policy. Aborted and deleted tasks will not be able to be fetched again in the future.",
"x-codeSamples": [
{
"lang": "TypeScript",
"label": "Node SDK",
"source": "// npm install --save @runwayml/sdk\nimport RunwayML from '@runwayml/sdk';\n\n// The env var RUNWAYML_API_SECRET is expected to contain your API key.\nconst client = new RunwayML();\n\nawait client.tasks.delete('17f20503-6c24-4c16-946b-35dbbce2af2f');"
},
{
"lang": "Python",
"label": "Python SDK",
"source": "# pip install runwayml\nfrom runwayml import RunwayML\n\n# The env var RUNWAYML_API_SECRET is expected to contain your API key.\nclient = RunwayML()\n\nclient.tasks.delete(id='17f20503-6c24-4c16-946b-35dbbce2af2f')"
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
},
"description": "The ID of a previously-submitted task that has not been canceled or deleted."
},
{
"$ref": "#/components/parameters/X-Runway-Version"
}
],
"responses": {
"204": {
"description": "This endpoint will produce a 204 No Content response indicating successful cancellation or deletion. Calling this endpoint for tasks which have already been deleted or aborted will result in a 404: for idempotency purposes, it is safe to ignore these 404 errors."
}
}
}
},
"/v1/image_to_video": {
"post": {
"tags": [
"Start generating"
],
"summary": "Image to video",
"description": "This endpoint will start a new task to generate a video from an image.",
"x-codeSamples": [
{
"lang": "TypeScript",
"label": "Node SDK",
"source": "// npm install --save @runwayml/sdk\nimport RunwayML from '@runwayml/sdk';\n\n// The env var RUNWAYML_API_SECRET is expected to contain your API key.\nconst client = new RunwayML();\n\nconst task = await client.imageToVideo\n .create({\n model: 'gen4_turbo',\n promptImage: 'https://example.com/bunny.jpg',\n promptText: 'A cute bunny hopping in a meadow',\n duration: 10,\n })\n .waitForTaskOutput();\n\nconsole.log(task);"
},
{
"lang": "Python",
"label": "Python SDK",
"source": "# pip install runwayml\nfrom runwayml import RunwayML\n\n# The env var RUNWAYML_API_SECRET is expected to contain your API key.\nclient = RunwayML()\n\ntask = client.image_to_video.create(\n model='gen4_turbo',\n prompt_image='https://example.com/bunny.jpg',\n prompt_text='A cute bunny hopping in a meadow',\n duration=10,\n).wait_for_task_output()\n\nprint(task)"
}
],
"parameters": [
{
"$ref": "#/components/parameters/X-Runway-Version"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"title": "gen4_turbo",
"type": "object",
"properties": {
"promptText": {
"description": "A non-empty string up to 1000 characters (measured in UTF-16 code units). This should describe in detail what should appear in the output.",
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"promptImage": {
"anyOf": [
{
"description": "A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.",
"example": "https://example.com/image.jpg",
"anyOf": [
{
"description": "A HTTPS URL.",
"example": "https://example.com/file",
"type": "string",
"minLength": 13,
"maxLength": 2048,
"pattern": "^https:\\/\\/.*"
},
{
"description": "A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.",
"example": "runway://<token>",
"type": "string",
"minLength": 13,
"maxLength": 5000,
"pattern": "^runway:\\/\\/.*"
},
{
"description": "A data URI containing encoded media.",
"example": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "string",
"minLength": 13,
"maxLength": 5242880,
"pattern": "^data:image\\/.*"
}
]
},
{
"title": "PromptImages",
"description": "An array of objects representing images to be used in the output video. Only a `first` frame is supported.",
"minItems": 1,
"maxItems": 1,
"type": "array",
"items": {
"title": "PromptImage",
"x-stainless-variantName": "PromptImage",
"type": "object",
"properties": {
"uri": {
"description": "A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.",
"example": "https://example.com/image.jpg",
"anyOf": [
{
"description": "A HTTPS URL.",
"example": "https://example.com/file",
"type": "string",
"minLength": 13,
"maxLength": 2048,
"pattern": "^https:\\/\\/.*"
},
{
"description": "A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.",
"example": "runway://<token>",
"type": "string",
"minLength": 13,
"maxLength": 5000,
"pattern": "^runway:\\/\\/.*"
},
{
"description": "A data URI containing encoded media.",
"example": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "string",
"minLength": 13,
"maxLength": 5242880,
"pattern": "^data:image\\/.*"
}
]
},
"position": {
"description": "The position of the image in the output video. \"first\" will use the image as the first frame of the video.",
"type": "string",
"const": "first"
}
},
"required": [
"uri",
"position"
]
}
}
]
},
"seed": {
"description": "If unspecified, a random number is chosen. Varying the seed integer is a way to get different results for the same other request parameters. Using the same seed integer for an identical request will produce similar results.",
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"ratio": {
"description": "The resolution of the output video.",
"type": "string",
"enum": [
"1280:720",
"720:1280",
"1104:832",
"832:1104",
"960:960",
"1584:672"
]
},
"duration": {
"description": "The number of seconds of duration for the output video.",
"type": "integer",
"minimum": 2,
"maximum": 10
},
"contentModeration": {
"description": "Settings that affect the behavior of the content moderation system.",
"type": "object",
"properties": {
"publicFigureThreshold": {
"description": "When set to `low`, the content moderation system will be less strict about preventing generations that include recognizable public figures.",
"type": "string",
"enum": [
"auto",
"low"
]
}
}
},
"model": {
"type": "string",
"const": "gen4_turbo"
}
},
"required": [
"promptImage",
"ratio",
"model"
]
},
{
"title": "veo3.1",
"type": "object",
"properties": {
"promptText": {
"description": "A non-empty string up to 1000 characters (measured in UTF-16 code units). This should describe in detail what should appear in the output.",
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"promptImage": {
"description": "You may specify an image to use as the first frame of the output video, or an array with a first frame and optionally a last frame. This model does not support generating with only a last frame.",
"anyOf": [
{
"description": "A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.",
"example": "https://example.com/image.jpg",
"anyOf": [
{
"description": "A HTTPS URL.",
"example": "https://example.com/file",
"type": "string",
"minLength": 13,
"maxLength": 2048,
"pattern": "^https:\\/\\/.*"
},
{
"description": "A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.",
"example": "runway://<token>",
"type": "string",
"minLength": 13,
"maxLength": 5000,
"pattern": "^runway:\\/\\/.*"
},
{
"description": "A data URI containing encoded media.",
"example": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "string",
"minLength": 13,
"maxLength": 5242880,
"pattern": "^data:image\\/.*"
}
]
},
{
"title": "PromptImages",
"description": "An array of objects representing images to be used in the output video. No two provided images may have the same `position` value.",
"example": [
{
"uri": "https://example.com/firstFrame.jpg",
"position": "first"
},
{
"uri": "https://example.com/lastFrame.jpg",
"position": "last"
}
],
"minItems": 1,
"maxItems": 2,
"type": "array",
"items": {
"title": "PromptImage",
"x-stainless-variantName": "PromptImage",
"type": "object",
"properties": {
"uri": {
"description": "A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.",
"example": "https://example.com/image.jpg",
"anyOf": [
{
"description": "A HTTPS URL.",
"example": "https://example.com/file",
"type": "string",
"minLength": 13,
"maxLength": 2048,
"pattern": "^https:\\/\\/.*"
},
{
"description": "A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.",
"example": "runway://<token>",
"type": "string",
"minLength": 13,
"maxLength": 5000,
"pattern": "^runway:\\/\\/.*"
},
{
"description": "A data URI containing encoded media.",
"example": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "string",
"minLength": 13,
"maxLength": 5242880,
"pattern": "^data:image\\/.*"
}
]
},
"position": {
"description": "The position of the image in the output video. \"first\" will use the image as the first frame of the video, \"last\" will use the image as the last frame of the video.",
"type": "string",
"enum": [
"first",
"last"
]
}
},
"required": [
"uri",
"position"
]
}
}
]
},
"ratio": {
"description": "The resolution of the output video.",
"type": "string",
"enum": [
"1280:720",
"720:1280",
"1080:1920",
"1920:1080"
]
},
"audio": {
"description": "Whether to generate audio for the video. Audio inclusion affects pricing.",
"default": true,
"type": "boolean"
},
"duration": {
"description": "The number of seconds of duration for the output video.",
"type": "number",
"enum": [
4,
6,
8
]
},
"model": {
"type": "string",
"const": "veo3.1"
}
},
"required": [
"promptImage",
"ratio",
"model"
]
},
{
"title": "gen3a_turbo",
"type": "object",
"properties": {
"promptText": {
"description": "A non-empty string up to 1000 characters (measured in UTF-16 code units). This should describe in detail what should appear in the output.",
"example": "A beautiful sunset over a calm ocean.",
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"promptImage": {
"anyOf": [
{
"description": "A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.",
"example": "https://example.com/image.jpg",
"anyOf": [
{
"description": "A HTTPS URL.",
"example": "https://example.com/file",
"type": "string",
"minLength": 13,
"maxLength": 2048,
"pattern": "^https:\\/\\/.*"
},
{
"description": "A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.",
"example": "runway://<token>",
"type": "string",
"minLength": 13,
"maxLength": 5000,
"pattern": "^runway:\\/\\/.*"
},
{
"description": "A data URI containing encoded media.",
"example": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "string",
"minLength": 13,
"maxLength": 5242880,
"pattern": "^data:image\\/.*"
}
]
},
{
"title": "PromptImages",
"description": "An array of objects representing images to be used in the output video. No two provided images may have the same `position` value.",
"example": [
{
"uri": "https://example.com/firstFrame.jpg",
"position": "first"
},
{
"uri": "https://example.com/lastFrame.jpg",
"position": "last"
}
],
"minItems": 1,
"maxItems": 2,
"type": "array",
"items": {
"title": "PromptImage",
"x-stainless-variantName": "PromptImage",
"type": "object",
"properties": {
"uri": {
"description": "A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.",
"example": "https://example.com/image.jpg",
"anyOf": [
{
"description": "A HTTPS URL.",
"example": "https://example.com/file",
"type": "string",
"minLength": 13,
"maxLength": 2048,
"pattern": "^https:\\/\\/.*"
},
{
"description": "A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.",
"example": "runway://<token>",
"type": "string",
"minLength": 13,
"maxLength": 5000,
"pattern": "^runway:\\/\\/.*"
},
{
"description": "A data URI containing encoded media.",
"example": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "string",
"minLength": 13,
"maxLength": 5242880,
"pattern": "^data:image\\/.*"
}
]
},
"position": {
"description": "The position of the image in the output video. \"first\" will use the image as the first frame of the video, \"last\" will use the image as the last frame of the video.",
"type": "string",
"enum": [
"first",
"last"
]
}
},
"required": [
"uri",
"position"
]
}
}
]
},
"seed": {
"description": "If unspecified, a random number is chosen. Varying the seed integer is a way to get different results for the same other request parameters. Using the same seed integer for an identical request will produce similar results.",
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"duration": {
"description": "The duration of the output video in seconds.",
"example": 5,
"default": 10,
"type": "number",
"enum": [
5,
10
]
},
"ratio": {
"description": "The resolution of the output video.",
"example": "1280:768",
"type": "string",
"enum": [
"768:1280",
"1280:768"
]
},
"contentModeration": {
"description": "Settings that affect the behavior of the content moderation system.",
"example": {
"publicFigureThreshold": "auto"
},
"type": "object",
"properties": {
"publicFigureThreshold": {
"description": "When set to `low`, the content moderation system will be less strict about preventing generations that include recognizable public figures.",
"type": "string",
"enum": [
"auto",
"low"
]
}
}
},
"model": {
"type": "string",
"const": "gen3a_turbo"
}
},
"required": [
"promptText",
"promptImage",
"model"
]
},
{
"title": "veo3.1_fast",
"type": "object",
"properties": {
"promptText": {
"description": "A non-empty string up to 1000 characters (measured in UTF-16 code units). This should describe in detail what should appear in the output.",
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"promptImage": {
"description": "You may specify an image to use as the first frame of the output video, or an array with a first frame and optionally a last frame. This model does not support generating with only a last frame.",
"anyOf": [
{
"description": "A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.",
"example": "https://example.com/image.jpg",
"anyOf": [
{
"description": "A HTTPS URL.",
"example": "https://example.com/file",
"type": "string",
"minLength": 13,
"maxLength": 2048,
"pattern": "^https:\\/\\/.*"
},
{
"description": "A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.",
"example": "runway://<token>",
"type": "string",
"minLength": 13,
"maxLength": 5000,
"pattern": "^runway:\\/\\/.*"
},
{
"description": "A data URI containing encoded media.",
"example": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "string",
"minLength": 13,
"maxLength": 5242880,
"pattern": "^data:image\\/.*"
}
]
},
{
"title": "PromptImages",
"description": "An array of objects representing images to be used in the output video. No two provided images may have the same `position` value.",
"example": [
{
"uri": "https://example.com/firstFrame.jpg",
"position": "first"
},
{
"uri": "https://example.com/lastFrame.jpg",
"position": "last"
}
],
"minItems": 1,
"maxItems": 2,
"type": "array",
"items": {
"title": "PromptImage",
"x-stainless-variantName": "PromptImage",
"type": "object",
"properties": {
"uri": {
"description": "A HTTPS URL, Runway or data URI containing an encoded image. See [our docs](/assets/inputs#images) on image inputs for more information.",
"example": "https://example.com/image.jpg",
"anyOf": [
{
"description": "A HTTPS URL.",
"example": "https://example.com/file",
"type": "string",
"minLength": 13,
"maxLength": 2048,
"pattern": "^https:\\/\\/.*"
},
{
"description": "A Runway upload URI. See https://docs.dev.runwayml.com/assets/uploads for more information.",
"example": "runway://<token>",
"type": "string",
"minLength": 13,
"maxLength": 5000,
"pattern": "^runway:\\/\\/.*"
},
{
"description": "A data URI containing encoded media.",
"example": "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"type": "string",
"minLength": 13,
"maxLength": 5242880,
"pattern": "^data:image\\/.*"
}
]
},
"position": {
"description": "The position of the image in the output video. \"first\" will use the image as the first frame of the video, \"last\" will use the image as the last frame of the video.",
"type": "string",
"enum": [
"first",
"last"
]
}
},
"required": [
"uri",
"position"
]
}
}
]
},
"ratio": {
"description": "The resolution of the output video.",
"type": "string",
"enum": [
"1280:720",
"720:1280",
"1080:1920",
"1920:1080"
]
},
"audio": {
"description": "Whether to generate audio for the video. Audio inclusion affects pricing.",
"default": true,
"type": "boolean"
},
"duration": {
"description": "The number of seconds of duration for the output video.",
"type": "number",
"enum": [
4,
6,
8
]
},
"model": {
"type": "string",
"const": "veo3.1_fast"
}
},
"required": [
"promptImage",
"ratio",
"model"
]
},
{
"title": "veo3",