egaki 0.4.1 → 0.6.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/CHANGELOG.md +71 -0
- package/README.md +107 -3
- package/dist/cli.js +540 -130
- package/dist/credentials.d.ts +11 -2
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +68 -5
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +45 -4
- package/dist/model-catalog.d.ts +96 -3
- package/dist/model-catalog.d.ts.map +1 -1
- package/dist/model-catalog.js +427 -3
- package/dist/models.d.ts +4 -4
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +162 -96
- package/dist/video-model-catalog.d.ts +1 -51
- package/dist/video-model-catalog.d.ts.map +1 -1
- package/dist/video-model-catalog.js +5 -306
- package/dist/xai-auth.d.ts +29 -0
- package/dist/xai-auth.d.ts.map +1 -0
- package/dist/xai-auth.js +325 -0
- package/package.json +5 -4
- package/skills/egaki/SKILL.md +10 -1
- package/src/cli.ts +712 -139
- package/src/credentials.ts +70 -7
- package/src/login.ts +48 -3
- package/src/model-catalog.ts +537 -7
- package/src/models.ts +239 -119
- package/src/video-model-catalog.ts +14 -363
- package/src/xai-auth.ts +396 -0
|
@@ -1,363 +1,14 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type PerVideoSecondCost = {
|
|
17
|
-
type: 'per-video-second'
|
|
18
|
-
/** Fallback duration when request does not specify one (seconds) */
|
|
19
|
-
defaultDurationSec: number
|
|
20
|
-
tiers: VideoDurationPricingTier[]
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type UnknownVideoCost = {
|
|
24
|
-
type: 'unknown'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type VideoModelCost = PerVideoSecondCost | UnknownVideoCost
|
|
28
|
-
|
|
29
|
-
export type VideoModelFeatures = {
|
|
30
|
-
/** Supports text prompt to video generation */
|
|
31
|
-
textToVideo: boolean
|
|
32
|
-
/** Supports image-to-video prompt object ({ image, text }) */
|
|
33
|
-
imageToVideo: boolean
|
|
34
|
-
/** Optional capabilities exposed by provider */
|
|
35
|
-
capabilities: Array<'t2v' | 'i2v' | 'r2v' | 'motion-control' | 'editing'>
|
|
36
|
-
/** Optional supported aspect ratios */
|
|
37
|
-
aspectRatios?: string[]
|
|
38
|
-
/** Optional supported resolutions */
|
|
39
|
-
resolutions?: string[]
|
|
40
|
-
/** Optional duration range in seconds */
|
|
41
|
-
durationRangeSec?: { min: number; max: number }
|
|
42
|
-
seed: boolean
|
|
43
|
-
multipleVideos: boolean
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type VideoModelEntry = {
|
|
47
|
-
id: string
|
|
48
|
-
name: string
|
|
49
|
-
description?: string
|
|
50
|
-
provider: string
|
|
51
|
-
strategy: 'video'
|
|
52
|
-
released: string
|
|
53
|
-
cost: VideoModelCost
|
|
54
|
-
features: VideoModelFeatures
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const commonRatios = ['16:9', '9:16', '1:1', '4:3', '3:4']
|
|
58
|
-
|
|
59
|
-
export const VIDEO_CATALOG: VideoModelEntry[] = [
|
|
60
|
-
{
|
|
61
|
-
id: 'veo-3.1-generate-001',
|
|
62
|
-
name: 'Veo 3.1',
|
|
63
|
-
provider: 'google',
|
|
64
|
-
strategy: 'video',
|
|
65
|
-
released: '2026-01',
|
|
66
|
-
cost: {
|
|
67
|
-
type: 'per-video-second',
|
|
68
|
-
defaultDurationSec: 8,
|
|
69
|
-
tiers: [
|
|
70
|
-
{ resolution: '720p', audio: false, costPerSecond: 0.2 },
|
|
71
|
-
{ resolution: '720p', audio: true, costPerSecond: 0.4 },
|
|
72
|
-
{ resolution: '1080p', audio: false, costPerSecond: 0.2 },
|
|
73
|
-
{ resolution: '1080p', audio: true, costPerSecond: 0.4 },
|
|
74
|
-
{ resolution: '4k', audio: false, costPerSecond: 0.4 },
|
|
75
|
-
{ resolution: '4k', audio: true, costPerSecond: 0.6 },
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
features: {
|
|
79
|
-
textToVideo: true,
|
|
80
|
-
imageToVideo: false,
|
|
81
|
-
capabilities: ['t2v'],
|
|
82
|
-
aspectRatios: ['16:9', '9:16'],
|
|
83
|
-
resolutions: ['720p', '1080p', '4k'],
|
|
84
|
-
durationRangeSec: { min: 4, max: 8 },
|
|
85
|
-
seed: true,
|
|
86
|
-
multipleVideos: true,
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: 'veo-3.1-fast-generate-001',
|
|
91
|
-
name: 'Veo 3.1 Fast',
|
|
92
|
-
provider: 'google',
|
|
93
|
-
strategy: 'video',
|
|
94
|
-
released: '2026-01',
|
|
95
|
-
cost: {
|
|
96
|
-
type: 'per-video-second',
|
|
97
|
-
defaultDurationSec: 8,
|
|
98
|
-
tiers: [
|
|
99
|
-
{ resolution: '720p', audio: false, costPerSecond: 0.1 },
|
|
100
|
-
{ resolution: '720p', audio: true, costPerSecond: 0.15 },
|
|
101
|
-
{ resolution: '1080p', audio: false, costPerSecond: 0.1 },
|
|
102
|
-
{ resolution: '1080p', audio: true, costPerSecond: 0.15 },
|
|
103
|
-
{ resolution: '4k', audio: false, costPerSecond: 0.3 },
|
|
104
|
-
{ resolution: '4k', audio: true, costPerSecond: 0.35 },
|
|
105
|
-
],
|
|
106
|
-
},
|
|
107
|
-
features: {
|
|
108
|
-
textToVideo: true,
|
|
109
|
-
imageToVideo: false,
|
|
110
|
-
capabilities: ['t2v'],
|
|
111
|
-
aspectRatios: ['16:9', '9:16'],
|
|
112
|
-
resolutions: ['720p', '1080p', '4k'],
|
|
113
|
-
durationRangeSec: { min: 4, max: 8 },
|
|
114
|
-
seed: true,
|
|
115
|
-
multipleVideos: true,
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 'veo-3.0-generate-001',
|
|
120
|
-
name: 'Veo 3.0',
|
|
121
|
-
provider: 'google',
|
|
122
|
-
strategy: 'video',
|
|
123
|
-
released: '2025-12',
|
|
124
|
-
cost: {
|
|
125
|
-
type: 'per-video-second',
|
|
126
|
-
defaultDurationSec: 8,
|
|
127
|
-
tiers: [
|
|
128
|
-
{ resolution: '720p', audio: false, costPerSecond: 0.2 },
|
|
129
|
-
{ resolution: '720p', audio: true, costPerSecond: 0.4 },
|
|
130
|
-
{ resolution: '1080p', audio: false, costPerSecond: 0.2 },
|
|
131
|
-
{ resolution: '1080p', audio: true, costPerSecond: 0.4 },
|
|
132
|
-
],
|
|
133
|
-
},
|
|
134
|
-
features: {
|
|
135
|
-
textToVideo: true,
|
|
136
|
-
imageToVideo: false,
|
|
137
|
-
capabilities: ['t2v'],
|
|
138
|
-
aspectRatios: ['16:9', '9:16'],
|
|
139
|
-
resolutions: ['720p', '1080p'],
|
|
140
|
-
durationRangeSec: { min: 4, max: 8 },
|
|
141
|
-
seed: true,
|
|
142
|
-
multipleVideos: true,
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: 'veo-3.0-fast-generate-001',
|
|
147
|
-
name: 'Veo 3.0 Fast',
|
|
148
|
-
provider: 'google',
|
|
149
|
-
strategy: 'video',
|
|
150
|
-
released: '2025-12',
|
|
151
|
-
cost: {
|
|
152
|
-
type: 'per-video-second',
|
|
153
|
-
defaultDurationSec: 8,
|
|
154
|
-
tiers: [
|
|
155
|
-
{ resolution: '720p', audio: false, costPerSecond: 0.1 },
|
|
156
|
-
{ resolution: '720p', audio: true, costPerSecond: 0.15 },
|
|
157
|
-
{ resolution: '1080p', audio: false, costPerSecond: 0.1 },
|
|
158
|
-
{ resolution: '1080p', audio: true, costPerSecond: 0.15 },
|
|
159
|
-
],
|
|
160
|
-
},
|
|
161
|
-
features: {
|
|
162
|
-
textToVideo: true,
|
|
163
|
-
imageToVideo: false,
|
|
164
|
-
capabilities: ['t2v'],
|
|
165
|
-
aspectRatios: ['16:9', '9:16'],
|
|
166
|
-
resolutions: ['720p', '1080p'],
|
|
167
|
-
durationRangeSec: { min: 4, max: 8 },
|
|
168
|
-
seed: true,
|
|
169
|
-
multipleVideos: true,
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
// ── Vertex: Veo ──────────────────────────────────────────────────────
|
|
173
|
-
// Same Veo models routed through Vertex AI / Google Cloud billing.
|
|
174
|
-
// Use `egaki login --provider vertex --key <key>` to configure.
|
|
175
|
-
{
|
|
176
|
-
id: 'vertex/veo-3.1-generate-001',
|
|
177
|
-
name: 'Veo 3.1 (Vertex)',
|
|
178
|
-
provider: 'vertex',
|
|
179
|
-
strategy: 'video',
|
|
180
|
-
released: '2026-01',
|
|
181
|
-
cost: {
|
|
182
|
-
type: 'per-video-second',
|
|
183
|
-
defaultDurationSec: 8,
|
|
184
|
-
tiers: [
|
|
185
|
-
{ resolution: '720p', audio: false, costPerSecond: 0.2 },
|
|
186
|
-
{ resolution: '720p', audio: true, costPerSecond: 0.4 },
|
|
187
|
-
{ resolution: '1080p', audio: false, costPerSecond: 0.2 },
|
|
188
|
-
{ resolution: '1080p', audio: true, costPerSecond: 0.4 },
|
|
189
|
-
{ resolution: '4k', audio: false, costPerSecond: 0.4 },
|
|
190
|
-
{ resolution: '4k', audio: true, costPerSecond: 0.6 },
|
|
191
|
-
],
|
|
192
|
-
},
|
|
193
|
-
features: {
|
|
194
|
-
textToVideo: true,
|
|
195
|
-
imageToVideo: false,
|
|
196
|
-
capabilities: ['t2v'],
|
|
197
|
-
aspectRatios: ['16:9', '9:16'],
|
|
198
|
-
resolutions: ['720p', '1080p', '4k'],
|
|
199
|
-
durationRangeSec: { min: 4, max: 8 },
|
|
200
|
-
seed: true,
|
|
201
|
-
multipleVideos: true,
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
id: 'vertex/veo-3.1-fast-generate-001',
|
|
206
|
-
name: 'Veo 3.1 Fast (Vertex)',
|
|
207
|
-
provider: 'vertex',
|
|
208
|
-
strategy: 'video',
|
|
209
|
-
released: '2026-01',
|
|
210
|
-
cost: {
|
|
211
|
-
type: 'per-video-second',
|
|
212
|
-
defaultDurationSec: 8,
|
|
213
|
-
tiers: [
|
|
214
|
-
{ resolution: '720p', audio: false, costPerSecond: 0.1 },
|
|
215
|
-
{ resolution: '720p', audio: true, costPerSecond: 0.15 },
|
|
216
|
-
{ resolution: '1080p', audio: false, costPerSecond: 0.1 },
|
|
217
|
-
{ resolution: '1080p', audio: true, costPerSecond: 0.15 },
|
|
218
|
-
{ resolution: '4k', audio: false, costPerSecond: 0.3 },
|
|
219
|
-
{ resolution: '4k', audio: true, costPerSecond: 0.35 },
|
|
220
|
-
],
|
|
221
|
-
},
|
|
222
|
-
features: {
|
|
223
|
-
textToVideo: true,
|
|
224
|
-
imageToVideo: false,
|
|
225
|
-
capabilities: ['t2v'],
|
|
226
|
-
aspectRatios: ['16:9', '9:16'],
|
|
227
|
-
resolutions: ['720p', '1080p', '4k'],
|
|
228
|
-
durationRangeSec: { min: 4, max: 8 },
|
|
229
|
-
seed: true,
|
|
230
|
-
multipleVideos: true,
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
id: 'grok-imagine-video',
|
|
235
|
-
name: 'Grok Imagine Video',
|
|
236
|
-
provider: 'xai',
|
|
237
|
-
strategy: 'video',
|
|
238
|
-
released: '2026-03',
|
|
239
|
-
cost: {
|
|
240
|
-
type: 'per-video-second',
|
|
241
|
-
defaultDurationSec: 5,
|
|
242
|
-
tiers: [
|
|
243
|
-
{ resolution: '480p', costPerSecond: 0.05 },
|
|
244
|
-
{ resolution: '720p', costPerSecond: 0.07 },
|
|
245
|
-
],
|
|
246
|
-
},
|
|
247
|
-
features: {
|
|
248
|
-
textToVideo: true,
|
|
249
|
-
imageToVideo: true,
|
|
250
|
-
capabilities: ['t2v', 'i2v', 'editing'],
|
|
251
|
-
aspectRatios: ['1:1', '16:9', '9:16', '4:3', '3:4', '3:2', '2:3'],
|
|
252
|
-
resolutions: ['480p', '720p'],
|
|
253
|
-
durationRangeSec: { min: 1, max: 15 },
|
|
254
|
-
seed: false,
|
|
255
|
-
multipleVideos: false,
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
id: 'kling-v2.6-t2v',
|
|
260
|
-
name: 'Kling v2.6 T2V',
|
|
261
|
-
provider: 'klingai',
|
|
262
|
-
strategy: 'video',
|
|
263
|
-
released: '2025-12',
|
|
264
|
-
cost: {
|
|
265
|
-
type: 'per-video-second',
|
|
266
|
-
defaultDurationSec: 5,
|
|
267
|
-
tiers: [
|
|
268
|
-
{ mode: 'std', costPerSecond: 0.042 },
|
|
269
|
-
{ mode: 'pro', audio: false, costPerSecond: 0.07 },
|
|
270
|
-
{ mode: 'pro', audio: true, costPerSecond: 0.14 },
|
|
271
|
-
],
|
|
272
|
-
},
|
|
273
|
-
features: {
|
|
274
|
-
textToVideo: true,
|
|
275
|
-
imageToVideo: false,
|
|
276
|
-
capabilities: ['t2v'],
|
|
277
|
-
aspectRatios: commonRatios,
|
|
278
|
-
durationRangeSec: { min: 5, max: 10 },
|
|
279
|
-
seed: false,
|
|
280
|
-
multipleVideos: false,
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
id: 'wan-v2.6-t2v',
|
|
285
|
-
name: 'Wan v2.6 T2V',
|
|
286
|
-
provider: 'alibaba',
|
|
287
|
-
strategy: 'video',
|
|
288
|
-
released: '2026-01',
|
|
289
|
-
cost: {
|
|
290
|
-
type: 'per-video-second',
|
|
291
|
-
defaultDurationSec: 5,
|
|
292
|
-
tiers: [
|
|
293
|
-
{ resolution: '720p', costPerSecond: 0.1 },
|
|
294
|
-
{ resolution: '1080p', costPerSecond: 0.15 },
|
|
295
|
-
],
|
|
296
|
-
},
|
|
297
|
-
features: {
|
|
298
|
-
textToVideo: true,
|
|
299
|
-
imageToVideo: false,
|
|
300
|
-
capabilities: ['t2v'],
|
|
301
|
-
resolutions: ['720p', '1080p'],
|
|
302
|
-
durationRangeSec: { min: 2, max: 15 },
|
|
303
|
-
seed: false,
|
|
304
|
-
multipleVideos: false,
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
|
|
308
|
-
// Fal direct BYOK models — duration pricing depends on Fal endpoint/config.
|
|
309
|
-
{
|
|
310
|
-
id: 'luma-ray-2',
|
|
311
|
-
name: 'Luma Ray 2 (Fal)',
|
|
312
|
-
provider: 'fal',
|
|
313
|
-
strategy: 'video',
|
|
314
|
-
released: '2025-11',
|
|
315
|
-
cost: { type: 'unknown' },
|
|
316
|
-
features: {
|
|
317
|
-
textToVideo: true,
|
|
318
|
-
imageToVideo: true,
|
|
319
|
-
capabilities: ['t2v', 'i2v'],
|
|
320
|
-
aspectRatios: commonRatios,
|
|
321
|
-
seed: true,
|
|
322
|
-
multipleVideos: false,
|
|
323
|
-
},
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
id: 'minimax-video',
|
|
327
|
-
name: 'MiniMax Video (Fal)',
|
|
328
|
-
provider: 'fal',
|
|
329
|
-
strategy: 'video',
|
|
330
|
-
released: '2025-10',
|
|
331
|
-
cost: { type: 'unknown' },
|
|
332
|
-
features: {
|
|
333
|
-
textToVideo: true,
|
|
334
|
-
imageToVideo: false,
|
|
335
|
-
capabilities: ['t2v'],
|
|
336
|
-
aspectRatios: commonRatios,
|
|
337
|
-
seed: false,
|
|
338
|
-
multipleVideos: false,
|
|
339
|
-
},
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
id: 'hunyuan-video',
|
|
343
|
-
name: 'Hunyuan Video (Fal)',
|
|
344
|
-
provider: 'fal',
|
|
345
|
-
strategy: 'video',
|
|
346
|
-
released: '2025-09',
|
|
347
|
-
cost: { type: 'unknown' },
|
|
348
|
-
features: {
|
|
349
|
-
textToVideo: true,
|
|
350
|
-
imageToVideo: true,
|
|
351
|
-
capabilities: ['t2v', 'i2v'],
|
|
352
|
-
aspectRatios: commonRatios,
|
|
353
|
-
seed: true,
|
|
354
|
-
multipleVideos: false,
|
|
355
|
-
},
|
|
356
|
-
},
|
|
357
|
-
]
|
|
358
|
-
|
|
359
|
-
const videoCatalogIndex = new Map(VIDEO_CATALOG.map((m) => [m.id, m]))
|
|
360
|
-
|
|
361
|
-
export function findVideoModel(id: string): VideoModelEntry | undefined {
|
|
362
|
-
return videoCatalogIndex.get(id)
|
|
363
|
-
}
|
|
1
|
+
// Re-exports from the unified model catalog.
|
|
2
|
+
// video-model-catalog.ts used to be a separate file. All video model data now
|
|
3
|
+
// lives in model-catalog.ts alongside image models. This file exists only so
|
|
4
|
+
// existing imports (gateway/src/plans.ts, etc.) keep working without changes.
|
|
5
|
+
export {
|
|
6
|
+
VIDEO_CATALOG,
|
|
7
|
+
findVideoModel,
|
|
8
|
+
type VideoModelEntry,
|
|
9
|
+
type VideoModelFeatures,
|
|
10
|
+
type VideoModelCost,
|
|
11
|
+
type PerVideoSecondCost,
|
|
12
|
+
type UnknownCost as UnknownVideoCost,
|
|
13
|
+
type VideoDurationPricingTier,
|
|
14
|
+
} from './model-catalog.js'
|