@brotu/ai 0.5.0 → 0.6.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/CATALOG.md CHANGED
@@ -1,18 +1,102 @@
1
1
  <!-- Generated by scripts/generate-catalog-doc.ts. Do not edit by hand. -->
2
2
  # Supported catalog
3
3
 
4
- 97 models: 37 video, 29 image, 12 speech, 19 text.
4
+ 146 models: 74 video, 41 image, 12 speech, 19 text.
5
5
 
6
6
  Every model is served by its vendor's own API — no aggregator sits in between, so
7
7
  the key you configure is the account that runs the work and bills it.
8
8
 
9
- Providers: byteplus, elevenlabs, google, kling, openai, qwen.
9
+ Providers: byteplus, elevenlabs, google, kling, openai, qwen, topaz.
10
10
 
11
11
  Every model here is reachable through one `ai.image`/`ai.video` call with the same
12
12
  params. What differs between them is only what this table records: durations,
13
13
  resolutions, aspect ratios and capabilities.
14
14
 
15
- ## Video (37)
15
+ ## Video (74)
16
+
17
+ ### aaa-9
18
+
19
+ | id | duration | resolutions | aspect | capabilities | served by |
20
+ |---|---|---|---|---|---|
21
+ | `aaa-9` | — | 720p, 1080p, 4k | — | — | topaz |
22
+
23
+ ### ahq-12
24
+
25
+ | id | duration | resolutions | aspect | capabilities | served by |
26
+ |---|---|---|---|---|---|
27
+ | `ahq-12` | — | 720p, 1080p, 4k | — | — | topaz |
28
+
29
+ ### aion-1
30
+
31
+ | id | duration | resolutions | aspect | capabilities | served by |
32
+ |---|---|---|---|---|---|
33
+ | `aion-1` | — | 720p, 1080p, 4k | — | — | topaz |
34
+
35
+ ### alq-13
36
+
37
+ | id | duration | resolutions | aspect | capabilities | served by |
38
+ |---|---|---|---|---|---|
39
+ | `alq-13` | — | 720p, 1080p, 4k | — | — | topaz |
40
+
41
+ ### alqs-2
42
+
43
+ | id | duration | resolutions | aspect | capabilities | served by |
44
+ |---|---|---|---|---|---|
45
+ | `alqs-2` | — | 720p, 1080p, 4k | — | — | topaz |
46
+
47
+ ### amq-13
48
+
49
+ | id | duration | resolutions | aspect | capabilities | served by |
50
+ |---|---|---|---|---|---|
51
+ | `amq-13` | — | 720p, 1080p, 4k | — | — | topaz |
52
+
53
+ ### amqs-2
54
+
55
+ | id | duration | resolutions | aspect | capabilities | served by |
56
+ |---|---|---|---|---|---|
57
+ | `amqs-2` | — | 720p, 1080p, 4k | — | — | topaz |
58
+
59
+ ### apf-2
60
+
61
+ | id | duration | resolutions | aspect | capabilities | served by |
62
+ |---|---|---|---|---|---|
63
+ | `apf-2` | — | 720p, 1080p, 4k | — | — | topaz |
64
+
65
+ ### apo-8
66
+
67
+ | id | duration | resolutions | aspect | capabilities | served by |
68
+ |---|---|---|---|---|---|
69
+ | `apo-8` | — | 720p, 1080p, 4k | — | — | topaz |
70
+
71
+ ### ast-2
72
+
73
+ | id | duration | resolutions | aspect | capabilities | served by |
74
+ |---|---|---|---|---|---|
75
+ | `ast-2` | — | 720p, 1080p, 4k | — | — | topaz |
76
+
77
+ ### chf-3
78
+
79
+ | id | duration | resolutions | aspect | capabilities | served by |
80
+ |---|---|---|---|---|---|
81
+ | `chf-3` | — | 720p, 1080p, 4k | — | — | topaz |
82
+
83
+ ### chr-2
84
+
85
+ | id | duration | resolutions | aspect | capabilities | served by |
86
+ |---|---|---|---|---|---|
87
+ | `chr-2` | — | 720p, 1080p, 4k | — | — | topaz |
88
+
89
+ ### color-1
90
+
91
+ | id | duration | resolutions | aspect | capabilities | served by |
92
+ |---|---|---|---|---|---|
93
+ | `color-1` | — | 720p, 1080p, 4k | — | — | topaz |
94
+
95
+ ### ddv-3
96
+
97
+ | id | duration | resolutions | aspect | capabilities | served by |
98
+ |---|---|---|---|---|---|
99
+ | `ddv-3` | — | 720p, 1080p, 4k | — | — | topaz |
16
100
 
