@howells/motif-sdk 5.4.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/image.js +8 -679
- package/dist/index.cjs +45 -1792
- package/dist/index.d.cts +7 -14
- package/dist/index.d.ts +7 -14
- package/dist/index.js +46 -1792
- package/dist/registry.d.ts +1757 -0
- package/dist/registry.js +2714 -0
- package/package.json +5 -1
package/dist/image.js
CHANGED
|
@@ -55,7 +55,6 @@ const AA_IMAGE_LEADERBOARD_SNAPSHOT = "2026-10-07";
|
|
|
55
55
|
const AA_IMAGE_SOURCES = ["https://artificialanalysis.ai/image/leaderboard/text-to-image", "https://artificialanalysis.ai/image/leaderboard/editing"];
|
|
56
56
|
const FAL_PRICING_CHECKED_AT = "2026-05-12";
|
|
57
57
|
const FAL_PRICING_CHECKED_JUL_2026 = "2026-07-11";
|
|
58
|
-
const FAL_PRICING_CHECKED_AUG_2026 = "2026-08-23";
|
|
59
58
|
const FAL_PRICING_CHECKED_SEP_2026 = "2026-09-16";
|
|
60
59
|
const FAL_PRICING_CHECKED_OCT_2026 = "2026-10-29";
|
|
61
60
|
const MODELS = {
|
|
@@ -193,77 +192,6 @@ const MODELS = {
|
|
|
193
192
|
type: "generation",
|
|
194
193
|
useQueue: true
|
|
195
194
|
},
|
|
196
|
-
gpt2: {
|
|
197
|
-
benchmark: {
|
|
198
|
-
artificialAnalysis: {
|
|
199
|
-
editing: {
|
|
200
|
-
elo: 1125,
|
|
201
|
-
rank: 5
|
|
202
|
-
},
|
|
203
|
-
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
204
|
-
sourceUrls: AA_IMAGE_SOURCES,
|
|
205
|
-
textToImage: {
|
|
206
|
-
elo: 1172,
|
|
207
|
-
rank: 3
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
speed: {
|
|
211
|
-
medianSeconds: 200.7,
|
|
212
|
-
p95Seconds: 232.6,
|
|
213
|
-
source: "artificial-analysis-models"
|
|
214
|
-
},
|
|
215
|
-
tiers: {
|
|
216
|
-
price: "ultra",
|
|
217
|
-
quality: "frontier",
|
|
218
|
-
speed: "very_slow"
|
|
219
|
-
},
|
|
220
|
-
useCase: "Established frontier generation and transparent PNGs"
|
|
221
|
-
},
|
|
222
|
-
customImageSize: {
|
|
223
|
-
maxEdge: 3840,
|
|
224
|
-
maxPixels: 8294400,
|
|
225
|
-
maxRatio: 3,
|
|
226
|
-
minPixels: 655360,
|
|
227
|
-
multipleOf: 16
|
|
228
|
-
},
|
|
229
|
-
editEndpoint: "openai/gpt-image-2/edit",
|
|
230
|
-
endpoint: "openai/gpt-image-2",
|
|
231
|
-
falPricing: {
|
|
232
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
233
|
-
currency: "USD",
|
|
234
|
-
endpointId: "openai/gpt-image-2",
|
|
235
|
-
estimatedCostPerImageUsd: .211,
|
|
236
|
-
source: "fal-pricing-api",
|
|
237
|
-
unit: "units",
|
|
238
|
-
unitPrice: 1
|
|
239
|
-
},
|
|
240
|
-
maxReferenceImages: 16,
|
|
241
|
-
name: "GPT Image 2",
|
|
242
|
-
pricePerImageUsd: .211,
|
|
243
|
-
pricing: "$0.211",
|
|
244
|
-
sizeMode: "image_size_enum",
|
|
245
|
-
supportsAspect: true,
|
|
246
|
-
streaming: {
|
|
247
|
-
generation: true,
|
|
248
|
-
edit: true
|
|
249
|
-
},
|
|
250
|
-
supportsEdit: true,
|
|
251
|
-
supportsMaskImage: true,
|
|
252
|
-
maskImageField: "mask_url",
|
|
253
|
-
supportsNumImages: true,
|
|
254
|
-
supportsOutputFormat: true,
|
|
255
|
-
supportsQuality: true,
|
|
256
|
-
supportsResolution: false,
|
|
257
|
-
supportsSyncMode: true,
|
|
258
|
-
transparencyRoute: {
|
|
259
|
-
apiKeyEnv: "OPENAI_API_KEY",
|
|
260
|
-
model: "gpt-image-2",
|
|
261
|
-
provider: "openai",
|
|
262
|
-
supportsEdit: true
|
|
263
|
-
},
|
|
264
|
-
type: "generation",
|
|
265
|
-
useQueue: true
|
|
266
|
-
},
|
|
267
195
|
gpt: {
|
|
268
196
|
benchmark: {
|
|
269
197
|
artificialAnalysis: {
|
|
@@ -425,7 +353,7 @@ const MODELS = {
|
|
|
425
353
|
quality: "frontier",
|
|
426
354
|
speed: "unknown"
|
|
427
355
|
},
|
|
428
|
-
useCase: "
|
|
356
|
+
useCase: "Gemini workhorse with 0.5K output"
|
|
429
357
|
},
|
|
430
358
|
editEndpoint: "fal-ai/nano-banana-2/edit",
|
|
431
359
|
endpoint: "fal-ai/nano-banana-2",
|
|
@@ -530,211 +458,6 @@ const MODELS = {
|
|
|
530
458
|
supportsWebSearch: true,
|
|
531
459
|
type: "generation"
|
|
532
460
|
},
|
|
533
|
-
gemini: {
|
|
534
|
-
benchmark: { artificialAnalysis: {
|
|
535
|
-
editing: {
|
|
536
|
-
elo: 987,
|
|
537
|
-
rank: 50
|
|
538
|
-
},
|
|
539
|
-
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
540
|
-
sourceUrls: AA_IMAGE_SOURCES,
|
|
541
|
-
textToImage: {
|
|
542
|
-
elo: 985,
|
|
543
|
-
rank: 60
|
|
544
|
-
}
|
|
545
|
-
} },
|
|
546
|
-
editEndpoint: "fal-ai/gemini-25-flash-image/edit",
|
|
547
|
-
endpoint: "fal-ai/gemini-25-flash-image",
|
|
548
|
-
falPricing: {
|
|
549
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
550
|
-
currency: "USD",
|
|
551
|
-
endpointId: "fal-ai/gemini-25-flash-image",
|
|
552
|
-
estimatedCostPerImageUsd: .0398,
|
|
553
|
-
source: "fal-pricing-api",
|
|
554
|
-
unit: "images",
|
|
555
|
-
unitPrice: .0398
|
|
556
|
-
},
|
|
557
|
-
maxReferenceImages: 4,
|
|
558
|
-
name: "Gemini 2.5 Flash",
|
|
559
|
-
pricePerImageUsd: .0398,
|
|
560
|
-
pricing: "$0.04",
|
|
561
|
-
sizeMode: "aspect_ratio",
|
|
562
|
-
supportedAspects: [
|
|
563
|
-
"21:9",
|
|
564
|
-
"16:9",
|
|
565
|
-
"3:2",
|
|
566
|
-
"4:3",
|
|
567
|
-
"5:4",
|
|
568
|
-
"1:1",
|
|
569
|
-
"4:5",
|
|
570
|
-
"3:4",
|
|
571
|
-
"2:3",
|
|
572
|
-
"9:16"
|
|
573
|
-
],
|
|
574
|
-
supportsAspect: true,
|
|
575
|
-
supportsEdit: true,
|
|
576
|
-
supportsNumImages: true,
|
|
577
|
-
supportsOutputFormat: true,
|
|
578
|
-
supportsResolution: false,
|
|
579
|
-
supportsSafetyTolerance: true,
|
|
580
|
-
supportsSeed: true,
|
|
581
|
-
supportsSyncMode: true,
|
|
582
|
-
type: "generation"
|
|
583
|
-
},
|
|
584
|
-
gemini3: {
|
|
585
|
-
editEndpoint: "fal-ai/gemini-3-pro-image-preview/edit",
|
|
586
|
-
endpoint: "fal-ai/gemini-3-pro-image-preview",
|
|
587
|
-
falPricing: {
|
|
588
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
589
|
-
currency: "USD",
|
|
590
|
-
endpointId: "fal-ai/gemini-3-pro-image-preview",
|
|
591
|
-
estimatedCostPerImageUsd: .15,
|
|
592
|
-
source: "fal-pricing-api",
|
|
593
|
-
unit: "images",
|
|
594
|
-
unitPrice: .15
|
|
595
|
-
},
|
|
596
|
-
maxReferenceImages: 4,
|
|
597
|
-
name: "Gemini 3 Pro",
|
|
598
|
-
pricePerImageUsd: .15,
|
|
599
|
-
pricing: "$0.15",
|
|
600
|
-
sizeMode: "aspect_ratio",
|
|
601
|
-
supportedAspects: [
|
|
602
|
-
"auto",
|
|
603
|
-
"21:9",
|
|
604
|
-
"16:9",
|
|
605
|
-
"3:2",
|
|
606
|
-
"4:3",
|
|
607
|
-
"5:4",
|
|
608
|
-
"1:1",
|
|
609
|
-
"4:5",
|
|
610
|
-
"3:4",
|
|
611
|
-
"2:3",
|
|
612
|
-
"9:16"
|
|
613
|
-
],
|
|
614
|
-
supportedResolutions: [
|
|
615
|
-
"1K",
|
|
616
|
-
"2K",
|
|
617
|
-
"4K"
|
|
618
|
-
],
|
|
619
|
-
supportsAspect: true,
|
|
620
|
-
supportsEdit: true,
|
|
621
|
-
supportsNumImages: true,
|
|
622
|
-
supportsOutputFormat: true,
|
|
623
|
-
supportsResolution: true,
|
|
624
|
-
supportsSafetyTolerance: true,
|
|
625
|
-
supportsSeed: true,
|
|
626
|
-
supportsSyncMode: true,
|
|
627
|
-
supportsWebSearch: true,
|
|
628
|
-
type: "generation"
|
|
629
|
-
},
|
|
630
|
-
seedream4: {
|
|
631
|
-
benchmark: {
|
|
632
|
-
artificialAnalysis: {
|
|
633
|
-
editing: {
|
|
634
|
-
elo: 1015,
|
|
635
|
-
rank: 36
|
|
636
|
-
},
|
|
637
|
-
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
638
|
-
sourceUrls: AA_IMAGE_SOURCES,
|
|
639
|
-
textToImage: {
|
|
640
|
-
elo: 1030,
|
|
641
|
-
rank: 21
|
|
642
|
-
}
|
|
643
|
-
},
|
|
644
|
-
speed: {
|
|
645
|
-
medianSeconds: 14.3,
|
|
646
|
-
p95Seconds: 21,
|
|
647
|
-
source: "artificial-analysis-models"
|
|
648
|
-
},
|
|
649
|
-
tiers: {
|
|
650
|
-
price: "budget",
|
|
651
|
-
quality: "best",
|
|
652
|
-
speed: "balanced"
|
|
653
|
-
},
|
|
654
|
-
useCase: "Legacy budget generation and large multi-reference edits"
|
|
655
|
-
},
|
|
656
|
-
customImageSize: {
|
|
657
|
-
maxPixels: 16777216,
|
|
658
|
-
minPixels: 921600
|
|
659
|
-
},
|
|
660
|
-
editEndpoint: "fal-ai/bytedance/seedream/v4/edit",
|
|
661
|
-
endpoint: "fal-ai/bytedance/seedream/v4/text-to-image",
|
|
662
|
-
falPricing: {
|
|
663
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
664
|
-
currency: "USD",
|
|
665
|
-
endpointId: "fal-ai/bytedance/seedream/v4/text-to-image",
|
|
666
|
-
estimatedCostPerImageUsd: .03,
|
|
667
|
-
source: "fal-pricing-api",
|
|
668
|
-
unit: "images",
|
|
669
|
-
unitPrice: .03
|
|
670
|
-
},
|
|
671
|
-
maxReferenceImages: 10,
|
|
672
|
-
name: "Seedream 4.0",
|
|
673
|
-
pricePerImageUsd: .03,
|
|
674
|
-
pricing: "$0.03",
|
|
675
|
-
sizeMode: "image_size_enum",
|
|
676
|
-
supportsAspect: true,
|
|
677
|
-
supportsEdit: true,
|
|
678
|
-
supportsNumImages: true,
|
|
679
|
-
supportsResolution: false,
|
|
680
|
-
supportsSeed: true,
|
|
681
|
-
supportsSyncMode: true,
|
|
682
|
-
type: "generation"
|
|
683
|
-
},
|
|
684
|
-
seedream45: {
|
|
685
|
-
benchmark: {
|
|
686
|
-
artificialAnalysis: {
|
|
687
|
-
editing: {
|
|
688
|
-
elo: 1037,
|
|
689
|
-
rank: 32
|
|
690
|
-
},
|
|
691
|
-
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
692
|
-
sourceUrls: AA_IMAGE_SOURCES,
|
|
693
|
-
textToImage: {
|
|
694
|
-
elo: 1022,
|
|
695
|
-
rank: 26
|
|
696
|
-
}
|
|
697
|
-
},
|
|
698
|
-
speed: {
|
|
699
|
-
medianSeconds: 18.2,
|
|
700
|
-
p95Seconds: 43.3,
|
|
701
|
-
source: "artificial-analysis-models"
|
|
702
|
-
},
|
|
703
|
-
tiers: {
|
|
704
|
-
price: "standard",
|
|
705
|
-
quality: "better",
|
|
706
|
-
speed: "balanced"
|
|
707
|
-
},
|
|
708
|
-
useCase: "Cheap current Seedream model with good animation/art scores"
|
|
709
|
-
},
|
|
710
|
-
customImageSize: {
|
|
711
|
-
maxPixels: 16777216,
|
|
712
|
-
minPixels: 3686400
|
|
713
|
-
},
|
|
714
|
-
editEndpoint: "fal-ai/bytedance/seedream/v4.5/edit",
|
|
715
|
-
endpoint: "fal-ai/bytedance/seedream/v4.5/text-to-image",
|
|
716
|
-
falPricing: {
|
|
717
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
718
|
-
currency: "USD",
|
|
719
|
-
endpointId: "fal-ai/bytedance/seedream/v4.5/text-to-image",
|
|
720
|
-
estimatedCostPerImageUsd: .04,
|
|
721
|
-
source: "fal-pricing-api",
|
|
722
|
-
unit: "images",
|
|
723
|
-
unitPrice: .04
|
|
724
|
-
},
|
|
725
|
-
maxReferenceImages: 10,
|
|
726
|
-
name: "Seedream 4.5",
|
|
727
|
-
pricePerImageUsd: .04,
|
|
728
|
-
pricing: "$0.04",
|
|
729
|
-
sizeMode: "image_size_enum",
|
|
730
|
-
supportsAspect: true,
|
|
731
|
-
supportsEdit: true,
|
|
732
|
-
supportsNumImages: true,
|
|
733
|
-
supportsResolution: false,
|
|
734
|
-
supportsSeed: true,
|
|
735
|
-
supportsSyncMode: true,
|
|
736
|
-
type: "generation"
|
|
737
|
-
},
|
|
738
461
|
seedream5: {
|
|
739
462
|
benchmark: { artificialAnalysis: {
|
|
740
463
|
editing: {
|
|
@@ -818,65 +541,6 @@ const MODELS = {
|
|
|
818
541
|
supportsSyncMode: true,
|
|
819
542
|
maxReferenceImages: 10
|
|
820
543
|
},
|
|
821
|
-
"flux2-max": {
|
|
822
|
-
benchmark: {
|
|
823
|
-
artificialAnalysis: {
|
|
824
|
-
editing: {
|
|
825
|
-
elo: 997,
|
|
826
|
-
rank: 49
|
|
827
|
-
},
|
|
828
|
-
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
829
|
-
sourceUrls: AA_IMAGE_SOURCES,
|
|
830
|
-
textToImage: {
|
|
831
|
-
elo: 1020,
|
|
832
|
-
rank: 28
|
|
833
|
-
}
|
|
834
|
-
},
|
|
835
|
-
speed: {
|
|
836
|
-
medianSeconds: 31.6,
|
|
837
|
-
p95Seconds: 41,
|
|
838
|
-
source: "artificial-analysis-models"
|
|
839
|
-
},
|
|
840
|
-
tiers: {
|
|
841
|
-
price: "premium",
|
|
842
|
-
quality: "best",
|
|
843
|
-
speed: "slow"
|
|
844
|
-
},
|
|
845
|
-
useCase: "Best FLUX quality and high-end editing"
|
|
846
|
-
},
|
|
847
|
-
customImageSize: {
|
|
848
|
-
maxEdge: 2560,
|
|
849
|
-
maxPixels: 4194304,
|
|
850
|
-
minEdge: 256,
|
|
851
|
-
multipleOf: 16
|
|
852
|
-
},
|
|
853
|
-
editEndpoint: "fal-ai/flux-2-max/edit",
|
|
854
|
-
endpoint: "fal-ai/flux-2-max",
|
|
855
|
-
falPricing: {
|
|
856
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
857
|
-
currency: "USD",
|
|
858
|
-
endpointId: "fal-ai/flux-2-max",
|
|
859
|
-
estimatedCostPerImageUsd: .07,
|
|
860
|
-
source: "fal-pricing-api",
|
|
861
|
-
unit: "megapixels",
|
|
862
|
-
unitPrice: .07
|
|
863
|
-
},
|
|
864
|
-
maxReferenceImages: 10,
|
|
865
|
-
name: "FLUX.2 Max",
|
|
866
|
-
pricePerImageUsd: .07,
|
|
867
|
-
pricing: "$0.07/MP",
|
|
868
|
-
sizeMode: "image_size_enum",
|
|
869
|
-
supportsAspect: true,
|
|
870
|
-
supportsEdit: true,
|
|
871
|
-
supportsNumImages: false,
|
|
872
|
-
supportsOutputFormat: true,
|
|
873
|
-
supportsResolution: false,
|
|
874
|
-
supportsSafetyChecker: true,
|
|
875
|
-
supportsSafetyTolerance: true,
|
|
876
|
-
supportsSeed: true,
|
|
877
|
-
supportsSyncMode: true,
|
|
878
|
-
type: "generation"
|
|
879
|
-
},
|
|
880
544
|
"flux2-pro": {
|
|
881
545
|
benchmark: {
|
|
882
546
|
artificialAnalysis: {
|
|
@@ -998,69 +662,6 @@ const MODELS = {
|
|
|
998
662
|
supportsSyncMode: true,
|
|
999
663
|
type: "generation"
|
|
1000
664
|
},
|
|
1001
|
-
"flux2-dev": {
|
|
1002
|
-
benchmark: {
|
|
1003
|
-
artificialAnalysis: {
|
|
1004
|
-
editing: {
|
|
1005
|
-
elo: 1e3,
|
|
1006
|
-
rank: 45
|
|
1007
|
-
},
|
|
1008
|
-
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
1009
|
-
sourceUrls: AA_IMAGE_SOURCES,
|
|
1010
|
-
textToImage: {
|
|
1011
|
-
elo: 1e3,
|
|
1012
|
-
rank: 42
|
|
1013
|
-
}
|
|
1014
|
-
},
|
|
1015
|
-
speed: {
|
|
1016
|
-
medianSeconds: 4.6,
|
|
1017
|
-
p95Seconds: 69.6,
|
|
1018
|
-
source: "artificial-analysis-models"
|
|
1019
|
-
},
|
|
1020
|
-
tiers: {
|
|
1021
|
-
price: "variable",
|
|
1022
|
-
quality: "better",
|
|
1023
|
-
speed: "fast"
|
|
1024
|
-
},
|
|
1025
|
-
useCase: "Open FLUX.2 quality with low average cost"
|
|
1026
|
-
},
|
|
1027
|
-
customImageSize: {
|
|
1028
|
-
maxEdge: 2048,
|
|
1029
|
-
minEdge: 512
|
|
1030
|
-
},
|
|
1031
|
-
editEndpoint: "fal-ai/flux-2/edit",
|
|
1032
|
-
endpoint: "fal-ai/flux-2",
|
|
1033
|
-
falPricing: {
|
|
1034
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
1035
|
-
currency: "USD",
|
|
1036
|
-
endpointId: "fal-ai/flux-2",
|
|
1037
|
-
estimatedCostPerImageUsd: .012,
|
|
1038
|
-
source: "fal-pricing-api",
|
|
1039
|
-
unit: "compute seconds",
|
|
1040
|
-
unitPrice: .00167
|
|
1041
|
-
},
|
|
1042
|
-
maxReferenceImages: 4,
|
|
1043
|
-
name: "FLUX.2 [dev]",
|
|
1044
|
-
pricePerImageUsd: .012,
|
|
1045
|
-
pricing: "$0.00167/sec",
|
|
1046
|
-
sizeMode: "image_size_enum",
|
|
1047
|
-
supportsAspect: true,
|
|
1048
|
-
streaming: {
|
|
1049
|
-
generation: true,
|
|
1050
|
-
edit: true
|
|
1051
|
-
},
|
|
1052
|
-
supportsEdit: true,
|
|
1053
|
-
supportsGuidanceScale: true,
|
|
1054
|
-
supportsInferenceSteps: true,
|
|
1055
|
-
supportsNumImages: true,
|
|
1056
|
-
supportsOutputFormat: true,
|
|
1057
|
-
supportsResolution: false,
|
|
1058
|
-
supportsSafetyChecker: true,
|
|
1059
|
-
supportsSafetyTolerance: true,
|
|
1060
|
-
supportsSeed: true,
|
|
1061
|
-
supportsSyncMode: true,
|
|
1062
|
-
type: "generation"
|
|
1063
|
-
},
|
|
1064
665
|
"flux2-turbo": {
|
|
1065
666
|
customImageSize: {
|
|
1066
667
|
maxEdge: 2048,
|
|
@@ -1091,188 +692,6 @@ const MODELS = {
|
|
|
1091
692
|
supportsSyncMode: true,
|
|
1092
693
|
type: "generation"
|
|
1093
694
|
},
|
|
1094
|
-
flux: {
|
|
1095
|
-
endpoint: "fal-ai/flux-pro/v1.1-ultra",
|
|
1096
|
-
falPricing: {
|
|
1097
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
1098
|
-
currency: "USD",
|
|
1099
|
-
endpointId: "fal-ai/flux-pro/v1.1-ultra",
|
|
1100
|
-
estimatedCostPerImageUsd: .06,
|
|
1101
|
-
source: "fal-pricing-api",
|
|
1102
|
-
unit: "images",
|
|
1103
|
-
unitPrice: .06
|
|
1104
|
-
},
|
|
1105
|
-
maxReferenceImages: 1,
|
|
1106
|
-
name: "FLUX Pro Ultra",
|
|
1107
|
-
pricePerImageUsd: .06,
|
|
1108
|
-
pricing: "$0.06",
|
|
1109
|
-
sizeMode: "aspect_ratio",
|
|
1110
|
-
supportsAspect: true,
|
|
1111
|
-
supportsEdit: true,
|
|
1112
|
-
supportsEnhancePrompt: true,
|
|
1113
|
-
supportsImagePromptStrength: true,
|
|
1114
|
-
supportsNumImages: true,
|
|
1115
|
-
supportsOutputFormat: true,
|
|
1116
|
-
supportsRaw: true,
|
|
1117
|
-
supportsResolution: false,
|
|
1118
|
-
supportsSafetyTolerance: true,
|
|
1119
|
-
supportsSeed: true,
|
|
1120
|
-
supportsSyncMode: true,
|
|
1121
|
-
type: "generation"
|
|
1122
|
-
},
|
|
1123
|
-
"flux-fast": {
|
|
1124
|
-
customImageSize: {},
|
|
1125
|
-
endpoint: "fal-ai/flux/schnell",
|
|
1126
|
-
falPricing: {
|
|
1127
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
1128
|
-
currency: "USD",
|
|
1129
|
-
endpointId: "fal-ai/flux/schnell",
|
|
1130
|
-
estimatedCostPerImageUsd: .003,
|
|
1131
|
-
source: "fal-pricing-api",
|
|
1132
|
-
unit: "megapixels",
|
|
1133
|
-
unitPrice: .003
|
|
1134
|
-
},
|
|
1135
|
-
name: "FLUX Schnell",
|
|
1136
|
-
pricePerImageUsd: .003,
|
|
1137
|
-
pricing: "$0.003",
|
|
1138
|
-
sizeMode: "image_size_enum",
|
|
1139
|
-
supportsAspect: true,
|
|
1140
|
-
supportsEdit: false,
|
|
1141
|
-
supportsGuidanceScale: true,
|
|
1142
|
-
supportsInferenceSteps: true,
|
|
1143
|
-
supportsNumImages: true,
|
|
1144
|
-
supportsOutputFormat: true,
|
|
1145
|
-
supportsResolution: false,
|
|
1146
|
-
supportsSeed: true,
|
|
1147
|
-
supportsSyncMode: true,
|
|
1148
|
-
type: "generation"
|
|
1149
|
-
},
|
|
1150
|
-
recraft: {
|
|
1151
|
-
customImageSize: {},
|
|
1152
|
-
endpoint: "fal-ai/recraft/v3/text-to-image",
|
|
1153
|
-
falPricing: {
|
|
1154
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
1155
|
-
currency: "USD",
|
|
1156
|
-
endpointId: "fal-ai/recraft/v3/text-to-image",
|
|
1157
|
-
estimatedCostPerImageUsd: .04,
|
|
1158
|
-
source: "fal-pricing-api",
|
|
1159
|
-
unit: "images",
|
|
1160
|
-
unitPrice: .04
|
|
1161
|
-
},
|
|
1162
|
-
name: "Recraft V3",
|
|
1163
|
-
pricePerImageUsd: .04,
|
|
1164
|
-
pricing: "$0.04",
|
|
1165
|
-
sizeMode: "image_size_enum",
|
|
1166
|
-
supportsAspect: true,
|
|
1167
|
-
supportsEdit: false,
|
|
1168
|
-
supportsNumImages: false,
|
|
1169
|
-
supportsResolution: false,
|
|
1170
|
-
supportsStyle: true,
|
|
1171
|
-
supportsSyncMode: true,
|
|
1172
|
-
type: "generation"
|
|
1173
|
-
},
|
|
1174
|
-
reve: {
|
|
1175
|
-
benchmark: {
|
|
1176
|
-
tiers: {
|
|
1177
|
-
price: "premium",
|
|
1178
|
-
quality: "frontier",
|
|
1179
|
-
speed: "unknown"
|
|
1180
|
-
},
|
|
1181
|
-
useCase: "Historical Reve route; not currently verified on fal"
|
|
1182
|
-
},
|
|
1183
|
-
editEndpoint: "fal-ai/reve/edit",
|
|
1184
|
-
endpoint: "fal-ai/reve/text-to-image",
|
|
1185
|
-
falPricing: {
|
|
1186
|
-
checkedAt: FAL_PRICING_CHECKED_AUG_2026,
|
|
1187
|
-
currency: "USD",
|
|
1188
|
-
endpointId: "fal-ai/reve/text-to-image",
|
|
1189
|
-
estimatedCostPerImageUsd: .04,
|
|
1190
|
-
source: "fal-pricing-api",
|
|
1191
|
-
unit: "images",
|
|
1192
|
-
unitPrice: .04
|
|
1193
|
-
},
|
|
1194
|
-
maxReferenceImages: 1,
|
|
1195
|
-
name: "Reve 2.1",
|
|
1196
|
-
pricePerImageUsd: .04,
|
|
1197
|
-
pricing: "$0.04",
|
|
1198
|
-
sizeMode: "aspect_ratio",
|
|
1199
|
-
supportedAspects: [
|
|
1200
|
-
"16:9",
|
|
1201
|
-
"9:16",
|
|
1202
|
-
"3:2",
|
|
1203
|
-
"2:3",
|
|
1204
|
-
"4:3",
|
|
1205
|
-
"3:4",
|
|
1206
|
-
"1:1"
|
|
1207
|
-
],
|
|
1208
|
-
supportsAspect: true,
|
|
1209
|
-
supportsEdit: true,
|
|
1210
|
-
supportsNumImages: true,
|
|
1211
|
-
supportsOutputFormat: true,
|
|
1212
|
-
supportsResolution: false,
|
|
1213
|
-
supportsSeed: false,
|
|
1214
|
-
supportsSyncMode: true,
|
|
1215
|
-
type: "generation"
|
|
1216
|
-
},
|
|
1217
|
-
recraft4: {
|
|
1218
|
-
benchmark: { artificialAnalysis: {
|
|
1219
|
-
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
1220
|
-
sourceUrls: AA_IMAGE_SOURCES,
|
|
1221
|
-
textToImage: {
|
|
1222
|
-
elo: 984,
|
|
1223
|
-
rank: 62
|
|
1224
|
-
}
|
|
1225
|
-
} },
|
|
1226
|
-
customImageSize: {},
|
|
1227
|
-
endpoint: "fal-ai/recraft/v4/text-to-image",
|
|
1228
|
-
falPricing: {
|
|
1229
|
-
checkedAt: FAL_PRICING_CHECKED_JUL_2026,
|
|
1230
|
-
currency: "USD",
|
|
1231
|
-
endpointId: "fal-ai/recraft/v4/text-to-image",
|
|
1232
|
-
estimatedCostPerImageUsd: .04,
|
|
1233
|
-
source: "fal-pricing-api",
|
|
1234
|
-
unit: "images",
|
|
1235
|
-
unitPrice: .04
|
|
1236
|
-
},
|
|
1237
|
-
name: "Recraft V4",
|
|
1238
|
-
pricePerImageUsd: .04,
|
|
1239
|
-
pricing: "$0.04",
|
|
1240
|
-
sizeMode: "image_size_enum",
|
|
1241
|
-
supportsAspect: true,
|
|
1242
|
-
supportsEdit: false,
|
|
1243
|
-
supportsNumImages: false,
|
|
1244
|
-
supportsResolution: false,
|
|
1245
|
-
supportsSyncMode: true,
|
|
1246
|
-
type: "generation"
|
|
1247
|
-
},
|
|
1248
|
-
ideogram: {
|
|
1249
|
-
customImageSize: {},
|
|
1250
|
-
endpoint: "fal-ai/ideogram/v3",
|
|
1251
|
-
falPricing: {
|
|
1252
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
1253
|
-
currency: "USD",
|
|
1254
|
-
endpointId: "fal-ai/ideogram/v3",
|
|
1255
|
-
estimatedCostPerImageUsd: .03,
|
|
1256
|
-
source: "fal-pricing-api",
|
|
1257
|
-
unit: "images",
|
|
1258
|
-
unitPrice: .03
|
|
1259
|
-
},
|
|
1260
|
-
name: "Ideogram V3",
|
|
1261
|
-
pricePerImageUsd: .03,
|
|
1262
|
-
pricing: "$0.03",
|
|
1263
|
-
sizeMode: "image_size_enum",
|
|
1264
|
-
supportsAspect: true,
|
|
1265
|
-
supportsEdit: false,
|
|
1266
|
-
supportsExpandPrompt: true,
|
|
1267
|
-
supportsNegativePrompt: true,
|
|
1268
|
-
supportsNumImages: true,
|
|
1269
|
-
supportsRenderingSpeed: true,
|
|
1270
|
-
supportsResolution: false,
|
|
1271
|
-
supportsSeed: true,
|
|
1272
|
-
supportsStyle: true,
|
|
1273
|
-
supportsSyncMode: true,
|
|
1274
|
-
type: "generation"
|
|
1275
|
-
},
|
|
1276
695
|
ideogram4: {
|
|
1277
696
|
benchmark: { artificialAnalysis: {
|
|
1278
697
|
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
@@ -1373,52 +792,6 @@ const MODELS = {
|
|
|
1373
792
|
supportsSyncMode: true,
|
|
1374
793
|
type: "generation"
|
|
1375
794
|
},
|
|
1376
|
-
qwen: {
|
|
1377
|
-
benchmark: {
|
|
1378
|
-
artificialAnalysis: {
|
|
1379
|
-
snapshotDate: AA_IMAGE_LEADERBOARD_SNAPSHOT,
|
|
1380
|
-
sourceUrls: AA_IMAGE_SOURCES,
|
|
1381
|
-
textToImage: {
|
|
1382
|
-
elo: 890,
|
|
1383
|
-
rank: 106
|
|
1384
|
-
}
|
|
1385
|
-
},
|
|
1386
|
-
speed: {
|
|
1387
|
-
medianSeconds: 23.3,
|
|
1388
|
-
p95Seconds: 491,
|
|
1389
|
-
source: "artificial-analysis-models"
|
|
1390
|
-
},
|
|
1391
|
-
tiers: {
|
|
1392
|
-
price: "budget",
|
|
1393
|
-
quality: "better",
|
|
1394
|
-
speed: "slow"
|
|
1395
|
-
},
|
|
1396
|
-
useCase: "Low-cost open-weight text and design generation"
|
|
1397
|
-
},
|
|
1398
|
-
customImageSize: {},
|
|
1399
|
-
endpoint: "fal-ai/qwen-image",
|
|
1400
|
-
falPricing: {
|
|
1401
|
-
checkedAt: FAL_PRICING_CHECKED_AT,
|
|
1402
|
-
currency: "USD",
|
|
1403
|
-
endpointId: "fal-ai/qwen-image",
|
|
1404
|
-
estimatedCostPerImageUsd: .02,
|
|
1405
|
-
source: "fal-pricing-api",
|
|
1406
|
-
unit: "megapixels",
|
|
1407
|
-
unitPrice: .02
|
|
1408
|
-
},
|
|
1409
|
-
name: "Qwen Image",
|
|
1410
|
-
pricePerImageUsd: .02,
|
|
1411
|
-
pricing: "$0.02/MP",
|
|
1412
|
-
sizeMode: "image_size_enum",
|
|
1413
|
-
supportsAspect: true,
|
|
1414
|
-
supportsEdit: false,
|
|
1415
|
-
supportsNumImages: true,
|
|
1416
|
-
supportsOutputFormat: true,
|
|
1417
|
-
supportsResolution: false,
|
|
1418
|
-
supportsSeed: true,
|
|
1419
|
-
supportsSyncMode: true,
|
|
1420
|
-
type: "generation"
|
|
1421
|
-
},
|
|
1422
795
|
qwen3: {
|
|
1423
796
|
benchmark: {
|
|
1424
797
|
artificialAnalysis: {
|
|
@@ -1819,32 +1192,11 @@ const MODELS = {
|
|
|
1819
1192
|
supportsNumImages: false,
|
|
1820
1193
|
supportsResolution: false,
|
|
1821
1194
|
type: "utility"
|
|
1822
|
-
},
|
|
1823
|
-
rmbg: {
|
|
1824
|
-
endpoint: "fal-ai/birefnet",
|
|
1825
|
-
name: "BiRefNet (Background Removal)",
|
|
1826
|
-
pricing: "$0.02",
|
|
1827
|
-
supportsAspect: false,
|
|
1828
|
-
supportsEdit: false,
|
|
1829
|
-
supportsNumImages: false,
|
|
1830
|
-
supportsResolution: false,
|
|
1831
|
-
type: "utility"
|
|
1832
|
-
},
|
|
1833
|
-
bria: {
|
|
1834
|
-
endpoint: "fal-ai/bria/background/remove",
|
|
1835
|
-
name: "Bria RMBG 2.0",
|
|
1836
|
-
pricing: "$0.02",
|
|
1837
|
-
supportsAspect: false,
|
|
1838
|
-
supportsEdit: false,
|
|
1839
|
-
supportsNumImages: false,
|
|
1840
|
-
supportsResolution: false,
|
|
1841
|
-
type: "utility"
|
|
1842
1195
|
}
|
|
1843
1196
|
};
|
|
1844
1197
|
[
|
|
1845
1198
|
"sunburst",
|
|
1846
1199
|
"flare",
|
|
1847
|
-
"gpt2",
|
|
1848
1200
|
"gpt",
|
|
1849
1201
|
"banana21",
|
|
1850
1202
|
"banana2",
|
|
@@ -1876,11 +1228,9 @@ const OPTION_CAPABILITIES = {
|
|
|
1876
1228
|
enableGoogleSearch: (config) => config.supportsGoogleSearch === true,
|
|
1877
1229
|
enableSafetyChecker: (config) => config.supportsSafetyChecker === true,
|
|
1878
1230
|
enableWebSearch: (config) => config.supportsWebSearch === true,
|
|
1879
|
-
enhancePrompt: (config) => config.supportsEnhancePrompt === true,
|
|
1880
1231
|
expandPrompt: (config) => config.supportsExpandPrompt === true,
|
|
1881
1232
|
guidanceScale: (config) => config.supportsGuidanceScale === true,
|
|
1882
1233
|
"image editing": (config) => config.supportsEdit,
|
|
1883
|
-
imagePromptStrength: (config) => config.supportsImagePromptStrength === true,
|
|
1884
1234
|
imageSize: (config) => config.sizeMode === "gpt_size" || config.sizeMode === "image_size_enum",
|
|
1885
1235
|
inputFidelity: (config) => config.sizeMode === "gpt_size",
|
|
1886
1236
|
limitGenerations: (config) => config.supportsLimitGenerations === true,
|
|
@@ -1891,12 +1241,10 @@ const OPTION_CAPABILITIES = {
|
|
|
1891
1241
|
numInferenceSteps: (config) => config.supportsInferenceSteps === true,
|
|
1892
1242
|
outputFormat: (config) => config.supportsOutputFormat === true,
|
|
1893
1243
|
quality: (config) => config.supportsQuality === true,
|
|
1894
|
-
raw: (config) => config.supportsRaw === true,
|
|
1895
1244
|
renderingSpeed: (config) => config.supportsRenderingSpeed === true,
|
|
1896
1245
|
resolution: (config) => config.supportsResolution,
|
|
1897
1246
|
safetyTolerance: (config) => config.supportsSafetyTolerance === true,
|
|
1898
1247
|
seed: (config) => config.supportsSeed === true,
|
|
1899
|
-
style: (config) => config.supportsStyle === true,
|
|
1900
1248
|
syncMode: (config) => config.supportsSyncMode === true,
|
|
1901
1249
|
thinkingLevel: (config) => config.supportsThinkingLevel === true,
|
|
1902
1250
|
"transparent output": (config) => config.supportsBackground === true || config.transparentOutput === true
|
|
@@ -1950,7 +1298,7 @@ Object.keys(OPTION_CAPABILITIES).filter(isModelOption);
|
|
|
1950
1298
|
description: "Natural, unposed documentary portraits of people. Pair with a mood for the light.",
|
|
1951
1299
|
id: "portrait",
|
|
1952
1300
|
label: "Documentary portrait",
|
|
1953
|
-
model: "
|
|
1301
|
+
model: "seedream5"
|
|
1954
1302
|
},
|
|
1955
1303
|
{
|
|
1956
1304
|
acceptsMood: false,
|
|
@@ -1987,7 +1335,7 @@ Object.keys(OPTION_CAPABILITIES).filter(isModelOption);
|
|
|
1987
1335
|
experimental: true,
|
|
1988
1336
|
id: "illustration",
|
|
1989
1337
|
label: "Editorial illustration",
|
|
1990
|
-
model: "
|
|
1338
|
+
model: "flare"
|
|
1991
1339
|
}
|
|
1992
1340
|
],
|
|
1993
1341
|
mood: [
|
|
@@ -3533,8 +2881,7 @@ function toProviderFetch(fetch) {
|
|
|
3533
2881
|
* Builds a Vercel AI SDK `ImageModel` from `@ai-sdk/fal`. Building a model
|
|
3534
2882
|
* performs no network I/O — the request only happens when `generateImage`
|
|
3535
2883
|
* invokes `model.doGenerate`. This is the lightweight fal *image* adapter; the
|
|
3536
|
-
* richer `FalClient` fal client (queue, upload,
|
|
3537
|
-
* is a separate, later fold (design doc §8, phase 1d).
|
|
2884
|
+
* richer `FalClient` fal client (queue, upload, tools) is separate.
|
|
3538
2885
|
*
|
|
3539
2886
|
* ENDPOINT QUIRK (Phase 0): fal's gpt-image endpoint wants `image_size` as a
|
|
3540
2887
|
* STRING enum (e.g. "1024x1024"), passed at generate time via
|
|
@@ -3548,48 +2895,31 @@ function toProviderFetch(fetch) {
|
|
|
3548
2895
|
* providerOptions: { fal: { image_size: "1024x1024" } },
|
|
3549
2896
|
* });
|
|
3550
2897
|
*/
|
|
3551
|
-
/**
|
|
3552
|
-
* fal endpoint ids proven to work with this adapter and priced in
|
|
3553
|
-
* {@link FAL_IMAGE_PRICE_USD} below (FLUX Pro Ultra + gpt-image).
|
|
3554
|
-
*/
|
|
3555
|
-
const FAL_FLUX_MODEL = "fal-ai/flux-pro/v1.1-ultra";
|
|
2898
|
+
/** The gpt-image endpoint id priced in {@link FAL_IMAGE_PRICE_USD} below. */
|
|
3556
2899
|
const FAL_GPT_IMAGE_MODEL = "fal-ai/gpt-image-1.5";
|
|
3557
2900
|
/** Env var read for the fal key when `apiKey` is not supplied in config. */
|
|
3558
2901
|
const FAL_API_KEY_ENV = "FAL_KEY";
|
|
3559
2902
|
/**
|
|
3560
2903
|
* Static fal USD/image, keyed by the fal ENDPOINT id. Cost tracking must price
|
|
3561
|
-
* the endpoints consumers actually pass
|
|
3562
|
-
* `fal-ai/flux/schnell`, `fal-ai/flux-2-pro`, `fal-ai/flux-2-max`. Every price is
|
|
2904
|
+
* the endpoints consumers actually pass. Every price is
|
|
3563
2905
|
* sourced from the fal registry snapshot in `../models`
|
|
3564
2906
|
* (`MODELS[...].pricePerImageUsd`) so this table stays in sync rather than
|
|
3565
2907
|
* drifting to a second hand-maintained copy; the `??` fallbacks are the registry
|
|
3566
2908
|
* values at time of writing, used only if a registry entry loses its optional
|
|
3567
2909
|
* price. Each key is `MODELS[x].endpoint`; the trailing comment cites the
|
|
3568
|
-
* `MODELS` key it comes from. Covers the
|
|
2910
|
+
* `MODELS` key it comes from. Covers the flux2 family, banana, seedream, and
|
|
3569
2911
|
* the other priced fal generation endpoints.
|
|
3570
2912
|
*/
|
|
3571
2913
|
const FAL_IMAGE_PRICE_USD = {
|
|
3572
|
-
[FAL_FLUX_MODEL]: MODELS.flux?.pricePerImageUsd ?? .06,
|
|
3573
|
-
"fal-ai/flux/schnell": MODELS["flux-fast"]?.pricePerImageUsd ?? .003,
|
|
3574
|
-
"fal-ai/flux-2-max": MODELS["flux2-max"]?.pricePerImageUsd ?? .07,
|
|
3575
2914
|
"fal-ai/flux-2-pro": MODELS["flux2-pro"]?.pricePerImageUsd ?? .03,
|
|
3576
2915
|
"fal-ai/flux-2-flex": MODELS["flux2-flex"]?.pricePerImageUsd ?? .05,
|
|
3577
|
-
"fal-ai/flux-2": MODELS["flux2-dev"]?.pricePerImageUsd ?? .012,
|
|
3578
2916
|
"fal-ai/flux-2/turbo": MODELS["flux2-turbo"]?.pricePerImageUsd ?? .008,
|
|
3579
2917
|
[FAL_GPT_IMAGE_MODEL]: MODELS.gpt?.pricePerImageUsd ?? .133,
|
|
3580
|
-
"openai/gpt-image-2": MODELS.gpt2?.pricePerImageUsd ?? .211,
|
|
3581
2918
|
"fal-ai/nano-banana-2": MODELS.banana2?.pricePerImageUsd ?? .08,
|
|
3582
2919
|
"fal-ai/nano-banana-pro": MODELS.banana?.pricePerImageUsd ?? .15,
|
|
3583
|
-
"fal-ai/gemini-25-flash-image": MODELS.gemini?.pricePerImageUsd ?? .0398,
|
|
3584
|
-
"fal-ai/gemini-3-pro-image-preview": MODELS.gemini3?.pricePerImageUsd ?? .15,
|
|
3585
|
-
"fal-ai/bytedance/seedream/v4/text-to-image": MODELS.seedream4?.pricePerImageUsd ?? .03,
|
|
3586
|
-
"fal-ai/bytedance/seedream/v4.5/text-to-image": MODELS.seedream45?.pricePerImageUsd ?? .04,
|
|
3587
2920
|
"bytedance/seedream/v5/pro/text-to-image": MODELS.seedream5?.pricePerImageUsd ?? .0675,
|
|
3588
2921
|
"bytedance/seedream/v5/lite/text-to-image": MODELS["seedream5-lite"]?.pricePerImageUsd ?? .035,
|
|
3589
|
-
"fal-ai/recraft/v3/text-to-image": MODELS.recraft?.pricePerImageUsd ?? .04,
|
|
3590
|
-
"fal-ai/recraft/v4/text-to-image": MODELS.recraft4?.pricePerImageUsd ?? .04,
|
|
3591
2922
|
"fal-ai/recraft/v4.1/text-to-image": MODELS.recraft41?.pricePerImageUsd ?? .035,
|
|
3592
|
-
"fal-ai/ideogram/v3": MODELS.ideogram?.pricePerImageUsd ?? .03,
|
|
3593
2923
|
"ideogram/v4": MODELS.ideogram4?.pricePerImageUsd ?? .03,
|
|
3594
2924
|
"xai/grok-imagine-image": MODELS["grok-image"]?.pricePerImageUsd ?? .02,
|
|
3595
2925
|
"xai/grok-imagine-image/v2.0/text-to-image": MODELS["grok-image-2"]?.pricePerImageUsd ?? .06,
|
|
@@ -3597,8 +2927,7 @@ const FAL_IMAGE_PRICE_USD = {
|
|
|
3597
2927
|
"meta/muse-image/text-to-image": MODELS["muse-image"]?.pricePerImageUsd ?? .01,
|
|
3598
2928
|
"microsoft/mai-image-2.5-pro": MODELS["mai-image-2.5-pro"]?.pricePerImageUsd ?? .17,
|
|
3599
2929
|
"fal-ai/ideogram/v3/generate-transparent": MODELS["ideogram3-transparent"]?.pricePerImageUsd ?? .06,
|
|
3600
|
-
"alibaba/qwen-image-3/text-to-image": MODELS.qwen3?.pricePerImageUsd ?? .04
|
|
3601
|
-
"fal-ai/qwen-image": MODELS.qwen?.pricePerImageUsd ?? .02
|
|
2930
|
+
"alibaba/qwen-image-3/text-to-image": MODELS.qwen3?.pricePerImageUsd ?? .04
|
|
3602
2931
|
};
|
|
3603
2932
|
/**
|
|
3604
2933
|
* Build a fal `ImageModel`. Prefers the passed `apiKey`, else the `FAL_KEY` env
|