From 8b4a1b3f4c26ddd88aeb5e54553f081140367c21 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Wed, 8 Apr 2026 15:20:47 +1200 Subject: [PATCH] feat: add Seedance 2.0 and 2.0 Fast video models Add Seedance 2.0 and 2.0 Fast with text-to-video and image-to-video variants. Both support audio generation, web search, and 4-15 second duration. Image input uses first_frame_url (singular string). Co-Authored-By: Claude Sonnet 4.5 --- src/app/api/generate/providers/kie.ts | 15 ++++++++ src/app/api/models/[modelId]/route.ts | 50 +++++++++++++++++++++++++++ src/app/api/models/route.ts | 38 +++++++++++++++++++- 3 files changed, 102 insertions(+), 1 deletion(-) diff --git a/src/app/api/generate/providers/kie.ts b/src/app/api/generate/providers/kie.ts index 0895e6a6..70a6d5eb 100644 --- a/src/app/api/generate/providers/kie.ts +++ b/src/app/api/generate/providers/kie.ts @@ -97,6 +97,19 @@ export function getKieModelDefaults(modelId: string): Record { case "grok-imagine/image-to-image": return {}; + // Seedance 2.0 models + case "bytedance/seedance-2/text-to-video": + case "bytedance/seedance-2/image-to-video": + case "bytedance/seedance-2-fast/text-to-video": + case "bytedance/seedance-2-fast/image-to-video": + return { + aspect_ratio: "16:9", + resolution: "720p", + duration: 8, + generate_audio: true, + web_search: false, + }; + // Grok Imagine video models case "grok-imagine/text-to-video": return { @@ -199,6 +212,8 @@ export function getKieImageInputKey(modelId: string): string { if (modelId === "flux-2/pro-image-to-image" || modelId === "flux-2/flex-image-to-image") return "input_urls"; // Wan 2.7 Image uses input_urls if (modelId === "wan/2-7-image") return "input_urls"; + // Seedance I2V models use first_frame_url (singular) + if (modelId === "bytedance/seedance-2/image-to-video" || modelId === "bytedance/seedance-2-fast/image-to-video") return "first_frame_url"; // Kling 2.5 turbo I2V uses singular image_url if (modelId === "kling/v2-5-turbo-image-to-video-pro") return "image_url"; // Kling 2.6 motion control uses input_urls diff --git a/src/app/api/models/[modelId]/route.ts b/src/app/api/models/[modelId]/route.ts index 9c95c4c7..960754ba 100644 --- a/src/app/api/models/[modelId]/route.ts +++ b/src/app/api/models/[modelId]/route.ts @@ -858,6 +858,56 @@ function getKieSchema(modelId: string): ExtractedSchema { inputs: [{ name: "prompt", type: "text", required: true, label: "Sound Description" }], }, // ============ Video models ============ + "bytedance/seedance-2/text-to-video": { + parameters: [ + { name: "aspect_ratio", type: "string", description: "Output aspect ratio", enum: ["16:9", "9:16", "1:1"], default: "16:9" }, + { name: "resolution", type: "string", description: "Output resolution", enum: ["720p", "1080p"], default: "720p" }, + { name: "duration", type: "integer", description: "Video duration in seconds (4-15)", default: 8, minimum: 4, maximum: 15 }, + { name: "generate_audio", type: "boolean", description: "Generate audio with the video", default: true }, + { name: "web_search", type: "boolean", description: "Enable web search for prompt enhancement", default: false }, + { name: "seed", type: "integer", description: "Random seed for reproducibility", minimum: 0 }, + ], + inputs: [{ name: "prompt", type: "text", required: true, label: "Prompt" }], + }, + "bytedance/seedance-2/image-to-video": { + parameters: [ + { name: "aspect_ratio", type: "string", description: "Output aspect ratio", enum: ["16:9", "9:16", "1:1"], default: "16:9" }, + { name: "resolution", type: "string", description: "Output resolution", enum: ["720p", "1080p"], default: "720p" }, + { name: "duration", type: "integer", description: "Video duration in seconds (4-15)", default: 8, minimum: 4, maximum: 15 }, + { name: "generate_audio", type: "boolean", description: "Generate audio with the video", default: true }, + { name: "web_search", type: "boolean", description: "Enable web search for prompt enhancement", default: false }, + { name: "seed", type: "integer", description: "Random seed for reproducibility", minimum: 0 }, + ], + inputs: [ + { name: "prompt", type: "text", required: false, label: "Prompt" }, + { name: "first_frame_url", type: "image", required: true, label: "Image" }, + ], + }, + "bytedance/seedance-2-fast/text-to-video": { + parameters: [ + { name: "aspect_ratio", type: "string", description: "Output aspect ratio", enum: ["16:9", "9:16", "1:1"], default: "16:9" }, + { name: "resolution", type: "string", description: "Output resolution", enum: ["720p", "1080p"], default: "720p" }, + { name: "duration", type: "integer", description: "Video duration in seconds (4-15)", default: 8, minimum: 4, maximum: 15 }, + { name: "generate_audio", type: "boolean", description: "Generate audio with the video", default: true }, + { name: "web_search", type: "boolean", description: "Enable web search for prompt enhancement", default: false }, + { name: "seed", type: "integer", description: "Random seed for reproducibility", minimum: 0 }, + ], + inputs: [{ name: "prompt", type: "text", required: true, label: "Prompt" }], + }, + "bytedance/seedance-2-fast/image-to-video": { + parameters: [ + { name: "aspect_ratio", type: "string", description: "Output aspect ratio", enum: ["16:9", "9:16", "1:1"], default: "16:9" }, + { name: "resolution", type: "string", description: "Output resolution", enum: ["720p", "1080p"], default: "720p" }, + { name: "duration", type: "integer", description: "Video duration in seconds (4-15)", default: 8, minimum: 4, maximum: 15 }, + { name: "generate_audio", type: "boolean", description: "Generate audio with the video", default: true }, + { name: "web_search", type: "boolean", description: "Enable web search for prompt enhancement", default: false }, + { name: "seed", type: "integer", description: "Random seed for reproducibility", minimum: 0 }, + ], + inputs: [ + { name: "prompt", type: "text", required: false, label: "Prompt" }, + { name: "first_frame_url", type: "image", required: true, label: "Image" }, + ], + }, "grok-imagine/text-to-video": { parameters: [ { name: "aspect_ratio", type: "string", description: "Output aspect ratio", enum: ["2:3", "3:2", "1:1", "16:9", "9:16"], default: "2:3" }, diff --git a/src/app/api/models/route.ts b/src/app/api/models/route.ts index b9923e8e..71249e9b 100644 --- a/src/app/api/models/route.ts +++ b/src/app/api/models/route.ts @@ -236,7 +236,43 @@ const KIE_MODELS: ProviderModel[] = [ coverImage: undefined, pageUrl: "https://kie.ai/grok-imagine", }, - // ============ Video Models (11) ============ + // ============ Video Models ============ + { + id: "bytedance/seedance-2/text-to-video", + name: "Seedance 2.0", + description: "ByteDance Seedance 2.0 text-to-video generation via Kie.ai. Supports audio generation and web search.", + provider: "kie", + capabilities: ["text-to-video"], + coverImage: undefined, + pageUrl: "https://docs.kie.ai/market/bytedance/seedance-2", + }, + { + id: "bytedance/seedance-2/image-to-video", + name: "Seedance 2.0 I2V", + description: "ByteDance Seedance 2.0 image-to-video generation via Kie.ai. Supports audio generation and web search.", + provider: "kie", + capabilities: ["image-to-video"], + coverImage: undefined, + pageUrl: "https://docs.kie.ai/market/bytedance/seedance-2", + }, + { + id: "bytedance/seedance-2-fast/text-to-video", + name: "Seedance 2.0 Fast", + description: "ByteDance Seedance 2.0 Fast text-to-video generation via Kie.ai. Supports audio generation and web search.", + provider: "kie", + capabilities: ["text-to-video"], + coverImage: undefined, + pageUrl: "https://docs.kie.ai/market/bytedance/seedance-2-fast", + }, + { + id: "bytedance/seedance-2-fast/image-to-video", + name: "Seedance 2.0 Fast I2V", + description: "ByteDance Seedance 2.0 Fast image-to-video generation via Kie.ai. Supports audio generation and web search.", + provider: "kie", + capabilities: ["image-to-video"], + coverImage: undefined, + pageUrl: "https://docs.kie.ai/market/bytedance/seedance-2-fast", + }, { id: "grok-imagine/text-to-video", name: "Grok Imagine Video",