17
101
  ### dreamina-seedance-2-0-260128
18
102
 
@@ -38,12 +122,48 @@ resolutions, aspect ratios and capabilities.
38
122
  |---|---|---|---|---|---|
39
123
  | `dreamina-seedance-2-5-260628` | 4–30s | 480p, 720p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | — | byteplus |
40
124
 
125
+ ### dtd-4
126
+
127
+ | id | duration | resolutions | aspect | capabilities | served by |
128
+ |---|---|---|---|---|---|
129
+ | `dtd-4` | — | 720p, 1080p, 4k | — | — | topaz |
130
+
131
+ ### dtds-2
132
+
133
+ | id | duration | resolutions | aspect | capabilities | served by |
134
+ |---|---|---|---|---|---|
135
+ | `dtds-2` | — | 720p, 1080p, 4k | — | — | topaz |
136
+
137
+ ### dtv-4
138
+
139
+ | id | duration | resolutions | aspect | capabilities | served by |
140
+ |---|---|---|---|---|---|
141
+ | `dtv-4` | — | 720p, 1080p, 4k | — | — | topaz |
142
+
143
+ ### dtvs-2
144
+
145
+ | id | duration | resolutions | aspect | capabilities | served by |
146
+ |---|---|---|---|---|---|
147
+ | `dtvs-2` | — | 720p, 1080p, 4k | — | — | topaz |
148
+
149
+ ### gcg-5
150
+
151
+ | id | duration | resolutions | aspect | capabilities | served by |
152
+ |---|---|---|---|---|---|
153
+ | `gcg-5` | — | 720p, 1080p, 4k | — | — | topaz |
154
+
41
155
  ### gemini-omni-flash-preview
42
156
 
43
157
  | id | duration | resolutions | aspect | capabilities | served by |
44
158
  |---|---|---|---|---|---|
45
159
  | `gemini-omni-flash-preview` | 10s | 720p | 16:9, 9:16 | — | google |
46
160
 
161
+ ### ghq-5
162
+
163
+ | id | duration | resolutions | aspect | capabilities | served by |
164
+ |---|---|---|---|---|---|
165
+ | `ghq-5` | — | 720p, 1080p, 4k | — | — | topaz |
166
+
47
167
  ### happyhorse-1.0-i2v
48
168
 
49
169
  | id | duration | resolutions | aspect | capabilities | served by |
@@ -86,6 +206,18 @@ resolutions, aspect ratios and capabilities.
86
206
  |---|---|---|---|---|---|
87
207
  | `happyhorse-1.1-t2v` | 3–15s | 480P, 720P, 1080P | — | — | qwen |
88
208
 
209
+ ### iris-2
210
+
211
+ | id | duration | resolutions | aspect | capabilities | served by |
212
+ |---|---|---|---|---|---|
213
+ | `iris-2` | — | 720p, 1080p, 4k | — | — | topaz |
214
+
215
+ ### iris-3
216
+
217
+ | id | duration | resolutions | aspect | capabilities | served by |
218
+ |---|---|---|---|---|---|
219
+ | `iris-3` | — | 720p, 1080p, 4k | — | — | topaz |
220
+
89
221
  ### kling
90
222
 
91
223
  | id | duration | resolutions | aspect | capabilities | served by |
@@ -101,6 +233,48 @@ resolutions, aspect ratios and capabilities.
101
233
  | `kling/v3` | 3, 4, 5, 6, 7, 8, 10, 12, 15s | 720p, 1080p, 4k | 16:9, 9:16, 1:1 | — | kling |
102
234
  | `kling/v3-turbo` | 3, 4, 5, 6, 7, 8, 10, 12, 15s | 720p, 1080p | 16:9, 9:16, 1:1 | — | kling |
103
235
 
