@openrouter/sdk 0.13.45 → 0.13.46

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.
@@ -1,6 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
3
  import { ContentPartImage, ContentPartImage$Outbound } from "./contentpartimage.js";
4
+ import { ImageGenerationProviderPreferences, ImageGenerationProviderPreferences$Outbound } from "./imagegenerationproviderpreferences.js";
4
5
  /**
5
6
  * Normalized aspect ratio of the generated image. Providers clamp to their supported subset.
6
7
  */
@@ -57,380 +58,6 @@ export declare const ImageGenerationRequestOutputFormat: {
57
58
  * Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`.
58
59
  */
59
60
  export type ImageGenerationRequestOutputFormat = OpenEnum<typeof ImageGenerationRequestOutputFormat>;
60
- /**
61
- * Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
62
- */
63
- export type ImageGenerationRequestOptions = {
64
- oneai?: {
65
- [k: string]: any | null;
66
- } | undefined;
67
- ai21?: {
68
- [k: string]: any | null;
69
- } | undefined;
70
- aionLabs?: {
71
- [k: string]: any | null;
72
- } | undefined;
73
- akashml?: {
74
- [k: string]: any | null;
75
- } | undefined;
76
- alibaba?: {
77
- [k: string]: any | null;
78
- } | undefined;
79
- amazonBedrock?: {
80
- [k: string]: any | null;
81
- } | undefined;
82
- amazonNova?: {
83
- [k: string]: any | null;
84
- } | undefined;
85
- ambient?: {
86
- [k: string]: any | null;
87
- } | undefined;
88
- anthropic?: {
89
- [k: string]: any | null;
90
- } | undefined;
91
- anyscale?: {
92
- [k: string]: any | null;
93
- } | undefined;
94
- arceeAi?: {
95
- [k: string]: any | null;
96
- } | undefined;
97
- atlasCloud?: {
98
- [k: string]: any | null;
99
- } | undefined;
100
- atoma?: {
101
- [k: string]: any | null;
102
- } | undefined;
103
- avian?: {
104
- [k: string]: any | null;
105
- } | undefined;
106
- azure?: {
107
- [k: string]: any | null;
108
- } | undefined;
109
- baidu?: {
110
- [k: string]: any | null;
111
- } | undefined;
112
- baseten?: {
113
- [k: string]: any | null;
114
- } | undefined;
115
- blackForestLabs?: {
116
- [k: string]: any | null;
117
- } | undefined;
118
- byteplus?: {
119
- [k: string]: any | null;
120
- } | undefined;
121
- centml?: {
122
- [k: string]: any | null;
123
- } | undefined;
124
- cerebras?: {
125
- [k: string]: any | null;
126
- } | undefined;
127
- chutes?: {
128
- [k: string]: any | null;
129
- } | undefined;
130
- cirrascale?: {
131
- [k: string]: any | null;
132
- } | undefined;
133
- clarifai?: {
134
- [k: string]: any | null;
135
- } | undefined;
136
- cloudflare?: {
137
- [k: string]: any | null;
138
- } | undefined;
139
- cohere?: {
140
- [k: string]: any | null;
141
- } | undefined;
142
- crofai?: {
143
- [k: string]: any | null;
144
- } | undefined;
145
- crucible?: {
146
- [k: string]: any | null;
147
- } | undefined;
148
- crusoe?: {
149
- [k: string]: any | null;
150
- } | undefined;
151
- darkbloom?: {
152
- [k: string]: any | null;
153
- } | undefined;
154
- decart?: {
155
- [k: string]: any | null;
156
- } | undefined;
157
- deepgram?: {
158
- [k: string]: any | null;
159
- } | undefined;
160
- deepinfra?: {
161
- [k: string]: any | null;
162
- } | undefined;
163
- deepseek?: {
164
- [k: string]: any | null;
165
- } | undefined;
166
- dekallm?: {
167
- [k: string]: any | null;
168
- } | undefined;
169
- digitalocean?: {
170
- [k: string]: any | null;
171
- } | undefined;
172
- enfer?: {
173
- [k: string]: any | null;
174
- } | undefined;
175
- fakeProvider?: {
176
- [k: string]: any | null;
177
- } | undefined;
178
- featherless?: {
179
- [k: string]: any | null;
180
- } | undefined;
181
- fireworks?: {
182
- [k: string]: any | null;
183
- } | undefined;
184
- friendli?: {
185
- [k: string]: any | null;
186
- } | undefined;
187
- gmicloud?: {
188
- [k: string]: any | null;
189
- } | undefined;
190
- googleAiStudio?: {
191
- [k: string]: any | null;
192
- } | undefined;
193
- googleVertex?: {
194
- [k: string]: any | null;
195
- } | undefined;
196
- gopomelo?: {
197
- [k: string]: any | null;
198
- } | undefined;
199
- groq?: {
200
- [k: string]: any | null;
201
- } | undefined;
202
- heygen?: {
203
- [k: string]: any | null;
204
- } | undefined;
205
- huggingface?: {
206
- [k: string]: any | null;
207
- } | undefined;
208
- hyperbolic?: {
209
- [k: string]: any | null;
210
- } | undefined;
211
- hyperbolicQuantized?: {
212
- [k: string]: any | null;
213
- } | undefined;
214
- inception?: {
215
- [k: string]: any | null;
216
- } | undefined;
217
- inceptron?: {
218
- [k: string]: any | null;
219
- } | undefined;
220
- inferactVllm?: {
221
- [k: string]: any | null;
222
- } | undefined;
223
- inferenceNet?: {
224
- [k: string]: any | null;
225
- } | undefined;
226
- infermatic?: {
227
- [k: string]: any | null;
228
- } | undefined;
229
- inflection?: {
230
- [k: string]: any | null;
231
- } | undefined;
232
- inocloud?: {
233
- [k: string]: any | null;
234
- } | undefined;
235
- ioNet?: {
236
- [k: string]: any | null;
237
- } | undefined;
238
- ionstream?: {
239
- [k: string]: any | null;
240
- } | undefined;
241
- klusterai?: {
242
- [k: string]: any | null;
243
- } | undefined;
244
- lambda?: {
245
- [k: string]: any | null;
246
- } | undefined;
247
- lepton?: {
248
- [k: string]: any | null;
249
- } | undefined;
250
- liquid?: {
251
- [k: string]: any | null;
252
- } | undefined;
253
- lynn?: {
254
- [k: string]: any | null;
255
- } | undefined;
256
- lynnPrivate?: {
257
- [k: string]: any | null;
258
- } | undefined;
259
- mancer?: {
260
- [k: string]: any | null;
261
- } | undefined;
262
- mancerOld?: {
263
- [k: string]: any | null;
264
- } | undefined;
265
- mara?: {
266
- [k: string]: any | null;
267
- } | undefined;
268
- meta?: {
269
- [k: string]: any | null;
270
- } | undefined;
271
- minimax?: {
272
- [k: string]: any | null;
273
- } | undefined;
274
- mistral?: {
275
- [k: string]: any | null;
276
- } | undefined;
277
- modal?: {
278
- [k: string]: any | null;
279
- } | undefined;
280
- modelrun?: {
281
- [k: string]: any | null;
282
- } | undefined;
283
- modular?: {
284
- [k: string]: any | null;
285
- } | undefined;
286
- moonshotai?: {
287
- [k: string]: any | null;
288
- } | undefined;
289
- morph?: {
290
- [k: string]: any | null;
291
- } | undefined;
292
- ncompass?: {
293
- [k: string]: any | null;
294
- } | undefined;
295
- nebius?: {
296
- [k: string]: any | null;
297
- } | undefined;
298
- nexAgi?: {
299
- [k: string]: any | null;
300
- } | undefined;
301
- nextbit?: {
302
- [k: string]: any | null;
303
- } | undefined;
304
- nineteen?: {
305
- [k: string]: any | null;
306
- } | undefined;
307
- novita?: {
308
- [k: string]: any | null;
309
- } | undefined;
310
- nvidia?: {
311
- [k: string]: any | null;
312
- } | undefined;
313
- octoai?: {
314
- [k: string]: any | null;
315
- } | undefined;
316
- openInference?: {
317
- [k: string]: any | null;
318
- } | undefined;
319
- openai?: {
320
- [k: string]: any | null;
321
- } | undefined;
322
- parasail?: {
323
- [k: string]: any | null;
324
- } | undefined;
325
- perceptron?: {
326
- [k: string]: any | null;
327
- } | undefined;
328
- perplexity?: {
329
- [k: string]: any | null;
330
- } | undefined;
331
- phala?: {
332
- [k: string]: any | null;
333
- } | undefined;
334
- poolside?: {
335
- [k: string]: any | null;
336
- } | undefined;
337
- quiver?: {
338
- [k: string]: any | null;
339
- } | undefined;
340
- recraft?: {
341
- [k: string]: any | null;
342
- } | undefined;
343
- recursal?: {
344
- [k: string]: any | null;
345
- } | undefined;
346
- reflection?: {
347
- [k: string]: any | null;
348
- } | undefined;
349
- reka?: {
350
- [k: string]: any | null;
351
- } | undefined;
352
- relace?: {
353
- [k: string]: any | null;
354
- } | undefined;
355
- replicate?: {
356
- [k: string]: any | null;
357
- } | undefined;
358
- sakana?: {
359
- [k: string]: any | null;
360
- } | undefined;
361
- sambanova?: {
362
- [k: string]: any | null;
363
- } | undefined;
364
- sambanovaCloaked?: {
365
- [k: string]: any | null;
366
- } | undefined;
367
- seed?: {
368
- [k: string]: any | null;
369
- } | undefined;
370
- sfCompute?: {
371
- [k: string]: any | null;
372
- } | undefined;
373
- siliconflow?: {
374
- [k: string]: any | null;
375
- } | undefined;
376
- sourceful?: {
377
- [k: string]: any | null;
378
- } | undefined;
379
- stealth?: {
380
- [k: string]: any | null;
381
- } | undefined;
382
- stepfun?: {
383
- [k: string]: any | null;
384
- } | undefined;
385
- streamlake?: {
386
- [k: string]: any | null;
387
- } | undefined;
388
- switchpoint?: {
389
- [k: string]: any | null;
390
- } | undefined;
391
- targon?: {
392
- [k: string]: any | null;
393
- } | undefined;
394
- tenstorrent?: {
395
- [k: string]: any | null;
396
- } | undefined;
397
- together?: {
398
- [k: string]: any | null;
399
- } | undefined;
400
- togetherLite?: {
401
- [k: string]: any | null;
402
- } | undefined;
403
- ubicloud?: {
404
- [k: string]: any | null;
405
- } | undefined;
406
- upstage?: {
407
- [k: string]: any | null;
408
- } | undefined;
409
- venice?: {
410
- [k: string]: any | null;
411
- } | undefined;
412
- wafer?: {
413
- [k: string]: any | null;
414
- } | undefined;
415
- wandb?: {
416
- [k: string]: any | null;
417
- } | undefined;
418
- xai?: {
419
- [k: string]: any | null;
420
- } | undefined;
421
- xiaomi?: {
422
- [k: string]: any | null;
423
- } | undefined;
424
- zAi?: {
425
- [k: string]: any | null;
426
- } | undefined;
427
- };
428
- /**
429
- * Provider-specific passthrough configuration
430
- */
431
- export type ImageGenerationRequestProvider = {
432
- options?: ImageGenerationRequestOptions | undefined;
433
- };
434
61
  /**
435
62
  * Rendering quality. Providers without a quality knob ignore this.
436
63
  */
@@ -494,9 +121,9 @@ export type ImageGenerationRequest = {
494
121
  */
495
122
  prompt: string;
496
123
  /**
497
- * Provider-specific passthrough configuration
124
+ * Provider routing preferences and provider-specific passthrough configuration.
498
125
  */
499
- provider?: ImageGenerationRequestProvider | undefined;
126
+ provider?: ImageGenerationProviderPreferences | undefined;
500
127
  /**
501
128
  * Rendering quality. Providers without a quality knob ignore this.
502
129
  */
@@ -525,382 +152,6 @@ export declare const ImageGenerationRequestBackground$outboundSchema: z.ZodType<
525
152
  /** @internal */
526
153
  export declare const ImageGenerationRequestOutputFormat$outboundSchema: z.ZodType<string, ImageGenerationRequestOutputFormat>;
527
154
  /** @internal */
528
- export type ImageGenerationRequestOptions$Outbound = {
529
- "01ai"?: {
530
- [k: string]: any | null;
531
- } | undefined;
532
- ai21?: {
533
- [k: string]: any | null;
534
- } | undefined;
535
- "aion-labs"?: {
536
- [k: string]: any | null;
537
- } | undefined;
538
- akashml?: {
539
- [k: string]: any | null;
540
- } | undefined;
541
- alibaba?: {
542
- [k: string]: any | null;
543
- } | undefined;
544
- "amazon-bedrock"?: {
545
- [k: string]: any | null;
546
- } | undefined;
547
- "amazon-nova"?: {
548
- [k: string]: any | null;
549
- } | undefined;
550
- ambient?: {
551
- [k: string]: any | null;
552
- } | undefined;
553
- anthropic?: {
554
- [k: string]: any | null;
555
- } | undefined;
556
- anyscale?: {
557
- [k: string]: any | null;
558
- } | undefined;
559
- "arcee-ai"?: {
560
- [k: string]: any | null;
561
- } | undefined;
562
- "atlas-cloud"?: {
563
- [k: string]: any | null;
564
- } | undefined;
565
- atoma?: {
566
- [k: string]: any | null;
567
- } | undefined;
568
- avian?: {
569
- [k: string]: any | null;
570
- } | undefined;
571
- azure?: {
572
- [k: string]: any | null;
573
- } | undefined;
574
- baidu?: {
575
- [k: string]: any | null;
576
- } | undefined;
577
- baseten?: {
578
- [k: string]: any | null;
579
- } | undefined;
580
- "black-forest-labs"?: {
581
- [k: string]: any | null;
582
- } | undefined;
583
- byteplus?: {
584
- [k: string]: any | null;
585
- } | undefined;
586
- centml?: {
587
- [k: string]: any | null;
588
- } | undefined;
589
- cerebras?: {
590
- [k: string]: any | null;
591
- } | undefined;
592
- chutes?: {
593
- [k: string]: any | null;
594
- } | undefined;
595
- cirrascale?: {
596
- [k: string]: any | null;
597
- } | undefined;
598
- clarifai?: {
599
- [k: string]: any | null;
600
- } | undefined;
601
- cloudflare?: {
602
- [k: string]: any | null;
603
- } | undefined;
604
- cohere?: {
605
- [k: string]: any | null;
606
- } | undefined;
607
- crofai?: {
608
- [k: string]: any | null;
609
- } | undefined;
610
- crucible?: {
611
- [k: string]: any | null;
612
- } | undefined;
613
- crusoe?: {
614
- [k: string]: any | null;
615
- } | undefined;
616
- darkbloom?: {
617
- [k: string]: any | null;
618
- } | undefined;
619
- decart?: {
620
- [k: string]: any | null;
621
- } | undefined;
622
- deepgram?: {
623
- [k: string]: any | null;
624
- } | undefined;
625
- deepinfra?: {
626
- [k: string]: any | null;
627
- } | undefined;
628
- deepseek?: {
629
- [k: string]: any | null;
630
- } | undefined;
631
- dekallm?: {
632
- [k: string]: any | null;
633
- } | undefined;
634
- digitalocean?: {
635
- [k: string]: any | null;
636
- } | undefined;
637
- enfer?: {
638
- [k: string]: any | null;
639
- } | undefined;
640
- "fake-provider"?: {
641
- [k: string]: any | null;
642
- } | undefined;
643
- featherless?: {
644
- [k: string]: any | null;
645
- } | undefined;
646
- fireworks?: {
647
- [k: string]: any | null;
648
- } | undefined;
649
- friendli?: {
650
- [k: string]: any | null;
651
- } | undefined;
652
- gmicloud?: {
653
- [k: string]: any | null;
654
- } | undefined;
655
- "google-ai-studio"?: {
656
- [k: string]: any | null;
657
- } | undefined;
658
- "google-vertex"?: {
659
- [k: string]: any | null;
660
- } | undefined;
661
- gopomelo?: {
662
- [k: string]: any | null;
663
- } | undefined;
664
- groq?: {
665
- [k: string]: any | null;
666
- } | undefined;
667
- heygen?: {
668
- [k: string]: any | null;
669
- } | undefined;
670
- huggingface?: {
671
- [k: string]: any | null;
672
- } | undefined;
673
- hyperbolic?: {
674
- [k: string]: any | null;
675
- } | undefined;
676
- "hyperbolic-quantized"?: {
677
- [k: string]: any | null;
678
- } | undefined;
679
- inception?: {
680
- [k: string]: any | null;
681
- } | undefined;
682
- inceptron?: {
683
- [k: string]: any | null;
684
- } | undefined;
685
- "inferact-vllm"?: {
686
- [k: string]: any | null;
687
- } | undefined;
688
- "inference-net"?: {
689
- [k: string]: any | null;
690
- } | undefined;
691
- infermatic?: {
692
- [k: string]: any | null;
693
- } | undefined;
694
- inflection?: {
695
- [k: string]: any | null;
696
- } | undefined;
697
- inocloud?: {
698
- [k: string]: any | null;
699
- } | undefined;
700
- "io-net"?: {
701
- [k: string]: any | null;
702
- } | undefined;
703
- ionstream?: {
704
- [k: string]: any | null;
705
- } | undefined;
706
- klusterai?: {
707
- [k: string]: any | null;
708
- } | undefined;
709
- lambda?: {
710
- [k: string]: any | null;
711
- } | undefined;
712
- lepton?: {
713
- [k: string]: any | null;
714
- } | undefined;
715
- liquid?: {
716
- [k: string]: any | null;
717
- } | undefined;
718
- lynn?: {
719
- [k: string]: any | null;
720
- } | undefined;
721
- "lynn-private"?: {
722
- [k: string]: any | null;
723
- } | undefined;
724
- mancer?: {
725
- [k: string]: any | null;
726
- } | undefined;
727
- "mancer-old"?: {
728
- [k: string]: any | null;
729
- } | undefined;
730
- mara?: {
731
- [k: string]: any | null;
732
- } | undefined;
733
- meta?: {
734
- [k: string]: any | null;
735
- } | undefined;
736
- minimax?: {
737
- [k: string]: any | null;
738
- } | undefined;
739
- mistral?: {
740
- [k: string]: any | null;
741
- } | undefined;
742
- modal?: {
743
- [k: string]: any | null;
744
- } | undefined;
745
- modelrun?: {
746
- [k: string]: any | null;
747
- } | undefined;
748
- modular?: {
749
- [k: string]: any | null;
750
- } | undefined;
751
- moonshotai?: {
752
- [k: string]: any | null;
753
- } | undefined;
754
- morph?: {
755
- [k: string]: any | null;
756
- } | undefined;
757
- ncompass?: {
758
- [k: string]: any | null;
759
- } | undefined;
760
- nebius?: {
761
- [k: string]: any | null;
762
- } | undefined;
763
- "nex-agi"?: {
764
- [k: string]: any | null;
765
- } | undefined;
766
- nextbit?: {
767
- [k: string]: any | null;
768
- } | undefined;
769
- nineteen?: {
770
- [k: string]: any | null;
771
- } | undefined;
772
- novita?: {
773
- [k: string]: any | null;
774
- } | undefined;
775
- nvidia?: {
776
- [k: string]: any | null;
777
- } | undefined;
778
- octoai?: {
779
- [k: string]: any | null;
780
- } | undefined;
781
- "open-inference"?: {
782
- [k: string]: any | null;
783
- } | undefined;
784
- openai?: {
785
- [k: string]: any | null;
786
- } | undefined;
787
- parasail?: {
788
- [k: string]: any | null;
789
- } | undefined;
790
- perceptron?: {
791
- [k: string]: any | null;
792
- } | undefined;
793
- perplexity?: {
794
- [k: string]: any | null;
795
- } | undefined;
796
- phala?: {
797
- [k: string]: any | null;
798
- } | undefined;
799
- poolside?: {
800
- [k: string]: any | null;
801
- } | undefined;
802
- quiver?: {
803
- [k: string]: any | null;
804
- } | undefined;
805
- recraft?: {
806
- [k: string]: any | null;
807
- } | undefined;
808
- recursal?: {
809
- [k: string]: any | null;
810
- } | undefined;
811
- reflection?: {
812
- [k: string]: any | null;
813
- } | undefined;
814
- reka?: {
815
- [k: string]: any | null;
816
- } | undefined;
817
- relace?: {
818
- [k: string]: any | null;
819
- } | undefined;
820
- replicate?: {
821
- [k: string]: any | null;
822
- } | undefined;
823
- sakana?: {
824
- [k: string]: any | null;
825
- } | undefined;
826
- sambanova?: {
827
- [k: string]: any | null;
828
- } | undefined;
829
- "sambanova-cloaked"?: {
830
- [k: string]: any | null;
831
- } | undefined;
832
- seed?: {
833
- [k: string]: any | null;
834
- } | undefined;
835
- "sf-compute"?: {
836
- [k: string]: any | null;
837
- } | undefined;
838
- siliconflow?: {
839
- [k: string]: any | null;
840
- } | undefined;
841
- sourceful?: {
842
- [k: string]: any | null;
843
- } | undefined;
844
- stealth?: {
845
- [k: string]: any | null;
846
- } | undefined;
847
- stepfun?: {
848
- [k: string]: any | null;
849
- } | undefined;
850
- streamlake?: {
851
- [k: string]: any | null;
852
- } | undefined;
853
- switchpoint?: {
854
- [k: string]: any | null;
855
- } | undefined;
856
- targon?: {
857
- [k: string]: any | null;
858
- } | undefined;
859
- tenstorrent?: {
860
- [k: string]: any | null;
861
- } | undefined;
862
- together?: {
863
- [k: string]: any | null;
864
- } | undefined;
865
- "together-lite"?: {
866
- [k: string]: any | null;
867
- } | undefined;
868
- ubicloud?: {
869
- [k: string]: any | null;
870
- } | undefined;
871
- upstage?: {
872
- [k: string]: any | null;
873
- } | undefined;
874
- venice?: {
875
- [k: string]: any | null;
876
- } | undefined;
877
- wafer?: {
878
- [k: string]: any | null;
879
- } | undefined;
880
- wandb?: {
881
- [k: string]: any | null;
882
- } | undefined;
883
- xai?: {
884
- [k: string]: any | null;
885
- } | undefined;
886
- xiaomi?: {
887
- [k: string]: any | null;
888
- } | undefined;
889
- "z-ai"?: {
890
- [k: string]: any | null;
891
- } | undefined;
892
- };
893
- /** @internal */
894
- export declare const ImageGenerationRequestOptions$outboundSchema: z.ZodType<ImageGenerationRequestOptions$Outbound, ImageGenerationRequestOptions>;
895
- export declare function imageGenerationRequestOptionsToJSON(imageGenerationRequestOptions: ImageGenerationRequestOptions): string;
896
- /** @internal */
897
- export type ImageGenerationRequestProvider$Outbound = {
898
- options?: ImageGenerationRequestOptions$Outbound | undefined;
899
- };
900
- /** @internal */
901
- export declare const ImageGenerationRequestProvider$outboundSchema: z.ZodType<ImageGenerationRequestProvider$Outbound, ImageGenerationRequestProvider>;
902
- export declare function imageGenerationRequestProviderToJSON(imageGenerationRequestProvider: ImageGenerationRequestProvider): string;
903
- /** @internal */
904
155
  export declare const ImageGenerationRequestQuality$outboundSchema: z.ZodType<string, ImageGenerationRequestQuality>;
905
156
  /** @internal */
906
157
  export declare const ImageGenerationRequestResolution$outboundSchema: z.ZodType<string, ImageGenerationRequestResolution>;
@@ -914,7 +165,7 @@ export type ImageGenerationRequest$Outbound = {
914
165
  output_compression?: number | undefined;
915
166
  output_format?: string | undefined;
916
167
  prompt: string;
917
- provider?: ImageGenerationRequestProvider$Outbound | undefined;
168
+ provider?: ImageGenerationProviderPreferences$Outbound | undefined;
918
169
  quality?: string | undefined;
919
170
  resolution?: string | undefined;
920
171
  seed?: number | undefined;