-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbeatapi.yaml
More file actions
3805 lines (3750 loc) · 169 KB
/
Copy pathbeatapi.yaml
File metadata and controls
3805 lines (3750 loc) · 169 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: BeatAPI Developer API
version: 1.0.0-launch
license:
name: BeatAPI Terms of Service
url: https://beatapi.io/terms-of-service
description: |
BeatAPI provides one API key for public text models, image generation, video generation,
video analysis, Effects, asynchronous video workflows, and short-lived Realtime Video Sessions.
For asynchronous operations, create a task, poll the shared task endpoint or receive webhook events,
and read hosted output URLs from `output.media`. For Realtime, create a Session on a trusted server
with your Bearer API key and pass only the returned short-lived `client_secret` to the browser.
Customer balances and usage are USD-denominated. Compatibility fields such
as `credit_balance` and `credits_reserved` remain in the API; 1 Credit = $1 USD.
## 5 minute Quick Start
1. Set your base URL to `https://api.beatapi.io`.
2. Create an API key in [Dashboard → API Keys](https://beatapi.io/dashboard/apikeys)
and send it as
`Authorization: Bearer <BEATAPI_API_KEY>`.
USD balance top-ups are available from
[Dashboard → Billing](https://beatapi.io/dashboard/billing).
3. Use public HTTPS URLs for input media. If your files are local, upload
them with `POST /v1/files` first.
4. Create a workflow task.
5. Poll every 5-10 seconds until `status` is `succeeded` or `failed`.
6. Add webhooks later if you do not want to poll.
```bash
read -rsp "BeatAPI API key: " BEATAPI_API_KEY && echo
export BEATAPI_API_KEY
curl https://api.beatapi.io/v1/workflows
curl https://api.beatapi.io/v1/music-video/tasks \
-H "Authorization: Bearer $BEATAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"images": ["https://media.beatapi.io/samples/neon-singer.png"],
"audio_url": "https://media.beatapi.io/samples/neon-singer-preview.mp3",
"prompt": "Neon rooftop performance with cinematic light trails.",
"language": "en",
"resolution": "720p"
}'
curl https://api.beatapi.io/v1/tasks/task_8K2qA \
-H "Authorization: Bearer $BEATAPI_API_KEY"
```
## How tasks work
A task starts as `queued` or `processing`. Keep polling
`GET /v1/tasks/{task_id}` every 5-10 seconds with a little jitter. Stop when
the task is `succeeded` or `failed`.
- `queued`: accepted and waiting for platform capacity.
- `processing`: generation is running.
- `storyboard_ready`: Music Video storyboard shots are available.
- `requires_action`: choose storyboard shots and call compose.
- `editing`: a storyboard shot edit is running.
- `composing`: selected storyboard shots are being composed.
- `succeeded`: output is ready in `output.media[]`.
- `failed`: no usable output was produced. Inspect `error_code`,
`error_message`, and `usage` for the final task result.
The current 10 minute processing window is an operational timeout for launch
testing, not a completion SLA.
## Inputs and limits
Public workflow inputs must use HTTPS URLs that are reachable from the
public internet. Localhost, private network URLs, and data URLs are rejected.
Use `POST /v1/files` for local images, audio, subtitles, or Motion Control reference videos.
Each verified new user account starts with a $2 welcome balance that never expires and
1 active processing concurrency. Lifetime paid purchases unlock higher limits:
$10+ = 2, $100+ = 5, $1,000+ = 10, $5,000+ = 15, and $20,000+ = 30.
`GET /v1/usage` returns current usage totals, concurrency limit, and active
processing task count. Active concurrency measures tasks that are currently
using BeatAPI processing resources. storyboard_ready and requires_action
tasks can have settled USD usage but do not count toward active processing
concurrency.
## Webhooks are optional
Polling is the simplest integration path. If you add webhooks, BeatAPI sends
`task.succeeded` and `task.failed` events. Webhook delivery failures do not
change task status; polling remains the source of truth.
servers:
- url: https://api.beatapi.io
externalDocs:
description: BeatAPI documentation
url: https://docs.beatapi.io
tags:
- name: Workflows
description: Discover the workflow IDs available for task creation.
- name: Music Video
description: Create music video tasks from images, audio, and optional creative controls.
- name: Effects
description: Discover versioned effects and create image or video effect tasks.
- name: Generation
description: Discover BeatAPI generation models and create image or video tasks.
- name: Text
description: Discover enabled text models and call them through OpenAI, Anthropic, or Gemini-compatible request formats.
- name: Ecommerce Video
description: Create product ad video tasks from product images and duration.
- name: Video Analysis
description: Analyze uploaded videos with standard or deep multimodal reasoning.
- name: Tasks
description: Poll task status and read output URLs.
- name: Usage
description: Inspect task totals and account concurrency.
- name: Realtime Video
description: Create and manage short-lived BeatAPI browser sessions for live AI video effects.
- name: Files
description: Upload local assets and use the returned HTTPS URL as workflow input.
- name: Webhooks
description: Manage optional completion callbacks.
webhooks:
taskCompleted:
post:
operationId: receiveBeatApiTaskEvent
x-fern-ignore: true
tags: [Webhooks]
summary: Receive a BeatAPI task completion event
description: |
BeatAPI sends this request to each active endpoint subscribed to the event.
Verify `x-beatapi-signature` against the exact request body and use polling
as the source of truth if delivery is delayed or fails.
security: []
parameters:
- in: header
name: x-beatapi-event
required: true
schema: { type: string, enum: [task.succeeded, task.failed] }
- in: header
name: x-beatapi-timestamp
required: true
schema: { type: string }
- in: header
name: x-beatapi-signature
required: true
schema: { type: string }
requestBody:
required: true
content:
application/json:
schema: { $ref: '#/components/schemas/WebhookEvent' }
example:
id: evt_123
event: task.succeeded
created_at: 1782210300
data:
id: task_8K2qA
object: task
task_kind: video
capability_id: seedance-2.5
capability_version: null
media_type: video
model: seedance-2.5
status: succeeded
stage: succeeded
created_at: 1782210000
updated_at: 1782210300
completed_at: 1782210300
output:
media:
- type: video
url: https://media.beatapi.io/outputs/task_8K2qA/0.mp4
mime_type: video/mp4
r2_url: https://media.beatapi.io/outputs/task_8K2qA/0.mp4
usage:
credits_reserved: 1.55
credits_charged: 1.55
billable_duration_seconds: 5
credits_settled: 1.55
credits_refunded: 0
request_id: req_abc123
error_code: null
error_message: null
responses:
'200': { description: Event accepted }
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: sk_xxx
description: 'Send your API key as `Authorization: Bearer <BEATAPI_API_KEY>`.'
ApiKeyHeader:
type: apiKey
in: header
name: x-api-key
description: Anthropic-compatible API key header. Use a BeatAPI API key.
GoogleApiKeyHeader:
type: apiKey
in: header
name: x-goog-api-key
description: Gemini-compatible API key header. Use a BeatAPI API key.
GoogleApiKeyQuery:
type: apiKey
in: query
name: key
description: Gemini SDK compatibility only. Prefer the x-goog-api-key header when possible.
schemas:
TextModelId:
type: string
description: Public text model id exposed by BeatAPI. Call GET /v1/models to discover the models enabled for your environment.
TextModel:
type: object
additionalProperties: false
required: [id, object, created, owned_by]
properties:
id: { $ref: '#/components/schemas/TextModelId' }
object: { type: string, const: model }
created: { type: integer, example: 1788220800 }
owned_by: { type: string, const: beatapi }
TextModelList:
type: object
additionalProperties: false
required: [object, data]
properties:
object: { type: string, const: list }
data:
type: array
items: { $ref: '#/components/schemas/TextModel' }
TextPassthroughRequest:
type: object
description: SDK-compatible text request. BeatAPI preserves supported provider-format fields and streams the matching response format back.
required: [model]
properties:
model: { $ref: '#/components/schemas/TextModelId' }
additionalProperties: true
TextPassthroughResponse:
type: object
description: Response body in the selected SDK-compatible wire format.
additionalProperties: true
Workflow:
type: object
required: [id, object, name, description]
properties:
id:
type: string
enum: [music-video, ecommerce-video, video-analysis]
example: music-video
object:
type: string
enum: [workflow]
name:
type: string
example: Music Video API
description:
type: string
TaskStatus:
type: string
enum: [queued, processing, storyboard_ready, requires_action, editing, composing, succeeded, failed]
StoryboardShot:
type: object
required: [id, index, status, created_at, updated_at]
properties:
id:
type: string
description: BeatAPI shot id. Use this id for media retrieval, edit, and compose operations.
example: shot_xxx
index:
type: integer
description: Zero-based shot order in the storyboard.
example: 0
status:
$ref: '#/components/schemas/TaskStatus'
description: Current lifecycle state for this storyboard shot.
duration_seconds:
type: integer
description: Planned or generated shot duration in seconds.
example: 5
prompt:
type: string
description: Creative instruction used to generate this shot.
example: Opening lyric shot.
lyric_text:
type: string
description: Lyric segment aligned with this shot when available.
example: Intro
media:
type: object
description: Present only after the shot media has been materialized or after a shot edit finishes.
properties:
type:
type: string
description: Hosted media type for the materialized shot.
example: video
url:
type: string
format: uri
description: BeatAPI-hosted HTTPS URL for the materialized shot.
example: https://media.beatapi.io/outputs/task_8K2qA/shots/0.mp4
mime_type:
type: string
description: MIME type of the hosted shot media.
example: video/mp4
created_at:
type: integer
description: Unix timestamp when the shot record was created.
example: 1782210000
updated_at:
type: integer
description: Unix timestamp when the shot record last changed.
example: 1782210300
Storyboard:
type: object
required: [shots]
properties:
shots:
type: array
description: Ordered Music Video storyboard shots. The array may be empty before storyboard generation completes.
items:
$ref: '#/components/schemas/StoryboardShot'
ShotMedia:
type: object
required: [object, task_id, shot_id, index, status, media, created_at, updated_at, request_id]
properties:
object:
type: string
enum: [shot_media]
task_id:
type: string
example: task_8K2qA
shot_id:
type: string
example: shot_xxx
index:
type: integer
example: 0
status:
$ref: '#/components/schemas/TaskStatus'
media:
type: object
required: [type, url, mime_type]
properties:
type:
type: string
enum: [video]
url:
type: string
format: uri
example: https://media.beatapi.io/outputs/task_8K2qA/shots/shot_xxx/current.mp4
mime_type:
type: string
example: video/mp4
created_at:
type: integer
example: 1782210000
updated_at:
type: integer
example: 1782210300
request_id:
type: string
example: req_abc123
TaskUsage:
type: object
required: [credits_reserved, credits_settled, credits_refunded, credits_charged]
properties:
credits_reserved:
type: number
format: double
multipleOf: 0.01
description: USD amount reserved for this task. The compatibility field name is retained; 1 Credit equals $1 USD.
credits_charged:
type: number
format: double
multipleOf: 0.01
description: USD amount charged when the task or operation is accepted.
billable_duration_seconds:
type: integer
description: Server-detected or request-declared billable duration used for USD calculation.
credits_settled:
type: number
format: double
multipleOf: 0.01
description: USD amount settled after successful work.
credits_refunded:
type: number
format: double
multipleOf: 0.01
description: USD amount refunded after failed eligible work.
Task:
type: object
required: [id, object, task_kind, capability_id, capability_version, status, stage, created_at, updated_at, completed_at, output, usage, request_id, error_code, error_message]
properties:
id:
type: string
description: Stable BeatAPI task ID used for polling and support.
example: task_8K2qA
object:
type: string
enum: [task]
description: Object discriminator; always `task`.
task_kind:
type: string
enum: [workflow, effect, image, video]
description: Public task family that determines which capability fields are present.
capability_id:
type: string
description: Stable BeatAPI workflow, Effect, or generation model ID selected when the task was accepted.
capability_version:
type: [integer, 'null']
description: Immutable capability version used by this task. Legacy workflow rows are returned as version 1.
workflow:
type: string
enum: [music-video, ecommerce-video, video-analysis]
description: Present for workflow tasks; identifies the selected BeatAPI workflow.
example: music-video
effect_id:
type: string
description: Present for Effect tasks; stable selected Effect ID.
example: video-muscle-max
effect_version:
type: integer
description: Present for Effect tasks; immutable Effect version used for processing.
example: 1
media_type:
type: string
enum: [image, video]
description: Present when task_kind is image or video.
model:
type: string
description: Stable BeatAPI model alias. It is independent from internal execution routing.
status:
$ref: '#/components/schemas/TaskStatus'
description: Current task lifecycle status. Stop polling at `succeeded` or `failed`; Music Video can also require manual action.
stage:
$ref: '#/components/schemas/TaskStatus'
description: Current processing stage, exposed separately so workflow progress can be tracked.
storyboard:
$ref: '#/components/schemas/Storyboard'
description: Music Video storyboard metadata when available.
created_at:
type: integer
description: Unix timestamp when BeatAPI accepted the task.
updated_at:
type: integer
description: Unix timestamp of the latest task update.
completed_at:
type: [integer, 'null']
description: Terminal Unix timestamp, or null while work is in progress.
output:
description: Output is null until the task succeeds.
oneOf:
- type: 'null'
- type: object
required: [media, r2_url]
properties:
media:
type: array
description: BeatAPI-hosted result assets.
items:
type: object
required: [type, url, mime_type]
properties:
type:
type: string
enum: [image, video]
description: Result asset type.
url:
type: string
format: uri
description: BeatAPI-hosted HTTPS result URL.
mime_type:
type: string
description: Result asset MIME type.
examples: [video/mp4, image/png, image/jpeg, image/webp]
r2_url:
type: string
format: uri
description: Primary BeatAPI-hosted result URL for clients that need one canonical asset.
- type: object
required: [text, usage, finish_reason]
properties:
text:
type: string
description: Completed video analysis text.
usage:
type: object
description: Measured token usage used for final USD settlement.
required: [input_tokens, output_tokens, total_tokens]
properties:
input_tokens:
type: integer
minimum: 0
description: Tokens consumed by the prompt and video input.
output_tokens:
type: integer
minimum: 0
description: Tokens consumed by visible output and model reasoning.
total_tokens:
type: integer
minimum: 0
description: Total measured input and output tokens.
finish_reason:
type: [string, 'null']
description: Upstream-compatible completion reason.
usage:
$ref: '#/components/schemas/TaskUsage'
description: USD reservation, settlement, refund, and optional billable duration for this task.
request_id:
type: string
description: Correlation ID to retain for logs and BeatAPI support.
example: req_abc123
error_code:
type: [string, 'null']
description: Machine-readable terminal failure code, or null when no task failure is recorded.
example: processing_timeout
error_message:
type: [string, 'null']
description: Human-readable terminal failure detail, or null when no task failure is recorded.
Effect:
type: object
required: [id, object, name, description, output_type, category, tags, input, options, preview, version, status]
properties:
id: { type: string, example: video-muscle-max }
object: { type: string, enum: [effect] }
name: { type: string, example: Muscle Transformation }
description: { type: string }
output_type: { type: string, enum: [image, video] }
category: { type: string, example: transformation }
tags: { type: array, items: { type: string } }
input:
type: object
required: [images_min, images_max, accepted_types]
properties:
images_min: { type: integer, minimum: 1 }
images_max: { type: integer, minimum: 1 }
accepted_types:
type: array
items: { type: string, enum: [image/jpeg, image/png, image/webp] }
max_size_mb:
type: integer
minimum: 1
description: Maximum downloaded bytes per input image. When omitted, BeatAPI enforces 50 MB.
max_dimension_px:
type: integer
minimum: 1
description: Maximum decoded width or height. BeatAPI inspects the actual image header before charging.
subject_requirements: { type: array, items: { type: string } }
options:
type: object
properties:
aspect_ratios: { type: array, items: { type: string } }
resolutions: { type: array, items: { type: string } }
duration_seconds: { type: array, items: { type: integer } }
bgm: { type: boolean }
seed: { type: boolean }
preview:
type: object
required: [cover_url, media_url]
properties:
cover_url: { type: [string, 'null'], format: uri }
media_url: { type: [string, 'null'], format: uri }
version: { type: integer, minimum: 1 }
status: { type: string, enum: [testing, active, paused] }
EffectResponse:
type: object
required: [data]
properties:
data: { $ref: '#/components/schemas/Effect' }
EffectListResponse:
type: object
required: [data]
properties:
data:
type: object
required: [object, data]
properties:
object: { type: string, enum: [list] }
data: { type: array, items: { $ref: '#/components/schemas/Effect' } }
File:
type: object
required: [id, object, url, key, mime_type, size_bytes, purpose, created_at]
properties:
id:
type: string
description: Stable uploaded file ID.
example: file_3xYz9
object:
type: string
enum: [file]
description: Object discriminator; always `file`.
url:
type: string
format: uri
description: Long-lived BeatAPI HTTPS URL to use in workflow or model requests.
example: https://media.beatapi.io/inputs/file_3xYz9.mp3
key:
type: string
description: BeatAPI storage key for support and diagnostics.
example: inputs/file_3xYz9.mp3
mime_type:
type: string
description: Accepted MIME type detected for the uploaded file.
example: audio/mpeg
size_bytes:
type: integer
description: Uploaded file size in bytes.
example: 1048576
audio_duration_seconds:
type: number
description: Present for uploaded audio files after server-side duration detection.
example: 64.02
audio_duration_source:
type: string
description: Duration detection method used for uploaded audio.
example: mp3_frame_scan
video_duration_seconds:
type: number
description: Present for MP4/MOV uploads after server-side container inspection.
example: 15.25
video_duration_source:
type: string
description: Duration and dimension detection method used for the uploaded video.
example: mp4_boxes
width:
type: integer
description: Detected pixel width for uploaded images and videos.
example: 720
height:
type: integer
description: Detected pixel height for uploaded images and videos.
example: 1280
purpose:
type: string
enum: [input]
description: File purpose; currently always `input`.
created_at:
type: integer
description: Unix timestamp when the file was stored.
example: 1782210000
WebhookEndpoint:
type: object
required: [id, object, url, description, events, status, secret, created_at, updated_at]
properties:
id:
type: string
description: Stable webhook endpoint ID used for get, update, and delete operations.
example: wh_9aBcD
object:
type: string
enum: [webhook_endpoint]
description: Object discriminator; always `webhook_endpoint`.
url:
type: string
format: uri
description: Public HTTPS callback URL receiving subscribed task events.
example: https://example.com/beatapi-webhook
description:
type: string
description: Account-defined label for the endpoint.
example: Production webhook
events:
type: array
description: Task event types delivered to this endpoint.
items:
type: string
enum: [task.succeeded, task.failed]
status:
type: string
enum: [active, disabled]
description: Delivery status. Disabled endpoints do not receive events.
secret:
type: string
description: Returned in full only when the endpoint is created. Later responses return a masked value.
example: whsec_example_masked
created_at:
type: integer
description: Unix timestamp when the endpoint was created.
updated_at:
type: integer
description: Unix timestamp when the endpoint last changed.
WebhookEvent:
type: object
required: [id, event, created_at, data]
properties:
id:
type: string
example: evt_123
event:
type: string
enum: [task.succeeded, task.failed]
created_at:
type: integer
data:
$ref: '#/components/schemas/Task'
WorkflowList:
type: object
required: [object, data]
properties:
object:
type: string
enum: [list]
data:
type: array
items:
$ref: '#/components/schemas/Workflow'
WorkflowListResponse:
type: object
required: [data]
properties:
data:
$ref: '#/components/schemas/WorkflowList'
GenerationModel:
type: object
additionalProperties: false
required: [id, object, name, media_type, input_modes]
properties:
id:
type: string
enum: [nano-banana, nano-banana-2, nano-banana-2-lite, nano-banana-pro, gpt-image-2, seedream-5-pro, grok-imagine-image-2.0, minimax-h3, grok-imagine-video-1.5, seedance-2, seedance-2-fast, seedance-2-mini, veo-3.1, seedance-2.5, kling-3, kling-2.6-motion-control, kling-3-motion-control, wan-3.0, wan-3.0-prime, happyhorse-1.0, happyhorse-1.1, minimax-h3-max, minimax-h3-max-turbo]
object: { type: string, enum: [generation_model] }
name: { type: string }
media_type: { type: string, enum: [image, video] }
input_modes:
type: array
items: { type: string, enum: [text, image, frames, reference] }
GenerationModelList:
type: object
required: [object, data]
properties:
object: { type: string, enum: [list] }
data:
type: array
items: { $ref: '#/components/schemas/GenerationModel' }
GenerationModelListResponse:
type: object
required: [data]
properties:
data: { $ref: '#/components/schemas/GenerationModelList' }
ImageGenerationTaskCreateRequest:
oneOf:
- $ref: '#/components/schemas/NanoBananaImageRequest'
- $ref: '#/components/schemas/NanoBanana2ImageRequest'
- $ref: '#/components/schemas/NanoBanana2LiteImageRequest'
- $ref: '#/components/schemas/NanoBananaProImageRequest'
- $ref: '#/components/schemas/GptImage2Request'
- $ref: '#/components/schemas/Seedream5ProImageRequest'
- $ref: '#/components/schemas/GrokImagineImage20Request'
discriminator:
propertyName: model
mapping:
nano-banana: '#/components/schemas/NanoBananaImageRequest'
nano-banana-2: '#/components/schemas/NanoBanana2ImageRequest'
nano-banana-2-lite: '#/components/schemas/NanoBanana2LiteImageRequest'
nano-banana-pro: '#/components/schemas/NanoBananaProImageRequest'
gpt-image-2: '#/components/schemas/GptImage2Request'
seedream-5-pro: '#/components/schemas/Seedream5ProImageRequest'
grok-imagine-image-2.0: '#/components/schemas/GrokImagineImage20Request'
NanoBananaImageRequest:
type: object
additionalProperties: false
required: [model, prompt]
properties:
model: { type: string, const: nano-banana, description: Must be `nano-banana`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Generation or image-editing instructions. }
images:
type: array
minItems: 1
maxItems: 10
description: Public HTTPS reference-image URLs. Omit for text-to-image.
items: { type: string, format: uri, pattern: '^https://' }
aspect_ratio:
type: string
enum: ['1:1', '9:16', '16:9', '3:4', '4:3', '3:2', '2:3', '5:4', '4:5', '21:9', auto]
default: '1:1'
description: Output image aspect ratio.
output_format: { type: string, enum: [png, jpeg], default: png, description: Output image file format. }
NanoBanana2ImageRequest:
type: object
additionalProperties: false
required: [model, prompt]
properties:
model: { type: string, const: nano-banana-2, description: Must be `nano-banana-2`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Generation or image-editing instructions. }
images:
type: array
minItems: 1
maxItems: 10
description: Public HTTPS reference-image URLs. Omit for text-to-image.
items: { type: string, format: uri, pattern: '^https://' }
aspect_ratio:
type: string
enum: ['1:1', '9:16', '16:9', '3:4', '4:3', '3:2', '2:3', '5:4', '4:5', '21:9', auto]
default: '1:1'
description: Output image aspect ratio.
resolution: { type: string, enum: [1K, 2K, 4K], default: 1K, description: Output resolution tier. }
output_format: { type: string, enum: [png, jpeg], default: png, description: Output image file format. }
NanoBanana2LiteImageRequest:
type: object
additionalProperties: false
required: [model, prompt]
properties:
model: { type: string, const: nano-banana-2-lite, description: Must be `nano-banana-2-lite`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Generation or image-editing instructions. }
images:
type: array
minItems: 1
maxItems: 10
description: Public HTTPS reference-image URLs. Omit for text-to-image.
items: { type: string, format: uri, pattern: '^https://' }
aspect_ratio:
type: string
enum: ['1:1', '9:16', '16:9', '3:4', '4:3', '3:2', '2:3', '5:4', '4:5', '21:9', auto]
default: '1:1'
description: Output image aspect ratio.
output_format: { type: string, enum: [png, jpeg], default: png, description: Output image file format. }
NanoBananaProImageRequest:
type: object
additionalProperties: false
required: [model, prompt]
properties:
model: { type: string, const: nano-banana-pro, description: Must be `nano-banana-pro`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Generation or image-editing instructions. }
images:
type: array
minItems: 1
maxItems: 8
description: Public HTTPS reference-image URLs. Omit for text-to-image.
items: { type: string, format: uri, pattern: '^https://' }
aspect_ratio:
type: string
enum: ['1:1', '2:3', '3:2', '3:4', '4:3', '4:5', '5:4', '9:16', '16:9', '21:9', auto]
default: '1:1'
description: Output image aspect ratio.
resolution: { type: string, enum: [1K, 2K, 4K], default: 1K, description: Output resolution tier. }
output_format: { type: string, enum: [png, jpg], default: png, description: Output image file format. }
GptImage2Request:
type: object
additionalProperties: false
required: [model, prompt]
properties:
model: { type: string, const: gpt-image-2, description: Must be `gpt-image-2`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Generation or image-editing instructions. }
images:
type: array
minItems: 1
maxItems: 16
description: Public HTTPS reference-image URLs. Omit for text-to-image.
items: { type: string, format: uri, pattern: '^https://' }
aspect_ratio:
type: string
enum: [auto, '1:1', '3:2', '2:3', '4:3', '3:4', '5:4', '4:5', '16:9', '9:16', '2:1', '1:2', '3:1', '1:3', '21:9', '9:21']
default: auto
description: Output image aspect ratio.
resolution: { type: string, enum: [1K, 2K, 4K], default: 1K, description: Output resolution tier. }
Seedream5ProImageRequest:
type: object
additionalProperties: false
required: [model, prompt]
properties:
model: { type: string, const: seedream-5-pro, description: Must be `seedream-5-pro`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Generation or image-editing instructions. }
images:
type: array
minItems: 1
maxItems: 10
description: Public HTTPS reference-image URLs. Omit for text-to-image.
items: { type: string, format: uri, pattern: '^https://' }
aspect_ratio:
type: string
enum: [auto, '1:1', '4:3', '3:4', '16:9', '9:16', '3:2', '2:3', '21:9']
default: '1:1'
description: Output image aspect ratio.
resolution: { type: string, enum: [1K, 2K, 4K], default: 1K, description: Output resolution tier. }
output_format: { type: string, enum: [png, jpeg], default: png, description: Output image file format. }
GrokImagineImage20Request:
type: object
additionalProperties: false
required: [model, prompt]
description: Omit `images` for text-to-image. Supply one to five images for editing; `auto` aspect ratio is available only when images are supplied.
properties:
model: { type: string, const: grok-imagine-image-2.0, description: Must be `grok-imagine-image-2.0`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Generation or image-editing instructions. }
images:
type: array
minItems: 1
maxItems: 5
description: Public HTTPS reference-image URLs. Omit for text-to-image.
items: { type: string, format: uri, pattern: '^https://' }
aspect_ratio:
type: string
enum: ['1:1', '2:3', '3:2', '16:9', '9:16', auto]
default: '1:1'
description: Output image aspect ratio. `auto` requires at least one image.
VideoGenerationTaskCreateRequest:
oneOf:
- $ref: '#/components/schemas/MinimaxH3VideoRequest'
- $ref: '#/components/schemas/GrokImagineVideo15Request'
- $ref: '#/components/schemas/Seedance2VideoRequest'
- $ref: '#/components/schemas/Seedance2FastVideoRequest'
- $ref: '#/components/schemas/Seedance2MiniVideoRequest'
- $ref: '#/components/schemas/Veo31VideoRequest'
- $ref: '#/components/schemas/Seedance25VideoRequest'
- $ref: '#/components/schemas/Kling3VideoRequest'
- $ref: '#/components/schemas/Kling26MotionControlVideoRequest'
- $ref: '#/components/schemas/Kling3MotionControlVideoRequest'
- $ref: '#/components/schemas/Wan30VideoRequest'
- $ref: '#/components/schemas/Wan30PrimeVideoRequest'
- $ref: '#/components/schemas/HappyHorse10VideoRequest'
- $ref: '#/components/schemas/HappyHorse11VideoRequest'
- $ref: '#/components/schemas/MinimaxH3MaxVideoRequest'
- $ref: '#/components/schemas/MinimaxH3MaxTurboVideoRequest'
discriminator:
propertyName: model
mapping:
minimax-h3: '#/components/schemas/MinimaxH3VideoRequest'
grok-imagine-video-1.5: '#/components/schemas/GrokImagineVideo15Request'
seedance-2: '#/components/schemas/Seedance2VideoRequest'
seedance-2-fast: '#/components/schemas/Seedance2FastVideoRequest'
seedance-2-mini: '#/components/schemas/Seedance2MiniVideoRequest'
veo-3.1: '#/components/schemas/Veo31VideoRequest'
seedance-2.5: '#/components/schemas/Seedance25VideoRequest'
kling-3: '#/components/schemas/Kling3VideoRequest'
kling-2.6-motion-control: '#/components/schemas/Kling26MotionControlVideoRequest'
kling-3-motion-control: '#/components/schemas/Kling3MotionControlVideoRequest'
wan-3.0: '#/components/schemas/Wan30VideoRequest'
wan-3.0-prime: '#/components/schemas/Wan30PrimeVideoRequest'
happyhorse-1.0: '#/components/schemas/HappyHorse10VideoRequest'
happyhorse-1.1: '#/components/schemas/HappyHorse11VideoRequest'
minimax-h3-max: '#/components/schemas/MinimaxH3MaxVideoRequest'
minimax-h3-max-turbo: '#/components/schemas/MinimaxH3MaxTurboVideoRequest'
MinimaxH3VideoRequest:
type: object
additionalProperties: false
required: [model, prompt]
description: '`images` cannot be combined with any `reference_*` input. An audio reference also requires at least one reference image or video.'
properties:
model: { type: string, const: minimax-h3, description: Must be `minimax-h3`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Video generation instructions. }
images: { type: array, minItems: 1, maxItems: 2, description: One first-frame image or first- and last-frame images as public HTTPS URLs., items: { type: string, format: uri, pattern: '^https://' } }
reference_images: { type: array, minItems: 1, maxItems: 9, description: Public HTTPS image references for multimodal reference generation., items: { type: string, format: uri, pattern: '^https://' } }
reference_videos: { type: array, minItems: 1, maxItems: 3, description: Public HTTPS video references for multimodal reference generation., items: { type: string, format: uri, pattern: '^https://' } }
reference_audios: { type: array, minItems: 1, maxItems: 3, description: Public HTTPS audio references for multimodal reference generation. Audio also requires at least one reference image or video., items: { type: string, format: uri, pattern: '^https://' } }
duration: { type: integer, minimum: 4, maximum: 15, default: 5, description: Requested output duration in seconds. }
aspect_ratio:
type: string
enum: [adaptive, '21:9', '16:9', '4:3', '1:1', '3:4', '9:16']
description: Text mode defaults to 16:9 and does not accept adaptive. Frame mode always uses adaptive. Reference mode defaults to adaptive and also accepts a concrete ratio.
resolution: { type: string, enum: [768P, 2K], default: 768P, description: Output resolution tier. }
GrokImagineVideo15Request:
type: object
additionalProperties: false
required: [model, prompt]
description: '`images` accepts one first frame and cannot be combined with `reference_images`. Omit `aspect_ratio` when `images` is supplied. 1080p accepts at most one image.'
properties:
model: { type: string, const: grok-imagine-video-1.5, description: Must be `grok-imagine-video-1.5`. }
prompt: { type: string, minLength: 1, maxLength: 4096, description: Video generation instructions. }
images: { type: array, minItems: 1, maxItems: 1, description: One first-frame image as a public HTTPS URL., items: { type: string, format: uri, pattern: '^https://' } }
reference_images: { type: array, minItems: 1, maxItems: 7, description: One to seven public HTTPS reference images., items: { type: string, format: uri, pattern: '^https://' } }
duration: { type: integer, minimum: 1, maximum: 15, default: 8, description: Requested output duration in seconds. }
aspect_ratio: { type: string, enum: ['1:1', '16:9', '9:16', '3:2', '2:3', auto], default: '16:9', description: Output video aspect ratio. Omit when one first-frame image is supplied. }
resolution: { type: string, enum: [480p, 720p, 1080p], default: 480p, description: Output resolution tier. 1080p accepts at most one image. }
Seedance2VideoRequest:
type: object
additionalProperties: false
required: [model, prompt]
description: '`images` cannot be combined with any `reference_*` input. An audio reference also requires at least one reference image or video.'
properties:
model: { type: string, const: seedance-2, description: Must be `seedance-2`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Video generation instructions. }
images: { type: array, minItems: 1, maxItems: 2, description: One first-frame image or first- and last-frame images as public HTTPS URLs., items: { type: string, format: uri, pattern: '^https://' } }
reference_images: { type: array, minItems: 1, maxItems: 9, description: Public HTTPS image references for multimodal reference generation., items: { type: string, format: uri, pattern: '^https://' } }
reference_videos: { type: array, minItems: 1, maxItems: 3, description: Public HTTPS video references for multimodal reference generation., items: { type: string, format: uri, pattern: '^https://' } }
reference_audios: { type: array, minItems: 1, maxItems: 3, description: Public HTTPS audio references. Audio also requires at least one reference image or video., items: { type: string, format: uri, pattern: '^https://' } }
duration: { type: integer, minimum: 4, maximum: 15, default: 5, description: Requested output duration in seconds. }
aspect_ratio: { type: string, enum: [adaptive, '21:9', '16:9', '4:3', '1:1', '3:4', '9:16'], default: adaptive, description: Output video aspect ratio. }
resolution: { type: string, enum: [480p, 720p, 1080p, 4k, 4K], default: 720p, description: Output resolution tier. 4k and 4K are equivalent. 1080p is not supported with reference images. }
generate_audio: { type: boolean, default: true, description: Generate synchronized audio with the video. }
Seedance2FastVideoRequest:
type: object
additionalProperties: false
required: [model, prompt]
description: '`images` cannot be combined with any `reference_*` input. An audio reference also requires at least one reference image or video.'
properties:
model: { type: string, const: seedance-2-fast, description: Must be `seedance-2-fast`. }
prompt: { type: string, minLength: 1, maxLength: 5000, description: Video generation instructions. }
images: { type: array, minItems: 1, maxItems: 2, description: One first-frame image or first- and last-frame images as public HTTPS URLs., items: { type: string, format: uri, pattern: '^https://' } }
reference_images: { type: array, minItems: 1, maxItems: 9, description: Public HTTPS image references for multimodal reference generation., items: { type: string, format: uri, pattern: '^https://' } }
reference_videos: { type: array, minItems: 1, maxItems: 3, description: Public HTTPS video references for multimodal reference generation., items: { type: string, format: uri, pattern: '^https://' } }
reference_audios: { type: array, minItems: 1, maxItems: 3, description: Public HTTPS audio references. Audio also requires at least one reference image or video., items: { type: string, format: uri, pattern: '^https://' } }
duration: { type: integer, minimum: 4, maximum: 15, default: 5, description: Requested output duration in seconds. }
aspect_ratio: { type: string, enum: [adaptive, '21:9', '16:9', '4:3', '1:1', '3:4', '9:16'], default: adaptive, description: Output video aspect ratio. }
resolution: { type: string, enum: [480p, 720p], default: 720p, description: Output resolution tier. }
generate_audio: { type: boolean, default: true, description: Generate synchronized audio with the video. }
Seedance2MiniVideoRequest:
type: object
additionalProperties: false
required: [model, prompt]
description: 'Low-cost Seedance 2.0 route. `images` cannot be combined with any `reference_*` input. Generated audio is not supported.'
properties: