quickmagic-cli 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quickmagic-cli",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Quick Magic CLI — generate AI images/videos, product photoshoots, virtual try-on, hook ad videos, subtitles and more via the Quick Magic REST API, with browser-based OAuth PKCE login (no API keys to manage). Ships with 8 Claude Agent Skills and an MCP server integration.",
5
5
  "bin": {
6
6
  "quickmagic": "src/index.js",
@@ -2,7 +2,7 @@
2
2
  // upload presigned (>64KB) hoặc base64 nhỏ — xem src/media.js [260722].
3
3
  const api = require('../api');
4
4
  const jobs = require('./jobs');
5
- const { resolveMediaInputs } = require('../media');
5
+ const { resolveMediaInput, resolveMediaInputs } = require('../media');
6
6
 
7
7
  // generate image — POST /public/v1/images.
8
8
  async function image(options) {
@@ -31,6 +31,9 @@ async function video(options) {
31
31
  if (image_urls.length) body.image_urls = image_urls;
32
32
  // --mode reference|frames (R2V 260706): server validate theo model; bỏ trống = default model.
33
33
  if (options.mode) body.image_mode = options.mode;
34
+ // --video-ref (v2v 260723): file local tự upload presigned → URL host QM; server probe duration
35
+ // + validate (chỉ seedance-2-0/-fast, max 15s, không mix ảnh, giá hạng with-video).
36
+ if (options.videoRef) body.video_ref_url = await resolveMediaInput(options.videoRef);
34
37
 
35
38
  const data = await api.call('POST', '/videos', { body });
36
39
  const job_id = data.job_id;
package/src/index.js CHANGED
@@ -50,6 +50,7 @@ gen_cmd
50
50
  .option('--aspect-ratio <r>', 'Tỉ lệ khung')
51
51
  .option('--image <i...>', 'Ảnh đầu vào (URL hoặc file local, lặp nhiều lần — max theo model+mode, xem qm models)')
52
52
  .option('--mode <m>', 'Chế độ ảnh: reference (nhiều ảnh tham chiếu) | frames (khung đầu/cuối, max 2). Seedance 2.x KHÔNG nhận ảnh người thật ở MỌI chế độ (xem qm models --type video)')
53
+ .option('--video-ref <v>', 'Video tham chiếu (URL hoặc file local, max 15s/100MB) — CHỈ model supports_video_ref (seedance-2-0/-fast). Giá = rate with-video × (giây output + giây video); không dùng chung với --image')
53
54
  .option('--wait', 'Chờ tới khi job hoàn tất')
54
55
  .option('--out <dir>', 'Thư mục lưu kết quả (dùng kèm --wait)')
55
56
  .action(generate.video);