# Script clone

**What**：Give it a viral reference video and your product images: it keeps the viral video’s structure and pacing and re-shoots it with your product. You can set the model’s look, the voice-over language and the target market.

**When**：Commerce short videos: you found a viral clip and want the same script with your own product.

## Endpoints
- POST `/api/cqt/generator/viralclone`
- GET `/api/cqt/info/viralclone?id={taskId}`

## Models

Both models share the same endpoint and parameters; they differ in quality, allowed length and ratios. Lengths outside the table are rejected at submit (no charge).

| model | Usage | Materials | Duration (sec) | Resolutions |
| --- | --- | --- | --- | --- |
| `viral-clone-flash` | Advanced: balanced speed and price (default tier) | 1 reference video · ≤10 product images | 2~15 | 720P / 1080P |
| `viral-clone-pro` | Pro: higher quality and fidelity, longer videos and the adaptive ratio | 1 reference video · ≤10 product images | 4~30 | 720P / 1080P |

## Request params
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| model | string | Yes | viral-clone-flash (advanced) / viral-clone-pro (pro) |
| cloneMode | string | — | Clone type; script on this page (defaults to script when omitted) |
| videoUrls | string[] | Yes | Viral reference video URL, exactly 1 (must be publicly accessible) |
| imageUrls | string[] | Yes | Product image URLs, 1-10 images |
| duration | number | Yes | Output length in seconds: flash 2-15, pro 4-30. Also the billed seconds |
| resolution | string | — | 720P (default) / 1080P |
| aspectRatio | string | — | 9:16 / 16:9 / 3:4 / 4:3 / 1:1 / 21:9; pro also accepts adaptive (match the reference video). Omit to auto-pick 9:16 or 16:9 from the reference video |
| prompt | string | — | Extra requirements (optional), e.g. scene, mood, selling points |
| productName | string | — | Product name (optional) |
| productDescription | string | — | Selling-point description (optional) |
| personaImages | string[] | — | Person reference images (optional, ≤10) to set the on-screen person |
| personaGender | string | — | Model gender: male / female / any |
| personaAge | string | — | Age group: teenager / youth / middle_aged / senior |
| personaEthnicity | string | — | Appearance: caucasian / asian / latino / african / middle_eastern |
| personaBodyType | string | — | Body type: slim / standard / athletic / chubby |
| language | string | — | Voice-over language (script clone only): zh / en / ja / ko / es / pt / de / fr / it / pl / instrumental (no voice-over) |
| market | string | — | Target market (script clone only), affects localization: north_america / europe / china / japan / korea / sea / brazil |

## Request example
```bash
curl -X POST https://api.novapi.ai/api/cqt/generator/viralclone \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "viral-clone-flash",
    "cloneMode": "script",
    "videoUrls": [
      "https://example.com/viral.mp4"
    ],
    "imageUrls": [
      "https://example.com/product-1.png",
      "https://example.com/product-2.png"
    ],
    "productName": "Ice-silk white dress",
    "productDescription": "Cooling ice-silk fabric, quick-dry and breathable",
    "duration": 10,
    "resolution": "720P",
    "aspectRatio": "9:16",
    "language": "en",
    "market": "north_america",
    "personaGender": "female",
    "personaAge": "youth",
    "prompt": "Show the product in a sunny park"
  }'
# -> { "code":200, "data":"<taskId>" }
```

## Response example
```json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "<taskId>",
    "status": "succeeded",
    "resultUrl": "https://.../clone.mp4",
    "errorMsg": null,
    "createTime": "2026-11-18 10:00:00",
    "completeTime": "2026-11-18 10:05:00"
  }
}
```

## Response fields
| Field | Type | Description |
| --- | --- | --- |
| code | number | 200 means success |
| data.id | string | Task ID (taskId) |
| data.status | string | queued / running / succeeded / failed |
| data.resultUrl | string | Result video URL on our CDN (long-lived); null until done or on failure |
| data.errorMsg | string \| null | Failure reason; null on success |
