Skip to content

Creatify Pipeline

Take a viral TikTok or Instagram reel, pull its transcript, and feed the script into Creatify to produce a branded avatar video. Useful for ad library mining plus avatar repackaging in under a minute per asset.

Steps

  1. Pull the TikTok video transcript.
  2. Pull the Instagram reel transcript (optional, for cross-platform variants).
  3. Strip filler words and platform mentions.
  4. Send the cleaned script to Creatify's lipsync_v3 endpoint with your avatar id.
  5. Poll the render until status is done.
  6. Download the MP4.

Node Script

js
import fs from 'node:fs';

const SC_KEY = process.env.SCRAPECREATORS_API_KEY;
const CREATIFY_API_ID = process.env.CREATIFY_API_ID;
const CREATIFY_API_KEY = process.env.CREATIFY_API_KEY;

async function getTikTokTranscript(videoUrl) {
  const res = await fetch(
    `https://api.scrapecreators.com/v1/tiktok/video/transcript?url=${encodeURIComponent(videoUrl)}`,
    { headers: { 'x-api-key': SC_KEY } }
  );
  if (!res.ok) throw new Error(`TikTok transcript: ${res.status}`);
  const data = await res.json();
  return data.transcript || '';
}

function cleanScript(text) {
  return text
    .replace(/\b(um|uh|like|you know)\b/gi, '')
    .replace(/\s+/g, ' ')
    .trim();
}

async function createCreatifyVideo(script, avatarId) {
  const res = await fetch('https://api.creatify.ai/api/lipsyncs_v3/', {
    method: 'POST',
    headers: {
      'X-API-ID': CREATIFY_API_ID,
      'X-API-KEY': CREATIFY_API_KEY,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      script,
      creator: avatarId,
      aspect_ratio: '9:16',
    }),
  });
  return res.json();
}

const transcript = await getTikTokTranscript('https://www.tiktok.com/@stoolpresidente/video/7320000000000000000');
const script = cleanScript(transcript);
console.log('Script:', script.slice(0, 200));
const job = await createCreatifyVideo(script, 'YOUR_AVATAR_ID');
console.log('Creatify job:', job.id);

Notes

  • TikTok transcripts cost 1 credit per call. Instagram transcripts cost more because they use AI.
  • Creatify lipsync_v3 typically renders in 60 to 180 seconds.
  • Always strip platform-specific phrases ("hit follow", "tap the link") before re-rendering.
  • For volume, run TikTok hashtag search first, then loop through the top videos.
  • GET /v1/tiktok/video/transcript: TikTok video transcript.
  • GET /v2/instagram/media/transcript: Instagram post or reel transcript.
  • GET /v1/youtube/video/transcript: YouTube video transcript.
  • GET /v1/twitter/tweet/transcript: Twitter video tweet transcript.
  • GET /v1/facebook/post/transcript: Facebook post or reel transcript.