Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.
TypeScript agentic-aiaiai-agentsai-videocompilerdslffmpeggenerative-aillmmarkup-languagemonorepoplugin-systemprogramming-languagetext-to-videotypescriptvideovideo-automationvideo-clonevideo-editingvideo-generation
import type { GenerationRequestDraft } from "@hypit/generation";
import type { BlobRef } from "@hypit/hypit/protocol";
/** Seedance's reference-audio rule, shared by known imports and request assembly. */
export function validateSeedanceAudio(artifact: BlobRef, subject = "Seedance reference audio"): void {
if (artifact.mediaType === "audio/mp4" || artifact.mediaType === "audio/x-m4a") {
throw new Error(`${subject} does not accept m4a; convert the reference audio to WAV or MP3 before using it (media:ExtractAudio produces WAV)`);
}
}
/** Missing references in a draft remain graph inputs; only supplied audio is checked. */
export function validateSeedanceInputs(request: GenerationRequestDraft): void {
for (const value of request.ports.referenceAudio ?? []) {
if (typeof value === "object" && value.role === "audio") validateSeedanceAudio(value.artifact);
}
}