@unityclaw/skills 1.0.5 → 1.0.8
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 +63 -73
- package/dist/{chunk-VTGLNHDK.js → chunk-CVOSGIUI.js} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/unityclaw-document-convert/SKILL.md +8 -4
- package/unityclaw-document-translation/SKILL.md +1 -1
- package/unityclaw-idp-business-extraction/SKILL.md +54 -0
- package/unityclaw-idp-contract-extraction/SKILL.md +54 -0
- package/unityclaw-idp-invoice-extraction/SKILL.md +56 -0
- package/unityclaw-idp-personal-documents/SKILL.md +60 -0
- package/unityclaw-image-generation/SKILL.md +49 -15
- package/unityclaw-media-analysis/SKILL.md +17 -18
- package/unityclaw-media-download-xhs/SKILL.md +40 -0
- package/unityclaw-media-stats/SKILL.md +40 -0
- package/unityclaw-media-user-info/SKILL.md +40 -0
- package/unityclaw-video-frame-extract/SKILL.md +41 -0
- package/unityclaw-video-generation-jimeng-doubao/SKILL.md +70 -0
- package/unityclaw-video-generation-kling/SKILL.md +2 -3
- package/unityclaw-video-generation-wan-minimax/SKILL.md +70 -0
- package/unityclaw-video-generation-other/SKILL.md +0 -324
- package/unityclaw-video-generation-sora/SKILL.md +0 -286
- package/unityclaw-video-generation-veo/SKILL.md +0 -275
|
@@ -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
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: unityclaw-video-generation-sora
|
|
3
|
-
description: Generate cinematic videos using OpenAI Sora AI model
|
|
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 - Sora
|
|
23
|
-
|
|
24
|
-
Generate cinematic videos using OpenAI's Sora AI model.
|
|
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
|
-
const result = await client.video.sora({
|
|
75
|
-
prompt: 'A cat playing piano in a cozy living room',
|
|
76
|
-
orientation: { value: 'landscape', label: 'Landscape' }
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
// ✅ Correct: Check result.success, access data via result.response.data
|
|
80
|
-
if (result.success && result.response?.data) {
|
|
81
|
-
console.log('Generated video:', result.response.data);
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Available APIs
|
|
86
|
-
|
|
87
|
-
### Sora Video Generation
|
|
88
|
-
|
|
89
|
-
```typescript
|
|
90
|
-
// Basic usage
|
|
91
|
-
const result = await client.video.sora({
|
|
92
|
-
prompt: 'A drone shot flying over snowy mountains',
|
|
93
|
-
orientation: { value: 'landscape', label: 'Landscape' }
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// With reference image
|
|
97
|
-
const result = await client.video.sora({
|
|
98
|
-
prompt: 'Animate this scene with gentle movement',
|
|
99
|
-
attachment: [{ tmp_url: 'https://...', name: 'scene.jpg' }],
|
|
100
|
-
orientation: { value: 'portrait', label: 'Portrait' }
|
|
101
|
-
});
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Sora Stable Video Generation
|
|
105
|
-
|
|
106
|
-
```typescript
|
|
107
|
-
// With duration and size control
|
|
108
|
-
const result = await client.video.soraStable({
|
|
109
|
-
prompt: 'A peaceful ocean wave at sunset',
|
|
110
|
-
size: { value: '1920x1080', label: '1080p' },
|
|
111
|
-
seconds: { value: '10', label: '10s' }
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// Image-to-video
|
|
115
|
-
const result = await client.video.soraStable({
|
|
116
|
-
attachment: [{ tmp_url: 'https://...', name: 'image.jpg' }],
|
|
117
|
-
prompt: 'Bring this image to life',
|
|
118
|
-
size: { value: '1280x720', label: '720p' },
|
|
119
|
-
seconds: { value: '5', label: '5s' }
|
|
120
|
-
});
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Parameter Types
|
|
124
|
-
|
|
125
|
-
### SoraVideoParams
|
|
126
|
-
|
|
127
|
-
| Parameter | Type | Required | Description |
|
|
128
|
-
|-----------|------|----------|-------------|
|
|
129
|
-
| `prompt` | `string \| TextFieldItem[]` | No | Text description of the video |
|
|
130
|
-
| `attachment` | `AttachmentFieldItem[]` | No | Reference image for image-to-video |
|
|
131
|
-
| `orientation` | `LabelFieldItem` | Yes | Video orientation |
|
|
132
|
-
|
|
133
|
-
### SoraStableParams
|
|
134
|
-
|
|
135
|
-
| Parameter | Type | Required | Description |
|
|
136
|
-
|-----------|------|----------|-------------|
|
|
137
|
-
| `prompt` | `string \| TextFieldItem[]` | No | Text description |
|
|
138
|
-
| `attachment` | `AttachmentFieldItem[]` | No | Reference image |
|
|
139
|
-
| `size` | `LabelFieldItem` | No | Video resolution |
|
|
140
|
-
| `seconds` | `LabelFieldItem` | No | Video duration |
|
|
141
|
-
|
|
142
|
-
## Examples
|
|
143
|
-
|
|
144
|
-
### Text-to-Video
|
|
145
|
-
|
|
146
|
-
```typescript
|
|
147
|
-
const client = new UnityClawClient();
|
|
148
|
-
|
|
149
|
-
const result = await client.video.sora({
|
|
150
|
-
prompt: 'A cinematic drone shot flying through a futuristic neon-lit city at night, with flying cars and holographic billboards',
|
|
151
|
-
orientation: { value: 'landscape', label: 'Landscape' }
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
if (result.success && result.response?.data) {
|
|
155
|
-
console.log('Video URL:', result.response.data[0].content);
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### Image-to-Video
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
const result = await client.video.sora({
|
|
163
|
-
prompt: 'Animate this image with subtle camera movement and parallax effect',
|
|
164
|
-
attachment: [
|
|
165
|
-
{ tmp_url: 'https://example.com/landscape.jpg', name: 'landscape.jpg' }
|
|
166
|
-
],
|
|
167
|
-
orientation: { value: 'landscape', label: 'Landscape' }
|
|
168
|
-
});
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Long Duration Video
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
const result = await client.video.soraStable({
|
|
175
|
-
prompt: 'A time-lapse of a flower blooming in a garden',
|
|
176
|
-
size: { value: '1920x1080', label: '1080p Landscape' },
|
|
177
|
-
seconds: { value: '15', label: '15s' }
|
|
178
|
-
});
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Portrait Video for Social Media
|
|
182
|
-
|
|
183
|
-
```typescript
|
|
184
|
-
const result = await client.video.sora({
|
|
185
|
-
prompt: 'A person walking through a misty forest with sunlight filtering through the trees',
|
|
186
|
-
orientation: { value: 'portrait', label: 'Portrait' }
|
|
187
|
-
});
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### Batch Generation
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
const prompts = [
|
|
194
|
-
'A serene beach at golden hour with waves gently rolling',
|
|
195
|
-
'A busy Tokyo street crossing at night with neon signs',
|
|
196
|
-
'An astronaut floating in space with Earth in the background'
|
|
197
|
-
];
|
|
198
|
-
|
|
199
|
-
const results = await Promise.all(
|
|
200
|
-
prompts.map(prompt => client.video.sora({
|
|
201
|
-
prompt,
|
|
202
|
-
orientation: { value: 'landscape', label: 'Landscape' }
|
|
203
|
-
}))
|
|
204
|
-
);
|
|
205
|
-
|
|
206
|
-
results.forEach((result, i) => {
|
|
207
|
-
if (result.success && result.response?.data) {
|
|
208
|
-
console.log(`Video ${i + 1}: ${result.response.data?.[0]?.content}`);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
## Orientation Options
|
|
214
|
-
|
|
215
|
-
| Value | Label | Aspect Ratio | Use Case |
|
|
216
|
-
|-------|-------|--------------|----------|
|
|
217
|
-
| `landscape` | Landscape | 16:9 | YouTube, presentations |
|
|
218
|
-
| `portrait` | Portrait | 9:16 | TikTok, Instagram Reels |
|
|
219
|
-
| `square` | Square | 1:1 | Instagram feed |
|
|
220
|
-
|
|
221
|
-
## Response Format
|
|
222
|
-
|
|
223
|
-
```typescript
|
|
224
|
-
interface AttachmentResult {
|
|
225
|
-
name: string;
|
|
226
|
-
contentType: 'attachment/url';
|
|
227
|
-
content: string; // URL to generated video
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
interface APIResponse<AttachmentResult[]> {
|
|
231
|
-
code: number;
|
|
232
|
-
msg?: string;
|
|
233
|
-
data?: AttachmentResult[];
|
|
234
|
-
}
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
## Error Handling
|
|
238
|
-
|
|
239
|
-
```typescript
|
|
240
|
-
const result = await client.video.sora({
|
|
241
|
-
prompt: 'A test video',
|
|
242
|
-
orientation: { value: 'landscape', label: 'Landscape' }
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
if (!result.success) {
|
|
246
|
-
console.error('Request failed');
|
|
247
|
-
console.log('Check logs:', result.logs);
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
if (result.response?.code !== 0) {
|
|
252
|
-
console.error('API error:', result.response);
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// Success
|
|
257
|
-
console.log('Success:', result.response.data);
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
## Task Folders
|
|
261
|
-
|
|
262
|
-
Each execution creates a task folder:
|
|
263
|
-
|
|
264
|
-
```typescript
|
|
265
|
-
const result = await client.video.sora({
|
|
266
|
-
prompt: 'test',
|
|
267
|
-
orientation: { value: 'landscape', label: 'Landscape' }
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
console.log('Task ID:', result.taskId);
|
|
271
|
-
console.log('Task Folder:', result.taskFolder);
|
|
272
|
-
console.log('Downloaded Videos:', result.attachments);
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
## Best Practices
|
|
276
|
-
|
|
277
|
-
1. **Detailed Prompts**: Include camera angles, lighting, and movement descriptions
|
|
278
|
-
2. **Reference Images**: Use high-quality images for image-to-video
|
|
279
|
-
3. **Orientation**: Match orientation to target platform
|
|
280
|
-
4. **Duration**: Use `soraStable` for precise duration control
|
|
281
|
-
|
|
282
|
-
## Related Skills
|
|
283
|
-
|
|
284
|
-
- [unityclaw-video-generation-veo](../unityclaw-video-generation-veo/SKILL.md) - Google Veo video generation
|
|
285
|
-
- [unityclaw-video-generation-kling](../unityclaw-video-generation-kling/SKILL.md) - Kling video generation
|
|
286
|
-
- [unityclaw-image-generation](../unityclaw-image-generation/SKILL.md) - Generate reference images
|