@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.
@@ -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