videodraft 0.20.0 → 0.22.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/README.md +44 -15
- package/dist/client.d.ts +49 -1
- package/dist/client.js +550 -9
- package/dist/index.js +1477 -246
- package/package.json +6 -3
- package/skills/index.json +14 -9
- package/skills/videodraft/SKILL.md +8 -6
- package/skills/videodraft/references/3d.md +46 -0
- package/skills/videodraft/references/examples.md +9 -1
- package/skills/videodraft/references/models.md +35 -9
- package/skills/videodraft/references/pipeline.md +30 -29
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# videodraft
|
|
2
2
|
|
|
3
|
-
The official [VideoDraft](https://videodraft.ai) CLI
|
|
3
|
+
The official [VideoDraft](https://videodraft.ai) CLI creates AI videos, images, audio and 3D assets from your terminal. Built for humans **and** coding agents: every command supports `--json`, exit codes are stable, async jobs are first-class.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx videodraft login
|
|
@@ -32,7 +32,7 @@ Credentials are stored in `~/.config/videodraft/config.json` (0600). `videodraft
|
|
|
32
32
|
|
|
33
33
|
## Asset generation first
|
|
34
34
|
|
|
35
|
-
Standalone images, clips and
|
|
35
|
+
Standalone images, clips, audio and 3D models are complete deliverables. They do not need a VideoDraft project unless you want to attach them to an existing project or turn them into a multi-scene production.
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
videodraft generate image "isometric workspace, warm light" --num 4 --download "./out/{job_id}_{index}.{ext}"
|
|
@@ -52,6 +52,8 @@ videodraft generate dialogue --line "elevenlabs-kPzsL2i3teMYv0FxEYQ6:Ready?" --l
|
|
|
52
52
|
videodraft generate voice-changer ./speech.wav --voice elevenlabs-kPzsL2i3teMYv0FxEYQ6 --duration 12 --download changed.mp3
|
|
53
53
|
videodraft generate dub ./clip.mp4 --to es --duration 30 --download dubbed.mp4
|
|
54
54
|
videodraft upscale image ./photo.png --scale 4x --download ./photo-4x.png
|
|
55
|
+
videodraft upscale video ./clip.mp4 --resolution 1080p --mode generative --download ./clip-1080p.mp4
|
|
56
|
+
videodraft interpolate ./clip.mp4 --fps 60 --download ./clip-60fps.mp4
|
|
55
57
|
videodraft avatar create ./founder.jpg --script "$(videodraft avatar script 'our launch' --json | jq -r .script)"
|
|
56
58
|
videodraft edit video ./clip.mp4 "Add falling snow" --model grok-imagine-video-edit --download ./clip-snow.mp4
|
|
57
59
|
videodraft edit motion ./character.png "Apply the reference dance" --motion-video ./dance.mp4 --download ./character-dance.mp4
|
|
@@ -87,6 +89,32 @@ videodraft models audio
|
|
|
87
89
|
|
|
88
90
|
Asset I/O is part of the asset workflow: `videodraft upload`, `videodraft download`, generation `--download`, and local refs like `--ref ./image.png` make files usable by agents and visible in local workspaces.
|
|
89
91
|
|
|
92
|
+
### 3D model generation and rigging
|
|
93
|
+
|
|
94
|
+
Meshy 7 and Tripo H3.1 support text, image, and multi-image inputs through Fal. Saved 3D assets are independent of AI Studio sessions. Inspect the live catalog for each endpoint's exact options, view order, limits, default settings, output formats, and pricing:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
videodraft models 3d --json
|
|
98
|
+
videodraft generate 3d "a weathered brass telescope" --model meshy-7 --estimate
|
|
99
|
+
videodraft generate 3d --model meshy-7 --ref ./character.png --download
|
|
100
|
+
videodraft generate 3d --model tripo-h3.1 --input-mode multi_image --ref ./front.png --ref ./left.png --ref ./back.png --ref ./right.png --options @model-options.json --no-wait --json
|
|
101
|
+
videodraft wait JOB_ID --download ./media/3d --json
|
|
102
|
+
videodraft assets 3d list --status completed --json
|
|
103
|
+
videodraft assets 3d get ASSET_ID --download
|
|
104
|
+
videodraft rig 3d --asset ASSET_ID --estimate
|
|
105
|
+
videodraft rig 3d ./character.glb --download
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The positional prompt is for text mode. Image modes do not accept a geometry prompt; Meshy has a separate `texture_prompt` option for texture guidance. `--input-mode` defaults to text without references, image with one reference, and multi-image with two or more. Meshy multi-image accepts 1-4 views; use explicit `--input-mode multi_image` for a single view. Tripo accepts 2-4 views in front, left, back, right order. Rigging accepts a compatible textured humanoid GLB as a saved asset, public URL, or local file. It does not promise a facial/dialogue rig. Local GLBs use the separate 3D upload lane.
|
|
109
|
+
|
|
110
|
+
`--options '{...}'` or `--options @file.json` passes exact provider fields. Repeat `--option key=value` to override individual fields; values preserve JSON objects, arrays, numbers, and booleans. Read the live schemas instead of assuming both models share option names. `--estimate` uses the same server pricing calculation as submission and does not upload local inputs. Charges are whole VideoDraft credits at 100 credits per dollar. Fal BYOK uses your connected Fal account and zero VideoDraft credits.
|
|
111
|
+
|
|
112
|
+
3D `--download` saves **all returned model files, textures, materials, animations, and previews**, plus `manifest.json`, under `media/3d/<asset_id>/`. A custom directory receives a per-asset subdirectory; `{job_id}` or `{asset_id}` can specify the directory layout. A single `.glb` filename or image/video `{index}.{ext}` template is rejected because it would discard the rest of the package. Existing downloads are preserved by adding a directory suffix. GLB/FBX/ZIP bytes are retained; glTF/OBJ/MTL dependency links are adjusted to their downloaded filenames. Provider-supplied dependency aliases restore texture paths required by original FBX files. Inspect `package_warnings` and the manifest's `complete` field before treating packages as self-contained. A failed download leaves no completed manifest.
|
|
113
|
+
|
|
114
|
+
Each submission includes a UUID `request_id`. Retry interrupted submissions with the **same arguments and `--request-id UUID`**. A local request journal in the CLI config directory reuses the originally uploaded references. Reusing a UUID with changed inputs fails. The journal contains the submitted prompt/options and public asset URLs and is stored with owner-only permissions. If a wait times out, use `status` or `wait` with the existing job ID; do not submit a new request.
|
|
115
|
+
|
|
116
|
+
Machine output preserves `artifacts` and adds `output_files`, `downloaded_files`, `manifest_path`, and `package_warnings`. Only rendered previews appear in `output_media`; meshes and texture maps never masquerade as playable images or videos. Use external 3D software to view/edit the meshes. This release does not add an AI Studio 3D viewer.
|
|
117
|
+
|
|
90
118
|
## The project pipeline
|
|
91
119
|
|
|
92
120
|
Use projects when the user asks for a story, storyboard, editable web project, timeline, production flow, or exported MP4.
|
|
@@ -112,18 +140,19 @@ late Byteplus output refusals are refunded but cannot be rerouted.
|
|
|
112
140
|
|
|
113
141
|
## Commands
|
|
114
142
|
|
|
115
|
-
| Group | Commands
|
|
116
|
-
| --------------- |
|
|
117
|
-
| Auth | `login` `logout` `whoami`
|
|
118
|
-
| Account | `credits` `costs [model]` `models [image\|video\|audio\|voices\|styles]` `workspaces` `sessions list/create/current/name/reset` `kling-voices list/create/delete`
|
|
119
|
-
| Projects | `projects list/get/delete/favorite/open` `checkpoint create/list/restore`
|
|
120
|
-
| Pipeline | `create` `shots` `produce` (`--mode full_video`) `attach` `finalize` `export` `export-status` `video-prompts`
|
|
121
|
-
| Generate | `generate image/video/audio/voiceover/music/sound-effect/dialogue/voice-changer/dub` `edit video/motion` `upscale image/video` `avatar script/create/render/get/list/fabric/lipsync` |
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
143
|
+
| Group | Commands |
|
|
144
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
145
|
+
| Auth | `login` `logout` `whoami` |
|
|
146
|
+
| Account | `credits` `costs [model]` `models [image\|video\|audio\|voices\|styles]` `workspaces` `sessions list/create/current/name/reset` `kling-voices list/create/delete` |
|
|
147
|
+
| Projects | `projects list/get/delete/favorite/open` `checkpoint create/list/restore` |
|
|
148
|
+
| Pipeline | `create` `shots` `produce` (`--mode full_video`) `attach` `finalize` `export` `export-status` `video-prompts` |
|
|
149
|
+
| Generate | `generate image/video/audio/voiceover/music/sound-effect/dialogue/voice-changer/dub/3d` `rig 3d` `edit video/motion` `upscale image/video` `interpolate` `avatar script/create/render/get/list/fabric/lipsync` |
|
|
150
|
+
| 3D assets | `models 3d` `assets 3d list` `assets 3d get <id> --download` |
|
|
151
|
+
| Jobs | `status <job>` `wait <job>` `generations` |
|
|
152
|
+
| Media | `upload <file>` `media list` `describe <url\|file>` `download <url>` |
|
|
153
|
+
| Everything else | `tools list [--lane assets\|asset_io\|project_data\|production]` `tools schema <name>` `call <tool> --args '<json>'` |
|
|
154
|
+
| Agents | `skills install [--agent claude\|codex\|cursor]` `skills path` |
|
|
155
|
+
| Utility | `config get/set/path` `completion bash\|zsh` `docs` `--version` |
|
|
127
156
|
|
|
128
157
|
`call` reaches **every** VideoDraft API tool (the full MCP catalog), including ones without a curated command — new platform features work in the CLI the day they ship.
|
|
129
158
|
|
|
@@ -150,7 +179,7 @@ npx videodraft skills install # zero-install: npx fetches the C
|
|
|
150
179
|
videodraft skills install # if the CLI is on PATH — auto-detects your installed agents
|
|
151
180
|
videodraft skills install --agent claude,codex # target specific agents (repeatable/comma; --all for every agent)
|
|
152
181
|
videodraft skills install --project # into ./.claude/skills for just this repo (else global)
|
|
153
|
-
videodraft skills show # print the skill (also: skills show editor|models|examples|pipeline|--all)
|
|
182
|
+
videodraft skills show # print the skill (also: skills show editor|models|3d|examples|pipeline|--all)
|
|
154
183
|
|
|
155
184
|
# Or install straight from the repo — no CLI on PATH needed first:
|
|
156
185
|
npx -y skills add videodraft-ai/cli -g # vercel-labs skills tool; npx -y skips npx's install prompt; -g = user scope
|
package/dist/client.d.ts
CHANGED
|
@@ -372,6 +372,54 @@ declare function uploadFile(client: VideoDraftClient, localPath: string, options
|
|
|
372
372
|
contentType?: string;
|
|
373
373
|
fetchImpl?: typeof fetch;
|
|
374
374
|
}): Promise<UploadResult>;
|
|
375
|
+
/** 3D uploads use their own server validation and artifact storage lane. */
|
|
376
|
+
declare function upload3DFile(client: VideoDraftClient, localPath: string, options?: {
|
|
377
|
+
fetchImpl?: typeof fetch;
|
|
378
|
+
}): Promise<UploadResult>;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Canonical media descriptor emitted by every command that produces media, so a
|
|
382
|
+
* consuming app (VideoDraft ADE) can render generated media
|
|
383
|
+
* DETERMINISTICALLY — without scraping human text or guessing the kind from a
|
|
384
|
+
* file extension. The kind is stated by us, never inferred downstream.
|
|
385
|
+
*
|
|
386
|
+
* Emitted ONLY as an `output_media` array field inside the `--json` document
|
|
387
|
+
* (the documented machine channel — "agents parse --json"). Human / piped output
|
|
388
|
+
* is intentionally left byte-identical to before, so terminal users, scripts and
|
|
389
|
+
* `$(…)` captures that parse the human output are never affected.
|
|
390
|
+
*/
|
|
391
|
+
interface MediaDescriptor {
|
|
392
|
+
/** Explicit asset kind — stated here, never re-guessed by the consumer. */
|
|
393
|
+
kind: "image" | "video" | "audio";
|
|
394
|
+
/** The CDN / public URL of the generated asset. */
|
|
395
|
+
url: string;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
interface Model3DArtifact {
|
|
399
|
+
id: string;
|
|
400
|
+
role: string;
|
|
401
|
+
url: string;
|
|
402
|
+
filename: string;
|
|
403
|
+
content_type?: string;
|
|
404
|
+
bytes?: number;
|
|
405
|
+
/** Additional relative paths needed by preserved FBX/external dependencies. */
|
|
406
|
+
aliases?: string[];
|
|
407
|
+
}
|
|
408
|
+
interface Model3DDownload {
|
|
409
|
+
downloaded_files: DownloadedFile[];
|
|
410
|
+
package_directory: string;
|
|
411
|
+
manifest_path: string;
|
|
412
|
+
package_warnings: string[];
|
|
413
|
+
}
|
|
414
|
+
declare function isModel3DResult(payload: any): boolean;
|
|
415
|
+
declare function model3DArtifacts(payload: any): Model3DArtifact[];
|
|
416
|
+
declare function model3DOutputFields(payload: any): {
|
|
417
|
+
output_files: Model3DArtifact[];
|
|
418
|
+
output_media: MediaDescriptor[];
|
|
419
|
+
artifact_warnings: string[];
|
|
420
|
+
package_warnings: string[];
|
|
421
|
+
};
|
|
422
|
+
declare function downloadModel3DPackage(payload: any, target: string | true, fetchImpl?: typeof fetch): Promise<Model3DDownload>;
|
|
375
423
|
|
|
376
424
|
/**
|
|
377
425
|
* Error taxonomy + stable exit codes.
|
|
@@ -494,4 +542,4 @@ declare function refreshAccessToken(params: {
|
|
|
494
542
|
/** RFC 7009 revocation — best-effort, used by `videodraft logout`. */
|
|
495
543
|
declare function revokeToken(baseUrl: string, token: string, fetchImpl?: typeof fetch): Promise<void>;
|
|
496
544
|
|
|
497
|
-
export { AuthError, type CliConfig, CliError, type ConnectionSessionRecord, type ConnectionSessionStore, DEFAULT_BASE_URL, type DownloadedFile, EXIT, type GenerationResult, MCP_SESSION_HEADER, type McpToolInfo, type PollOptions, type Profile, type ResolvedAuth, RpcError, SESSION_IDLE_MS, STATIC_CLI_CLIENT_ID, TimeoutError, type TokenProvider, ToolError, type UploadResult, VideoDraftClient, type VideoDraftClientOptions, authorizeViaLoopback, buildAuthorizeUrl, configDir, configPath, createConnectionSessionStore, createPkcePair, downloadOutputs, downloadUrl, exchangeCode, extFromUrl, extractOutputUrls, getProfile, guessContentType, nextPollDelay, pollExport, pollGeneration, pollGenerations, pollGenerationsBatch, probeClientId, profileTokenProvider, readConfig, refreshAccessToken, registerCliClient, renderTemplate, resetAllConnectionSessions, resolveAuth, revokeToken, sessionScope, staticTokenProvider, updateConfig, uploadFile, writeConfig };
|
|
545
|
+
export { AuthError, type CliConfig, CliError, type ConnectionSessionRecord, type ConnectionSessionStore, DEFAULT_BASE_URL, type DownloadedFile, EXIT, type GenerationResult, MCP_SESSION_HEADER, type McpToolInfo, type Model3DArtifact, type Model3DDownload, type PollOptions, type Profile, type ResolvedAuth, RpcError, SESSION_IDLE_MS, STATIC_CLI_CLIENT_ID, TimeoutError, type TokenProvider, ToolError, type UploadResult, VideoDraftClient, type VideoDraftClientOptions, authorizeViaLoopback, buildAuthorizeUrl, configDir, configPath, createConnectionSessionStore, createPkcePair, downloadModel3DPackage, downloadOutputs, downloadUrl, exchangeCode, extFromUrl, extractOutputUrls, getProfile, guessContentType, isModel3DResult, model3DArtifacts, model3DOutputFields, nextPollDelay, pollExport, pollGeneration, pollGenerations, pollGenerationsBatch, probeClientId, profileTokenProvider, readConfig, refreshAccessToken, registerCliClient, renderTemplate, resetAllConnectionSessions, resolveAuth, revokeToken, sessionScope, staticTokenProvider, updateConfig, upload3DFile, uploadFile, writeConfig };
|