236
+ ### nxf-1
237
+
238
+ | id | duration | resolutions | aspect | capabilities | served by |
239
+ |---|---|---|---|---|---|
240
+ | `nxf-1` | — | 720p, 1080p, 4k | — | — | topaz |
241
+
242
+ ### nxhf-1
243
+
244
+ | id | duration | resolutions | aspect | capabilities | served by |
245
+ |---|---|---|---|---|---|
246
+ | `nxhf-1` | — | 720p, 1080p, 4k | — | — | topaz |
247
+
248
+ ### nxl-1
249
+
250
+ | id | duration | resolutions | aspect | capabilities | served by |
251
+ |---|---|---|---|---|---|
252
+ | `nxl-1` | — | 720p, 1080p, 4k | — | — | topaz |
253
+
254
+ ### nyx-3
255
+
256
+ | id | duration | resolutions | aspect | capabilities | served by |
257
+ |---|---|---|---|---|---|
258
+ | `nyx-3` | — | 720p, 1080p, 4k | — | — | topaz |
259
+
260
+ ### pnat-1
261
+
262
+ | id | duration | resolutions | aspect | capabilities | served by |
263
+ |---|---|---|---|---|---|
264
+ | `pnat-1` | — | 720p, 1080p, 4k | — | — | topaz |
265
+
266
+ ### prob-4
267
+
268
+ | id | duration | resolutions | aspect | capabilities | served by |
269
+ |---|---|---|---|---|---|
270
+ | `prob-4` | — | 720p, 1080p, 4k | — | — | topaz |
271
+
272
+ ### rhea-1
273
+
274
+ | id | duration | resolutions | aspect | capabilities | served by |
275
+ |---|---|---|---|---|---|
276
+ | `rhea-1` | — | 720p, 1080p, 4k | — | — | topaz |
277
+
104
278
  ### seedance-1-0-lite-i2v-250428
105
279
 
106
280
  | id | duration | resolutions | aspect | capabilities | served by |
@@ -131,6 +305,48 @@ resolutions, aspect ratios and capabilities.
131
305
  |---|---|---|---|---|---|
132
306
  | `seedance-1-5-pro-251215` | 4–12s | 480p, 720p, 1080p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | — | byteplus |
133
307
 
308
+ ### slf-2
309
+
310
+ | id | duration | resolutions | aspect | capabilities | served by |
311
+ |---|---|---|---|---|---|
312
+ | `slf-2` | — | 720p, 1080p, 4k | — | — | topaz |
313
+
314
+ ### slhq-1
315
+
316
+ | id | duration | resolutions | aspect | capabilities | served by |
317
+ |---|---|---|---|---|---|
318
+ | `slhq-1` | — | 720p, 1080p, 4k | — | — | topaz |
319
+
320
+ ### slm-1
321
+
322
+ | id | duration | resolutions | aspect | capabilities | served by |
323
+ |---|---|---|---|---|---|
324
+ | `slm-1` | — | 720p, 1080p, 4k | — | — | topaz |
325
+
326
+ ### slp-2.6
327
+
328
+ | id | duration | resolutions | aspect | capabilities | served by |
329
+ |---|---|---|---|---|---|
330
+ | `slp-2.6` | — | 720p, 1080p, 4k | — | — | topaz |
331
+
332
+ ### thd-3
333
+
334
+ | id | duration | resolutions | aspect | capabilities | served by |
335
+ |---|---|---|---|---|---|
336
+ | `thd-3` | — | 720p, 1080p, 4k | — | — | topaz |
337
+
338
+ ### thf-4
339
+
340
+ | id | duration | resolutions | aspect | capabilities | served by |
341
+ |---|---|---|---|---|---|
342
+ | `thf-4` | — | 720p, 1080p, 4k | — | — | topaz |
343
+
344
+ ### thm-2
345
+
346
+ | id | duration | resolutions | aspect | capabilities | served by |
347
+ |---|---|---|---|---|---|
348
+ | `thm-2` | — | 720p, 1080p, 4k | — | — | topaz |
349
+
134
350
  ### veo-3.1-fast-generate-preview
135
351
 
136
352
  | id | duration | resolutions | aspect | capabilities | served by |
@@ -191,7 +407,31 @@ resolutions, aspect ratios and capabilities.
191
407
  |---|---|---|---|---|---|
192
408
  | `wan2.7-t2v` | 2–15s | 720P, 1080P | — | — | qwen |
193
409
 
