LinkPix — E-commerce AI Viral Content Generation
LinkPix is the e-commerce content creation capability of the Qinghu Workbench (main images / detail images / ad creatives / POD materials / AI-generated videos / viral video replication / video translation / AI tools).
The command-line entry point is qhkit (npm package @iqinghu/qhkit, the command name after installation is qhkit). All commands below start with qhkit.
This skill does only one thing: teaches you (the agent) to determine when to use it and how to translate user needs into correct command invocations.
0. Intent Routing: What the User Wants → Which Command to Use
| User Intent (Example Wording) | Command | Output |
|---|---|---|
| Generate product images/primary images/sets of images, "make a few marketing images from this image" | image (Suite Mode) | Images |
| Generate a commercial image directly from a text description (reference image optional) | image (Custom Image Generation Family; real-time list: Smart Model / Image 5.0 Lite / Specialized Model / Image 5.0 Pro, etc., uploadedImages optional) | Images |
| Generate an e-commerce detail page long image | image (E-commerce Detail Image) | Image |
| "Help me write an image generation prompt", generate a prompt from a product image / selling points | image (polish) | Prompt text |
| One product image × multiple prompts, each generates one image, "batch out N different images" | image-batch (Batch Image Generation) | Images |
| Apply the same modification instruction to multiple images (e.g., batch white background) | image-batch (Batch Image Modification) | Images |
| "Put my product into these reference images" | image-batch (Batch Replacement) | Images |
| "Make a primary image for my product in the style of this viral primary image" | image-batch (Primary Image Replication) | Images |
| Generate multi-pose model sets for clothing images | image-batch (Pose Sets) | Images |
| Translate text on images (batch translation) | image-batch (Batch Image Translation) | Images |
| Create an ad video / product video (with reference images) | video | Video |
| "Turn these images into a product video", one-click video creation | video-quick | Video |
| Change person / model / face (on an existing video) | video-replace | Video |
| Translate a video, add foreign voiceover, add foreign subtitles | video-translate | Video |
| Remove watermark / remove subtitles / enhance quality (super-resolution) | video-edit | Video |
| "Replicate this viral video for me" (Douyin link, etc.) | video-inspire | Video script text |
| Convert a video to text/image post | video-to-text | Text post body |
| Write a storyboard script, generate storyboard images | storyboard | Script text + storyboard images |
| Batch produce advertising creatives/traffic materials from official templates | ad | Video or image (depending on template) |
| Print extraction/placement/fission, POD print materials, query product base images | pod | Images |
| Use Qinghu Workbench's "AI Applications" (viral video imitation, TVC ad production, model outfit changing, ultra-clear restoration, watermark removal, short video/KOL data engine) | workflow | Video / Image / Data table |
If uncertain, first ask yourself: is the output an image or a video? Is the input text, an image, or an existing video? This table should lead to a unique command.
Capability Boundary: Media needs outside the table above (e.g., music/MV generation, digital human dubbing, live streaming clips, long video editing) are not supported by qhkit — clearly inform the user that it is currently unsupported, suggest they check the capabilities at Qinghu Workbench (https://www.iqinghu.com) or use another skill, do not force-fit the closest command as a workaround.
1. Prerequisites: Environment Bootstrap (Install What's Missing, Don't Abandon the Task Due to Missing Environment)
Check in order, install locally if missing:
- Is qhkit available? If
qhkit config showruns successfully, it's installed; skip to step 4. - No qhkit but Node/npm available (OpenClaw/Hermes machine deployment ensures Node 22+) → Install globally (recommended method):
Default to npm's official registry; if the official registry is slow or times out (common on domestic networks), add the mirror parameternpm i -g @iqinghu/qhkit--registry=https://registry.npmmirror.com(Aliyun-maintained npm official mirror, only as a network fallback). Only fall back tonpx @iqinghu/qhkit <command> ...if global installation fails due to permission issues that cannot be escalated (npx requires the full package name). - No Node at all (requires Node ≥ 18): Install Node first, then go back to step 2.
Only proceed if the checksum output is# Linux binary installation (installs to user directory, no root needed; verify official SHA256 first, then extract): cd /tmp && curl -fsSLO https://nodejs.org/dist/v22.22.3/node-v22.22.3-linux-x64.tar.xz cd /tmp && curl -fsSL https://nodejs.org/dist/v22.22.3/SHASUMS256.txt | grep ' node-v22.22.3-linux-x64.tar.xz$' | sha256sum -c - mkdir -p "$HOME/.local/lib" && tar -xJf /tmp/node-v22.22.3-linux-x64.tar.xz -C "$HOME/.local/lib" export PATH="$HOME/.local/lib/node-v22.22.3-linux-x64/bin:$PATH"OK; if verification fails, delete and re-download, never extract a file that hasn't passed verification. If nodejs.org is unreachable, replace the prefixhttps://nodejs.org/distin both download URLs with the mirrorhttps://registry.npmmirror.com/-/binary/node(same directory structure, SHASUMS256.txt is mirrored too, verification steps remain the same). Theexport PATHonly takes effect for the current shell; each new shell must execute this line before cross-calling commands (or append it to~/.bashrc). On macOS usebrew install node; on Windows use winget/official installer. For arm64 machines, replacex64witharm64. - API Key: If no key is present (command returns
stage:"config"), send the following guidance to the user, then after obtaining the key, executeqhkit config set --token <key> --env prod(or set the environment variableQHKIT_TOKEN):- Open https://www.iqinghu.com/workbench/login?urlCode=agentgit to register/log in
- Go to Console → Workbench's APIKeys page: https://www.iqinghu.com/workbench/dashboard/api-keys
- Click "Create/Copy" to generate a key, then send me the API key
Tutorial with images for obtaining the key: https://xcnzsfe4uxrw.feishu.cn/wiki/KJ0Ywsyw8iAXmRkz5l4cddDbn6g
- Self-check:
qhkit config showoutputs the desensitized configuration — everything is ready.
Update Method: When qhkit is already installed globally, updates are also performed by you (the agent) via global installation:
npm i -g @iqinghu/qhkit@latest
If the official registry is slow or times out, add --registry=https://registry.npmmirror.com. If any of the following signals appear, update first before continuing: command returns {"ok":false,"stage":"version",...} (version gate: generate/script will be directly blocked when a newer version is available, the message contains the exact upgrade command, follow it); command returns {"ok":false,"stage":"runtime","message":"Unknown command: <command>. Run qhkit --help for usage."} (local qhkit is too old and doesn't have this command yet — note this is not blocked by the version gate, stage is runtime not version, don't mistake it for a usage error); stderr indicates a new version is available; command reports "mode has been taken offline or configuration changed, please upgrade qhkit". Retry the original command after upgrading. (Model listings for video and image are read in real-time starting from 0.12.0, so new models added online don't require a CLI upgrade.)
When installation/configuration fails, inform the user of the specific error (common issues: no write permission → prompt the user to escalate privileges or use npx; no network → ask the user to handle the network).
2. Unified Invocation Contract (Consistent Across All Commands)
qhkit <command> <action> '<json>'
qhkit <command> <action> @params.json # Write parameters to a file to avoid shell escaping issues (recommended)
- Action is three-stage:
options(query available values/lists) →generate(submit) →status(poll).storyboardhas an additionalscript;adusestemplatesto query templates;podalso hasproductsto query the product image library;image/video/ad/pod/workflowalso haveestimate(cost estimate) — same parameters asgenerate, returns the credits that will be actually deducted for this submission (credits) and whether the balance is sufficient (enough), without submitting the task. The first four don't upload files and return instantly;workflow estimateis an exception — local materials will actually be uploaded (workflow estimation requires real material URLs). - stdout is always one line of JSON; on success it contains business fields, on failure it is
{"ok":false,"stage":"...","message":"..."}with exit code 1. Simply relay the message to the user. - The return is direct data results (no pre-rendered presentation fields): output URLs are sourced from
images/videos/primaryVideo, text output invideoScript/imageText/script, credits incredits, task IDs in various taskId fields. How to present to the user is up to you based on the current environment. - stderr may contain informational lines (e.g., version/model directory warnings), not errors, do not treat as failures.
- Parameters like
uploadedImages/urls/ video parameters can be directly local file paths (CLI automatically uploads to obtain URLs, this is the most common usage); if the material is already on the public internet, http(s) URLs can also be used directly. The only exception:video-inspire'sresourceUrlonly accepts http(s) links (sharing links from platforms like Douyin, the backend fetches from the link, no file upload). - Image size limit 10MB: For local images between 3–10MB, the CLI will automatically append COS thumbnail parameters (proportional scaling down to within 2048px, only scale down, no enlargement) after upload to prevent large images from causing downstream disconnections; stderr will show a line of information in this case — it's a hint, not an error. For public URLs, this processing is only applied to Qinghu/COS domains; for external large image URLs provided by the user, it's recommended to download them locally first and then pass the path to allow the CLI to use this defense.
- When an image exceeds 10MB and is blocked, don't throw the problem back to the user; you (the agent) should compress it locally and retry (target: proportional scaling within 2048px, only scale down, no enlargement; output as jpg; after compression, pass the new file path back to the original command and retry once). Only use two methods, check in order:
- Python first (check if
python --versionorpython3 --versionworks; if Pillow is missing, install it first:pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple):python -c "from PIL import Image, ImageOps; im=ImageOps.exif_transpose(Image.open('original_image')); im.thumbnail((2048,2048)); im.convert('RGB').save('compressed.jpg', quality=85)" - If no Python, use Node (Node is definitely available since qhkit can run), compress using npm's sharp-cli:
npx --yes sharp-cli -i original_image -o compressed.jpg resize 2048(downloads on first run, cached afterwards; if the official registry is slow, add--registry=https://registry.npmmirror.com) Similarly, for external large image URLs: download locally first, then go through the above process. Only if both methods fail, inform the user honestly and ask them to provide an image within 10MB; if compression and retry still fail, relay the CLI's message, do not retry repeatedly.
- Python first (check if
- Label parameters (
modelLabel,sizePreset,themeLabel, etc.) must match the candidate values returned byoptionsverbatim, do not invent or translate them. If unsure, calloptionsfirst. - Model listings for
videoandimageare real-time (from 0.12.0, they read the online directory directly, automatically following additions/removals/price changes, no CLI upgrade needed), and neither has a default model —modelLabelis mandatory; if missing, it will error out and list the current available options. Before selecting a model for the first time in a session, runoptionsto querymodelLabel/modelsfor the current list, do not use memory or the snapshot in this document to report model names. If the directory cannot be fetched (network issue/key problem), the command will explicitly report an error; guide the user to check the configuration based on the prompt.
⛔ Must get user confirmation before submission (hard rule): Before initiating any action that would create a task or consume credits (all generate actions, including storyboard's script), you must first list the key parameters of this submission to the user in one go — model/template, number of images or video duration, size and quality, language, which reference images will be used, and the estimated credits from estimate — wait for the user's explicit consent before executing the submission. Even if all parameters come from the user's own words, reiterate and confirm them (there may be discrepancies between verbal descriptions and actual enumeration values; tasks cannot be cancelled after submission). Read-only actions (options / estimate / status / templates / products / config show) do not require confirmation and can be called directly.
3. Polling Rules (Important)
image generatehas built-in polling: The command blocks until images are generated or timeout (approximately 14 minutes max), directly returning image URLs in the output; no need to check status again.pod generateandad generatefor the image line work the same way (block until images are generated).- Other video-type
generateonly submit (includingad's video line): Returns immediately withstage:"pending"+ task ID; requires repeated calls tostatusuntilstage:"done"(returns with output URLs) or an error occurs. - Recommended polling interval: 15–30 seconds for images; 30–60 seconds for videos. Video tasks can take up to 40 minutes, so don't give up early; also inform the user of the expected time.
- Tasks cannot be cancelled after submission; stopping polling does not affect backend generation; keep the task ID and inform the user.
4. Command Quick Reference
image — AI Image Generation (modelLabel mandatory, list is real-time)
Two fixed modes (Suite Mode / E-commerce Detail Image, dedicated workflows) + Custom Image Generation Family (real-time list): All visible models under businessType=image except for Suite Mode; new additions/removals/price changes online are automatically followed. No default model — modelLabel is mandatory; first query options for modelLabel/models to get the current list before selecting.
Point-in-time reference (2026-08-25 directory, only to give you a sense; rely on real-time options output):
| modelLabel | Official Selling Point | When to Choose | Input | Unit Price/Image (1K time-point value) |
|---|---|---|---|---|
Suite Mode | Upload reference image, intelligently generate professional primary image sets | For a set of product images with a unified style | Reference image or customCopy (at least one) | 1.5 |
Smart Model | Best image generation quality, excellent picture, every image is a pick | Quality priority, and free quota is available | prompt (required) + reference image (optional) | 1.5 (with free quota) |
Image 5.0 Pro | Realistic, fast | For realism and speed | prompt (required) + reference image (optional) | 2 |
Image 5.0 Lite | High detail consistency | To maintain consistent details across multiple images | prompt (required) + reference image (optional) | 1.5 |
Specialized Model | Best image generation quality, slowest speed | When the user explicitly wants the best quality and is not pressed for time | prompt (required) + reference image (optional) | 1.5 |
E-commerce Detail Image | Non-editable, multiple short images, high image quality | For a detail page long image | Reference image (required) + themeLabel | 2 |
The 2K tier is roughly twice the 1K price; if a reference image exceeds the free limit (3 images), each additional image has a small surcharge — estimate will automatically factor these in.
The middle four are the Custom Image Generation Family, with identical input parameters (prompt required + optional uploadedImages/sizePreset/imageCount), only differing in quality orientation and credits. The canonical labels are the online model names (historical labels like Specialized Mode still work as aliases); if the user hasn't specified a model, list the candidates (including selling points and unit prices from models) for the user to choose, don't decide for them.
⚠️ All 6 modes accept reference images (optional for the four custom generation models; for image-to-image semantics. Tested on 2026-08-20, the Smart Model with a reference image produces images that align with the original image details one-to-one). If the user provides a product image, pass it in via
uploadedImages; don't just transcribe the image content into a prompt text (which loses original image details), and don't say "a certain mode doesn't support reference images."
# Suite Mode: reference image + optional copy + publishing platform (imageCount 1/6/7/8/9/10, default 9)
qhkit image generate '{"modelLabel":"Suite Mode","uploadedImages":["./material/product_image.jpg"],"customCopy":"50% off limited time","platform":"Douyin","imageCount":6}'
# Custom image generation: prompt direct output, reference image optional (imageCount 1/2/4/6/8/10)
qhkit image generate '{"modelLabel":"Specialized Model","prompt":"High-end cosmetic scene image","sizePreset":"Default 1:1 2K (2048×2048)"}'
qhkit image generate '{"modelLabel":"Smart Model","prompt":"High-end cosmetic scene image","imageCount":2}'
# Custom image generation + reference image (use this when the user provides a product image, strictly based on the original image)
qhkit image generate '{"modelLabel":"Smart Model","prompt":"Military green emergency radio e-commerce main image, professional studio texture","uploadedImages":["./material/radio.jpg"],"imageCount":2}'
# Detail image: reference image + color theme
qhkit image generate '{"modelLabel":"E-commerce Detail Image","uploadedImages":["./material/product_image.jpg"],"themeLabel":"Ocean Blue"}'
# Prompt polishing: provide at least one of product image/product name/selling point, returns an AI-generated image prompt (no task creation, no image generation credits deducted)
qhkit image polish '{"uploadedImages":["./material/product_image.jpg"],"productName":"Thermos","pointDescription":"Titanium alloy liner, 24h insulation"}'
# Cost estimate: same parameters as generate but with a different action; returns the actual credits that will be deducted for this submission (including discounts/quality/free quota) — run this before presenting the credits to the user
qhkit image estimate '{"modelLabel":"Suite Mode","uploadedImages":["./material/product_image.jpg"],"imageCount":6}'
# Model selection quick query: model selling points + real-time credits + free quota (run this first when unsure which one to choose)
qhkit image options '{"queryParams":["models"]}'
# Available values query (sizePreset/platform/themeLabel/imageCount vary by mode; ensure you include modelLabel)
qhkit image options '{"queryParams":["sizePreset","imageCount"],"modelLabel":"Image 5.0 Pro"}'
Suite Mode/Detail Image require at least one reference image; Custom Generation must have prompt (reference image optional). generate returns instantly with image URLs (built-in polling).
sizePreset differs per model (the size tables for the four custom generation models are independent of each other), don't apply one model's size label to another — query options first.
Default quality is 1K; to request 2K (price roughly double the 1K tier), explicitly pass "quality":"2K". Suite Mode defaults to 9 images (consistent with the official website) — when confirming parameters, be sure to report the image count, quality, and estimate credits to the user; always use the actual estimate return value for credit numbers.
Suite Mode publishing platform is passed via platform (Taobao/Douyin/Pinduoduo/1688/JD/Amazon/Shopee/TikTok Shop/Lazada/Temu/Ozon/Wildberries/SHEIN, query options for platform to see the full list): this influences the composition and copy layout strategy of the suite images; if the user mentions a target platform, include it.
image-batch — Batch Image Generation Modes (mode selection from six)
These are the batch gameplay modes corresponding to the "AI Capabilities" cards on the official website's homepage; all have built-in polling (blocks until images are generated). No count parameter — the number of output images is determined by the number of prompts/images/actions (max 10 per batch):
| mode | Use Case | Key Parameters | Image Count |
|---|---|---|---|
Batch Image Generation | Single product × multiple prompts, one image per prompt | prompts[] + uploadedImages (reference image required, 1–10 images) | = number of prompts |
Batch Image Modification | Multiple images with one shared modification instruction (e.g., batch white background) | prompt + uploadedImages (1–10 images) | = number of images |
Batch Replacement | Replace the product into each reference image | referenceImages + productImage (1 image) + productName | = number of reference images |
Primary Image Replication | Replicate the style of a reference image, generate a new primary image for your product (currently only 1:1) | referenceImages + productImages (1–6 images) | = number of reference images |
Pose Sets | Clothing-specific: 1 product image × multiple pose actions | uploadedImages (only 1 image) + poseActions[] (each ≤300 characters) | = number of actions |
Batch Image Translation | Translate text on images | prompt (must specify the target language) + uploadedImages (1–10 images) | = number of images |
qhkit image-batch options '{}' # Parameter descriptions for the six modes
qhkit image-batch generate '{"mode":"Batch Image Generation","prompts":["White background image","Outdoor scene image"],"uploadedImages":["./material/product_image.jpg"]}'
qhkit image-batch generate '{"mode":"Batch Image Modification","prompt":"Uniformly change to pure white background","uploadedImages":["./a.jpg","./b.jpg"]}'
qhkit image-batch generate '{"mode":"Batch Replacement","referenceImages":["./scene1.jpg","./scene2.jpg"],"productImage":"./product.jpg","productName":"Thermos"}'
qhkit image-batch generate '{"mode":"Primary Image Replication","referenceImages":["./viral_main_image.jpg"],"productImages":["./my_product.jpg"]}'
qhkit image-batch generate '{"mode":"Pose Sets","uploadedImages":["./dress.jpg"],"poseActions":["Stand straight with hands on hips, facing front","Turn back and look over shoulder"]}'
qhkit image-batch generate '{"mode":"Batch Image Translation","prompt":"Translate into English","uploadedImages":["./chinese_main_image.jpg"]}'
qhkit image-batch estimate '{"mode":"Pose Sets","uploadedImages":["./dress.jpg"],"poseActions":["Front view","Side view"]}' # Cost estimate (Pose Sets: +0.5 credit per pose)
- Batch Image Generation/Modification/Replacement/Pose Sets must pass
modelLabel(Custom Image Generation Family, real-time list, no default; first queryimage optionsformodelLabel) with optionalsizePreset/quality; Primary Image Replication and Batch Image Translation have fixed models. - Elements in
referenceImagesfor Batch Replacement can be written as{"url":"...","replaceText":"Replace the vase position in the image"}to specify the replacement area; Primary Image Replication similarly supportshint(custom replication requirements), or pass"removeText":trueglobally to remove text from reference images. - Batch Image Translation is charged per image; Pose Sets do not use free quotas.
video — AI Video Generation (modelLabel uses "Model Name + Duration in Seconds", list is real-time)
Online, a "duration + generation channel" combination constitutes a model. Models with the same name often have multiple durations, so the label is formatted like Seedance2.0 15 seconds. When only the model name is provided: if it's unique, it matches; if multiple durations exist, it will error out requesting additional duration.
Model list reads the online directory in real-time (from 0.12.0): additions/removals/price changes/maintenance/limited-time discounts are automatically followed; no default model — modelLabel is mandatory; omitting it will error out and list the current available options (narrowed by duration if duration is provided). Therefore, the workflow is fixed: first options to query models for the current list and capability rules, then estimate for cost, confirm with the user, then generate.
# This is always the first step: current models, their reference image/video/audio/frame rules, unit prices, and activity badges
qhkit video options '{"queryParams":["modelLabel","models"]}'
# Materials can be either public URLs or local file paths (local files are automatically uploaded by the CLI to obtain URLs)
qhkit video generate '{"modelLabel":"Seedance2.0 15 seconds","prompt":"Outdoor work light advertisement","uploadedImages":["./material/product_image.jpg"],"uploadedVideo":"./material/reference_video.mp4"}'
qhkit video generate '{"modelLabel":"All-In-One E-commerce 2.0","duration":10,"prompt":"Outdoor work light advertisement","uploadedImages":["./material/product_image.jpg"]}'
qhkit video status '{"videoTaskId":"task-123"}'
# Cost estimate: same parameters as generate but with a different action — run this before presenting credits to the user
qhkit video estimate '{"modelLabel":"Seedance2.0 15 seconds","uploadedVideo":"./material/reference_video.mp4"}'
Each model in options's models provides all fields needed for selection: description/propertyTags (effect, stability, prompt requirements, quality), credits (unit price), activityBadge (e.g., "Limited time 50% off"), free, maintenance, notice (e.g., "Coming soon"), category (main image video/product video/marketing material/grass-roots video/marketing ad/traffic material), reference material rules (see below).
Point-in-time reference (2026-08-25 domestic version directory, only to give you a sense; rely on real-time options output): 19 models, durations 5–30 seconds. Highlights from that time: Aliwanx3.0 15 seconds (25 credits, limited-time 50% off, reference video ≤5s), Seedance2.5 15/20/30 seconds (grass-roots/marketing ad tier, reference image required, reference video ≤10s, 15-second tier also accepts reference audio ≤3s), MiniMax H3 5/10/15 seconds (5–10 credits cost-effective tier, 768p, new ultra-wide 21:9 aspect ratio, does not accept reference video), Seedance2.0 15 seconds/All-In-One E-commerce 2.0 (classic product video tier), Brand Quality Blockbuster 5 seconds (within free quota, reference image required, prompt requirements: "precise").
How to choose (principles, not tied to specific model names):
-
Filter
modelsbased on user needs: for camera movement imitation →supportsReferenceVideo: true; for BGM/dry voiceover →supportsReferenceAudio: true; for text-only startup →referenceImageRequired: false; cost-conscious → sort bycreditsascending (watch foractivityBadgelimited-time discounts). -
Prompt requirements (
propertyTags's "prompt requirement"): Models requiring "simple/concise" can use a one-liner selling point; models requiring "precise" (e.g., Brand Quality Blockbuster, Aliwanx3.0) will produce poor results with just one line; first help the user flesh out the shot, lighting, and material before submitting. -
Models with
maintenance: truecannot be submitted (the CLI will block them); models withnoticeof "Coming soon" should no longer be recommended. -
If the user hasn't specified a model, list 2–3 candidates (including unit prices) for the user to choose, don't decide for them.
-
Reference image rules follow the model (provided per entry in
options'smodels):multi_referencefor multiple images, each can includeimageUsageusage text;first_frameaccepts only 1 image for the first frame;first_last_frameaccepts 2 images (first frame first, last frame second), these two modes do not accept usage text. Models withreferenceImageRequired: truerequire an image; others can generate purely from text. -
Reference video (
uploadedVideo) is only supported by models withsupportsReferenceVideo: true; can be an array, maximum seemaxReferenceVideos(the CLI validates before submission). Note: this field inmodelshas been normalized according to the authoritative backend standard (both the switch and the rule must be true for support), follow it accordingly. -
Reference audio (
uploadedAudio, e.g., BGM/dry voiceover) is only supported by models withsupportsReferenceAudio: true; maximum seemaxReferenceAudios; local files ≤50MB are automatically uploaded. -
orientationLabeldiffers per model (modelsprovides full list inorientationLabel): common options includeVertical 9:16(default) /Horizontal 16:9/Square 1:1/Ultra-Wide 21:9(multi-resolution support inimageArtdetail sub-object). If the user hasn't specified, use the default or ask; if the user wants a full-screen short video (Douyin/etc.), default is 9:16.videomodels do not havesizePreset; passorientationLabelfor aspect ratio. The CLI validates that the model supports the provided orientation; if it doesn't, it will error out. -
video generateis async (submission only): Immediately returns task ID; requires pollingstatus. Prompt must be provided (no default prompt).promptis mandatory for all models;uploadedImages/uploadedVideo/uploadedAudioare optional but subject to model support (checked by the CLI). Image: currently up to 30 per model (if the model supports multi-image input, with usage categories like multi_reference); video: up to 20 per model; audio: up to 5 files per model. The CLI uploads files and the backend checks bounds, no manual counter needed.
video-quick — One-Click Video Creation
Generate a product video directly from multiple images + copy/audio: pass images and text (or audio), output a video. No prompt needed, fixed model. All built-in polling (blocks until completion, no generate → status separation; timeout maximum is the same as normal video generation, ≈40 minutes).
qhkit video-quick generate '{"uploadedImages":["file1.jpg","file2.jpg"],"copy":"Limited time 50% off, exclusive for members"}'
qhkit video-quick generate '{"uploadedImages":["file1.jpg","file2.jpg"],"audio":"background_music.mp3"}'
qhkit video-quick options '{}' # Full list of configurations: languages, voiceover, subtitles
copyandaudioare optional (if not provided, the system will write copy based on the images). If both are provided, copy takes priority for visuals and audio takes priority for sound (but the CLI will automatically merge; no conflict). User guide: one-click is suitable for short videos within 30 seconds; for precise effects, use thevideocommand.
video-replace — Replace Person/Model/Face
qhkit video-replace options '{}' # Queries dimensions/models/person counts supported
qhkit video-replace generate '{"uploadedVideo":"./source_video.mp4","uploadedImages":["./new_face.jpg"]}'
qhkit video-replace status '{"replaceTaskId":"task-xxx"}'
# Cost estimate (same parameters as generate, returns credits for this submission)
qhkit video-replace estimate '{"uploadedVideo":"./source_video.mp4","uploadedImages":["./new_face.jpg"]}'
video-translate — Video Translation (Automatic Voiceover + Subtitles)
Translate a video's audio and generate subtitles in the target language (audio dubbing + subtitle output).
qhkit video-translate options '{}' # Current language list and voiceover model list
qhkit video-translate generate '{"uploadedVideo":"./video.mp4","sourceLanguage":"zh","targetLanguage":"en"}'
qhkit video-translate status '{"translateTaskId":"task-xxx"}'
qhkit video-translate estimate '{"uploadedVideo":"./video.mp4","sourceLanguage":"zh","targetLanguage":"en"}' # Cost estimate
- If
sourceLanguageis not provided, the system will auto-detect; recommended to explicitly provide it.
video-edit — Remove Watermark/Subtitles, Quality Enhancement (Super-Resolution)
Non-destructive edits (outputs a new video), all complex parameter configurations are handled by the CLI (no manual options query needed).
qhkit video-edit generate '{"action":"watermark","uploadedVideo":"./watermarked.mp4"}'
qhkit video-edit generate '{"action":"subtitle","uploadedVideo":"./subtitled.mp4"}'
qhkit video-edit generate '{"action":"enhance","uploadedVideo":"./low_res.mp4"}'
qhkit video-edit status '{"editTaskId":"task-xxx"}'
qhkit video-edit estimate '{"action":"watermark","uploadedVideo":"./watermarked.mp4"}'
qhkit video-edit generate '{"action":"watermark","uploadedVideo":"https://example.com/watermarked.mp4"}' # Public URL
video-inspire — Viral Video Replication (Script Extraction + Enrichment)
Input: a sharing link from a short video platform (Douyin, etc.). Output: a detailed video script (text), which can then be used to generate a new video via video generate.
# Only accepts http(s) links, not local files! (Backend fetches the video from the link)
qhkit video-inspire generate '{"resourceUrl":"https://www.douyin.com/video/123456789"}'
qhkit video-inspire status '{"inspireTaskId":"task-xxx"}'
- Output is in
videoScript(text script, not a video), used for inspiration and copywriting reference.
video-to-text — Video to Text/Image Post
Converts video content into text and images suitable for note/posting platforms (e.g., Xiaohongshu).
qhkit video-to-text generate '{"uploadedVideo":"./video.mp4"}'
storyboard — Storyboard Script + Images
Generate a shot-by-shot script and corresponding storyboard images.
qhkit storyboard options '{}' # Query supported styles/etc.
# Script generation (generates script text first, does not create task, no image generation credits deducted)
qhkit storyboard script '{"prompt":"30-second short video storyboard for a portable Bluetooth speaker"}'
# Script + storyboard images (image generation uses `script` output internally, creates task, deducts credits for the images)
qhkit storyboard generate '{"modelLabel":"Smart Model","prompt":"30-second short video storyboard for a portable Bluetooth speaker","imageCount":6}'
qhkit storyboard status '{"storyboardTaskId":"task-xxx"}'
scriptonly returns script text (no image generation, no task creation).generateretains the script in output and also generates images.
ad — Batch Ad Creative Generation (Template-Based)
Generate multiple ad creatives based on official templates: pass product image + selling points, batch produce for various advertising channels.
qhkit ad templates '{}' # Query available template names/IDs
qhkit ad options '{}' # Available values (duration, aspect ratio, etc.)
qhkit ad generate '{"templateId":"ts_xxxx","uploadedImages":["./product.jpg"],"adCopy":"Limited time discount, Member Day"}'
qhkit ad status '{"adTaskId":"task-xxx"}'
# Video line templates generate videos; image line templates generate images; check the template list for specifics
qhkit ad estimate '{"templateId":"ts_xxxx","uploadedImages":["./product.jpg"]}' # Cost estimate
pod — Print-on-Demand Material Generation
Extract patterns from clothing photos, generate design placements and stencil layers.
qhkit pod products '{}' # Query available product base images
qhkit pod options '{}' # Available values
qhkit pod generate '{"mode":"extract","uploadedImages":["./clothing.jpg"]}'
qhkit pod generate '{"mode":"place","materials":[{"templateProductId":"tp_xxxx"}],"uploadedImages":["./pattern.png"]}'
qhkit pod generate '{"mode":"fission","uploadedImages":["./design_source.jpg"]}'
qhkit pod status '{"podTaskId":"task-xxx"}'
workflow — AI Applications (Multi-Function Entrance)
Unified entry point for all AI applications in Qinghu Workbench. Running options queries the list of available applications and their required parameters.
qhkit workflow options '{}' # Query available applications list: each application's entryName + description (e.g., viral video imitation, TVC ad production, model outfit changing, ultra-clear restoration, watermark removal, short video/KOL data engine)
qhkit workflow generate '{"entryName":"viral-video-imitation","url":"https://www.douyin.com/video/123456","uploadedImages":["./my_product.jpg"]}'
qhkit workflow status '{"workflowTaskId":"task-xxx"}'
# Cost estimate (note: this will actually upload local materials, which may consume network resources, use wisely)
qhkit workflow estimate '{"entryName":"viral-video-imitation","url":"https://example.com","uploadedImages":["./my_product.jpg"]}'
- The required parameters for each application can be viewed via
options. The output is either a video, an image, or a data table depending on the application.
5. Error Handling & Edge Cases (Summary)
- All errors return JSON with
ok: falseand astagefield:config(no key/incorrect key),version(need to upgrade CLI),runtime(command error, parameter issue, or server-side error). Inform the user of the message. - Image exceeds 10MB: First try Python compression with Pillow; if that fails, use Node's sharp-cli; if both fail, ask the user to provide an image within 10MB. Do not retry compression infinitely, relay the error message.
- Video task times out or takes too long: Inform the user of the task ID and say "the backend is still processing, you can continue polling, estimated completion time is about X minutes."
- Network issues: If npm install fails due to network, suggest setting the mirror; if nodejs.org is unreachable, suggest the npmmirror mirror.
- Model no longer exists: If a model specified by the user is not found in the current options list, run
optionsagain and report the current available models back to the user for re-selection. - No default model: Never assume a model for
imageorvideo; list candidates after queryingoptions. - User requests unsupported functionality: Clearly state "not currently supported by qhkit, please use other skills" — do not force-fit.
6. Important User Interaction Principles
- Ask and confirm first: Any operation that consumes credits must first confirm the parameters and cost estimate with the user; never submit without approval.
- Be transparent about waiting times: Inform users of the estimated generation time (image ≈14 min, video ≈40 min) to set expectations.
- Provide real-time model listings: Always query
optionsformodels/modelLabelbefore selecting a model, ensuring the user gets the latest selection. - Error messages are your guide: When a command errors out, directly relay the returned
messageto the user; the backend's error messages are already user-facing. - No fake confirmations: Every submission must be preceded by an actual
estimatecall; do not fabricate credit numbers, always query the latest estimate. - Don't rewrite instructions for the user: If the user's request is unclear, ask for clarification rather than making assumptions.