makaron-cli 0.17.17 → 0.17.19

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.17.17",
3
+ "version": "0.17.19",
4
4
  "description": "Give Claude Code a creative agent. Pass complete creative requests and source media to Makaron Chat.",
5
5
  "author": {
6
6
  "name": "Versa AI",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.17.17",
3
+ "version": "0.17.19",
4
4
  "description": "Give Codex a creative agent. Pass complete creative requests and source media to Makaron Chat.",
5
5
  "author": {
6
6
  "name": "Versa AI",
package/README.md CHANGED
@@ -458,6 +458,8 @@ npx makaron-cli video status <taskId>
458
458
  npx makaron-cli video retake --video input.mp4 --start 2 --end 5 --prompt "Make the umbrella red" --project <id> --model seedance-2.5 --wait --json
459
459
  ```
460
460
 
461
+ Seedance 2.5 Flash Retake: explicitly select `--model seedance-2.5-flash`; source >=4s, selection 0.1–15s, with at least 4s editing context. `--video-resolution 480p|720p` (default 720p); original audio is retained unless `--audio-mode generated` is explicit. No native exact final/middle-frame locks. The edited range is assembled back into the original duration; outside footage stays in place. Keep the request ID and poll the same root task.
462
+
461
463
  Video segment editing also works directly from natural-language chat, without a GUI selection:
462
464
 
463
465
  ```bash
@@ -475,6 +477,8 @@ npx makaron-cli chat --project <id|auto> --video input.mp4 -b "make it funny"
475
477
 
476
478
  Kling 4.0: use `--video-model kling-4` for native text-to-video or image/video feature references, integer 3–30s at 720p (default) or 1080p. Up to 10 images and 5 videos; source videos must each be 3s or longer, total at most 30s, 720–2160px per side, 24–60fps and at most 200MB each. `--video-operation edit` requires exactly one source video and preserves its canvas/audio. Explicit keyframe I2V, extension and replacement-audio controls are not exposed. Retake defaults to `kling-4` at 720p, original audio only, source at least 3s, no final/middle frame control. Kling 4.0 Flash (`kling-4-flash`) is the default when `--video-model` is omitted (omitting it with `--duration` above 20 uses `seedance-2.5`): the faster variant with the same inputs, edit route and Retake rules, but integer 3–20s at 720p only, scripts at most 2500 characters, and source/reference videos at most 20s total. Never silently substitute one Kling 4 variant for the other.
477
479
 
480
+ Seedance 2.5 Flash: explicitly select `--video-model seedance-2.5-flash`; generation is integer 4–30s at480p/720p (default720p). Up to10images,5videos(each2–30s,total≤30s),5audios(total≤30s). Images are feature references by default; `--image-workflow image-to-video` locks1–2 first/last frames with no video/audio inputs. Use `--video-operation generate` for video references or `edit` for exactly one4–30s source; edit and first/last frames follow source canvas. Edit follows source duration: omit duration, never -1. Native synchronized audio is included. No extend, draft, MOV, web-search, relaxed content filter or native1080p/4K. Set `--request-id <uuid>` before the first submission and reuse it with identical arguments to recover the original task without another charge. Keep the returned task ID and poll it; never silently substitute Eco or another model. Apply the additive media-pricing setup before submitting on a new database.
481
+
478
482
  Options for `video create`: `--script "..."`, `--script-file <path>`, `--image <url>` (repeatable, up to the selected model limit), `--video <file|url>` and `--audio <file|url>` (repeatable where supported), `--voice <xai-preset-id>` (repeatable, Grok only), `--duration <seconds>`, `--aspect 9:16|16:9|1:1`, `--video-model seedance-fast|seedance-mini|seedance|seedance-2.5|wan-3.0|wan-3.0-prime|kling-4|grok|google-omni|minimax-h3|minimax-h3-max|fal-h3-max|sync-lipsync-v3`, `--video-resolution auto|480p|720p|768p|1080p|2k|4k`. Default model is FAL H3 Max (`fal-h3-max`) at 768p (480p/1080p optional): native text-to-video or image/video/audio reference-to-video, integer 5-15s, up to 9 images + 3 videos + 3 audios (12 total). SeeDance accepts native text-to-video with no image and integer output duration 4-15s (default 5s); every Seedance image input is submitted through reference-to-video, including one image. `seedance-mini` supports 480p/720p and is best for cheaper drafts/multi-size tests. Wan 3.0 and Wan 3.0 Prime both expose 480p/720p/1080p/2K/4K; 2K/4K automatically use the matching FlashVSR endpoint. MiniMax H3 accepts native text-to-video, 4-15s output, public 768p/2k resolution, and up to 9 image, up to 3 video, and up to 3 audio feature references through Makaron Agent/chat; a single image keeps the `reference_image` role. `sync-lipsync-v3` requires exactly one video plus one MP3/WAV and preserves that replacement audio while aligning the mouth. H3 defaults to 768p; request 2k explicitly for maximum/final quality. Kling 4.0 supports integer 3-30s in one call. Grok generation uses `grok-imagine-video-1.5`: text-only generation supports 480p/720p/1080p, while any 1-7 image or preset voice input uses reference-to-video and is capped at 720p. Grok edit/extend uses `grok-imagine-video` internally under the same `grok` selector. Gemini Omni 1.2 supports 3-15s fast image/video generation and editing with native generated audio and multi-speaker dialogue; every image-only generation request uses `reference_to_video`, including a single image, with up to 6 images when no video reference is provided.
479
483
 
480
484
  fal H3 Turbo: use `--video-model minimax-h3-max` for faster-than-real-time generation. It supports exactly 5/10/15 seconds at 480p/768p and defaults to native 768p, with no image for T2V or exactly one `--image` for I2V. It does not accept reference video/audio or multiple images.
@@ -624,11 +628,12 @@ Admin commands require an API key with admin privileges. Ask your admin to run `
624
628
 
625
629
  ### Add credits to a user
626
630
 
627
- Use either the account email address or the Supabase user UUID. Credits must be a positive integer.
631
+ Use the account email address, Supabase user UUID, or full active API key. Credits are added to the owning account (shared by its API keys), and must be a positive integer. Keep `MAKARON_API_KEY` set to your administrator credential; the positional API key identifies the recipient. Full recipient keys are redacted from command output.
628
632
 
629
633
  ```bash
630
634
  npx makaron-cli admin add-credits user@example.com 1000
631
635
  npx makaron-cli admin add-credits <user-id> 1000 --json
636
+ npx makaron-cli admin add-credits "$RECIPIENT_API_KEY" 1000 --json
632
637
  ```
633
638
 
634
639
  ### List all marketplace skills
package/bin/makaron.mjs CHANGED
@@ -2139,7 +2139,7 @@ Inputs:
2139
2139
  --voice <preset-id> Grok preset voice. Repeatable, up to 3.
2140
2140
 
2141
2141
  Generation options:
2142
- --video-model <id> seedance-fast, seedance-mini, seedance, seedance-2.5,
2142
+ --video-model <id> seedance-fast, seedance-mini, seedance, seedance-2.5-flash, seedance-2.5,
2143
2143
  wan-3.0, wan-3.0-prime, kling-4, kling-4-flash, grok, google-omni,
2144
2144
  minimax-h3, minimax-h3-max, fal-h3-max, or sync-lipsync-v3.
2145
2145
  --duration <seconds> Output duration supported by the selected model.
@@ -2169,6 +2169,9 @@ Recent model choices:
2169
2169
  5/10/15s; native 768p default or 480p; no video/audio/multi-image references.
2170
2170
  wan-3.0-prime Faster Wan 3.0 tier; 2-30s; 480p through 4k; multimodal refs.
2171
2171
  wan-3.0 Wan standard tier with the same public duration/resolution range.
2172
+ seedance-2.5-flash 4-30s; 480p/720p;10 images/5 videos/5 audios; edit follows source.
2173
+ --image-workflow <id> Flash: reference-to-video (default) or image-to-video (1-2 first/last frames).
2174
+ --request-id <uuid> Reuse this ID with identical arguments to recover the original billed task.
2172
2175
  seedance-2.5 Defaults to Eco; 4-30s; 1080p default, 720p/2k/4k; multimodal refs.
2173
2176
  seedance-2.5-eco 480p generation → ByteDance Fast; 1080p default, 2k/4k.
2174
2177
  minimax-h3 4-15s; 768p default or 2k; image/video/audio feature refs.
@@ -2410,7 +2413,7 @@ Not sure which built-in skill to use? Start with:
2410
2413
  } else if (topic === 'video') {
2411
2414
  if (subtopic === 'script') console.log('Usage: makaron video script --image <file> [--image <file>] [--lang en|zh] "direction"');
2412
2415
  else if (subtopic === 'create') printVideoCreateHelp();
2413
- else if (subtopic === 'retake') console.log('Usage: makaron video retake --video <url|file> --start <seconds> --end <seconds> --prompt "change" [--model seedance-2.5-eco|seedance-2.5|fal-h3-max|kling-4|kling-4-flash|wan-3.0|wan-3.0-prime|grok|google-omni|minimax-h3] [--project <id>] [--wait] [--json] [--request-id <uuid>] [--audio-mode original|generated]\nDefault: kling-4 at 720p; source >=3s, original audio only. Select another compatible model explicitly for generated audio.');
2416
+ else if (subtopic === 'retake') console.log('Usage: makaron video retake --video <url|file> --start <seconds> --end <seconds> --prompt "change" [--model seedance-2.5-eco|seedance-2.5|seedance-2.5-flash|fal-h3-max|kling-4|kling-4-flash|wan-3.0|wan-3.0-prime|grok|google-omni|minimax-h3] [--project <id>] [--wait] [--json] [--request-id <uuid>] [--audio-mode original|generated] [--video-resolution <resolution>]\nDefault: kling-4 at 720p; source >=3s, original audio only. Select another compatible model explicitly for generated audio.');
2414
2417
  else if (subtopic === 'status') console.log('Usage: makaron video status <taskId> | --snapshot <snapshotId> [--wait]');
2415
2418
  else printVideoHelp();
2416
2419
  } else if (topic === 'music') {
@@ -2425,7 +2428,7 @@ Not sure which built-in skill to use? Start with:
2425
2428
  else if (subtopic === 'skill-categories') console.log('Usage: makaron admin skill-categories [--json|add|update|delete] ...');
2426
2429
  else if (subtopic === 'upload') console.log('Usage: makaron admin upload <local-file> <storage-path>');
2427
2430
  else if (subtopic === 'fetch-skill') console.log('Usage: makaron admin fetch-skill <share-code|url>');
2428
- else if (subtopic === 'add-credits') console.log('Usage: makaron admin add-credits <email-or-user-id> <credits> [--json]');
2431
+ else if (subtopic === 'add-credits') console.log('Usage: makaron admin add-credits <email-or-user-id-or-api-key> <credits> [--json]');
2429
2432
  else if (subtopic === 'set-admin') console.log('Usage: makaron admin set-admin <email>');
2430
2433
  else console.log(`Admin commands:
2431
2434
  admin skills List all marketplace skills
@@ -2438,7 +2441,7 @@ Not sure which built-in skill to use? Start with:
2438
2441
  admin skill-categories delete <id> Delete a category
2439
2442
  admin upload <file> <storage-path> Upload file to Storage
2440
2443
  admin fetch-skill <code|url> Download skill from share link
2441
- admin add-credits <user> <credits> Add credits by email or user ID
2444
+ admin add-credits <user> <credits> Add credits by email, user ID or API key
2442
2445
  admin set-admin <email> Grant admin access to a user
2443
2446
  `);
2444
2447
  } else if (topic === 'register') {
@@ -3352,14 +3355,16 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3352
3355
  else if ((flag === '--model' || flag === '--video-model') && args[i + 1]) params.model = args[++i];
3353
3356
  else if (flag === '--project' && args[i + 1]) params.project_id = args[++i];
3354
3357
  else if (flag === '--request-id' && args[i + 1]) params.request_id = args[++i];
3355
- else { console.error('Usage: makaron video retake --video <url|file> --start <seconds> --end <seconds> --prompt "change" [--model seedance-2.5-eco|seedance-2.5|fal-h3-max|kling-4|kling-4-flash|wan-3.0|wan-3.0-prime|grok|google-omni|minimax-h3] [--project <id>] [--wait] [--json] [--request-id <uuid>] [--audio-mode original|generated]\nDefault: kling-4 at 720p; source >=3s, original audio only. Select another compatible model explicitly for generated audio.'); process.exit(1); }
3358
+ else if (flag === '--video-resolution' && args[i + 1]) params.video_resolution = args[++i];
3359
+ else { console.error('Usage: makaron video retake --video <url|file> --start <seconds> --end <seconds> --prompt "change" [--model seedance-2.5-eco|seedance-2.5|seedance-2.5-flash|fal-h3-max|kling-4|kling-4-flash|wan-3.0|wan-3.0-prime|grok|google-omni|minimax-h3] [--project <id>] [--wait] [--json] [--request-id <uuid>] [--audio-mode original|generated] [--video-resolution <resolution>]\nDefault: kling-4 at 720p; source >=3s, original audio only. Select another compatible model explicitly for generated audio.'); process.exit(1); }
3356
3360
  }
3357
3361
  if (!params.video_url || !params.prompt || !Number.isFinite(params.start) || !Number.isFinite(params.end)
3358
3362
  || params.start < 0 || params.end - params.start < .1 || params.end - params.start > 15
3359
3363
  || (params.audio_mode && !['original','generated'].includes(params.audio_mode))
3360
- || !['seedance-2.5-eco', 'seedance-2.5', 'fal-h3-max', 'kling-4', 'kling-4-flash', 'wan-3.0', 'wan-3.0-prime', 'grok', 'google-omni', 'minimax-h3'].includes(params.model)) {
3364
+ || !['seedance-2.5-eco', 'seedance-2.5', 'seedance-2.5-flash', 'fal-h3-max', 'kling-4', 'kling-4-flash', 'wan-3.0', 'wan-3.0-prime', 'grok', 'google-omni', 'minimax-h3'].includes(params.model)) {
3361
3365
  console.error('Retake needs one video, a prompt, a valid 0.1–15 second interval, and a supported model.'); process.exit(1);
3362
3366
  }
3367
+ if (params.video_resolution && (!['480p','720p','768p','1080p'].includes(params.video_resolution) || (params.model === 'seedance-2.5-flash' && !['480p','720p'].includes(params.video_resolution)))) { console.error('Choose a supported Retake resolution; Flash supports 480p/720p only.'); process.exit(1); }
3363
3368
  if (!isHttpUrl(params.video_url)) {
3364
3369
  if (!params.project_id) { console.error('Local video upload requires --project <id>.'); process.exit(1); }
3365
3370
  const valid = validateVideoFileForAnalysis(params.video_url);
@@ -3383,9 +3388,9 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3383
3388
  const videos = [];
3384
3389
  const audios = [];
3385
3390
  const referenceVoices = [];
3386
- let script = '', duration = undefined, aspectRatio = undefined, videoModel = undefined, videoResolution = undefined, wait = false;
3391
+ let script = '', duration = undefined, aspectRatio = undefined, videoModel = undefined, videoResolution = undefined, imageWorkflow = undefined, wait = false;
3387
3392
  let keepOriginalSound = false, videoOperation = undefined, extendDirection = undefined, outputFormat = undefined;
3388
- let generateAudio = undefined, contentFilter = undefined, webSearch = false;
3393
+ let generateAudio = undefined, contentFilter = undefined, webSearch = false, billingRequestId = undefined;
3389
3394
  for (let i = 2; i < args.length; i++) {
3390
3395
  if (args[i] === '--image' && args[i + 1]) images.push(args[++i]);
3391
3396
  else if (args[i] === '--video' && args[i + 1]) videos.push(args[++i]);
@@ -3403,6 +3408,8 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3403
3408
  else if (args[i] === '--video-resolution' && args[i + 1]) videoResolution = args[++i];
3404
3409
  else if (args[i] === '--resolution' && args[i + 1]) videoResolution = args[++i];
3405
3410
  else if (args[i] === '--keep-original-sound') keepOriginalSound = true;
3411
+ else if (args[i] === '--image-workflow' && args[i + 1]) imageWorkflow = args[++i];
3412
+ else if (args[i] === '--request-id' && args[i + 1]) billingRequestId = args[++i];
3406
3413
  else if (args[i] === '--video-operation' && args[i + 1]) videoOperation = args[++i];
3407
3414
  else if (args[i] === '--extend-direction' && args[i + 1]) extendDirection = args[++i];
3408
3415
  else if (args[i] === '--output-format' && args[i + 1]) outputFormat = args[++i];
@@ -3427,9 +3434,13 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3427
3434
  : ['kling4-flash', 'kling-4.0-flash', 'kling 4.0 flash', 'kling 4 flash'].includes(String(videoModel).toLowerCase()) ? 'kling-4-flash'
3428
3435
  : ['omni', 'gemini-omni', 'gemini-omni-1.2', 'gemini-omni-1.2-flash', 'omni-1.2', 'gemini omni', 'gemini omni 1.2'].includes(String(videoModel).toLowerCase()) ? 'google-omni'
3429
3436
  : (videoModel || (duration != null && duration > 20 ? 'seedance-2.5' : 'kling-4-flash'));
3437
+ if (billingRequestId && !/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(billingRequestId)) {
3438
+ console.error('--request-id must be a UUID. Reuse it only for the identical submission.'); process.exit(1);
3439
+ }
3440
+ const isFlash = selectedVideoModel === 'seedance-2.5-flash';
3430
3441
  const isSeedance25 = ['seedance-2.5', 'seedance-2.5-eco'].includes(selectedVideoModel);
3431
3442
  const isWan30 = selectedVideoModel === 'wan-3.0' || selectedVideoModel === 'wan-3.0-prime';
3432
- const isSeedanceModel = selectedVideoModel === 'seedance-fast' || selectedVideoModel === 'seedance-mini' || selectedVideoModel === 'seedance' || isSeedance25;
3443
+ const isSeedanceModel = selectedVideoModel === 'seedance-fast' || selectedVideoModel === 'seedance-mini' || selectedVideoModel === 'seedance' || isSeedance25 || isFlash;
3433
3444
  const isMinimaxH3 = selectedVideoModel === 'minimax-h3';
3434
3445
  const isFalH3Max = selectedVideoModel === 'minimax-h3-max';
3435
3446
  const isFalReference = selectedVideoModel === 'fal-h3-max';
@@ -3452,6 +3463,12 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3452
3463
  if (isKling4 && script.length > 2500) { console.error(`${kling4Label} scripts are limited to 2500 characters (this one has ${script.length}). Shorten the script, or choose another model with --video-model.`); process.exit(1); }
3453
3464
  if (isFalReference && (images.length > 9 || videos.length > 3 || audios.length > 3 || images.length + videos.length + audios.length > 12)) { console.error('FAL H3 Max accepts at most 9 images, 3 videos, 3 audios, 12 total.'); process.exit(1); }
3454
3465
  if (isFalReference && duration != null && (!Number.isInteger(duration) || duration < 5 || duration > 15)) { console.error('FAL H3 Max output duration must be an integer from 5 to 15 seconds.'); process.exit(1); }
3466
+ if (isFlash && (images.length > 10 || videos.length > 5 || audios.length > 5)) { console.error('Seedance 2.5 Flash accepts at most 10 images,5 videos and5 audios.'); process.exit(1); }
3467
+ if (isFlash && duration != null && (!Number.isInteger(duration) || duration < 4 || duration > 30)) { console.error('Seedance 2.5 Flash duration must be an integer 4–30 seconds.'); process.exit(1); }
3468
+ if (isFlash && videoResolution && !['auto', '480p', '720p'].includes(videoResolution)) { console.error('Seedance 2.5 Flash supports only 480p/720p.'); process.exit(1); }
3469
+ if (isFlash && (videoOperation === 'extend' || extendDirection || outputFormat === 'mov' || webSearch || contentFilter === false)) { console.error('Flash has no extend, draft, MOV, web search or relaxed-filter mode.'); process.exit(1); }
3470
+ if (imageWorkflow && (!isFlash || !['reference-to-video', 'image-to-video'].includes(imageWorkflow))) { console.error('--image-workflow is supported for Flash reference-to-video or image-to-video only.'); process.exit(1); }
3471
+ if (isFlash && imageWorkflow === 'image-to-video' && (!images.length || images.length > 2 || videos.length || audios.length)) { console.error('Flash first/last frames need1–2 images only.'); process.exit(1); }
3455
3472
  if (isSeedance25 && images.length > 30) { console.error('Seedance 2.5 supports at most 30 image references.'); process.exit(1); }
3456
3473
  if (isSeedance25 && videos.length > 10) { console.error('Seedance 2.5 supports at most 10 video references.'); process.exit(1); }
3457
3474
  if (isSeedance25 && audios.length > 10) { console.error('Seedance 2.5 supports at most 10 audio references.'); process.exit(1); }
@@ -3484,12 +3501,12 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3484
3501
  process.exit(1);
3485
3502
  }
3486
3503
 
3487
- const inferredOperation = videoOperation || ((isSeedance25 || isGrok) && videos.length ? 'edit' : 'generate');
3488
- let providerMaxDuration = isSeedance25 ? SEEDANCE25_MAX_VIDEO_REFERENCE_DURATION : MAX_VIDEO_PROVIDER_REFERENCE_DURATION;
3504
+ const inferredOperation = videoOperation || ((isSeedance25 || isFlash || isGrok) && videos.length ? 'edit' : 'generate');
3505
+ let providerMaxDuration = isSeedance25 || isFlash ? SEEDANCE25_MAX_VIDEO_REFERENCE_DURATION : MAX_VIDEO_PROVIDER_REFERENCE_DURATION;
3489
3506
  if (isGrok) providerMaxDuration = inferredOperation === 'edit' ? 8.7 : 15;
3490
3507
  if (isSyncLipsync) providerMaxDuration = 60;
3491
3508
  if (isKling4) providerMaxDuration = kling4MaxSeconds;
3492
- const providerMaxPixels = isSyncLipsync || isMinimaxH3 || isWan30 || isKling4 ? Infinity : isSeedance25 ? SEEDANCE25_MAX_VIDEO_FRAME_PIXELS : MAX_VIDEO_FRAME_PIXELS;
3509
+ const providerMaxPixels = isSyncLipsync || isMinimaxH3 || isWan30 || isKling4 ? Infinity : isSeedance25 || isFlash ? SEEDANCE25_MAX_VIDEO_FRAME_PIXELS : MAX_VIDEO_FRAME_PIXELS;
3493
3510
  const localImages = images.filter(image => !isHttpUrl(image));
3494
3511
  if (localImages.length) {
3495
3512
  const uploadedImages = await uploadImageFilesViaSignedUrl(baseUrl, headers, undefined, localImages);
@@ -3504,7 +3521,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3504
3521
  maxDuration: providerMaxDuration,
3505
3522
  durationTolerance: MAX_VIDEO_PROVIDER_REFERENCE_DURATION_TOLERANCE,
3506
3523
  maxFramePixels: providerMaxPixels,
3507
- maxFileSize: isWan30 ? MULEROUTER_WAN_MAX_VIDEO_FILE_SIZE : isSeedance25 || isSyncLipsync || isKling4 ? 200 * 1024 * 1024 : MAX_VIDEO_PROVIDER_REFERENCE_FILE_SIZE,
3524
+ maxFileSize: isWan30 ? MULEROUTER_WAN_MAX_VIDEO_FILE_SIZE : isSeedance25 || isFlash || isSyncLipsync || isKling4 ? 200 * 1024 * 1024 : MAX_VIDEO_PROVIDER_REFERENCE_FILE_SIZE,
3508
3525
  ...(isKling4 ? {
3509
3526
  allowedExtensions: ['mp4', 'mov'], minSide: 720, maxSide: 2160,
3510
3527
  } : isGrok ? {
@@ -3540,7 +3557,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3540
3557
  const audioUrls = [];
3541
3558
  for (const audio of audios) {
3542
3559
  if (isHttpUrl(audio)) { audioUrls.push(audio); continue; }
3543
- const valid = validateAudioReferenceFile(audio, { maxDuration: isSyncLipsync ? 60 : isSeedance25 ? 30 : MAX_AUDIO_REFERENCE_DURATION });
3560
+ const valid = validateAudioReferenceFile(audio, { maxDuration: isSyncLipsync ? 60 : isSeedance25 || isFlash ? 30 : MAX_AUDIO_REFERENCE_DURATION });
3544
3561
  if (!valid.ok) { console.error(`❌ ${valid.error}`); process.exit(1); }
3545
3562
  process.stderr.write(`🎵 Uploading ${path.basename(audio)}...\n`);
3546
3563
  const uploaded = await uploadFileViaSignedUrl(baseUrl, headers, undefined, audio, valid.mime, { uploadKind: 'audio' });
@@ -3552,7 +3569,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3552
3569
  const resolvedOperation = inferredOperation;
3553
3570
  const vArgs = isSyncLipsync
3554
3571
  ? { script, images, videoUrls, audioUrls, videoModel: selectedVideoModel, videoResolution }
3555
- : isSeedance25 || isWan30 || isGrok
3572
+ : isSeedance25 || isFlash || isWan30 || isGrok
3556
3573
  ? { script, images, videoUrls, audioUrls, referenceVoiceIds: referenceVoices, videoModel: selectedVideoModel, videoResolution, operation: resolvedOperation, extendDirection, outputFormat, generateAudio, contentFilter, webSearch }
3557
3574
  : isMinimaxH3 || isFalReference
3558
3575
  ? { script, images, videoUrls, audioUrls, videoModel: selectedVideoModel, videoResolution }
@@ -3561,12 +3578,14 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3561
3578
  : videoUrls[0]
3562
3579
  ? { videoUrl: videoUrls[0], editPrompt: script, images, videoModel: selectedVideoModel, videoResolution, referType: isSeedanceModel ? 'feature' : 'base' }
3563
3580
  : { script, images, videoModel: selectedVideoModel, videoResolution };
3581
+ if (imageWorkflow) vArgs.imageWorkflow = imageWorkflow;
3582
+ if (billingRequestId) vArgs.billingRequestId = billingRequestId;
3564
3583
  if (inputVideoMeta?.duration) vArgs.referenceVideoDuration = inputVideoMeta.duration;
3565
3584
  const effectiveDuration = resolvedOperation === 'edit' ? undefined : duration || (inputVideoMeta?.duration ? Math.min(providerMaxDuration, Math.round(inputVideoMeta.duration)) : undefined);
3566
3585
  if (effectiveDuration) vArgs.duration = effectiveDuration;
3567
3586
  if (aspectRatio) vArgs.aspectRatio = aspectRatio;
3568
3587
  if (keepOriginalSound && videoUrls.length && !isSeedance25) vArgs.keepOriginalSound = true;
3569
- const result = await callMcpTool(baseUrl, headers, videoUrls.length && !isSeedance25 && !isWan30 && !isGrok && !isMinimaxH3 && !isFalReference && !isSyncLipsync ? 'makaron_edit_video' : 'makaron_create_video', vArgs);
3588
+ const result = await callMcpTool(baseUrl, headers, videoUrls.length && !isSeedance25 && !isFlash && !isWan30 && !isGrok && !isMinimaxH3 && !isFalReference && !isSyncLipsync ? 'makaron_edit_video' : 'makaron_create_video', vArgs);
3570
3589
  const text = result?.content?.find(c => c.type === 'text')?.text;
3571
3590
  if (text) {
3572
3591
  console.log(text);
@@ -3817,17 +3836,25 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3817
3836
  const user = args[2]?.trim();
3818
3837
  const credits = Number(args[3]);
3819
3838
  if (!user || !Number.isSafeInteger(credits) || credits <= 0) {
3820
- console.error('Usage: makaron admin add-credits <email-or-user-id> <credits> [--json]');
3839
+ console.error('Usage: makaron admin add-credits <email-or-user-id-or-api-key> <credits> [--json]');
3821
3840
  console.error('Credits must be a positive integer.');
3822
3841
  process.exit(1);
3823
3842
  }
3824
3843
 
3844
+ const isApiKey = user.startsWith('mk_live_');
3825
3845
  const res = await fetch(`${baseUrl}/api/admin/add-credits`, {
3826
3846
  method: 'POST',
3827
3847
  headers: { 'Content-Type': 'application/json', ...headers },
3828
- body: JSON.stringify({ email: user, credits }),
3848
+ body: JSON.stringify({ ...(isApiKey ? { apiKey: user } : { email: user }), credits }),
3829
3849
  });
3830
- const data = await res.json().catch(() => null);
3850
+ const responseText = await res.text();
3851
+ // Never echo the target credential, even if an older server includes it in an error.
3852
+ let data;
3853
+ try {
3854
+ data = JSON.parse(responseText, (_key, value) =>
3855
+ isApiKey && typeof value === 'string' ? value.replaceAll(user, '[redacted API key]') : value);
3856
+ }
3857
+ catch { data = null; }
3831
3858
  if (!res.ok) {
3832
3859
  console.error(`Error ${res.status}:`, data?.error || 'Failed to add credits');
3833
3860
  process.exit(1);
@@ -3835,7 +3862,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3835
3862
  if (args.includes('--json')) {
3836
3863
  console.log(JSON.stringify(data));
3837
3864
  } else {
3838
- console.log(`✅ Added ${credits} credits to ${user}. New balance: ${data.newBalance}`);
3865
+ console.log(`✅ Added ${credits} credits to ${isApiKey ? data.userId : user}. New balance: ${data.newBalance}`);
3839
3866
  }
3840
3867
 
3841
3868
  } else {
@@ -3850,7 +3877,7 @@ if (!command || command === '--help' || command === '-h' || command === 'help')
3850
3877
  admin skill-categories delete <id> Delete a category
3851
3878
  admin upload <file> <storage-path> Upload file to Storage
3852
3879
  admin fetch-skill <code|url> Download skill from share link
3853
- admin add-credits <user> <credits> Add credits by email or user ID
3880
+ admin add-credits <user> <credits> Add credits by email, user ID or API key
3854
3881
  admin set-admin <email> Grant admin access to a user
3855
3882
  `);
3856
3883
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makaron-cli",
3
- "version": "0.17.17",
3
+ "version": "0.17.19",
4
4
  "description": "Talk to Makaron Agent from the terminal — create projects, edit images, generate videos",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -196,7 +196,7 @@ npx makaron-cli chat --project auto \
196
196
 
197
197
  `--skill` accepts an installed skill name, a marketplace UUID, or a unique marketplace label. Marketplace search matches every localized title, every localized default prompt, and category ids. If a marketplace skill is matched, the CLI installs or reuses it and sends `[Active skill: <installed-skill-name>]` to Makaron Agent. Do not call admin skill commands for ordinary users. There is intentionally no user-facing CLI delete command for marketplace skills.
198
198
 
199
- For an explicitly authorized administrator, `admin add-credits <email-or-user-id> <positive-integer> [--json]` adds credits to a user. Marketplace administrators can use `admin skills` to see category assignment and 4-locale title/prompt completeness, while `admin skill-categories` supports list/add/update/delete. New skills must include `en`, `zh`, `zh-Hant`, and `ja` in both `labels` and `prompts`, plus at least one existing `categories` id. Partial localized updates are safely merged server-side.
199
+ For an explicitly authorized administrator, `admin add-credits <email-or-user-id-or-api-key> <positive-integer> [--json]` adds credits to the owning account. A full active recipient API key can identify the account; keep `MAKARON_API_KEY` set to the administrator credential. Never include full keys in messages or logs. Marketplace administrators can use `admin skills` to see category assignment and 4-locale title/prompt completeness, while `admin skill-categories` supports list/add/update/delete. New skills must include `en`, `zh`, `zh-Hant`, and `ja` in both `labels` and `prompts`, plus at least one existing `categories` id. Partial localized updates are safely merged server-side.
200
200
 
201
201
  ### With additional images (existing project)
202
202
 
@@ -389,6 +389,8 @@ Segment edits have two intents: modify changes the inside of the existing sequen
389
389
 
390
390
  Chat segment inspection also reads source speech through ASR, reusing cached transcripts. It returns selected speech with source/output timecodes separately from adjacent speech, so the edit can follow the retained narration. Original audio is the default; Chat may select `audio_mode: generated` for requested new sound inside the selection. ASR does not guarantee music-beat or lip synchronization, and unavailable/untimed speech is reported rather than assigned invented timings. Direct `video retake` uses the caller's completed prompt and does not perform Agent interpretation or ASR planning.
391
391
 
392
+ Seedance 2.5 Flash Retake: explicitly select `--model seedance-2.5-flash`; source >=4s, selection 0.1–15s, with at least 4s editing context. `--video-resolution 480p|720p` (default 720p); original audio is retained unless `--audio-mode generated` is explicit. No native exact final/middle-frame locks. The edited range is assembled back into the original duration; outside footage stays in place. Keep the request ID and poll the same root task.
393
+
392
394
  `video retake` uses original-source seconds, accepts a 0.1–15s range in a source up to 120s, and automatically replaces only that range while preserving duration. Audio defaults to original; `--audio-mode generated` uses synchronized new audio inside the selection and source audio outside. Models: `grok` (native edit, source >=1s, selection <=8.5s, max 720p, source video only), `google-omni` (native edit, source >=3s, selection <=15s), `minimax-h3` (reference-guided rebuilding, source >=2s), `wan-3.0` / `wan-3.0-prime` (reference-guided rebuilding, source >=1s, no native endpoint locks), `kling-4` (default, source >=3s, original audio only), `fal-h3-max`, `seedance-2.5-eco` (preferred Seedance option), and explicitly selected native `seedance-2.5`. For sources shorter than 3 seconds, explicitly select a compatible model: H3 for sources >=2s or Seedance for shorter sources. Generated audio requires an explicitly selected compatible model. Grok/Omni/MiniMax have no exact final/middle/corrected-frame controls in Retake. Local files require `--project`. Keep the root taskId and request ID; resume polling or replay the same request ID instead of paying for another generation.
393
395
 
394
396
  `video create` returns a provider task id and does not create or update a Makaron project timeline. For project/timeline video editing, use:
@@ -405,6 +407,8 @@ Provider integration contract: every image passed to video generation is a featu
405
407
 
406
408
  fal H3 Turbo uses the `minimax-h3-max` selector, supports exactly 5/10/15 seconds at 480p/768p, and defaults to native 768p for faster-than-real-time T2V or one-start-image I2V.
407
409
 
410
+ Seedance 2.5 Flash: explicitly select `--video-model seedance-2.5-flash`; generation is integer 4–30s at480p/720p (default720p). Up to10images,5videos(each2–30s,total≤30s),5audios(total≤30s). Images are feature references by default; `--image-workflow image-to-video` locks1–2 first/last frames with no video/audio inputs. Use `--video-operation generate` for video references or `edit` for exactly one4–30s source; edit and first/last frames follow source canvas. Edit follows source duration: omit duration, never -1. Native synchronized audio is included. No extend, draft, MOV, web-search, relaxed content filter or native1080p/4K. Keep the returned task ID and poll it; never silently substitute Eco or another model. This candidate needs its additive media-pricing migration before live product billing can submit.
411
+
408
412
  Seedance 2.5 uses `--video-model seedance-2.5` or `seedance-2.5-eco` for 4-30s videos: generate at 480p, then automatically upscale to 720p, 1080p (default), 2K or 4K in one task. This is upscaled output. Use `seedance-2.5-native` explicitly for unenhanced native output at 480p (default) or 720p; the native Evolink route does not expose 4K. All Seedance 2.5 routes accept up to 30 images + 10 videos + 10 audios, repeatable local/URL references, `--video-operation generate|edit|extend`, `--extend-direction`, and `--web-search`. Eco delivers MP4; native also supports `--output-format mov`. Use `makaron chat` to enhance an existing video without regeneration, or MCP `makaron_upscale_video` with one video URL and `resolution=720p|1080p|2k|4k` (up to 60s).
409
413
 
410
414
  Wan 3.0 exposes two model choices: `--video-model wan-3.0` and the faster `--video-model wan-3.0-prime`. Both support 2-30s generation, native audio, up to 10 images + 5 videos + 5 audios, and 480p/720p/1080p/2K/4K. Pass `--video-resolution 2k|4k` to select the matching FlashVSR/Pro endpoint automatically; Pro is not a separate model selector. Use generation mode with feature references; typed edit/extend and the relaxed content-filter flag are not supported.