Skip to main content

Your agent can clone viral videos now

Cloning takes a public TikTok or Instagram video, evaluates whether its motion and framing will transfer cleanly, and generates a new video with your character performing the same motion. Create your character once, then reuse its id on every clone.
Need an API key? Follow Get your API key first.

Before you start

  • All URLs passed between steps must be https://. Plain http:// is rejected.
  • TikTok and Instagram links are not directly fetchable by the generation providers. Stage the source first with POST /v1/videos/download/tiktok or POST /v1/videos/download/instagram. Clone-check, extraction, and clone-video use the staged VidJutsu URL; starting-image uses the extracted first-frame image.
  • Source clips are capped at 15 seconds. A longer sourceVideoUrl passed to POST /v1/clones/video is rejected with a 422 and error: "video_too_long".
  • POST /v1/clones/check and POST /v1/clones/video both cap source videos at 15 seconds. Trim or choose a short segment before checking or generating.
  • Starting images returned by POST /v1/clones/starting-image are generated with a server-enforced clean-frame instruction: no captions, watermarks, or platform UI.
  • Kling 3.0 Motion Control is the only supported clone-video model. If you send model, its value must be "kling"; omitting it uses "kling" by default.
  • Characters are a persisted, reusable resource. Create one once, keep its id, and pass that id into every clone from then on instead of regenerating a character each time.

Create your character first

Before you clone anything, create the character you want to appear in your clones. This only needs to happen once.
referenceImageUrl is optional if you already have a face or identity image to guide the generation; without it, the character comes purely from prompt. The call is synchronous and shares the daily clone admission limit. Save id: it is what you pass to every clone that should use this character, so you only create it once. To see the characters you’ve already created, list them:
Or fetch one directly by id:
Errors: 403 subscription_required, 429 on the shared clone admission limit. 404 if the character id doesn’t exist or belongs to another tenant.

The clone calls

1. Stage the source video

Repeated imports of the same post reuse the same asset (reused: true) without calling ScrapeCreators or fetching the source media again. Existing assets created before metadata storage return metadata: {} and are not backfilled. Use url as videoUrl for clone-check and as mediaUrl for frame extraction; later, use it as the clone video’s sourceVideoUrl. Errors: 403 subscription_required if the key has no active subscription. 429 with a Retry-After header if the shared 500/day scrape-and-download limit is hit; the window resets at 00:00 UTC.

2. Check whether it will clone well

Gemini returns structured observations and the server applies a fixed rubric. strong is 85–100, possible is 70–84, and weak is below 70. Removable captions, stickers, watermarks, and overlays do not reduce the score unless they hide motion-critical parts of the performer. Branch on the result: a strong or possible verdict is worth continuing, weak usually is not. This call is synchronous and shares the same daily clone admission limit as the character, starting-image, and video steps. Errors: 400 social_video_requires_download for a raw TikTok or Instagram page, 413 media_too_large above 50 MB, 415 unsupported_media_type for HTML or a non-MP4 container, 422 video_too_long above 15 seconds, 403 subscription_required, and 429 with Retry-After on the shared clone admission limit.

3. Compose the starting frame

Extract frame index 0 from the staged video with POST /v1/extract, then pass its returned image URL as firstFrame together with the stored characterId.
Gemini edits the actual firstFrame: it preserves composition, pose, lighting, and background while replacing the performer identity from characterId. The returned image is generated with a server-enforced no-overlay instruction. The endpoint is synchronous and shares the clone admission limit. Errors: 400 for missing or invalid firstFrame/characterId, 404 if the character is unknown or belongs to another tenant, 403 subscription_required, and 429 on the shared clone admission limit.

4. Submit the clone

Kling 3.0 Motion Control is the only supported model. model defaults to "kling" and, when provided, must be "kling". prompt optionally overrides the default motion-control prompt. This call remains asynchronous: it returns 202 immediately with a task id to poll. Errors: 403 subscription_required. 422 video_too_long if sourceVideoUrl runs past 15 seconds. 429 with Retry-After on the shared clone admission limit.

5. Poll for the result

Poll while status is "processing". On "completed", videoUrl carries the finished clip. On "failed", error explains why. Status reads are not billed and not rate-limited. Unknown ids, or ids owned by another tenant, return 404.

SDK and CLI

The vidjutsu clone run command requires CLI 1.4.0 or later. On an older release, use the REST calls above or upgrade before cloning.
Create your character once:
This prints the character’s id. Reuse that id on every clone:
The CLI command wraps the remaining calls: stage, check, starting image (using the character id you passed), submit, poll, printing the verdict and score before it commits to generation.

Continue the workflow

Scrape guide

Preview a TikTok or Instagram post’s engagement before you decide what to clone.

API reference

Full request and response schemas for every clone endpoint.

Overlay and disclaimer

Add a text overlay or disclaimer card to the finished clone before you publish.

Authentication

Get an API key and pass it as a bearer token.