ima2-gen 3.8.1 → 3.8.2
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/config.js +4 -2
- package/docs/API.md +2 -2
- package/docs/PROMPT_STUDIO.md +1 -1
- package/docs/PROMPT_STUDIO.zh-CN.md +1 -1
- package/docs/migration/runtime-test-inventory.md +2 -1
- package/lib/agentImageVideoGen.js +3 -1
- package/package.json +2 -2
- package/skills/ima2/SKILL.md +117 -17
package/config.js
CHANGED
|
@@ -15,11 +15,13 @@ import { join, dirname } from "node:path";
|
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
16
|
import { readFileSync, existsSync } from "node:fs";
|
|
17
17
|
import { deriveSupportedImageModels, deriveUnsupportedImageModels } from "./lib/providers/derive.js";
|
|
18
|
-
|
|
18
|
+
// 4.6 rewrites prompts in ways that read worse than 4.3 for this planner's job, which
|
|
19
|
+
// is judged by the result rather than a benchmark. 4.6 stays selectable below.
|
|
20
|
+
export const DEFAULT_GROK_PLANNER_MODEL = "grok-4.3";
|
|
19
21
|
export const GROK_PLANNER_MODELS = [
|
|
20
22
|
DEFAULT_GROK_PLANNER_MODEL,
|
|
23
|
+
"grok-4.6",
|
|
21
24
|
"grok-4.5",
|
|
22
|
-
"grok-4.3",
|
|
23
25
|
"gpt-5.6-luna",
|
|
24
26
|
"gpt-5.6-terra",
|
|
25
27
|
"gpt-5.6-sol",
|
package/docs/API.md
CHANGED
|
@@ -14,7 +14,7 @@ Image generation supports OAuth, API-key, Grok, and Gemini (`agy` and `gemini-ap
|
|
|
14
14
|
|
|
15
15
|
- `provider: "oauth"` uses the local Codex OAuth proxy.
|
|
16
16
|
- `provider: "api"` uses the OpenAI Responses API with the hosted `image_generation` tool.
|
|
17
|
-
- `provider: "grok"` uses the bundled progrok xAI proxy. Classic, Node, and Agent generation run mandatory xAI Web Search through `/v1/responses`, then run a `grok-4.
|
|
17
|
+
- `provider: "grok"` uses the bundled progrok xAI proxy. Classic, Node, and Agent generation run mandatory xAI Web Search through `/v1/responses`, then run a `grok-4.3` planner call with a forced local `generate_image` function, then ima2 executes xAI `/v1/images/generations`. `grok-4.6` and `grok-4.5` remain selectable overrides. If reference images, a Node parent image, or an Agent current image are attached, the final step switches to xAI `/v1/images/edits` so image-to-image context is preserved.
|
|
18
18
|
- `provider: "agy"` spawns the Antigravity CLI (`agy -p`) to generate images via Google Gemini's `default_api:generate_image` tool. Model is `nano-banana-2`. Output is fixed at 1024×1024 JPEG. Max 3 reference images (i2i). No web search, quality, size, or mask controls. Multimode returns a single image. Video is unsupported (`AGY_VIDEO_UNSUPPORTED`).
|
|
19
19
|
- `provider: "grok-api"` uses a direct xAI API key instead of the bundled progrok OAuth proxy. Same pipeline as `grok` (Web Search → planner → `/v1/images/generations`), same aspect ratio and resolution options. Requires an xAI API key configured via the web UI key management or `XAI_API_KEY` env var. Also supports video generation.
|
|
20
20
|
- `provider: "gemini-api"` calls the Google Generative Language API directly (or Vertex AI with a service account JSON). Supports models `nano-banana-2` (Gemini 3.1 Flash Image) and `nano-banana-pro` (Gemini 3 Pro Image). Supports variable aspect ratios (1:1 through 21:9) and four resolution tiers (512px, 1K, 2K, 4K) on both auth paths — the direct API path sends `generation_config.response_format.image` (snake_case) while the Vertex AI endpoint (`aiplatform.googleapis.com`) sends `generationConfig.imageConfig` (camelCase). With `size: "auto"` the image config is omitted entirely and the model decides ratio/size. Auth: `GEMINI_API_KEY` env var, web UI key management (`/api/keys/gemini`), or a Vertex AI service account JSON (`VERTEX_SERVICE_ACCOUNT_JSON` or `/api/keys/vertex`). When both Vertex credentials and an API key are configured, Vertex takes priority. The chosen auth mode (`apikey` or `vertex`) persists to `~/.ima2/config.json` as `geminiAuthMode` and is restored on server startup. Per-model cost: `nano-banana-2` (Flash): 512=$0.001, 1K=$0.003, 2K=$0.004, 4K=$0.006; `nano-banana-pro`: 1K=$0.007, 2K=$0.007, 4K=$0.013. No web search or mask controls.
|
|
@@ -406,7 +406,7 @@ Generate a video via the Grok video provider. Returns Server-Sent Events on the
|
|
|
406
406
|
| `referenceFilenames` | string[] | — | Existing generated files for reference-to-video |
|
|
407
407
|
| `continueFromVideo` | string | — | Generated `.mp4` parent; server extracts its last frame and rebuilds lineage from sidecar |
|
|
408
408
|
| `continuityLineage` | object | — | Optional client hint; used only when `continueFromVideo` is absent |
|
|
409
|
-
| `plannerModel` | string | `grok-4.
|
|
409
|
+
| `plannerModel` | string | `grok-4.3` | Grok video planner model override; `grok-4.6` and `grok-4.5` are selectable (also via settings UI or `IMA2_GROK_PLANNER_MODEL`) |
|
|
410
410
|
| `storyboard` | boolean | `false` | Enable storyboard mode — maintains character/scene continuity across sequential clips |
|
|
411
411
|
|
|
412
412
|
Blank prompts return `PROMPT_REQUIRED` with a `guidance` string. The active
|
package/docs/PROMPT_STUDIO.md
CHANGED
|
@@ -17,7 +17,7 @@ you want a reproducible way to report a workspace issue.
|
|
|
17
17
|
| 1:1 Direct | Sends the prompt through with less rewriting by the app. | Use it for exact wording, strict prompt experiments, or provider-side prompt syntax. |
|
|
18
18
|
| Model quick menu | Changes the image model and reasoning effort from the sidebar header. | The full Settings workspace remains the detailed configuration page. |
|
|
19
19
|
| Recent generations | Shows the visible Prompt Studio history domain. | Arrow keys move inside the same visible recent domain instead of hidden older rows. Video items render as video thumbnails. Drag any thumbnail to the composer to add it as a reference image. Video results expose First, Mid, and Last frame buttons to copy keyframes. |
|
|
20
|
-
| Video settings | Controls Grok video duration, resolution, aspect ratio, and planner model. | Default planner model is `grok-4.
|
|
20
|
+
| Video settings | Controls Grok video duration, resolution, aspect ratio, and planner model. | Default planner model is `grok-4.3`; `grok-4.6` and `grok-4.5` are selectable. |
|
|
21
21
|
| Gallery | Browses saved local images, All/Favorites tabs, and folders. | Favorite toggles should preserve the gallery viewport you were browsing. |
|
|
22
22
|
| Prompt library | Imports saved prompt text into the composer intentionally. | Library insert/continue actions are explicit prompt imports; passive image selection is not. |
|
|
23
23
|
|
|
@@ -17,7 +17,7 @@ Prompt Studio 是用于重复图像迭代的经典工作区配置文件。它
|
|
|
17
17
|
|1:1直接|通过应用程序更少的重写来发送提示。|将其用于精确的措辞、严格的提示实验或提供者端提示语法。|
|
|
18
18
|
|模型快捷菜单|从侧边栏标题更改图像模型和推理工作。|完整的设置工作区仍然是详细的配置页面。|
|
|
19
19
|
|最近几代|显示可见的 Prompt Studio 历史域。|箭头键在同一可见的最近域内移动,而不是隐藏的旧行。视频项目呈现为视频缩略图。将任何缩略图拖到编辑器中以将其添加为参考图像。视频结果显示“第一帧”、“中间帧”和“最后一帧”按钮以复制关键帧。|
|
|
20
|
-
|视频设置|控制Grok视频时长、分辨率、宽高比和规划器模型。|默认规划器模型是`grok-4.
|
|
20
|
+
|视频设置|控制Grok视频时长、分辨率、宽高比和规划器模型。|默认规划器模型是`grok-4.3`;`grok-4.6`和`grok-4.5`可选。|
|
|
21
21
|
|画廊|浏览保存的本地图像、所有/收藏夹选项卡和文件夹。|最喜欢的切换应保留您正在浏览的图库视口。|
|
|
22
22
|
|提示库|有意将保存的提示文本导入到编辑器中。|库插入/继续操作是显式提示导入;被动图像选择则不然。|
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@ Generated by `npm run test:inventory` (script: `scripts/classify-tests.mjs`).
|
|
|
4
4
|
|
|
5
5
|
_Tests considered "runtime-importing" if they import from `../lib/`, `../routes/`, `../bin/`, `../server`, or `../config`._
|
|
6
6
|
|
|
7
|
-
Total:
|
|
7
|
+
Total: 372 (runtime: 169, contract: 203)
|
|
8
8
|
|
|
9
9
|
## Runtime-importing tests
|
|
10
10
|
- `tests/agent-mode-auto-planner-contract.test.ts`
|
|
@@ -146,6 +146,7 @@ Total: 371 (runtime: 168, contract: 203)
|
|
|
146
146
|
- `tests/serve-singleton-contract.test.ts`
|
|
147
147
|
- `tests/serve-ui-build-contract.test.ts`
|
|
148
148
|
- `tests/server-code-preservation.test.ts`
|
|
149
|
+
- `tests/skill-video-claims-contract.test.ts`
|
|
149
150
|
- `tests/sprite-anchor-policy.test.ts`
|
|
150
151
|
- `tests/sprite-atlas-compose.test.ts`
|
|
151
152
|
- `tests/sprite-atlas-import.test.ts`
|
|
@@ -22,7 +22,9 @@ import { isVideoGenerationError, normalizeVideoGenerationRequest, } from "./vide
|
|
|
22
22
|
import { appendAgentTurn, getAgentImages, getAgentSession, importAgentImage, } from "./agentStore.js";
|
|
23
23
|
import { errInfo } from "./errInfo.js";
|
|
24
24
|
import { forceImagePrompt, isTextOnlyResult, textOnlyError, notFound } from "./agentRuntime.js";
|
|
25
|
-
|
|
25
|
+
// Spelled out rather than derived from the default, so moving the default does not
|
|
26
|
+
// silently drop a model agents are allowed to ask for.
|
|
27
|
+
const AGENT_GROK_PLANNER_MODELS = new Set([DEFAULT_GROK_PLANNER_MODEL, "grok-4.6", "grok-4.5", "grok-4.3"]);
|
|
26
28
|
export async function generateAgentImageWithRetry(ctx, sessionId, prompt, manifest, webSearchEnabled, options) {
|
|
27
29
|
options.onProgressStage?.("requesting");
|
|
28
30
|
let lastError = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ima2-gen",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"packageManager": "npm@11.18.0",
|
|
5
5
|
"description": "Local-first visual generation runtime and studio for people and coding agents, with reproducible image and video workflows across multiple providers.",
|
|
6
6
|
"type": "module",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"tsx": "^4.23.12",
|
|
120
120
|
"typescript": "^5.9.3"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "19b682ffdeaedb38fda2ee4be45726abb5f47390"
|
|
123
123
|
}
|
package/skills/ima2/SKILL.md
CHANGED
|
@@ -575,8 +575,8 @@ Persist the server-side model defaults shared by GPT OAuth and API provider path
|
|
|
575
575
|
|
|
576
576
|
The built-in OAuth image default is `gpt-5.6-luna`; Grok image and video code
|
|
577
577
|
defaults are `grok-imagine-image-quality` and `grok-imagine-video` respectively.
|
|
578
|
-
|
|
579
|
-
are
|
|
578
|
+
For video, set `grok-imagine-video-1.5` as your default and leave the base model
|
|
579
|
+
for edit and extension, which are the only things 1.5 cannot do.
|
|
580
580
|
|
|
581
581
|
```bash
|
|
582
582
|
ima2 defaults set model gpt-5.5
|
|
@@ -659,10 +659,11 @@ a SuperGrok subscription; MCP lanes require their own connected subscription.
|
|
|
659
659
|
|
|
660
660
|
```bash
|
|
661
661
|
ima2 models --kind video
|
|
662
|
-
ima2 defaults set video grok/grok-imagine-video
|
|
662
|
+
ima2 defaults set video grok/grok-imagine-video-1.5
|
|
663
663
|
ima2 video "a cat playing piano" # text-to-video, uses saved default
|
|
664
|
-
ima2 video "animate this" --
|
|
665
|
-
ima2 video "
|
|
664
|
+
ima2 video "animate this" --ref photo.png # image-to-video: photo is frame 1
|
|
665
|
+
ima2 video "same cat, on a beach" --ref cat.png --as-reference # new scene, same subject
|
|
666
|
+
ima2 video "cinematic" --ref a.png --ref b.png # 2+ refs are always references
|
|
666
667
|
```
|
|
667
668
|
|
|
668
669
|
Targets use `--model <lane>/<model>`; a bare ID is accepted only when it is
|
|
@@ -691,24 +692,62 @@ parameters. Multishot generation is `POST /api/mcp/multishot` (CLI surface
|
|
|
691
692
|
planned). Video edit is the 2-step `edit-video-preview` → `edit-video-submit`
|
|
692
693
|
media action; stage-1 returns a synchronous keyframe preview.
|
|
693
694
|
|
|
694
|
-
###
|
|
695
|
+
### Model choice: reach for 1.5 first
|
|
696
|
+
|
|
697
|
+
`grok-imagine-video-1.5` is the model to use unless you are editing or extending an
|
|
698
|
+
existing video. It owns everything that makes a clip better; the base model owns two
|
|
699
|
+
operations 1.5 refuses.
|
|
700
|
+
|
|
701
|
+
| Capability | `grok-imagine-video-1.5` | `grok-imagine-video` (base) |
|
|
702
|
+
|---|---|---|
|
|
703
|
+
| Reference images (1-7) | yes | yes |
|
|
704
|
+
| 1080p | yes (not in reference-to-video) | no |
|
|
705
|
+
| Duration 1-15s | yes | yes |
|
|
706
|
+
| Preset voices (`--voice`) | yes, up to 3 | **no** — returns 400 |
|
|
707
|
+
| Video edit (V2V) | **no** — returns 400 | yes |
|
|
708
|
+
| Video extension | **no** — returns 400 | yes |
|
|
709
|
+
|
|
710
|
+
So: **1.5 for generating, base for editing and extending.** Nothing needs both at once.
|
|
711
|
+
|
|
712
|
+
`grok-imagine-video-1.5-preview` is still accepted as a compatibility alias, but write
|
|
713
|
+
`grok-imagine-video-1.5` in anything new.
|
|
714
|
+
|
|
715
|
+
Prompt-only text-to-video on 1.5 is implemented as an internal white-canvas image-to-video anchor,
|
|
716
|
+
because upstream 1.5 rejects raw T2V. That is an implementation detail — ask for
|
|
717
|
+
text-to-video normally.
|
|
718
|
+
|
|
719
|
+
When a request does fall back to another model, the result carries `requestedModel`,
|
|
720
|
+
`effectiveModel`, and `modelFallback`. Read `effectiveModel` before naming or reporting
|
|
721
|
+
which model produced a clip. A request carrying `--voice` never falls back, because the
|
|
722
|
+
base model cannot honor the voice and silently dropping it would return a clip missing
|
|
723
|
+
what was asked for.
|
|
724
|
+
|
|
725
|
+
### Modes (from --ref count, plus your choice at one reference)
|
|
695
726
|
|
|
696
727
|
| Refs | Mode | Max Duration |
|
|
697
728
|
|------|------|-------------|
|
|
698
729
|
| 0 | text-to-video | 15s |
|
|
699
|
-
| 1 | image-to-video | 15s |
|
|
700
|
-
|
|
|
730
|
+
| 1 | image-to-video (default) | 15s |
|
|
731
|
+
| 1 + `--as-reference` | reference-to-video | 15s |
|
|
732
|
+
| 2-7 | reference-to-video | 15s |
|
|
733
|
+
|
|
734
|
+
One image is ambiguous and only the caller knows the intent, so it is a choice rather
|
|
735
|
+
than a deduction. **image-to-video** locks that image as the opening frame and animates
|
|
736
|
+
it. **reference-to-video** carries its subject, outfit, or location into a new scene
|
|
737
|
+
without reproducing the shot. Two or more images can only be references.
|
|
701
738
|
|
|
702
|
-
|
|
739
|
+
Reference-to-video tops out at 720p; ask for 1080p there and the request is refused.
|
|
703
740
|
|
|
704
741
|
### Parameters
|
|
705
742
|
|
|
706
743
|
| Flag | Values | Default |
|
|
707
744
|
|------|--------|---------|
|
|
708
745
|
| `--duration` | 1–15 (seconds) | 5 |
|
|
709
|
-
| `--resolution` | 480p, 720p, 1080p (1.5
|
|
746
|
+
| `--resolution` | 480p, 720p, 1080p (1.5 only; not in reference-to-video) | 480p |
|
|
710
747
|
| `--aspect-ratio` | auto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 | auto |
|
|
711
|
-
| `--model` | `<lane>/<model>`;
|
|
748
|
+
| `--model` | `<lane>/<model>`; prefer `grok-imagine-video-1.5` (preview alias accepted) | `grok-imagine-video` after selecting the Grok lane |
|
|
749
|
+
| `--as-reference` | (flag) with exactly one `--ref`: guide a new scene instead of animating that image | off |
|
|
750
|
+
| `--voice` | preset voice id, repeatable, max 3 (1.5 only) | (none) |
|
|
712
751
|
| `--topic` | any string | (none) |
|
|
713
752
|
| `--session` | session ID | (none) |
|
|
714
753
|
| `-o, --out` | output file path | saved under configured generated dir |
|
|
@@ -804,7 +843,7 @@ ima2 serve # server must be running
|
|
|
804
843
|
### Output
|
|
805
844
|
|
|
806
845
|
SSE streaming events: `planning` → `submitted` → `progress` (0-100%) → `done`.
|
|
807
|
-
The `submitted` and `done` payloads include `requestedModel`, `effectiveModel`, and `modelFallback` so agents can report when a
|
|
846
|
+
The `submitted` and `done` payloads include `requestedModel`, `effectiveModel`, and `modelFallback` so agents can report which model actually produced a clip when a request falls back. A request carrying `--voice` never falls back. CLI `--json` prints `video.requestedModel`, `video.effectiveModel`, and `video.modelFallback`; use `path`/`filename` for local chaining.
|
|
808
847
|
|
|
809
848
|
### Discover Valid Parameters
|
|
810
849
|
|
|
@@ -830,8 +869,9 @@ Generate a high-quality still image first, then animate it. This produces better
|
|
|
830
869
|
|
|
831
870
|
| Scenario | Use | Why |
|
|
832
871
|
|----------|-----|-----|
|
|
833
|
-
| Need 2+ character identity lock from separate refs | ref2v (`grok-imagine-video`, max 7 refs,
|
|
834
|
-
| Single composed scene with all elements | i2v (`1.5
|
|
872
|
+
| Need 2+ character identity lock from separate refs | ref2v (`grok-imagine-video-1.5`, max 7 refs, up to 15s, 720p) | Refs lock character appearance |
|
|
873
|
+
| Single composed scene with all elements | i2v (`grok-imagine-video-1.5`, 1 ref) | Better motion quality from composed start |
|
|
874
|
+
| One subject, but a brand new setting | ref2v with one ref (`--as-reference`) | Keeps the subject without reproducing the source shot |
|
|
835
875
|
| Continue from previous video | `video continue` (last frame as i2v ref) | Lineage metadata preserved |
|
|
836
876
|
|
|
837
877
|
```bash
|
|
@@ -1021,12 +1061,43 @@ done
|
|
|
1021
1061
|
### Limitations
|
|
1022
1062
|
|
|
1023
1063
|
- Max 15 seconds per clip (extend adds 2-10s more)
|
|
1024
|
-
- Reference-to-video
|
|
1064
|
+
- Reference-to-video: 1-7 refs, up to 15 seconds, 720p ceiling. The 10-second clamp this
|
|
1065
|
+
section used to describe was ours, not xAI's, and was removed in v3.8.0 (issue #155)
|
|
1025
1066
|
- 1080p resolution is available for `grok-imagine-video-1.5` prompt-only text-to-video via the white-canvas I2V shim, and for image-to-video with a single image/frame source
|
|
1026
1067
|
- Video edit/extend: grok-imagine-video only (1.5 is not supported)
|
|
1027
1068
|
- Video edit input: max 8.7 seconds
|
|
1028
1069
|
- Video extend input: 2-15 seconds; extension duration: 2-10 seconds
|
|
1029
1070
|
|
|
1071
|
+
#### Provenance of the limits above
|
|
1072
|
+
|
|
1073
|
+
Do not re-litigate these from doc snippets alone. Two different kinds of fact are
|
|
1074
|
+
mixed in this section, and they age differently.
|
|
1075
|
+
|
|
1076
|
+
**Owner-measured, not in any public doc — trust it, do not "correct" it away:**
|
|
1077
|
+
|
|
1078
|
+
| Limit | Source |
|
|
1079
|
+
|---|---|
|
|
1080
|
+
| Video edit input max **8.7 seconds** | Owner's own empirical measurement, recorded in `docs/grok-video-i2v-research.md` (2026-05-30). No xAI doc states this number. It is not a hallucination and it is not stale-by-default — leave it in place unless a fresh measurement contradicts it. |
|
|
1081
|
+
|
|
1082
|
+
**Live-probed against `api.x.ai` on 2026-08-20 (real requests, real responses):**
|
|
1083
|
+
|
|
1084
|
+
| Behavior | Observed |
|
|
1085
|
+
|---|---|
|
|
1086
|
+
| `grok-imagine-video-1.5` + `/v1/videos/edits` | `400 "Video editing is not supported for this model."` |
|
|
1087
|
+
| `grok-imagine-video-1.5` + `/v1/videos/extensions` | `400 "Video extension is not supported for this model."` |
|
|
1088
|
+
| `grok-imagine-video` (base) + edit / extend | `200` → `done` (both work) |
|
|
1089
|
+
| Edit `duration` / `resolution` overrides | Accepted with `200` but **silently ignored** — output inherits the source video's properties, capped at 720p |
|
|
1090
|
+
| Extension `duration` outside 2-10 | Returns `200` with a `request_id`, then **fails asynchronously** on poll: `"Duration must be between 2 and 10 seconds"`. Validate before sending; a 200 here does not mean accepted. |
|
|
1091
|
+
| R2V reference count | 7 max; 8 → `400 "Too many reference images: 8. Maximum allowed is 7."` |
|
|
1092
|
+
| R2V + 1080p | `400 "1080p video resolution is not supported for reference-to-video requests."` |
|
|
1093
|
+
| R2V duration 15 | `200` → `done`, `video.duration=15` (this is why the old 10s clamp was removed) |
|
|
1094
|
+
| R2V with a single reference image | Accepted (`200`) — 2+ is an ima2 convention, not an API requirement |
|
|
1095
|
+
| `reference_audios: [{"voice_id": "eve"}]` on 1.5 | `200` → `done` (preset voices work; up to 3) |
|
|
1096
|
+
| Rate limit | 2 requests/second per team; exceeding it returns `429` |
|
|
1097
|
+
|
|
1098
|
+
The 1.5-vs-base split is not symmetric: **1.5** owns reference images, 1080p, and 15s;
|
|
1099
|
+
**base** owns video editing and extension. Neither model does both.
|
|
1100
|
+
|
|
1030
1101
|
### Video Editing (V2V)
|
|
1031
1102
|
|
|
1032
1103
|
Edit an existing video with a text prompt. This uses xAI's real video edit endpoint and saves the result as a generated video artifact.
|
|
@@ -1045,13 +1116,22 @@ ima2 video edit "Add a sailboat in the distance" --video "$VIDEO_FILE"
|
|
|
1045
1116
|
ima2 video edit "Make it stormy with dark clouds" --video "$VIDEO_FILE"
|
|
1046
1117
|
```
|
|
1047
1118
|
|
|
1048
|
-
Constraints: grok-imagine-video only, input mp4 <=8.7s
|
|
1119
|
+
Constraints: grok-imagine-video only, input mp4 <=8.7s (owner-measured 2026-05-30; not
|
|
1120
|
+
in any xAI doc — see Provenance above). `grok-imagine-video-1.5` returns
|
|
1121
|
+
`400 "Video editing is not supported for this model."` (verified 2026-08-20).
|
|
1122
|
+
`duration` and `resolution` are accepted but ignored: the output inherits the source
|
|
1123
|
+
video's properties, capped at 720p. Use `-o/--out` if you also need a local copy
|
|
1124
|
+
outside the generated directory.
|
|
1049
1125
|
|
|
1050
1126
|
### Video Extension (Continue from Last Frame)
|
|
1051
1127
|
|
|
1052
1128
|
Extend a video from its last frame using xAI's video extension endpoint. The output combines the source video and extension, but continuity quality is provider-dependent.
|
|
1053
1129
|
|
|
1054
|
-
Constraints: grok-imagine-video only, extension duration 2-10s. 1.5
|
|
1130
|
+
Constraints: grok-imagine-video only, extension duration 2-10s. `grok-imagine-video-1.5`
|
|
1131
|
+
returns `400 "Video extension is not supported for this model."` (verified 2026-08-20).
|
|
1132
|
+
`duration` is the length of the **appended segment**, not the total: a 10s source with
|
|
1133
|
+
`duration: 5` returns a 15s video. Out-of-range durations return `200` and then fail
|
|
1134
|
+
asynchronously on poll, so validate before sending.
|
|
1055
1135
|
|
|
1056
1136
|
```bash
|
|
1057
1137
|
# Generate initial clip
|
|
@@ -1335,3 +1415,23 @@ Agents: run `ima2 tools list --json` for the live view; this section is the bund
|
|
|
1335
1415
|
| `mcp.runway.whoami` | — | Returns the authenticated Runway user profile, the workspace this MCP connection is pinned to (chosen at sign-in), and the list of image/vid |
|
|
1336
1416
|
|
|
1337
1417
|
<!-- mcp-tools:generated:end -->
|
|
1418
|
+
### Preset Voices (1.5 only)
|
|
1419
|
+
|
|
1420
|
+
`grok-imagine-video-1.5` can give the subject a speaking voice. Pass up to three preset
|
|
1421
|
+
voices; the base model rejects the field outright.
|
|
1422
|
+
|
|
1423
|
+
```bash
|
|
1424
|
+
ima2 video "the person from <IMAGE_1> greets the camera with <AUDIO_0>" \
|
|
1425
|
+
--ref portrait.png --as-reference --voice eve --duration 6 --resolution 720p
|
|
1426
|
+
```
|
|
1427
|
+
|
|
1428
|
+
Address voices in the prompt as `<AUDIO_0>`, `<AUDIO_1>`, `<AUDIO_2>`, the same way
|
|
1429
|
+
reference images are `<IMAGE_1>`..`<IMAGE_N>`. A voice nobody is assigned to in the
|
|
1430
|
+
prompt does not get used.
|
|
1431
|
+
|
|
1432
|
+
Known presets include `ara`, `eve`, `leo`, `rex`, `sal`, `carina`, `luna`, `orion`,
|
|
1433
|
+
`iris`, `atlas`. **This list is a hint, not an allowlist.** xAI owns the roster and also
|
|
1434
|
+
accepts custom voice ids, so an unknown id comes back as a 400 that names every voice it
|
|
1435
|
+
will take — read that error rather than guessing from this page.
|
|
1436
|
+
|
|
1437
|
+
### Video Editing (V2V)
|