@picsart/ai-sdk 3.24.0 → 3.25.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 +35 -7
- package/index.d.ts +14 -1
- package/index.js +75 -43
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,9 +24,9 @@ npm install @picsart/ai-sdk
|
|
|
24
24
|
```typescript
|
|
25
25
|
import { createClient, Models, Model, catalog } from '@picsart/ai-sdk'
|
|
26
26
|
|
|
27
|
-
// Create a client — pass your
|
|
27
|
+
// Create a client — pass your Picsart API key
|
|
28
28
|
const ai = createClient({
|
|
29
|
-
|
|
29
|
+
apiKey: process.env.PICSART_API_KEY,
|
|
30
30
|
apiUrl: 'https://api.picsart.com',
|
|
31
31
|
})
|
|
32
32
|
|
|
@@ -49,13 +49,41 @@ Model(Models.Flux2Pro).params().toSchema() // param schema
|
|
|
49
49
|
Model(Models.Flux2Pro).validate({ prompt: 'a cat' })
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
## Authentication
|
|
53
|
+
|
|
54
|
+
Pass `apiKey` and the SDK sends `Authorization: Bearer <apiKey>` on every request
|
|
55
|
+
(a leading `Bearer ` is stripped if present). Create a key from the
|
|
56
|
+
[Authentication guide](https://picsart.com/api-platform/docs/authentication).
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
const ai = createClient({
|
|
60
|
+
apiKey: process.env.PICSART_API_KEY,
|
|
61
|
+
apiUrl: 'https://api.picsart.com',
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Keep the key server-side — anything shipped to a browser is public.
|
|
66
|
+
|
|
67
|
+
Apps that already handle auth themselves (session cookies, token refresh, a
|
|
68
|
+
backend proxy) can pass their own `fetch` instead. It takes precedence over
|
|
69
|
+
`apiKey` when both are set:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
const ai = createClient({
|
|
73
|
+
fetch: myAuthenticatedFetch,
|
|
74
|
+
apiUrl: 'https://api.picsart.com',
|
|
75
|
+
})
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`createClient` throws if neither `apiKey` nor `fetch` is provided.
|
|
79
|
+
|
|
52
80
|
## Drive Integration
|
|
53
81
|
|
|
54
82
|
Auto-save generations to Picsart Drive:
|
|
55
83
|
|
|
56
84
|
```typescript
|
|
57
85
|
const ai = createClient({
|
|
58
|
-
|
|
86
|
+
apiKey: process.env.PICSART_API_KEY,
|
|
59
87
|
apiUrl: 'https://api.picsart.com',
|
|
60
88
|
drive: { folder: 'AI Playground' },
|
|
61
89
|
})
|
|
@@ -83,7 +111,7 @@ as `mode: 'text'`. Each vendor uses its own native workflow, so capabilities are
|
|
|
83
111
|
```typescript
|
|
84
112
|
import { createClient, Models } from '@picsart/ai-sdk'
|
|
85
113
|
|
|
86
|
-
const ai = createClient({
|
|
114
|
+
const ai = createClient({ apiKey: process.env.PICSART_API_KEY, apiUrl: 'https://api.picsart.com' })
|
|
87
115
|
|
|
88
116
|
// Text in, text out
|
|
89
117
|
const { text } = await ai.generateText(Models.ClaudeOpus48, { prompt: 'Explain RAG in one line.' })
|
|
@@ -139,11 +167,11 @@ The SDK exports 7 symbols:
|
|
|
139
167
|
|
|
140
168
|
| Export | Type | Description |
|
|
141
169
|
|--------|------|-------------|
|
|
142
|
-
| `createClient` | function | Create an AI client from authenticated fetch |
|
|
170
|
+
| `createClient` | function | Create an AI client from an API key (or a custom authenticated fetch) |
|
|
143
171
|
| `Models` | object | Model catalog: 108 models + list/search/validate/toSchema |
|
|
144
172
|
| `GenerateResult` | type | `{ url, model, handle, drive? }` |
|
|
145
|
-
| `ClientConfig` | type | `{ fetch
|
|
146
|
-
| `AuthenticatedFetch` | type | `(url, init?) => Promise<Response>` |
|
|
173
|
+
| `ClientConfig` | type | `{ apiKey?, fetch?, apiUrl, drive? }` — one of `apiKey` / `fetch` required |
|
|
174
|
+
| `AuthenticatedFetch` | type | `(url, init?) => Promise<Response>` — for the custom-`fetch` path |
|
|
147
175
|
| `SdkTransport` | type | Advanced: custom transport interface |
|
|
148
176
|
| `WorkflowJobHandle` | type | Job handle for submit/status/cancel |
|
|
149
177
|
|
package/index.d.ts
CHANGED
|
@@ -1102,7 +1102,19 @@ type ModelInputById = {
|
|
|
1102
1102
|
};
|
|
1103
1103
|
"seed-audio-1.0": {
|
|
1104
1104
|
prompt: string;
|
|
1105
|
-
voiceId?: "zh_female_vv_uranus_bigtts" | "zh_female_xiaohe_uranus_bigtts" | "en_female_stokie_uranus_bigtts" | "en_female_dacey_uranus_bigtts" | "en_male_tim_uranus_bigtts" | "zh_male_m191_uranus_bigtts" | "zh_male_taocheng_uranus_bigtts" | "zh_male_sophie_uranus_bigtts" | "zh_female_yingyujiaoxue_uranus_bigtts" | "zh_male_dayi_uranus_bigtts" | "zh_female_mizai_uranus_bigtts" | "zh_female_jitangnv_uranus_bigtts" | "zh_female_meilinvyou_uranus_bigtts" | "zh_female_liuchangnv_uranus_bigtts" | "zh_male_ruyayichen_uranus_bigtts" | "zh_female_cancan_uranus_bigtts" | "zh_female_tianmeixiaoyuan_uranus_bigtts" | "zh_female_tianmeitaozi_uranus_bigtts" | "zh_female_shuangkuaisisi_uranus_bigtts" | "zh_female_peiqi_uranus_bigtts" | "zh_female_xiaoxue_uranus_bigtts" | "zh_female_yuanqi_uranus_bigtts" | "zh_female_kefunvsheng_uranus_bigtts" | "zh_male_shaonianzixin_uranus_bigtts" | "zh_female_linjianvhai_uranus_bigtts" | "zh_female_kiwi_uranus_bigtts" | "zh_female_sajiaoxuemei_uranus_bigtts" | "
|
|
1105
|
+
voiceId?: "zh_female_vv_uranus_bigtts" | "zh_female_xiaohe_uranus_bigtts" | "en_female_stokie_uranus_bigtts" | "en_female_dacey_uranus_bigtts" | "en_male_tim_uranus_bigtts" | "zh_male_m191_uranus_bigtts" | "zh_male_taocheng_uranus_bigtts" | "zh_male_sophie_uranus_bigtts" | "zh_female_yingyujiaoxue_uranus_bigtts" | "zh_male_dayi_uranus_bigtts" | "zh_female_mizai_uranus_bigtts" | "zh_female_jitangnv_uranus_bigtts" | "zh_female_meilinvyou_uranus_bigtts" | "zh_female_liuchangnv_uranus_bigtts" | "zh_male_ruyayichen_uranus_bigtts" | "zh_female_cancan_uranus_bigtts" | "zh_female_tianmeixiaoyuan_uranus_bigtts" | "zh_female_tianmeitaozi_uranus_bigtts" | "zh_female_shuangkuaisisi_uranus_bigtts" | "zh_female_peiqi_uranus_bigtts" | "zh_female_xiaoxue_uranus_bigtts" | "zh_female_yuanqi_uranus_bigtts" | "zh_female_kefunvsheng_uranus_bigtts" | "zh_male_shaonianzixin_uranus_bigtts" | "zh_female_linjianvhai_uranus_bigtts" | "zh_female_kiwi_uranus_bigtts" | "zh_female_sajiaoxuemei_uranus_bigtts" | "zh_male_liufei_uranus_bigtts" | "zh_female_qingxinnvsheng_uranus_bigtts" | "zh_male_sunwukong_uranus_bigtts" | "en_male_adam-imitation_uranus_bigtts" | "en_male_alberto_uranus_bigtts" | "en_male_alex_uranus_bigtts" | "en_female_allison_uranus_bigtts" | "en_female_authoritative-british_uranus_bigtts" | "en_female_authoritative-informative_uranus_bigtts" | "en_male_bill-jones_uranus_bigtts" | "en_male_bill_jones_corey_uranus_bigtts" | "en_male_brad_pitt_p1_uranus_bigtts" | "en_female_brittney_uranus_bigtts" | "en_female_brittney_pimintel_uranus_bigtts" | "en_male_bruce_uranus_bigtts" | "en_male_chandler_p1_uranus_bigtts" | "en_male_cowboy-bob_uranus_bigtts" | "en_male_cowboy_john_b_uranus_bigtts" | "en_male_david_uranus_bigtts" | "en_male_deep-voice_uranus_bigtts" | "en_male_diyuwenrounan_uranus_bigtts" | "en_male_evil-guy-oxley_uranus_bigtts" | "en_male_excited-male-voice_uranus_bigtts" | "en_male_father-christmas_uranus_bigtts" | "en_female_female_tutor_ms-jenny_uranus_bigtts" | "en_male_fernando-martinez_uranus_bigtts" | "en_male_godfather_uranus_bigtts" | "en_male_gollum_uranus_bigtts" | "en_male_hades_uranus_bigtts" | "en_female_hayley_uranus_bigtts" | "en_male_jamie_uranus_bigtts" | "en_female_jane_uranus_bigtts" | "en_female_jenny_uranus_bigtts" | "en_male_jidongchuanjiaoshi_uranus_bigtts" | "en_male_jimmy_uranus_bigtts" | "en_female_joanne_uranus_bigtts" | "en_male_joker_uranus_bigtts" | "en_male_josh_uranus_bigtts" | "en_male_josh_coery_uranus_bigtts" | "en_male_kevin_uranus_bigtts" | "en_male_knightley_uranus_bigtts" | "en_female_lana_del_rey_kelley_d_p1_uranus_bigtts" | "en_female_lana_del_rey_parky_s_p1_uranus_bigtts" | "en_male_marcus_uranus_bigtts" | "en_female_mel_uranus_bigtts" | "en_male_michael_uranus_bigtts" | "en_male_michael-mouse_uranus_bigtts" | "en_male_michael_kevin_uranus_bigtts" | "en_male_motivational-coach_uranus_bigtts" | "en_female_myra_uranus_bigtts" | "en_female_myra_cmb_uranus_bigtts" | "en_female_nadia_uranus_bigtts" | "en_female_natasha_uranus_bigtts" | "en_female_pleasant-female_uranus_bigtts" | "en_female_rachel_p1_uranus_bigtts" | "en_male_ronald_uranus_bigtts" | "en_male_russell_uranus_bigtts" | "en_female_scarlet_p1_uranus_bigtts" | "en_female_sharron_uranus_bigtts" | "en_male_simba_p1_uranus_bigtts" | "en_female_skye_uranus_bigtts" | "en_male_tom_hiddleston_p1_uranus_bigtts" | "en_male_valentino_uranus_bigtts" | "en_male_valentino_corey_uranus_bigtts" | "en_female_wenrouzhishijieshuonv_uranus_bigtts" | "en_female_xinwenjieshuonv_uranus_bigtts" | "en_male_yangguangjieshuonan_uranus_bigtts" | "en_female_zendaya_p1_uranus_bigtts";
|
|
1106
|
+
audioUrls?: string[];
|
|
1107
|
+
imageUrls?: string[];
|
|
1108
|
+
format?: "wav" | "mp3" | "pcm" | "ogg_opus";
|
|
1109
|
+
sampleRate?: 8000 | 16000 | 24000 | 32000 | 44100 | 48000;
|
|
1110
|
+
speechRate?: number;
|
|
1111
|
+
loudnessRate?: number;
|
|
1112
|
+
pitchRate?: number;
|
|
1113
|
+
aigcWatermark?: boolean;
|
|
1114
|
+
};
|
|
1115
|
+
"seed-audio-1.0-multilingual": {
|
|
1116
|
+
prompt: string;
|
|
1117
|
+
voiceId?: "zh_female_vv_uranus_bigtts" | "zh_female_xiaohe_uranus_bigtts" | "en_female_stokie_uranus_bigtts" | "en_female_dacey_uranus_bigtts" | "en_male_tim_uranus_bigtts" | "zh_male_m191_uranus_bigtts" | "zh_male_taocheng_uranus_bigtts" | "zh_male_sophie_uranus_bigtts" | "zh_female_yingyujiaoxue_uranus_bigtts" | "zh_male_dayi_uranus_bigtts" | "zh_female_mizai_uranus_bigtts" | "zh_female_jitangnv_uranus_bigtts" | "zh_female_meilinvyou_uranus_bigtts" | "zh_female_liuchangnv_uranus_bigtts" | "zh_male_ruyayichen_uranus_bigtts" | "zh_female_cancan_uranus_bigtts" | "zh_female_tianmeixiaoyuan_uranus_bigtts" | "zh_female_tianmeitaozi_uranus_bigtts" | "zh_female_shuangkuaisisi_uranus_bigtts" | "zh_female_peiqi_uranus_bigtts" | "zh_female_xiaoxue_uranus_bigtts" | "zh_female_yuanqi_uranus_bigtts" | "zh_female_kefunvsheng_uranus_bigtts" | "zh_male_shaonianzixin_uranus_bigtts" | "zh_female_linjianvhai_uranus_bigtts" | "zh_female_kiwi_uranus_bigtts" | "zh_female_sajiaoxuemei_uranus_bigtts" | "zh_male_liufei_uranus_bigtts" | "zh_female_qingxinnvsheng_uranus_bigtts" | "zh_male_sunwukong_uranus_bigtts" | "en_male_adam-imitation_uranus_bigtts" | "en_male_alberto_uranus_bigtts" | "en_male_alex_uranus_bigtts" | "en_female_allison_uranus_bigtts" | "en_female_authoritative-british_uranus_bigtts" | "en_female_authoritative-informative_uranus_bigtts" | "en_male_bill-jones_uranus_bigtts" | "en_male_bill_jones_corey_uranus_bigtts" | "en_male_brad_pitt_p1_uranus_bigtts" | "en_female_brittney_uranus_bigtts" | "en_female_brittney_pimintel_uranus_bigtts" | "en_male_bruce_uranus_bigtts" | "en_male_chandler_p1_uranus_bigtts" | "en_male_cowboy-bob_uranus_bigtts" | "en_male_cowboy_john_b_uranus_bigtts" | "en_male_david_uranus_bigtts" | "en_male_deep-voice_uranus_bigtts" | "en_male_diyuwenrounan_uranus_bigtts" | "en_male_evil-guy-oxley_uranus_bigtts" | "en_male_excited-male-voice_uranus_bigtts" | "en_male_father-christmas_uranus_bigtts" | "en_female_female_tutor_ms-jenny_uranus_bigtts" | "en_male_fernando-martinez_uranus_bigtts" | "en_male_godfather_uranus_bigtts" | "en_male_gollum_uranus_bigtts" | "en_male_hades_uranus_bigtts" | "en_female_hayley_uranus_bigtts" | "en_male_jamie_uranus_bigtts" | "en_female_jane_uranus_bigtts" | "en_female_jenny_uranus_bigtts" | "en_male_jidongchuanjiaoshi_uranus_bigtts" | "en_male_jimmy_uranus_bigtts" | "en_female_joanne_uranus_bigtts" | "en_male_joker_uranus_bigtts" | "en_male_josh_uranus_bigtts" | "en_male_josh_coery_uranus_bigtts" | "en_male_kevin_uranus_bigtts" | "en_male_knightley_uranus_bigtts" | "en_female_lana_del_rey_kelley_d_p1_uranus_bigtts" | "en_female_lana_del_rey_parky_s_p1_uranus_bigtts" | "en_male_marcus_uranus_bigtts" | "en_female_mel_uranus_bigtts" | "en_male_michael_uranus_bigtts" | "en_male_michael-mouse_uranus_bigtts" | "en_male_michael_kevin_uranus_bigtts" | "en_male_motivational-coach_uranus_bigtts" | "en_female_myra_uranus_bigtts" | "en_female_myra_cmb_uranus_bigtts" | "en_female_nadia_uranus_bigtts" | "en_female_natasha_uranus_bigtts" | "en_female_pleasant-female_uranus_bigtts" | "en_female_rachel_p1_uranus_bigtts" | "en_male_ronald_uranus_bigtts" | "en_male_russell_uranus_bigtts" | "en_female_scarlet_p1_uranus_bigtts" | "en_female_sharron_uranus_bigtts" | "en_male_simba_p1_uranus_bigtts" | "en_female_skye_uranus_bigtts" | "en_male_tom_hiddleston_p1_uranus_bigtts" | "en_male_valentino_uranus_bigtts" | "en_male_valentino_corey_uranus_bigtts" | "en_female_wenrouzhishijieshuonv_uranus_bigtts" | "en_female_xinwenjieshuonv_uranus_bigtts" | "en_male_yangguangjieshuonan_uranus_bigtts" | "en_female_zendaya_p1_uranus_bigtts" | "de_male_seven_uranus_bigtts" | "jp_female_minimi_uranus_bigtts" | "fr_male_usseau_uranus_bigtts" | "es_male_felipe_uranus_bigtts" | "id_male_han_uranus_bigtts" | "pt_male_martins_uranus_bigtts" | "it_male_enzo_uranus_bigtts" | "kr_male_shane_uranus_bigtts" | "ja_female_bv024_uranus_bigtts" | "ja_female_bv520_uranus_bigtts" | "ja_female_bv521_uranus_bigtts" | "ja_female_bv522_uranus_bigtts" | "ja_female_bv523_uranus_bigtts" | "ja_male_bv524_uranus_bigtts" | "ja_female_minimi_uranus_bigtts" | "ja_female_shirou_uranus_bigtts" | "de_female_bv081_uranus_bigtts" | "de_male_sven_uranus_bigtts" | "es_female_bv084_uranus_bigtts" | "es_male_dani_uranus_bigtts" | "es_male_guillem_uranus_bigtts" | "es_female_ht_mx_f6_uranus_bigtts" | "mx_female_bv065_uranus_bigtts" | "mx_male_bv165dialogue_uranus_bigtts" | "mx_male_bv165narrator_uranus_bigtts" | "mx_female_bv166dialogue_uranus_bigtts" | "mx_female_bv166emotion_uranus_bigtts" | "mx_female_bv166narrator_uranus_bigtts" | "mx_male_felipe_uranus_bigtts" | "mx_male_ht_mx_m012_uranus_bigtts" | "mx_female_leslie_uranus_bigtts" | "mx_male_marcelo_uranus_bigtts" | "fr_female_fr_bv078_uranus_bigtts" | "fr_female_fr_f47_uranus_bigtts" | "fr_male_fr_m29_uranus_bigtts" | "id_male_bv160_uranus_bigtts" | "id_male_bv160dialogue_uranus_bigtts" | "id_male_bv160narration_uranus_bigtts" | "id_female_bv161_uranus_bigtts" | "id_female_bv161dialogue_uranus_bigtts" | "id_female_bv161narration_uranus_bigtts" | "id_female_bv164_uranus_bigtts" | "id_male_bv164dialogue_uranus_bigtts" | "id_male_bv164narration_uranus_bigtts" | "id_female_f20_uranus_bigtts" | "id_male_m08_uranus_bigtts" | "id_female_phulia_uranus_bigtts" | "pt_male_bv172_uranus_bigtts" | "pt_male_bv172dialogue_uranus_bigtts" | "pt_male_bv172emotion_uranus_bigtts" | "pt_male_bv172narrator_uranus_bigtts" | "pt_female_bv173_uranus_bigtts" | "pt_female_bv173dialogue_uranus_bigtts" | "pt_female_bv173emotion_uranus_bigtts" | "pt_female_bv173narrator_uranus_bigtts" | "pt_female_bv530_uranus_bigtts" | "pt_male_bv531_uranus_bigtts" | "pt_female_mari_uranus_bigtts" | "pt_male_rael_uranus_bigtts" | "ar_female_dina_uranus_bigtts" | "ar_female_fatma_uranus_bigtts" | "ar_male_youssef_uranus_bigtts" | "tl_female_annika_uranus_bigtts" | "tl_male_ed_uranus_bigtts" | "tl_female_hervie_uranus_bigtts" | "ko_male_bv545_uranus_bigtts" | "ko_female_bv546_uranus_bigtts" | "ko_male_m03_uranus_bigtts" | "ko_male_shane_uranus_bigtts" | "ms_male_ham_uranus_bigtts" | "ms_male_naim_uranus_bigtts" | "ru_female_af07_uranus_bigtts" | "ru_female_irinae_uranus_bigtts" | "ru_male_pavel_uranus_bigtts" | "ru_female_sophie_uranus_bigtts" | "ru_male_vlad_uranus_bigtts" | "th_female_bv568_angry_uranus_bigtts" | "th_female_bv568_fear_uranus_bigtts" | "th_female_bv568_happy_uranus_bigtts" | "th_female_bv568_hate_uranus_bigtts" | "th_female_bv568_neutral_uranus_bigtts" | "th_female_bv568_sad_uranus_bigtts" | "th_female_bv568_suprise_uranus_bigtts" | "vi_female_hong_uranus_bigtts" | "vi_female_ling_uranus_bigtts" | "vi_female_linh_uranus_bigtts" | "vi_female_partner_uranus_bigtts" | "vi_female_ruan_uranus_bigtts" | "vi_female_wu_uranus_bigtts" | "vi_male_wumg_uranus_bigtts";
|
|
1106
1118
|
audioUrls?: string[];
|
|
1107
1119
|
imageUrls?: string[];
|
|
1108
1120
|
format?: "wav" | "mp3" | "pcm" | "ogg_opus";
|
|
@@ -2275,6 +2287,7 @@ declare const Models: {
|
|
|
2275
2287
|
readonly RunwayGen4Ref: "runway-gen4-ref";
|
|
2276
2288
|
readonly RunwayGen45: "runway-gen4.5";
|
|
2277
2289
|
readonly SeedAudio10: "seed-audio-1.0";
|
|
2290
|
+
readonly SeedAudio10Multilingual: "seed-audio-1.0-multilingual";
|
|
2278
2291
|
readonly Seedance15Pro: "seedance-1.5-pro";
|
|
2279
2292
|
readonly Seedance20: "seedance-2.0";
|
|
2280
2293
|
readonly Seedance20Fast: "seedance-2.0-fast";
|
package/index.js
CHANGED
|
@@ -4407,7 +4407,7 @@ var ASYNC_VOICES = [
|
|
|
4407
4407
|
{ id: "d7114790-534e-4007-b80d-6d176230553c", name: "Nellie", description: "Bold British-accented female voice with a slightly sharp, newscasting style. This voice delivers with clarity and confidence, ideal for news, reports, and formal announcements, ensuring a strong, professional presence while maintaining a sharp and impactful delivery.", tags: ["Female", "British (UK)", "Newscasting", "Informative/Educational"], provider: "async" }
|
|
4408
4408
|
];
|
|
4409
4409
|
var SEEDAUDIO_DEFAULT_VOICE_ID = "en_male_tim_uranus_bigtts";
|
|
4410
|
-
var
|
|
4410
|
+
var SEEDAUDIO_EN_ZH_VOICES = [
|
|
4411
4411
|
{ id: "zh_female_vv_uranus_bigtts", name: "Vivi", description: "A youthful and vibrant female voice.", tags: ["Female", "Multilingual"], provider: "seedaudio" },
|
|
4412
4412
|
{ id: "zh_female_xiaohe_uranus_bigtts", name: "Mindy", description: "A gentle, soft-spoken, and slightly mature female voice.", tags: ["Female", "Multilingual"], provider: "seedaudio" },
|
|
4413
4413
|
{ id: "en_female_stokie_uranus_bigtts", name: "Stokie", description: "A trendy, casual, and expressive young female voice.", tags: ["Female", "English"], provider: "seedaudio" },
|
|
@@ -4435,14 +4435,6 @@ var SEEDAUDIO_VOICES = [
|
|
|
4435
4435
|
{ id: "zh_female_linjianvhai_uranus_bigtts", name: "Pinky", description: "A warm, friendly, and approachable young female voice.", tags: ["Female", "Multilingual"], provider: "seedaudio" },
|
|
4436
4436
|
{ id: "zh_female_kiwi_uranus_bigtts", name: "Sweety", description: "A bright, cheerful, and modern young female voice.", tags: ["Female", "Multilingual"], provider: "seedaudio" },
|
|
4437
4437
|
{ id: "zh_female_sajiaoxuemei_uranus_bigtts", name: "Sandy", description: "A very young, sweet, and playful female voice.", tags: ["Female", "Multilingual"], provider: "seedaudio" },
|
|
4438
|
-
{ id: "de_male_seven_uranus_bigtts", name: "Sven", description: "A steady, clear, and confident male voice.", tags: ["Male", "German"], provider: "seedaudio" },
|
|
4439
|
-
{ id: "jp_female_minimi_uranus_bigtts", name: "Minimi", description: "A high-pitched, sweet, 'kawaii' young female voice.", tags: ["Female", "Japanese"], provider: "seedaudio" },
|
|
4440
|
-
{ id: "fr_male_usseau_uranus_bigtts", name: "Usseau", description: "A sophisticated, crisp, and articulate male voice.", tags: ["Male", "French"], provider: "seedaudio" },
|
|
4441
|
-
{ id: "es_male_felipe_uranus_bigtts", name: "Felipe", description: "An energetic, upbeat, and charismatic young male voice.", tags: ["Male", "Spanish (MX)"], provider: "seedaudio" },
|
|
4442
|
-
{ id: "id_male_han_uranus_bigtts", name: "Han", description: "A modern, smooth, and friendly young adult male voice.", tags: ["Male", "Indonesian"], provider: "seedaudio" },
|
|
4443
|
-
{ id: "pt_male_martins_uranus_bigtts", name: "Martins", description: "A charismatic, warm, and expressive male voice.", tags: ["Male", "Portuguese (BR)"], provider: "seedaudio" },
|
|
4444
|
-
{ id: "it_male_enzo_uranus_bigtts", name: "Enzo", description: "An authentic, charismatic, and warm Italian male voice.", tags: ["Male", "Italian"], provider: "seedaudio" },
|
|
4445
|
-
{ id: "kr_male_shane_uranus_bigtts", name: "Jihoon", description: "A polished, modern, and smooth Korean male voice.", tags: ["Male", "Korean"], provider: "seedaudio" },
|
|
4446
4438
|
{ id: "zh_male_liufei_uranus_bigtts", name: "Felix", description: "A clear and energetic voice.", tags: ["Male", "Chinese"], provider: "seedaudio" },
|
|
4447
4439
|
{ id: "zh_female_qingxinnvsheng_uranus_bigtts", name: "Celeste", description: "A fresh and clear female voice.", tags: ["Female", "Chinese"], provider: "seedaudio" },
|
|
4448
4440
|
{ id: "zh_male_sunwukong_uranus_bigtts", name: "Monkey King", description: "A Monkey King character voice.", tags: ["Male", "Chinese", "Character"], provider: "seedaudio" },
|
|
@@ -4510,7 +4502,17 @@ var SEEDAUDIO_VOICES = [
|
|
|
4510
4502
|
{ id: "en_female_wenrouzhishijieshuonv_uranus_bigtts", name: "Megan", description: "A gentle, fun older sister sharing knowledge in a relaxed way.", tags: ["Female", "English (US)", "CustomerService"], provider: "seedaudio" },
|
|
4511
4503
|
{ id: "en_female_xinwenjieshuonv_uranus_bigtts", name: "Kayla", description: "An enthusiastic, outgoing female student full of expressiveness.", tags: ["Female", "English (US)", "RolePlay"], provider: "seedaudio" },
|
|
4512
4504
|
{ id: "en_male_yangguangjieshuonan_uranus_bigtts", name: "Dylan", description: "A witty, humorous uncle with a vivid narrative style.", tags: ["Male", "English (US)"], provider: "seedaudio" },
|
|
4513
|
-
{ id: "en_female_zendaya_p1_uranus_bigtts", name: "Zendaya", description: "An easygoing, approachable older sister full of energy.", tags: ["Female", "English (US)", "Education"], provider: "seedaudio" }
|
|
4505
|
+
{ id: "en_female_zendaya_p1_uranus_bigtts", name: "Zendaya", description: "An easygoing, approachable older sister full of energy.", tags: ["Female", "English (US)", "Education"], provider: "seedaudio" }
|
|
4506
|
+
];
|
|
4507
|
+
var SEEDAUDIO_OTHER_LANGUAGE_VOICES = [
|
|
4508
|
+
{ id: "de_male_seven_uranus_bigtts", name: "Sven", description: "A steady, clear, and confident male voice.", tags: ["Male", "German"], provider: "seedaudio" },
|
|
4509
|
+
{ id: "jp_female_minimi_uranus_bigtts", name: "Minimi", description: "A high-pitched, sweet, 'kawaii' young female voice.", tags: ["Female", "Japanese"], provider: "seedaudio" },
|
|
4510
|
+
{ id: "fr_male_usseau_uranus_bigtts", name: "Usseau", description: "A sophisticated, crisp, and articulate male voice.", tags: ["Male", "French"], provider: "seedaudio" },
|
|
4511
|
+
{ id: "es_male_felipe_uranus_bigtts", name: "Felipe", description: "An energetic, upbeat, and charismatic young male voice.", tags: ["Male", "Spanish (MX)"], provider: "seedaudio" },
|
|
4512
|
+
{ id: "id_male_han_uranus_bigtts", name: "Han", description: "A modern, smooth, and friendly young adult male voice.", tags: ["Male", "Indonesian"], provider: "seedaudio" },
|
|
4513
|
+
{ id: "pt_male_martins_uranus_bigtts", name: "Martins", description: "A charismatic, warm, and expressive male voice.", tags: ["Male", "Portuguese (BR)"], provider: "seedaudio" },
|
|
4514
|
+
{ id: "it_male_enzo_uranus_bigtts", name: "Enzo", description: "An authentic, charismatic, and warm Italian male voice.", tags: ["Male", "Italian"], provider: "seedaudio" },
|
|
4515
|
+
{ id: "kr_male_shane_uranus_bigtts", name: "Jihoon", description: "A polished, modern, and smooth Korean male voice.", tags: ["Male", "Korean"], provider: "seedaudio" },
|
|
4514
4516
|
{ id: "ja_female_bv024_uranus_bigtts", name: "Bonnie", description: "A gentle, soft, warm female college student.", tags: ["Female", "Japanese"], provider: "seedaudio" },
|
|
4515
4517
|
{ id: "ja_female_bv520_uranus_bigtts", name: "Poppy", description: "An energetic young woman with an anime-dubbing style.", tags: ["Female", "Japanese", "Dubbing"], provider: "seedaudio" },
|
|
4516
4518
|
{ id: "ja_female_bv521_uranus_bigtts", name: "Aoi", description: "A sweet, lively young woman with strong performance appeal.", tags: ["Female", "Japanese", "Entertainment"], provider: "seedaudio" },
|
|
@@ -4594,10 +4596,57 @@ var SEEDAUDIO_VOICES = [
|
|
|
4594
4596
|
{ id: "vi_female_wu_uranus_bigtts", name: "Wu", description: "A straightforward, outgoing young woman with a rational mindset.", tags: ["Female", "Vietnamese"], provider: "seedaudio" },
|
|
4595
4597
|
{ id: "vi_male_wumg_uranus_bigtts", name: "Wumg", description: "A modest, patient, rigorous, meticulous young man.", tags: ["Male", "Vietnamese"], provider: "seedaudio" }
|
|
4596
4598
|
];
|
|
4599
|
+
var SEEDAUDIO_VOICES = [
|
|
4600
|
+
...SEEDAUDIO_EN_ZH_VOICES,
|
|
4601
|
+
...SEEDAUDIO_OTHER_LANGUAGE_VOICES
|
|
4602
|
+
];
|
|
4597
4603
|
|
|
4598
4604
|
// src/vendors/catalog/seedaudio.ts
|
|
4599
4605
|
var REF_MUTEX_REASON = "A named voice and audio/image references cannot be combined.";
|
|
4606
|
+
var seedAudioParams = (voices) => ({
|
|
4607
|
+
...params.prompt({ maxLength: 3e3 }),
|
|
4608
|
+
// Voice: a named BytePlus voice (default), OR clone from up to 3 reference
|
|
4609
|
+
// audios, OR one image reference. The three are mutually exclusive; the
|
|
4610
|
+
// payload builder prioritizes an uploaded reference over the named voice.
|
|
4611
|
+
...params.voiceId(voices, SEEDAUDIO_DEFAULT_VOICE_ID),
|
|
4612
|
+
...params.audioInputs(3, "Reference Audios"),
|
|
4613
|
+
...params.imageInput(1, "Reference Image", false),
|
|
4614
|
+
// Output audio configuration (nested under `audio_config` at the wire).
|
|
4615
|
+
...p.enum("format", ["wav", "mp3", "pcm", "ogg_opus"], "wav", { label: "Format" }),
|
|
4616
|
+
...p.enum("sampleRate", [8e3, 16e3, 24e3, 32e3, 44100, 48e3], 44100, { label: "Sample Rate" }),
|
|
4617
|
+
...p.range("speechRate", -50, 100, 0, { label: "Speech Rate" }),
|
|
4618
|
+
...p.range("loudnessRate", -50, 100, 0, { label: "Loudness" }),
|
|
4619
|
+
...p.range("pitchRate", -12, 12, 0, { label: "Pitch" }),
|
|
4620
|
+
...p.boolean("aigcWatermark", false, "Watermark")
|
|
4621
|
+
});
|
|
4622
|
+
var refMutexConstraints = [
|
|
4623
|
+
{ when: { imageUrls: { exists: true } }, then: {
|
|
4624
|
+
voiceId: { disabled: true, reason: REF_MUTEX_REASON },
|
|
4625
|
+
audioUrls: { disabled: true, reason: REF_MUTEX_REASON }
|
|
4626
|
+
} },
|
|
4627
|
+
{ when: { audioUrls: { exists: true } }, then: {
|
|
4628
|
+
voiceId: { disabled: true, reason: REF_MUTEX_REASON },
|
|
4629
|
+
imageUrls: { disabled: true, reason: REF_MUTEX_REASON }
|
|
4630
|
+
} }
|
|
4631
|
+
];
|
|
4600
4632
|
var { MODELS: MODELS15 } = defineModels("seedaudio", [
|
|
4633
|
+
{
|
|
4634
|
+
id: "seed-audio-1.0-multilingual",
|
|
4635
|
+
name: "Seed Audio Multilingual",
|
|
4636
|
+
addedAt: "2026-07-28",
|
|
4637
|
+
workflow: "bytedance/text-to-speech",
|
|
4638
|
+
estimatedTime: 15,
|
|
4639
|
+
mode: "audio",
|
|
4640
|
+
inputType: "tts",
|
|
4641
|
+
description: "Synthesize natural speech in 20 languages \u2014 pick a named voice or clone one from a reference audio.",
|
|
4642
|
+
features: [
|
|
4643
|
+
feat("20 Languages", "characteristic"),
|
|
4644
|
+
feat("Voice Cloning", "characteristic"),
|
|
4645
|
+
feat("Reference Audio", "audio")
|
|
4646
|
+
],
|
|
4647
|
+
paramConfig: seedAudioParams(SEEDAUDIO_VOICES),
|
|
4648
|
+
constraints: refMutexConstraints
|
|
4649
|
+
},
|
|
4601
4650
|
{
|
|
4602
4651
|
id: "seed-audio-1.0",
|
|
4603
4652
|
name: "Seed Audio",
|
|
@@ -4606,37 +4655,10 @@ var { MODELS: MODELS15 } = defineModels("seedaudio", [
|
|
|
4606
4655
|
estimatedTime: 15,
|
|
4607
4656
|
mode: "audio",
|
|
4608
4657
|
inputType: "tts",
|
|
4609
|
-
description: "Synthesize natural
|
|
4658
|
+
description: "Synthesize natural English or Chinese speech \u2014 pick a named voice or clone one from a reference audio.",
|
|
4610
4659
|
features: [feat("Voice Cloning", "characteristic"), feat("Reference Audio", "audio")],
|
|
4611
|
-
paramConfig:
|
|
4612
|
-
|
|
4613
|
-
// Voice: a named BytePlus voice (default), OR clone from up to 3 reference
|
|
4614
|
-
// audios, OR one image reference. The three are mutually exclusive; the
|
|
4615
|
-
// payload builder prioritizes an uploaded reference over the named voice.
|
|
4616
|
-
...params.voiceId(SEEDAUDIO_VOICES, SEEDAUDIO_DEFAULT_VOICE_ID),
|
|
4617
|
-
...params.audioInputs(3, "Reference Audios"),
|
|
4618
|
-
...params.imageInput(1, "Reference Image", false),
|
|
4619
|
-
// Output audio configuration (nested under `audio_config` at the wire).
|
|
4620
|
-
...p.enum("format", ["wav", "mp3", "pcm", "ogg_opus"], "wav", { label: "Format" }),
|
|
4621
|
-
...p.enum("sampleRate", [8e3, 16e3, 24e3, 32e3, 44100, 48e3], 44100, { label: "Sample Rate" }),
|
|
4622
|
-
...p.range("speechRate", -50, 100, 0, { label: "Speech Rate" }),
|
|
4623
|
-
...p.range("loudnessRate", -50, 100, 0, { label: "Loudness" }),
|
|
4624
|
-
...p.range("pitchRate", -12, 12, 0, { label: "Pitch" }),
|
|
4625
|
-
...p.boolean("aigcWatermark", false, "Watermark")
|
|
4626
|
-
},
|
|
4627
|
-
// Backend rejects mixing reference kinds. Trigger the mutex off the uploads
|
|
4628
|
-
// (voiceId always has a default, so it can't be a trigger) — an uploaded
|
|
4629
|
-
// reference greys out the voice picker and the other upload slot.
|
|
4630
|
-
constraints: [
|
|
4631
|
-
{ when: { imageUrls: { exists: true } }, then: {
|
|
4632
|
-
voiceId: { disabled: true, reason: REF_MUTEX_REASON },
|
|
4633
|
-
audioUrls: { disabled: true, reason: REF_MUTEX_REASON }
|
|
4634
|
-
} },
|
|
4635
|
-
{ when: { audioUrls: { exists: true } }, then: {
|
|
4636
|
-
voiceId: { disabled: true, reason: REF_MUTEX_REASON },
|
|
4637
|
-
imageUrls: { disabled: true, reason: REF_MUTEX_REASON }
|
|
4638
|
-
} }
|
|
4639
|
-
]
|
|
4660
|
+
paramConfig: seedAudioParams(SEEDAUDIO_EN_ZH_VOICES),
|
|
4661
|
+
constraints: refMutexConstraints
|
|
4640
4662
|
}
|
|
4641
4663
|
]);
|
|
4642
4664
|
|
|
@@ -4651,10 +4673,10 @@ var assembleReferences = (input) => {
|
|
|
4651
4673
|
}
|
|
4652
4674
|
return [{ speaker: input.voiceId ?? SEEDAUDIO_DEFAULT_VOICE_ID }];
|
|
4653
4675
|
};
|
|
4654
|
-
var buildSeedAudioPayload = (input) => {
|
|
4676
|
+
var buildSeedAudioPayload = (model) => (input) => {
|
|
4655
4677
|
const references = assembleReferences(input);
|
|
4656
4678
|
return {
|
|
4657
|
-
model
|
|
4679
|
+
model,
|
|
4658
4680
|
text_prompt: input.prompt,
|
|
4659
4681
|
// Apply the paramConfig defaults explicitly — a custom builder (unlike the
|
|
4660
4682
|
// pass-through one) doesn't get them for free, and the advertised defaults
|
|
@@ -4674,7 +4696,8 @@ var buildSeedAudioPayload = (input) => {
|
|
|
4674
4696
|
};
|
|
4675
4697
|
};
|
|
4676
4698
|
registerPayloads(MODELS15, {
|
|
4677
|
-
"seed-audio-1.0": buildSeedAudioPayload
|
|
4699
|
+
"seed-audio-1.0": buildSeedAudioPayload("seed-audio-1.0"),
|
|
4700
|
+
"seed-audio-1.0-multilingual": buildSeedAudioPayload("seed-audio-1.0-multilingual")
|
|
4678
4701
|
});
|
|
4679
4702
|
|
|
4680
4703
|
// src/vendors/catalog/reve.ts
|
|
@@ -8553,6 +8576,10 @@ function resolveModel(id) {
|
|
|
8553
8576
|
}
|
|
8554
8577
|
|
|
8555
8578
|
// src/client/transport.ts
|
|
8579
|
+
var GATEWAY_HEADERS = {
|
|
8580
|
+
"platform": "api",
|
|
8581
|
+
"X-Touchpoint": "sdk"
|
|
8582
|
+
};
|
|
8556
8583
|
function resolveFetch(config) {
|
|
8557
8584
|
if (config.fetch) return config.fetch;
|
|
8558
8585
|
if (config.apiKey) {
|
|
@@ -8560,6 +8587,9 @@ function resolveFetch(config) {
|
|
|
8560
8587
|
return (url, init) => {
|
|
8561
8588
|
const headers = new Headers(init?.headers);
|
|
8562
8589
|
headers.set("Authorization", `Bearer ${token}`);
|
|
8590
|
+
for (const [name, value] of Object.entries(GATEWAY_HEADERS)) {
|
|
8591
|
+
if (!headers.has(name)) headers.set(name, value);
|
|
8592
|
+
}
|
|
8563
8593
|
return globalThis.fetch(url, { ...init, headers });
|
|
8564
8594
|
};
|
|
8565
8595
|
}
|
|
@@ -10331,6 +10361,7 @@ var RunwayGen4Aleph = "runway-gen4-aleph";
|
|
|
10331
10361
|
var RunwayGen4Ref = "runway-gen4-ref";
|
|
10332
10362
|
var RunwayGen45 = "runway-gen4.5";
|
|
10333
10363
|
var SeedAudio10 = "seed-audio-1.0";
|
|
10364
|
+
var SeedAudio10Multilingual = "seed-audio-1.0-multilingual";
|
|
10334
10365
|
var Seedance15Pro = "seedance-1.5-pro";
|
|
10335
10366
|
var Seedance20 = "seedance-2.0";
|
|
10336
10367
|
var Seedance20Fast = "seedance-2.0-fast";
|
|
@@ -10525,6 +10556,7 @@ var Models = {
|
|
|
10525
10556
|
RunwayGen4Ref,
|
|
10526
10557
|
RunwayGen45,
|
|
10527
10558
|
SeedAudio10,
|
|
10559
|
+
SeedAudio10Multilingual,
|
|
10528
10560
|
Seedance15Pro,
|
|
10529
10561
|
Seedance20,
|
|
10530
10562
|
Seedance20Fast,
|