194
- ## Image (29)
410
+ ### wonder-1
411
+
412
+ | id | duration | resolutions | aspect | capabilities | served by |
413
+ |---|---|---|---|---|---|
414
+ | `wonder-1` | — | 720p, 1080p, 4k | — | — | topaz |
415
+
416
+ ## Image (41)
417
+
418
+ ### bloom-2
419
+
420
+ | id | resolutions | aspect | input | served by |
421
+ |---|---|---|---|---|
422
+ | `bloom-2` | — | — | image_required | topaz |
423
+
424
+ ### cgi
425
+
426
+ | id | resolutions | aspect | input | served by |
427
+ |---|---|---|---|---|
428
+ | `cgi` | — | — | image_required | topaz |
429
+
430
+ ### denoise-max
431
+
432
+ | id | resolutions | aspect | input | served by |
433
+ |---|---|---|---|---|
434
+ | `denoise-max` | — | — | image_required | topaz |
195
435
 
196
436
  ### dola-seedream-5-0-pro-260628
197
437
 
@@ -241,6 +481,12 @@ resolutions, aspect ratios and capabilities.
241
481
  |---|---|---|---|---|
242
482
  | `gpt-image-2` | — | — | image_optional | openai |
243
483
 
484
+ ### high-fidelity-v2
485
+
486
+ | id | resolutions | aspect | input | served by |
487
+ |---|---|---|---|---|
488
+ | `high-fidelity-v2` | — | — | image_required | topaz |
489
+
244
490
  ### kling
245
491
 
246
492
  | id | resolutions | aspect | input | served by |
@@ -251,6 +497,12 @@ resolutions, aspect ratios and capabilities.
251
497
  | `kling/image-v2-1` | — | 16:9, 9:16, 1:1 | text_only | kling |
252
498
  | `kling/image-v2-new` | — | 16:9, 9:16, 1:1 | text_only | kling |
253
499
 
500
+ ### low-resolution-v2
501
+
502
+ | id | resolutions | aspect | input | served by |
503
+ |---|---|---|---|---|
504
+ | `low-resolution-v2` | — | — | image_required | topaz |
505
+
254
506
  ### qwen-image-2.0
255
507
 
256
508
  | id | resolutions | aspect | input | served by |
@@ -281,6 +533,18 @@ resolutions, aspect ratios and capabilities.
281
533
  |---|---|---|---|---|
282
534
  | `qwen-image-max` | — | — | image_optional | qwen |
283
535
 
536
+ ### recovery-v2
537
+
538
+ | id | resolutions | aspect | input | served by |
539
+ |---|---|---|---|---|
540
+ | `recovery-v2` | — | — | image_required | topaz |
541
+
542
+ ### redefine
543
+
544
+ | id | resolutions | aspect | input | served by |
545
+ |---|---|---|---|---|
546
+ | `redefine` | — | — | image_required | topaz |
547
+
284
548
  ### seededit-3-0-i2i-250628
285
549
 
286
550
  | id | resolutions | aspect | input | served by |
@@ -317,6 +581,24 @@ resolutions, aspect ratios and capabilities.
317
581
  |---|---|---|---|---|
318
582
  | `seedream-5-0-260128` | 1K, 2K, 4K | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | image_optional | byteplus |
319
583
 
584
+ ### standard-max
585
+
586
+ | id | resolutions | aspect | input | served by |
587
+ |---|---|---|---|---|
588
+ | `standard-max` | — | — | image_required | topaz |
589
+
590
+ ### standard-v2
591
+
592
+ | id | resolutions | aspect | input | served by |
593
+ |---|---|---|---|---|
594
+ | `standard-v2` | — | — | image_required | topaz |
595
+
596
+ ### text-refine
597
+
598
+ | id | resolutions | aspect | input | served by |
599
+ |---|---|---|---|---|
600
+ | `text-refine` | — | — | image_required | topaz |
601
+
320
602
  ### wan2.6-image
321
603
 
322
604
  | id | resolutions | aspect | input | served by |
@@ -341,6 +623,18 @@ resolutions, aspect ratios and capabilities.
341
623
  |---|---|---|---|---|
342
624
  | `wan2.7-image-pro` | 1K, 2K, 4K | — | image_optional | qwen |
343
625
 
626
+ ### wonder
627
+
628
+ | id | resolutions | aspect | input | served by |
629
+ |---|---|---|---|---|
630
+ | `wonder` | — | — | image_required | topaz |
631
+
632
+ ### wonder-3.5
633
+
634
+ | id | resolutions | aspect | input | served by |
635
+ |---|---|---|---|---|
636
+ | `wonder-3.5` | — | — | image_required | topaz |
637
+
344
638
  ### z-image-turbo
345
639
 
346
640
  | id | resolutions | aspect | input | served by |
