velora-mcp-server 1.1.0 → 1.1.2
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/build/index.js +13 -12
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -414,6 +414,11 @@ ${p.features.map((f) => ` - ${f}`).join("\n")}`;
|
|
|
414
414
|
.optional()
|
|
415
415
|
.default("auto")
|
|
416
416
|
.describe("Overall style/theme of the video. 'auto' lets Velora AI choose the best style for your topic."),
|
|
417
|
+
media_mix: zod_1.z
|
|
418
|
+
.enum(["mixed", "stock_only", "ai_only"])
|
|
419
|
+
.optional()
|
|
420
|
+
.default("mixed")
|
|
421
|
+
.describe("Controls the type of visuals used in the video. 'mixed' uses both. 'stock_only' uses 100% stock footage (no AI generation). 'ai_only' uses 100% AI generated video clips."),
|
|
417
422
|
script: zod_1.z
|
|
418
423
|
.string()
|
|
419
424
|
.optional()
|
|
@@ -427,25 +432,19 @@ ${p.features.map((f) => ` - ${f}`).join("\n")}`;
|
|
|
427
432
|
.string()
|
|
428
433
|
.optional()
|
|
429
434
|
.describe("Optional webhook URL to receive a POST callback when the video is completed. The callback payload will include video_id and output_url."),
|
|
430
|
-
}, async ({ api_key, topic, language, duration_minutes, aspect_ratio, voice_type, video_model, include_subtitles, subtitle_style, video_style, script, include_background_music, webhook_url, }) => {
|
|
435
|
+
}, async ({ api_key, topic, language, duration_minutes, aspect_ratio, voice_type, video_model, include_subtitles, subtitle_style, video_style, media_mix, script, include_background_music, webhook_url, }) => {
|
|
431
436
|
try {
|
|
432
437
|
const payload = {
|
|
433
438
|
topic,
|
|
434
439
|
language,
|
|
435
|
-
|
|
440
|
+
duration_minutes,
|
|
441
|
+
theme: video_style === "auto" ? "documentary" : video_style,
|
|
436
442
|
aspect_ratio,
|
|
437
|
-
|
|
438
|
-
video_model,
|
|
439
|
-
include_subtitles,
|
|
440
|
-
subtitle_style,
|
|
441
|
-
video_style,
|
|
442
|
-
include_background_music,
|
|
443
|
+
media_mix,
|
|
443
444
|
};
|
|
444
|
-
if (script)
|
|
445
|
-
payload.script = script;
|
|
446
445
|
if (webhook_url)
|
|
447
446
|
payload.webhook_url = webhook_url;
|
|
448
|
-
const response = await fetch(`${VELORA_API_BASE}/
|
|
447
|
+
const response = await fetch(`${VELORA_API_BASE}/v1/videos/generate`, {
|
|
449
448
|
method: "POST",
|
|
450
449
|
headers: {
|
|
451
450
|
"Content-Type": "application/json",
|
|
@@ -455,7 +454,9 @@ ${p.features.map((f) => ` - ${f}`).join("\n")}`;
|
|
|
455
454
|
});
|
|
456
455
|
const data = await response.json();
|
|
457
456
|
if (!response.ok) {
|
|
458
|
-
const errorMsg = data?.detail
|
|
457
|
+
const errorMsg = typeof data?.detail === 'string'
|
|
458
|
+
? data.detail
|
|
459
|
+
: JSON.stringify(data?.detail || data?.message || response.statusText);
|
|
459
460
|
return {
|
|
460
461
|
content: [
|
|
461
462
|
{
|
package/package.json
CHANGED