Ddukddak

Advanced Video Generator

Automate Plan+

Create professional videos programmatically with text overlays, smooth transitions, animated elements, and background music. Perfect for ads, social media stories, product demos, and promotional content.

Get Started

Install the SDK and generate videos programmatically. Video generation requires the Automate plan or higher.

Install the SDK

npm install @ddukddak/node

Generate a Video

const { Ddukddak } = require("@ddukddak/node");

const client = new Ddukddak("YOUR_API_KEY");

// Generate a video with text overlays and background music
const video = await client.videos.createAndWait(
  {
    template: "product-animation",
    input_media_url: "https://example.com/clip.mp4",
    properties: [
      { name: "title", text: "Spring Sale 2026" },
      { name: "subtitle", text: "Up to 50% off" },
    ],
    audio_url: "https://example.com/bgm.mp3",
  },
  5000,   // pollInterval: 5s (videos take longer)
  600000, // timeout: 10 minutes max
);

console.log(video.video_url);

API Parameters

Parameters for the video generation endpoint.

ParameterTypeRequiredDescription
templatestringYesTemplate slug or UUID for the video
input_media_urlstringYesURL of the input video or media file
propertiesarrayNoArray of property objects: { name, text?, image_url?, color? }
audio_urlstringNoURL of background audio track

Async Pattern with Error Handling

For production use, handle plan restrictions and poll for completion manually.

const { Ddukddak, PlanRestrictedError } = require("@ddukddak/node");

const client = new Ddukddak("YOUR_API_KEY");

try {
  // Step 1: Create video (returns immediately)
  const video = await client.videos.create({
    template: "product-animation",
    input_media_url: "https://example.com/clip.mp4",
    properties: [
      { name: "title", text: "Spring Sale 2026" },
    ],
    audio_url: "https://example.com/bgm.mp3",
  });

  console.log(`Request ID: ${video.uid}`);

  // Step 2: Poll for completion
  const result = await client.videos.get(video.uid);
  console.log(`Status: ${result.status}`);
  if (result.status === "completed") {
    console.log(`Video URL: ${result.video_url}`);
  }

} catch (error) {
  if (error instanceof PlanRestrictedError) {
    console.log("Video generation requires Automate plan or higher.");
    console.log("Upgrade: https://ddukddak.studio/pricing");
  } else {
    throw error;
  }
}

Want to build this?

Use our API to create dynamic videos at scale for ads, social media, and promotional content.