package/README.md CHANGED
@@ -27,7 +27,7 @@ Kling, Seedance, Wan, Veo, Gemini, gpt-image and ElevenLabs all speak different
27
27
 
28
28
  Get your key (`brotu_sk_…`) at [brotu.app](https://brotu.app). Pass a vendor key you already have and that model hits the vendor. Everything else generates on Brotu.
29
29
 
30
- 97 models: 37 video, 29 image, 12 speech, 19 text. Full table in [CATALOG.md](./CATALOG.md). That file is generated from the catalog, so it cannot drift from what the code supports.
30
+ 146 models: 74 video, 41 image, 12 speech, 19 text. Full table in [CATALOG.md](./CATALOG.md). That file is generated from the catalog, so it cannot drift from what the code supports.
31
31
 
32
32
  ## Install
33
33
 
@@ -57,6 +57,7 @@ const ai = brotu({
57
57
  openai: { apiKey: process.env.OPENAI_API_KEY! },
58
58
  qwen: { apiKey: process.env.QWEN_API_KEY! },
59
59
  elevenlabs: { apiKey: process.env.ELEVENLABS_API_KEY! },
60
+ topaz: { apiKey: process.env.TOPAZ_API_KEY! },
60
61
  },
61
62
  webhook: {
62
63
  url: "https://my.app/hooks/brotu",
@@ -71,8 +72,8 @@ Every public call returns `{ data, error }`. `data` is unusable until you narrow
71
72
 
72
73
  | Surface | Methods |
73
74
  |---|---|
74
- | `ai.video` | `submit` / `generate` / `list` |
75
- | `ai.image` | `submit` / `generate` / `list` |
75
+ | `ai.video` | `submit` / `generate` / `list` / `upscale` |
76
+ | `ai.image` | `submit` / `generate` / `list` / `upscale` |
76
77
  | `ai.text` | `submit` / `generate` / `list` |
77
78
  | `ai.audio` | `submit` / `generate` / `list` |
78
79
  | `ai.jobs` | `poll` / `wait` |
@@ -99,7 +100,7 @@ ai.audio.list();
99
100
  // reason: "Brotu generates image and video only. Pass providers.kling to run this one." }, …]
100
101
  ```
101
102
 
102
- With a Brotu key alone that is 29 image and 37 video models, and the 31 speech and text models listed with the key they are waiting on. Models you cannot reach stay in the list on purpose: hiding them would hide the gap. `ai.models()` is the filtered view, only what runs.
103
+ With a Brotu key alone that is 41 image and 74 video models, and the 31 speech and text models listed with the key they are waiting on. Models you cannot reach stay in the list on purpose: hiding them would hide the gap. `ai.models()` is the filtered view, only what runs.
103
104
 
104
105
  ## Video
105
106
 
@@ -0,0 +1,71 @@
1
+ import { type Job, type JobSnapshot } from "../lib/jobs";
2
+ import { type AudioGenerationParams, type ContentGeneratorPort, type CostEstimate, type GenerationOutput, type GenerationParams, type GenerationResult, type GenerationType, type ImageGenerationParams, type TextGenerationParams, type VideoGenerationParams } from "../ports/content-generator.port";
3
+ import { type TopazBinding } from "../providers/topaz.models";
4
+ export interface TopazAdapterOptions {
5
+ apiKey: string;
6
+ baseUrl?: string;
7
+ maxPollAttempts?: number;
8
+ }
9
+ interface StatusResponse {
10
+ status?: string;
11
+ progress?: number;
12
+ message?: string;
13
+ outputSize?: string;
14
+ estimates?: {
15
+ cost?: number[];
16
+ time?: number[];
17
+ };
18
+ download?: {
19
+ url?: string;
20
+ expiresIn?: number;
21
+ expiresAt?: number;
22
+ };
23
+ }
24
+ /**
25
+ * Topaz Labs video API.
26
+ *
27
+ * The express endpoint skips source probing and multi-part accept/complete:
28
+ * create the request, PUT the file at the signed URL, then poll /status.
29
+ * Auth is `X-API-Key`, not Bearer.
30
+ */
31
+ export declare class TopazAdapter implements ContentGeneratorPort {
32
+ readonly providerName = "topaz";
33
+ readonly supportedTypes: GenerationType[];
34
+ private readonly opts;
35
+ constructor(opts: TopazAdapterOptions);
36
+ private get baseUrl();
37
+ private get headers();
38
+ private binding;
39
+ /** 720p / 1080p / 4k, or an explicit "1920x1080" / "1920*1080" pair. */
40
+ resolutionOf(resolution: string | undefined): {
41
+ width: number;
42
+ height: number;
43
+ };
44
+ containerOf(url: string): "mp4" | "mov" | "mkv";
45
+ filterOf(binding: TopazBinding, params: VideoGenerationParams): Record<string, unknown>;
46
+ requestBody(binding: TopazBinding, params: VideoGenerationParams, sourceUrl: string): Record<string, unknown>;
47
+ private request;
48
+ private downloadSource;
49
+ private submitTask;
50
+ outputsFrom(payload: StatusResponse, job: Job): GenerationOutput[];
51
+ private snapshot;
52
+ private run;
53
+ completeJob(job: Job): Promise<JobSnapshot>;
54
+ generateVideo(params: VideoGenerationParams): Promise<GenerationResult>;
55
+ imageBody(binding: TopazBinding, params: ImageGenerationParams, sourceUrl: string): Record<string, string>;
56
+ private submitImage;
57
+ private imageSnapshot;
58
+ private runImage;
59
+ generateImage(params: ImageGenerationParams): Promise<GenerationResult>;
60
+ generateText(params: TextGenerationParams): Promise<GenerationResult>;
61
+ generateAudio(params: AudioGenerationParams): Promise<GenerationResult>;
62
+ estimateCost(type: GenerationType, params: GenerationParams): Promise<CostEstimate>;
63
+ supportsModel(model: string): boolean;
64
+ getAvailableModels(): {
65
+ id: string;
66
+ name: string;
67
+ type: GenerationType;
68
+ }[];
69
+ }
70
+ export {};
71
+ //# sourceMappingURL=topaz.adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topaz.adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/topaz.adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,GAAG,EACR,KAAK,WAAW,EAEhB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAEjB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAGN,KAAK,YAAY,EACjB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAyBD,UAAU,cAAc;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;I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AAG;IAsDX,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAehD;IAED,aAAa,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAEtE;IAED,SAAS,CACR,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,qBAAqB,EAC7B,SAAS,EAAE,MAAM,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAwBxB;YAEa,WAAW;YAiDX,aAAa;YAyDb,QAAQ;IAuDtB,aAAa,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAEtE;IAED,YAAY,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAEpE;IAED,aAAa,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAEtE;IAED,YAAY,CACX,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,gBAAgB,GACtB,OAAO,CAAC,YAAY,CAAC,CAEvB;IAED,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpC;IAED,kBAAkB,IAAI;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,cAAc,CAAA;KAAE,EAAE,CAMzE;CACD"}
package/dist/catalog.cjs CHANGED
@@ -991,6 +991,105 @@ var QWEN_CATALOG = [
991
991
  )
992
992
  ];
993
993
 
994
+ // src/providers/topaz.models.ts
995
+ var VIDEO_RES = ["720p", "1080p", "4k"];
996
+ function video(id, name, kind, description) {
997
+ return [id, { name, vendorModel: id, surface: "video", kind, description }];
998
+ }
999
+ function image(id, name, vendorModel, imagePath, description) {
1000
+ return [
1001
+ id,
1002
+ { name, vendorModel, surface: "image", imagePath, description }
1003
+ ];
1004
+ }
1005
+ var ENTRIES = [
1006
+ // Precision video upscale (Proteus family)
1007
+ video("prob-4", "Proteus", "upscale", "Default video upscale. Preserves the source."),
1008
+ video("pnat-1", "Proteus Natural", "upscale", "Softer Proteus. 2\xD7 only."),
1009
+ video("rhea-1", "Rhea", "upscale", "High-fidelity 4\xD7 upscale for fine detail."),
1010
+ video("thd-3", "Theia Fine Tune Detail", "upscale", "More aggressive detail."),
1011
+ video("thf-4", "Theia Fine Tune Fidelity", "upscale", "Lighter touch, closer to the source."),
1012
+ video("thm-2", "Themis 2", "upscale", "Motion deblur."),
1013
+ video("aaa-9", "Artemis Aliasing / Moire", "upscale", "Aliasing and moire cleanup."),
1014
+ video("ahq-12", "Artemis High Quality", "upscale", "Artemis for clean footage."),
1015
+ video("amq-13", "Artemis Medium Quality", "upscale", "Artemis for typical compression."),
1016
+ video("amqs-2", "Artemis Medium Halo", "upscale", "Medium halo reduction."),
1017
+ video("alq-13", "Artemis Low Quality", "upscale", "Artemis for degraded sources."),
1018
+ video("alqs-2", "Artemis Strong Halo", "upscale", "Strong halo reduction."),
1019
+ video("iris-3", "Iris Medium Quality", "upscale", "Face recovery, medium quality."),
1020
+ video("iris-2", "Iris Low Quality", "upscale", "Face recovery, low quality."),
1021
+ video("dtv-4", "Dione TV", "upscale", "Deinterlace broadcast footage."),
1022
+ video("ddv-3", "Dione DV", "upscale", "Deinterlace camcorder footage."),
1023
+ video("dtvs-2", "Dione Robust", "upscale", "Deinterlace degraded interlaced sources."),
1024
+ video("dtd-4", "Dione Dehalo", "upscale", "Deinterlace with halo cleanup."),
1025
+ video("dtds-2", "Dione Robust Dehalo", "upscale", "Deinterlace, degraded, with halo cleanup."),
1026
+ video("ghq-5", "Gaia High Quality", "upscale", "CGI and animation, high quality."),
1027
+ video("gcg-5", "Gaia CG", "upscale", "General CGI and renders."),
1028
+ video("nyx-3", "Nyx", "upscale", "Default video denoise."),
1029
+ video("nxl-1", "Nyx XL", "upscale", "Heavy video denoise."),
1030
+ video("nxhf-1", "Nyx High Fidelity", "upscale", "Light denoise, keep texture."),
1031
+ video("nxf-1", "Nyx Fast", "upscale", "Fast video denoise."),
1032
+ video("color-1", "Video Colorization", "upscale", "Black-and-white to color."),
1033
+ // Generative / creative video
1034
+ video("slp-2.6", "Starlight Precise 2.6", "upscale", "Generative upscale to 4K. Faces, texture, text."),
1035
+ video("slhq-1", "Starlight HQ", "upscale", "Maximum quality generative enhance."),
1036
+ video("slf-2", "Starlight Fast 2", "upscale", "Faster generative upscale."),
1037
+ video("slm-1", "Starlight Mini", "upscale", "Archival and interlaced restoration."),
1038
+ video("wonder-1", "Starlight Sharp", "upscale", "Local-first sharpening restore."),
1039
+ video("ast-2", "Astra 2", "upscale", "Creative GenAI video upscale."),
1040
+ // Frame interpolation — not upscalers
1041
+ video("aion-1", "Aion", "interpolation", "Extreme slow motion on complex, high-res motion."),
1042
+ video("apo-8", "Apollo", "interpolation", "Default slow-mo and frame-rate conversion."),
1043
+ video("apf-2", "Apollo Fast", "interpolation", "Faster Apollo."),
1044
+ video("chr-2", "Chronos", "interpolation", "Interpolation for harder motion."),
1045
+ video("chf-3", "Chronos Fast", "interpolation", "Faster Chronos."),
1046
+ // Image — Gigapixel / enhance
1047
+ image("standard-v2", "Standard 2", "Standard V2", "/image/v1/enhance/async", "Default image upscale."),
1048
+ image("high-fidelity-v2", "High Fidelity 2", "High Fidelity V2", "/image/v1/enhance/async", "Maximum source preservation."),
1049
+ image("low-resolution-v2", "Low Resolution 2", "Low Resolution V2", "/image/v1/enhance/async", "Tiny or heavily compressed sources."),
1050
+ image("cgi", "Art & CGI", "CGI", "/image/v1/enhance/async", "Illustrations, renders, game art."),
1051
+ image("text-refine", "Text & Shapes", "Text Refine", "/image/v1/enhance/async", "Documents, screenshots, type."),
1052
+ // Image — generative enhance
1053
+ image("standard-max", "Standard Max", "Standard MAX", "/image/v1/enhance-gen/async", "Default generative image upscale."),
1054
+ image("wonder", "Wonder", "Wonder", "/image/v1/enhance-gen/async", "One-click generative restore."),
1055
+ image("wonder-3.5", "Wonder 3.5", "Wonder 3.5", "/image/v1/enhance-gen/async", "Highest-quality generative image upscale."),
1056
+ image("redefine", "Redefine", "Redefine", "/image/v1/enhance-gen/async", "Prompt-guided generative enhance."),
1057
+ image("recovery-v2", "Recover 3", "Recovery V2", "/image/v1/enhance-gen/async", "Heavily damaged sources."),
1058
+ image("bloom-2", "Bloom 2", "Bloom 2", "/image/v1/enhance-gen/async", "Creative upscale for GenAI images."),
1059
+ image("denoise-max", "Denoise Max", "Denoise Max", "/image/v1/denoise-gen/async", "Highest-quality image denoise.")
1060
+ ];
1061
+ var TOPAZ_MODELS = Object.fromEntries(
1062
+ ENTRIES.flatMap(([id, binding]) => {
1063
+ const rows = [[id, binding]];
1064
+ if (binding.surface === "image" && binding.vendorModel !== id) {
1065
+ rows.push([binding.vendorModel, binding]);
1066
+ }
1067
+ return rows;
1068
+ })
1069
+ );
1070
+ function nodeTypes(binding) {
1071
+ if (binding.surface === "image") return ["image_upscale"];
1072
+ return binding.kind === "interpolation" ? ["video_gen"] : ["video_upscale"];
1073
+ }
1074
+ var TOPAZ_CATALOG = ENTRIES.map(([id, binding]) => ({
1075
+ id,
1076
+ name: binding.name,
1077
+ category: binding.surface,
1078
+ inputType: binding.surface === "video" ? "video_required" : "image_required",
1079
+ nodeTypes: nodeTypes(binding),
1080
+ creditsPerUnit: 0,
1081
+ creditUnit: binding.surface === "video" ? "second" : "image",
1082
+ supportedResolutions: binding.surface === "video" ? [...VIDEO_RES] : void 0,
1083
+ provider: "topaz",
1084
+ description: binding.description
1085
+ }));
1086
+ var TOPAZ_VIDEO_MODELS = Object.fromEntries(
1087
+ ENTRIES.filter(([, binding]) => binding.surface === "video")
1088
+ );
1089
+ var TOPAZ_IMAGE_MODELS = Object.fromEntries(
1090
+ ENTRIES.filter(([, binding]) => binding.surface === "image")
1091
+ );
1092
+
994
1093
  // src/catalog.ts
995
1094
  var PROVIDER_BASE_URLS = {
996
1095
  byteplus: "https://ark.ap-southeast.bytepluses.com",
@@ -999,6 +1098,7 @@ var PROVIDER_BASE_URLS = {
999
1098
  google: "https://generativelanguage.googleapis.com",
1000
1099
  openai: "https://api.openai.com",
1001
1100
  qwen: "https://dashscope-intl.aliyuncs.com",
1101
+ topaz: "https://api.topazlabs.com",
1002
1102
  brotu: "https://api.brotu.app"
1003
1103
  };
1004
1104
  var DEFAULT_BROTU_API_URL = PROVIDER_BASE_URLS.brotu;
@@ -1016,7 +1116,8 @@ var BUILT_IN = [
1016
1116
  ...QWEN_CATALOG,
1017
1117
  ...OPENAI_CATALOG,
1018
1118
  ...GOOGLE_CATALOG,
1019
- ...ELEVENLABS_CATALOG
1119
+ ...ELEVENLABS_CATALOG,
1120
+ ...TOPAZ_CATALOG
1020
1121
  ];
1021
1122
  var catalog = BUILT_IN;
1022
1123
  var catalogMap = byId(BUILT_IN);
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAU9E,OAAO,KAAK,EAAE,cAAc,EAAkB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAgBhF,eAAO,MAAM,qBAAqB,QAA2B,CAAC;AA+B9D;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,GAAE,aAAa,EAAO,GAAG,IAAI,CAUjE;AAED,0EAA0E;AAC1E,wBAAgB,YAAY,IAAI,IAAI,CAGnC;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEnE;AAED,wBAAgB,SAAS,IAAI,aAAa,EAAE,CAE3C;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wDAAwD;AACxD,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAQvC;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,GACrB,gBAAgB,CAqClB;AAED;;;;G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B,CAAC;AAEhF,sEAAsE;AACtE,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,aAAa,CAAC;IACrB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,iBAAiB,EAAE,CAmC3E;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,EAAE,CAI3E"}
package/dist/catalog.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  registerModels,
11
11
  resetCatalog,
12
12
  resolveProvider
13
- } from "./chunk-3MC3RDAJ.js";
13
+ } from "./chunk-QQIHMDJC.js";
14
14
  export {
15
15
  BROTU_SUPPORTED_CATEGORIES,
16
16
  DEFAULT_BROTU_API_URL,