@unityclaw/skills 1.0.5 → 1.0.6
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 +0 -3
- 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-video-generation-sora/SKILL.md +0 -286
- package/unityclaw-video-generation-veo/SKILL.md +0 -275
package/README.md
CHANGED
|
@@ -90,11 +90,8 @@ npx @unityclaw/skills /unityclaw-media-analysis https://youtube.com/watch?v=...
|
|
|
90
90
|
| [unityclaw-image-compress](./unityclaw-image-compress/SKILL.md) | Compress images with quality control | 🗜️ |
|
|
91
91
|
|
|
92
92
|
### Video Skills
|
|
93
|
-
|
|
94
93
|
| Skill | Description | Emoji |
|
|
95
94
|
|-------|-------------|-------|
|
|
96
|
-
| [unityclaw-video-generation-sora](./unityclaw-video-generation-sora/SKILL.md) | Generate videos using OpenAI Sora | 🎬 |
|
|
97
|
-
| [unityclaw-video-generation-veo](./unityclaw-video-generation-veo/SKILL.md) | Generate videos using Google Veo | 🎥 |
|
|
98
95
|
| [unityclaw-video-generation-kling](./unityclaw-video-generation-kling/SKILL.md) | Generate videos using Kling AI | 📹 |
|
|
99
96
|
| [unityclaw-video-generation-other](./unityclaw-video-generation-other/SKILL.md) | Generate videos using Doubao, Wan, MiniMax, JiMeng | 🎞️ |
|
|
100
97
|
|
|
@@ -108,7 +108,7 @@ function getClaudeSkillsDir() {
|
|
|
108
108
|
}
|
|
109
109
|
function getOpenClawSkillsDir() {
|
|
110
110
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
111
|
-
return process.env.OPENCLAW_SKILLS_DIR || path.join(homeDir, ".openclaw", "skills");
|
|
111
|
+
return process.env.OPENCLAW_SKILLS_DIR || path.join(homeDir, ".openclaw", "workspace", "skills");
|
|
112
112
|
}
|
|
113
113
|
async function promptForApiKey() {
|
|
114
114
|
const rl = readline.createInterface({
|
package/dist/cli.cjs
CHANGED
|
@@ -138,7 +138,7 @@ function getClaudeSkillsDir() {
|
|
|
138
138
|
}
|
|
139
139
|
function getOpenClawSkillsDir() {
|
|
140
140
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
141
|
-
return process.env.OPENCLAW_SKILLS_DIR || import_path.default.join(homeDir, ".openclaw", "skills");
|
|
141
|
+
return process.env.OPENCLAW_SKILLS_DIR || import_path.default.join(homeDir, ".openclaw", "workspace", "skills");
|
|
142
142
|
}
|
|
143
143
|
async function promptForApiKey() {
|
|
144
144
|
const rl = readline.createInterface({
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -149,7 +149,7 @@ function getClaudeSkillsDir() {
|
|
|
149
149
|
}
|
|
150
150
|
function getOpenClawSkillsDir() {
|
|
151
151
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
152
|
-
return process.env.OPENCLAW_SKILLS_DIR || import_path.default.join(homeDir, ".openclaw", "skills");
|
|
152
|
+
return process.env.OPENCLAW_SKILLS_DIR || import_path.default.join(homeDir, ".openclaw", "workspace", "skills");
|
|
153
153
|
}
|
|
154
154
|
async function promptForApiKey() {
|
|
155
155
|
const rl = readline.createInterface({
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -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
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: unityclaw-video-generation-veo
|
|
3
|
-
description: Generate high-quality videos using Google Veo 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 - Veo
|
|
23
|
-
|
|
24
|
-
Generate high-quality videos using Google's Veo AI model with advanced control over aspect ratio, resolution, and duration.
|
|
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.veo({
|
|
75
|
-
prompt: 'A beautiful sunset over the ocean with waves crashing',
|
|
76
|
-
aspect_ratio: { value: '16:9', label: '16:9' },
|
|
77
|
-
duration: { value: '8', label: '8s' }
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// ✅ Correct: Check result.success, access data via result.response.data
|
|
81
|
-
if (result.success && result.response?.data) {
|
|
82
|
-
console.log('Generated video:', result.response.data);
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## API Reference
|
|
87
|
-
|
|
88
|
-
### veo()
|
|
89
|
-
|
|
90
|
-
Generate video using Google Veo model.
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
await client.video.veo({
|
|
94
|
-
prompt?: string | TextFieldItem[];
|
|
95
|
-
attachment?: AttachmentFieldItem[];
|
|
96
|
-
first_frame?: AttachmentFieldItem[];
|
|
97
|
-
last_frame?: AttachmentFieldItem[];
|
|
98
|
-
aspect_ratio?: LabelFieldItem | string;
|
|
99
|
-
resolution?: LabelFieldItem | string;
|
|
100
|
-
duration?: LabelFieldItem | string;
|
|
101
|
-
}): Promise<APIResponse<AttachmentResult[]>>
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Parameters
|
|
105
|
-
|
|
106
|
-
| Parameter | Type | Required | Description |
|
|
107
|
-
|-----------|------|----------|-------------|
|
|
108
|
-
| `prompt` | `string \| TextFieldItem[]` | No* | Text description (*required if no attachment) |
|
|
109
|
-
| `attachment` | `AttachmentFieldItem[]` | No* | Reference image (*required if no prompt) |
|
|
110
|
-
| `first_frame` | `AttachmentFieldItem[]` | No | Starting frame for video |
|
|
111
|
-
| `last_frame` | `AttachmentFieldItem[]` | No | Ending frame for video |
|
|
112
|
-
| `aspect_ratio` | `LabelFieldItem \| string` | No | Video aspect ratio |
|
|
113
|
-
| `resolution` | `LabelFieldItem \| string` | No | Video resolution |
|
|
114
|
-
| `duration` | `LabelFieldItem \| string` | No | Video duration in seconds |
|
|
115
|
-
|
|
116
|
-
## Examples
|
|
117
|
-
|
|
118
|
-
### Text-to-Video
|
|
119
|
-
|
|
120
|
-
```typescript
|
|
121
|
-
const client = new UnityClawClient();
|
|
122
|
-
|
|
123
|
-
const result = await client.video.veo({
|
|
124
|
-
prompt: 'A majestic eagle soaring through misty mountain peaks at sunrise',
|
|
125
|
-
aspect_ratio: { value: '16:9', label: '16:9' },
|
|
126
|
-
resolution: { value: '1080p', label: '1080p' },
|
|
127
|
-
duration: { value: '8', label: '8s' }
|
|
128
|
-
});
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Image-to-Video
|
|
132
|
-
|
|
133
|
-
```typescript
|
|
134
|
-
const result = await client.video.veo({
|
|
135
|
-
attachment: [
|
|
136
|
-
{ tmp_url: 'https://example.com/landscape.jpg', name: 'landscape.jpg' }
|
|
137
|
-
],
|
|
138
|
-
aspect_ratio: { value: '16:9', label: '16:9' },
|
|
139
|
-
duration: { value: '5', label: '5s' }
|
|
140
|
-
});
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### First/Last Frame Control
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
// Generate video with specific start and end frames
|
|
147
|
-
const result = await client.video.veo({
|
|
148
|
-
first_frame: [
|
|
149
|
-
{ tmp_url: 'https://example.com/start.jpg', name: 'start.jpg' }
|
|
150
|
-
],
|
|
151
|
-
last_frame: [
|
|
152
|
-
{ tmp_url: 'https://example.com/end.jpg', name: 'end.jpg' }
|
|
153
|
-
],
|
|
154
|
-
prompt: 'Smooth transition between the two scenes',
|
|
155
|
-
duration: { value: '8', label: '8s' }
|
|
156
|
-
});
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### High Resolution Video
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
const result = await client.video.veo({
|
|
163
|
-
prompt: 'A cinematic shot of a luxury car driving through a city at night',
|
|
164
|
-
aspect_ratio: { value: '16:9', label: '16:9' },
|
|
165
|
-
resolution: { value: '4K', label: '4K' },
|
|
166
|
-
duration: { value: '10', label: '10s' }
|
|
167
|
-
});
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### Portrait Video
|
|
171
|
-
|
|
172
|
-
```typescript
|
|
173
|
-
const result = await client.video.veo({
|
|
174
|
-
prompt: 'A model walking down a fashion runway with dramatic lighting',
|
|
175
|
-
aspect_ratio: { value: '9:16', label: '9:16' },
|
|
176
|
-
duration: { value: '5', label: '5s' }
|
|
177
|
-
});
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Simple String Parameters
|
|
181
|
-
|
|
182
|
-
```typescript
|
|
183
|
-
// You can also use simple strings instead of LabelFieldItem
|
|
184
|
-
const result = await client.video.veo({
|
|
185
|
-
prompt: 'A peaceful garden scene',
|
|
186
|
-
aspect_ratio: '16:9',
|
|
187
|
-
resolution: '1080p',
|
|
188
|
-
duration: '8'
|
|
189
|
-
});
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## Aspect Ratio Options
|
|
193
|
-
|
|
194
|
-
| Value | Use Case |
|
|
195
|
-
|-------|----------|
|
|
196
|
-
| `16:9` | Standard landscape (YouTube, presentations) |
|
|
197
|
-
| `9:16` | Portrait (TikTok, Instagram Reels) |
|
|
198
|
-
| `1:1` | Square (Instagram feed) |
|
|
199
|
-
|
|
200
|
-
## Duration Options
|
|
201
|
-
|
|
202
|
-
| Value | Description |
|
|
203
|
-
|-------|-------------|
|
|
204
|
-
| `5` | 5 seconds |
|
|
205
|
-
| `8` | 8 seconds (default) |
|
|
206
|
-
| `10` | 10 seconds |
|
|
207
|
-
|
|
208
|
-
## Resolution Options
|
|
209
|
-
|
|
210
|
-
| Value | Description |
|
|
211
|
-
|-------|-------------|
|
|
212
|
-
| `720p` | HD quality |
|
|
213
|
-
| `1080p` | Full HD |
|
|
214
|
-
| `4K` | Ultra HD |
|
|
215
|
-
|
|
216
|
-
## Response Format
|
|
217
|
-
|
|
218
|
-
```typescript
|
|
219
|
-
interface AttachmentResult {
|
|
220
|
-
name: string;
|
|
221
|
-
contentType: 'attachment/url';
|
|
222
|
-
content: string; // URL to generated video
|
|
223
|
-
}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
## Error Handling
|
|
227
|
-
|
|
228
|
-
```typescript
|
|
229
|
-
const result = await client.video.veo({
|
|
230
|
-
prompt: 'A test video',
|
|
231
|
-
aspect_ratio: '16:9'
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
if (!result.success) {
|
|
235
|
-
console.error('Request failed');
|
|
236
|
-
console.log('Check logs:', result.logs);
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
if (result.response?.code !== 0) {
|
|
241
|
-
console.error('API error:', result.response);
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// Success
|
|
246
|
-
console.log('Success:', result.response.data);
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## Task Folders
|
|
250
|
-
|
|
251
|
-
Each execution creates a task folder:
|
|
252
|
-
|
|
253
|
-
```typescript
|
|
254
|
-
const result = await client.video.veo({
|
|
255
|
-
prompt: 'test',
|
|
256
|
-
aspect_ratio: '16:9'
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
console.log('Task ID:', result.taskId);
|
|
260
|
-
console.log('Task Folder:', result.taskFolder);
|
|
261
|
-
console.log('Downloaded Videos:', result.attachments);
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
## Best Practices
|
|
265
|
-
|
|
266
|
-
1. **First/Last Frame**: Use for precise control over video start/end
|
|
267
|
-
2. **Resolution**: Match to your output requirements
|
|
268
|
-
3. **Duration**: Shorter videos generate faster
|
|
269
|
-
4. **Prompts**: Be specific about camera movement and style
|
|
270
|
-
|
|
271
|
-
## Related Skills
|
|
272
|
-
|
|
273
|
-
- [unityclaw-video-generation-sora](../unityclaw-video-generation-sora/SKILL.md) - OpenAI Sora video generation
|
|
274
|
-
- [unityclaw-video-generation-kling](../unityclaw-video-generation-kling/SKILL.md) - Kling video generation
|
|
275
|
-
- [unityclaw-image-generation](../unityclaw-image-generation/SKILL.md) - Generate reference images
|