mulmocast 2.1.22 → 2.1.24

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,326 +0,0 @@
1
- // node & browser
2
- export const provider2TTSAgent = {
3
- nijivoice: {
4
- agentName: "ttsNijivoiceAgent",
5
- hasLimitedConcurrency: true,
6
- keyName: "NIJIVOICE_API_KEY",
7
- },
8
- openai: {
9
- agentName: "ttsOpenaiAgent",
10
- hasLimitedConcurrency: false,
11
- defaultModel: "gpt-4o-mini-tts",
12
- defaultVoice: "shimmer",
13
- keyName: "OPENAI_API_KEY",
14
- baseURLKeyName: "OPENAI_BASE_URL",
15
- },
16
- google: {
17
- agentName: "ttsGoogleAgent",
18
- hasLimitedConcurrency: false,
19
- keyName: "GEMINI_API_KEY",
20
- },
21
- gemini: {
22
- agentName: "ttsGeminiAgent",
23
- hasLimitedConcurrency: false,
24
- defaultModel: "gemini-2.5-flash-preview-tts",
25
- defaultVoice: "Kore",
26
- models: ["gemini-2.5-flash-preview-tts", "gemini-2.5-pro-preview-tts"],
27
- keyName: "GEMINI_API_KEY",
28
- },
29
- elevenlabs: {
30
- agentName: "ttsElevenlabsAgent",
31
- hasLimitedConcurrency: true,
32
- defaultModel: "eleven_multilingual_v2",
33
- // Models | ElevenLabs Documentation
34
- // https://elevenlabs.io/docs/models
35
- models: ["eleven_multilingual_v2", "eleven_turbo_v2_5", "eleven_turbo_v2", "eleven_flash_v2_5", "eleven_flash_v2"],
36
- keyName: "ELEVENLABS_API_KEY",
37
- },
38
- kotodama: {
39
- agentName: "ttsKotodamaAgent",
40
- hasLimitedConcurrency: true,
41
- defaultVoice: "Atla",
42
- defaultDecoration: "neutral",
43
- keyName: "KOTODAMA_API_KEY",
44
- },
45
- mock: {
46
- agentName: "mediaMockAgent",
47
- hasLimitedConcurrency: true,
48
- defaultModel: "mock-model",
49
- models: ["mock-model"],
50
- },
51
- };
52
- export const gptImages = ["gpt-image-1.5", "gpt-image-1", "gpt-image-1-mini"];
53
- export const provider2ImageAgent = {
54
- openai: {
55
- agentName: "imageOpenaiAgent",
56
- defaultModel: "gpt-image-1",
57
- models: ["dall-e-3", ...gptImages],
58
- keyName: "OPENAI_API_KEY",
59
- baseURLKeyName: "OPENAI_BASE_URL",
60
- },
61
- google: {
62
- agentName: "imageGenAIAgent",
63
- defaultModel: "gemini-2.5-flash-image",
64
- models: ["imagen-4.0-generate-preview-06-06", "imagen-4.0-ultra-generate-preview-06-06", "gemini-2.5-flash-image", "gemini-3-pro-image-preview"],
65
- keyName: "GEMINI_API_KEY",
66
- },
67
- replicate: {
68
- agentName: "imageReplicateAgent",
69
- defaultModel: "bytedance/seedream-4",
70
- models: ["bytedance/seedream-4", "qwen/qwen-image"],
71
- keyName: "REPLICATE_API_TOKEN",
72
- },
73
- mock: {
74
- agentName: "mediaMockAgent",
75
- defaultModel: "mock-model",
76
- models: ["mock-model"],
77
- keyName: "",
78
- },
79
- };
80
- export const provider2MovieAgent = {
81
- replicate: {
82
- agentName: "movieReplicateAgent",
83
- defaultModel: "bytedance/seedance-1-lite",
84
- keyName: "REPLICATE_API_TOKEN",
85
- models: [
86
- "bytedance/seedance-1-lite",
87
- "bytedance/seedance-1-pro",
88
- "kwaivgi/kling-v1.6-pro",
89
- "kwaivgi/kling-v2.1",
90
- "kwaivgi/kling-v2.1-master",
91
- "google/veo-2",
92
- "google/veo-3",
93
- "google/veo-3-fast",
94
- "minimax/video-01",
95
- "minimax/hailuo-02",
96
- "minimax/hailuo-02-fast",
97
- "pixverse/pixverse-v4.5",
98
- "wan-video/wan-2.2-i2v-fast",
99
- "wan-video/wan-2.2-t2v-fast",
100
- ],
101
- modelParams: {
102
- "bytedance/seedance-1-lite": {
103
- durations: [5, 10],
104
- start_image: "image",
105
- last_image: "last_frame_image",
106
- price_per_sec: 0.036, // in USD
107
- },
108
- "bytedance/seedance-1-pro": {
109
- durations: [5, 10],
110
- start_image: "image",
111
- last_image: "last_frame_image",
112
- price_per_sec: 0.15,
113
- },
114
- "kwaivgi/kling-v1.6-pro": {
115
- durations: [5, 10],
116
- start_image: "start_image",
117
- price_per_sec: 0.095,
118
- },
119
- "kwaivgi/kling-v2.1": {
120
- durations: [5, 10],
121
- start_image: "start_image",
122
- price_per_sec: 0.05,
123
- },
124
- "kwaivgi/kling-v2.1-master": {
125
- durations: [5, 10],
126
- start_image: "start_image",
127
- price_per_sec: 0.28,
128
- },
129
- "google/veo-2": {
130
- durations: [5, 6, 7, 8],
131
- start_image: "image",
132
- price_per_sec: 0.5,
133
- },
134
- "google/veo-3": {
135
- durations: [8],
136
- start_image: "image",
137
- price_per_sec: 0.75,
138
- },
139
- "google/veo-3-fast": {
140
- durations: [8],
141
- start_image: "image",
142
- price_per_sec: 0.4,
143
- },
144
- "minimax/video-01": {
145
- durations: [6],
146
- start_image: "first_frame_image",
147
- price_per_sec: 0.5,
148
- },
149
- "minimax/hailuo-02": {
150
- durations: [6], // NOTE: 10 for only 720p
151
- start_image: "first_frame_image",
152
- price_per_sec: 0.08,
153
- },
154
- "minimax/hailuo-02-fast": {
155
- durations: [6, 10], // NOTE: 512P
156
- start_image: "first_frame_image",
157
- price_per_sec: 0.0166,
158
- },
159
- "pixverse/pixverse-v4.5": {
160
- durations: [5, 8],
161
- start_image: "image",
162
- last_image: "last_frame_image",
163
- price_per_sec: 0.12,
164
- },
165
- "wan-video/wan-2.2-i2v-fast": {
166
- durations: [5],
167
- start_image: "image",
168
- price_per_sec: 0.012,
169
- },
170
- "wan-video/wan-2.2-t2v-fast": {
171
- durations: [5],
172
- start_image: undefined,
173
- price_per_sec: 0.012,
174
- },
175
- },
176
- },
177
- google: {
178
- agentName: "movieGenAIAgent",
179
- defaultModel: "veo-2.0-generate-001",
180
- models: ["veo-2.0-generate-001", "veo-3.0-generate-001", "veo-3.1-generate-preview"],
181
- keyName: "GEMINI_API_KEY",
182
- modelParams: {
183
- "veo-3.1-generate-preview": {
184
- durations: [4, 6, 8],
185
- },
186
- "veo-3.0-generate-001": {
187
- durations: [4, 6, 8],
188
- },
189
- "veo-2.0-generate-001": {
190
- durations: [5, 6, 7, 8],
191
- },
192
- },
193
- },
194
- mock: {
195
- agentName: "mediaMockAgent",
196
- defaultModel: "mock-model",
197
- models: ["mock-model"],
198
- keyName: "",
199
- modelParams: {},
200
- },
201
- };
202
- export const provider2SoundEffectAgent = {
203
- replicate: {
204
- agentName: "soundEffectReplicateAgent",
205
- defaultModel: "zsxkib/mmaudio",
206
- keyName: "REPLICATE_API_TOKEN",
207
- models: ["zsxkib/mmaudio"],
208
- modelParams: {
209
- "zsxkib/mmaudio": {
210
- identifier: "zsxkib/mmaudio:62871fb59889b2d7c13777f08deb3b36bdff88f7e1d53a50ad7694548a41b484",
211
- },
212
- },
213
- },
214
- };
215
- export const provider2LipSyncAgent = {
216
- replicate: {
217
- agentName: "lipSyncReplicateAgent",
218
- defaultModel: "bytedance/omni-human",
219
- keyName: "REPLICATE_API_TOKEN",
220
- models: ["bytedance/latentsync", "tmappdev/lipsync", "bytedance/omni-human"],
221
- modelParams: {
222
- "bytedance/latentsync": {
223
- identifier: "bytedance/latentsync:637ce1919f807ca20da3a448ddc2743535d2853649574cd52a933120e9b9e293",
224
- video: "video",
225
- audio: "audio",
226
- },
227
- "tmappdev/lipsync": {
228
- identifier: "tmappdev/lipsync:c54ce2fe673ea59b857b91250b3d71a2cd304a78f2370687632805c8405fbf4c",
229
- video: "video_input",
230
- audio: "audio_input",
231
- },
232
- "bytedance/omni-human": {
233
- identifier: "bytedance/omni-human",
234
- image: "image",
235
- audio: "audio",
236
- price_per_sec: 0.14,
237
- },
238
- /* NOTE: This model does not work with large base64 urls.
239
- "sync/lipsync-2": {
240
- video: "video",
241
- audio: "audio",
242
- },
243
- */
244
- /* NOTE: This model does not work well for some unknown reason.
245
- "kwaivgi/kling-lip-sync": {
246
- video: "video_url",
247
- audio: "audio_file",
248
- },
249
- */
250
- },
251
- },
252
- };
253
- // : Record<LLM, { agent: string; defaultModel: string; max_tokens: number }>
254
- export const provider2LLMAgent = {
255
- openai: {
256
- agentName: "openAIAgent",
257
- defaultModel: "gpt-5",
258
- keyName: "OPENAI_API_KEY",
259
- baseURLKeyName: "OPENAI_BASE_URL",
260
- max_tokens: 8192,
261
- models: [
262
- "gpt-5",
263
- "gpt-5-nano",
264
- "gpt-5-mini",
265
- "gpt-4.1",
266
- "gpt-4.1-mini",
267
- "gpt-4.1-nano",
268
- "o3",
269
- "o3-mini",
270
- "o3-pro",
271
- "o1",
272
- "o1-pro",
273
- "gpt-4o",
274
- "gpt-4o-mini",
275
- ],
276
- },
277
- anthropic: {
278
- agentName: "anthropicAgent",
279
- defaultModel: "claude-3-7-sonnet-20250219",
280
- max_tokens: 8192,
281
- models: ["claude-opus-4-1-20250805", "claude-opus-4-20250514", "claude-sonnet-4-20250514", "claude-3-7-sonnet-20250219", "claude-3-haiku-20240307"],
282
- keyName: "ANTHROPIC_API_KEY",
283
- apiKeyNameOverride: "ANTHROPIC_API_TOKEN",
284
- // GraphAI is currently using ANTHROPIC_API_KEY, but the official name is ANTHROPIC_API_TOKEN.
285
- },
286
- gemini: {
287
- agentName: "geminiAgent",
288
- defaultModel: "gemini-2.5-flash",
289
- max_tokens: 8192,
290
- models: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "gemini-2.0-flash"],
291
- keyName: "GEMINI_API_KEY",
292
- },
293
- groq: {
294
- agentName: "groqAgent",
295
- defaultModel: "llama-3.1-8b-instant",
296
- keyName: "GROQ_API_KEY",
297
- max_tokens: 4096,
298
- models: ["llama-3.1-8b-instant", "llama-3.3-70b-versatile", "deepseek-r1-distill-llama-70b", "openai/gpt-oss-120b", "openai/gpt-oss-20b"],
299
- },
300
- mock: {
301
- agentName: "mediaMockAgent",
302
- defaultModel: "mock",
303
- max_tokens: 4096,
304
- models: ["mock"],
305
- },
306
- };
307
- export const defaultProviders = {
308
- tts: "openai",
309
- text2image: "openai",
310
- text2movie: "replicate",
311
- text2Html: "openai",
312
- llm: "openai",
313
- soundEffect: "replicate",
314
- lipSync: "replicate",
315
- };
316
- export const llm = Object.keys(provider2LLMAgent);
317
- export const htmlLLMProvider = ["openai", "anthropic", "mock"];
318
- export const getModelDuration = (provider, model, movieDuration) => {
319
- const modelParams = provider2MovieAgent[provider]?.modelParams;
320
- const { durations } = modelParams[model];
321
- if (durations && movieDuration) {
322
- const largerDurations = durations.filter((d) => d >= movieDuration);
323
- return largerDurations.length > 0 ? largerDurations[0] : durations[durations.length - 1];
324
- }
325
- return durations?.[0];
326
- };