@unityclaw/skills 1.0.6 β†’ 1.0.9

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,324 +0,0 @@
1
- ---
2
- name: unityclaw-video-generation-other
3
- description: Generate videos using Doubao, Wan (Alibaba), MiniMax, and JiMeng models
4
- version: 1.0.1
5
- metadata:
6
- openclaw:
7
- requires:
8
- env:
9
- - UNITYCLAW_API_KEY
10
- bins:
11
- - node
12
- - npm
13
- primaryEnv: UNITYCLAW_API_KEY
14
- emoji: "🎞️"
15
- homepage: https://unityclaw.com
16
- install:
17
- - kind: node
18
- package: "@unityclaw/sdk"
19
- bins: []
20
- ---
21
-
22
- # UnityClaw Video Generation - Other Models
23
-
24
- Generate videos using multiple AI models: Doubao, Wan (Alibaba), MiniMax, and JiMeng.
25
-
26
- ## Installation
27
-
28
- ```bash
29
- npm install @unityclaw/sdk
30
- ```
31
-
32
- ## Configuration
33
-
34
- Set your API key using one of these methods:
35
-
36
- ```bash
37
- # Method 1: Use SDK CLI (recommended - persists across sessions)
38
- npx @unityclaw/sdk config set apiKey your-api-key
39
-
40
- # Method 2: Environment variable
41
- export UNITYCLAW_API_KEY=your-api-key
42
- ```
43
-
44
- ## Response Structure
45
-
46
- > **IMPORTANT:** The result has a nested structure. Use `result.success` to check overall success, and access data via `result.response.data`.
47
-
48
- ```typescript
49
- interface UnityClawResult {
50
- success: boolean; // βœ… Use this to check if SDK call succeeded
51
- taskId: string; // Task identifier
52
- taskFolder: string; // Path to task folder with logs
53
- duration: number; // Request duration in ms
54
- response: { // API response object
55
- code: number; // 0 = success
56
- data: Array<{ // βœ… Result data here
57
- name: string;
58
- contentType: string;
59
- content: string; // URL to generated video
60
- }> | null;
61
- };
62
- logs: Array<{ timestamp; level; message }>;
63
- attachments: any[];
64
- }
65
- ```
66
-
67
- ## Quick Start
68
-
69
- ```typescript
70
- import { UnityClawClient } from '@unityclaw/sdk';
71
-
72
- const client = new UnityClawClient();
73
-
74
- // Using Doubao
75
- const result = await client.video.doubao({
76
- prompt: 'A cinematic drone shot of mountains',
77
- resolution: { value: '1080p', label: '1080p' },
78
- ratio: { value: '16:9', label: '16:9' }
79
- });
80
-
81
- // βœ… Correct: Check result.success, access data via result.response.data
82
- if (result.success && result.response?.data) {
83
- console.log('Generated video:', result.response.data);
84
- }
85
- ```
86
-
87
- ## Available APIs
88
-
89
- ### 1. Doubao Video
90
-
91
- ```typescript
92
- const result = await client.video.doubao({
93
- prompt: 'A cinematic drone shot of mountains at golden hour',
94
- resolution: { value: '1080p', label: '1080p' },
95
- ratio: { value: '16:9', label: '16:9' },
96
- duration: { value: '5', label: '5s' }
97
- });
98
- ```
99
-
100
- **Parameters:**
101
-
102
- | Parameter | Type | Required | Description |
103
- |-----------|------|----------|-------------|
104
- | `prompt` | `string \| TextFieldItem[]` | No | Text description |
105
- | `attachment` | `AttachmentFieldItem[]` | No | Reference image |
106
- | `action` | `LabelFieldItem \| string` | No | Action type |
107
- | `resolution` | `LabelFieldItem \| string` | Yes | Video resolution |
108
- | `ratio` | `LabelFieldItem \| string` | Yes | Aspect ratio |
109
- | `duration` | `LabelFieldItem \| string` | No | Video duration |
110
-
111
- ### 2. Wan Video (Alibaba)
112
-
113
- ```typescript
114
- const result = await client.video.wan({
115
- prompt: 'A futuristic city at night with neon lights',
116
- size: { value: '1280*720', label: '720p' },
117
- duration: { value: '5', label: '5s' },
118
- model: { value: 'wan2.6-t2v', label: 'Wan 2.6' }
119
- });
120
- ```
121
-
122
- **Parameters:**
123
-
124
- | Parameter | Type | Required | Description |
125
- |-----------|------|----------|-------------|
126
- | `prompt` | `string \| TextFieldItem[]` | No | Text description |
127
- | `attachment` | `AttachmentFieldItem[]` | No | Reference image |
128
- | `size` | `LabelFieldItem \| string` | No | Video size (e.g., '1280*720') |
129
- | `duration` | `LabelFieldItem \| string` | No | Video duration |
130
- | `model` | `LabelFieldItem \| string` | No | Model version |
131
- | `shot_type` | `LabelFieldItem \| string` | No | Camera shot type |
132
-
133
- ### 3. MiniMax Video
134
-
135
- ```typescript
136
- const result = await client.video.minimax({
137
- prompt: 'A person walking through a serene forest',
138
- size: { value: '1360*768', label: '768p' },
139
- model: { value: 'MiniMax-Hailuo-2.3', label: 'Hailuo 2.3' }
140
- });
141
- ```
142
-
143
- **Parameters:**
144
-
145
- | Parameter | Type | Required | Description |
146
- |-----------|------|----------|-------------|
147
- | `prompt` | `string \| TextFieldItem[]` | No | Text description |
148
- | `attachment` | `AttachmentFieldItem[]` | No | Reference image |
149
- | `size` | `LabelFieldItem \| string` | No | Video size |
150
- | `duration` | `LabelFieldItem \| string` | No | Video duration |
151
- | `model` | `LabelFieldItem \| string` | No | Model version |
152
-
153
- ### 4. JiMeng Video
154
-
155
- ```typescript
156
- const result = await client.video.jimeng({
157
- action: { value: 't2v', label: 'Text to Video' },
158
- prompt: 'A beautiful landscape with flowing river',
159
- aspect_ratio: { value: '16:9', label: '16:9' }
160
- });
161
- ```
162
-
163
- **Parameters:**
164
-
165
- | Parameter | Type | Required | Description |
166
- |-----------|------|----------|-------------|
167
- | `action` | `LabelFieldItem \| string` | Yes | Action type ('t2v' for text-to-video) |
168
- | `prompt` | `string \| TextFieldItem[]` | No | Text description |
169
- | `attachment` | `AttachmentFieldItem[]` | No | Reference image |
170
- | `aspect_ratio` | `LabelFieldItem \| string` | Yes | Aspect ratio |
171
-
172
- ## Examples
173
-
174
- ### Doubao - Text-to-Video
175
-
176
- ```typescript
177
- const client = new UnityClawClient();
178
-
179
- const result = await client.video.doubao({
180
- prompt: 'A luxury car driving along a coastal road at sunset',
181
- resolution: { value: '1080p', label: '1080p' },
182
- ratio: { value: '16:9', label: '16:9' },
183
- duration: { value: '5', label: '5s' }
184
- });
185
- ```
186
-
187
- ### Doubao - Image-to-Video
188
-
189
- ```typescript
190
- const result = await client.video.doubao({
191
- action: { value: 'i2v', label: 'Image to Video' },
192
- attachment: [
193
- { tmp_url: 'https://example.com/image.jpg', name: 'image.jpg' }
194
- ],
195
- prompt: 'Animate this image with gentle movement',
196
- resolution: { value: '1080p', label: '1080p' },
197
- ratio: { value: '16:9', label: '16:9' }
198
- });
199
- ```
200
-
201
- ### Wan - High Quality
202
-
203
- ```typescript
204
- const result = await client.video.wan({
205
- prompt: 'A samurai walking through cherry blossom petals falling',
206
- size: { value: '1920*1080', label: '1080p' },
207
- duration: { value: '5', label: '5s' },
208
- model: { value: 'wan2.6-t2v', label: 'Wan 2.6' },
209
- shot_type: { value: 'cinematic', label: 'Cinematic' }
210
- });
211
- ```
212
-
213
- ### MiniMax - Portrait Video
214
-
215
- ```typescript
216
- const result = await client.video.minimax({
217
- prompt: 'A dancer performing an elegant routine',
218
- size: { value: '768*1360', label: 'Portrait 768p' },
219
- model: { value: 'MiniMax-Hailuo-2.3', label: 'Hailuo 2.3' }
220
- });
221
- ```
222
-
223
- ### JiMeng - Chinese Prompt
224
-
225
- ```typescript
226
- const result = await client.video.jimeng({
227
- action: { value: 't2v', label: 'Text to Video' },
228
- prompt: 'δΈ€εͺε―ηˆ±ηš„η†ŠηŒ«εœ¨η«Ήζž—ι‡Œεƒη«Ήε­',
229
- aspect_ratio: { value: '16:9', label: '16:9' }
230
- });
231
- ```
232
-
233
- ### Compare Multiple Models
234
-
235
- ```typescript
236
- const prompt = 'A serene mountain lake at sunrise';
237
-
238
- const results = await Promise.all([
239
- client.video.doubao({
240
- prompt,
241
- resolution: '1080p',
242
- ratio: '16:9'
243
- }),
244
- client.video.wan({
245
- prompt,
246
- size: '1280*720'
247
- }),
248
- client.video.minimax({
249
- prompt,
250
- size: '1360*768'
251
- })
252
- ]);
253
-
254
- results.forEach((result, i) => {
255
- const model = ['Doubao', 'Wan', 'MiniMax'][i];
256
- if (result.success && result.response?.data) {
257
- console.log(`${model}: ${result.response.data?.[0]?.content}`);
258
- }
259
- });
260
- ```
261
-
262
- ## Model Comparison
263
-
264
- | Model | Strengths | Best For |
265
- |-------|-----------|----------|
266
- | Doubao | High quality, Chinese prompts | General purpose, Chinese content |
267
- | Wan | Multiple shot types | Cinematic videos |
268
- | MiniMax | Fast generation | Quick iterations |
269
- | JiMeng | Chinese language | Chinese content |
270
-
271
- ## Response Format
272
-
273
- ```typescript
274
- interface AttachmentResult {
275
- name: string;
276
- contentType: 'attachment/url';
277
- content: string; // URL to generated video
278
- }
279
- ```
280
-
281
- ## Error Handling
282
-
283
- ```typescript
284
- const result = await client.video.doubao({
285
- prompt: 'test',
286
- resolution: '1080p',
287
- ratio: '16:9'
288
- });
289
-
290
- if (!result.success) {
291
- console.error('Request failed');
292
- console.log('Check logs:', result.logs);
293
- return;
294
- }
295
-
296
- if (result.response?.code !== 0) {
297
- console.error('API error:', result.response);
298
- return;
299
- }
300
-
301
- // Success
302
- console.log('Success:', result.response.data);
303
- ```
304
-
305
- ## Task Folders
306
-
307
- Each execution creates a task folder:
308
-
309
- ```typescript
310
- const result = await client.video.wan({
311
- prompt: 'test',
312
- size: '1280*720'
313
- });
314
-
315
- console.log('Task ID:', result.taskId);
316
- console.log('Task Folder:', result.taskFolder);
317
- console.log('Videos:', result.attachments);
318
- ```
319
-
320
- ## Related Skills
321
-
322
- - [unityclaw-video-generation-sora](../unityclaw-video-generation-sora/SKILL.md) - OpenAI Sora
323
- - [unityclaw-video-generation-veo](../unityclaw-video-generation-veo/SKILL.md) - Google Veo
324
- - [unityclaw-video-generation-kling](../unityclaw-video-generation-kling/SKILL.md) - Kling