@aigne/aigne-hub 0.10.5-beta.1 → 0.10.5-beta.2

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 CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.10.5-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/aigne-hub-v0.10.5-beta.1...aigne-hub-v0.10.5-beta.2) (2025-11-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **cli:** optimize app startup by restructuring CLI application loading ([#698](https://github.com/AIGNE-io/aigne-framework/issues/698)) ([20c5059](https://github.com/AIGNE-io/aigne-framework/commit/20c50591bbd9a958b29409eca3ede5e341db2b7d))
9
+ * **docs:** update video mode docs ([#695](https://github.com/AIGNE-io/aigne-framework/issues/695)) ([d691001](https://github.com/AIGNE-io/aigne-framework/commit/d69100169457c16c14f2f3e2f7fcd6b2a99330f3))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @aigne/anthropic bumped to 0.14.5-beta.2
17
+ * @aigne/bedrock bumped to 0.10.10-beta.2
18
+ * @aigne/core bumped to 1.65.1-beta.2
19
+ * @aigne/deepseek bumped to 0.7.51-beta.2
20
+ * @aigne/doubao bumped to 1.1.5-beta.2
21
+ * @aigne/gemini bumped to 0.14.5-beta.2
22
+ * @aigne/ideogram bumped to 0.4.5-beta.2
23
+ * @aigne/ollama bumped to 0.7.51-beta.2
24
+ * @aigne/open-router bumped to 0.7.51-beta.2
25
+ * @aigne/openai bumped to 0.16.5-beta.2
26
+ * @aigne/poe bumped to 1.0.31-beta.2
27
+ * @aigne/transport bumped to 0.15.14-beta.2
28
+ * @aigne/xai bumped to 0.7.51-beta.2
29
+ * devDependencies
30
+ * @aigne/test-utils bumped to 0.5.58-beta.2
31
+
3
32
  ## [0.10.5-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/aigne-hub-v0.10.5-beta...aigne-hub-v0.10.5-beta.1) (2025-11-04)
4
33
 
5
34
 
package/README.md CHANGED
@@ -228,6 +228,110 @@ console.log(result);
228
228
 
229
229
  **Reference:** [Ideogram API Documentation](https://developer.ideogram.ai/api-reference/api-reference/generate-v3)
230
230
 
231
+ ## Video Generation
232
+
233
+ AIGNE Hub supports AI-powered video generation models from multiple providers. Here are examples for each supported platform:
234
+
235
+ ### OpenAI Sora Model
236
+
237
+ ```typescript
238
+ import { AIGNEHubVideoModel } from "@aigne/aigne-hub";
239
+
240
+ const model = new AIGNEHubVideoModel({
241
+ baseUrl: "https://your-aigne-hub-instance/ai-kit",
242
+ apiKey: "your-access-key-secret",
243
+ model: "openai/sora-2",
244
+ });
245
+
246
+ const result = await model.invoke({
247
+ prompt: "A serene beach scene with gentle waves at sunset",
248
+ size: "1280x720",
249
+ seconds: "8",
250
+ outputFileType: "url",
251
+ });
252
+
253
+ console.log(result);
254
+ /* Example Output:
255
+ {
256
+ videos: [{ url: "https://...", type: "url" }],
257
+ usage: {
258
+ inputTokens: 0,
259
+ outputTokens: 0,
260
+ aigneHubCredits: 200
261
+ },
262
+ model: "openai/sora-2",
263
+ seconds: 8
264
+ }
265
+ */
266
+ ```
267
+
268
+ **Available Parameters:**
269
+ - `prompt` (required): Text description of the video to generate
270
+ - `model`: Video model - `"openai/sora-2"` (standard) or `"openai/sora-2-pro"` (higher quality)
271
+ - `size`: Video resolution - `"720x1280"` (9:16 vertical), `"1280x720"` (16:9 horizontal), `"1024x1792"` (9:16 higher), `"1792x1024"` (16:9 higher)
272
+ - `seconds`: Video duration - `"4"`, `"8"`, or `"12"` seconds
273
+ - `image`: Optional input image for image-to-video generation
274
+ - `outputFileType`: Output format - `"url"`, `"file"`, or `"base64"`
275
+
276
+ **Reference:** [OpenAI Video API Documentation](https://platform.openai.com/docs/api-reference/videos)
277
+
278
+ ### Google Gemini Veo Model
279
+
280
+ ```typescript
281
+ import { AIGNEHubVideoModel } from "@aigne/aigne-hub";
282
+
283
+ const model = new AIGNEHubVideoModel({
284
+ baseUrl: "https://your-aigne-hub-instance/ai-kit",
285
+ apiKey: "your-access-key-secret",
286
+ model: "google/veo-3.1-generate-preview",
287
+ });
288
+
289
+ const result = await model.invoke({
290
+ prompt: "A majestic eagle soaring through mountain valleys",
291
+ aspectRatio: "16:9",
292
+ size: "1080p",
293
+ seconds: "6",
294
+ negativePrompt: "blur, low quality",
295
+ personGeneration: "allow_adult",
296
+ outputFileType: "url",
297
+ });
298
+
299
+ console.log(result);
300
+ /* Example Output:
301
+ {
302
+ videos: [{ url: "https://...", type: "url" }],
303
+ usage: {
304
+ inputTokens: 0,
305
+ outputTokens: 0,
306
+ aigneHubCredits: 150
307
+ },
308
+ model: "google/veo-3.1-generate-preview",
309
+ seconds: 6
310
+ }
311
+ */
312
+ ```
313
+
314
+ **Available Parameters:**
315
+ - `prompt` (required): Text description of the video to generate
316
+ - `model`: Video model - `"google/veo-3.1-generate-preview"` (latest), `"google/veo-3-generate"`, or `"google/veo-2-generate"`
317
+ - `aspectRatio`: Video aspect ratio - `"16:9"` (default, horizontal) or `"9:16"` (vertical)
318
+ - `size`: Video resolution - `"720p"` (default) or `"1080p"` (note: 1080p only supports 8 seconds for Veo 3.1)
319
+ - `seconds`: Video duration - `"4"`, `"6"`, or `"8"` seconds
320
+ - `negativePrompt`: Text describing content to avoid in the video
321
+ - `personGeneration`: Control person generation - `"allow_adult"` (text-to-video), `"allow_all"` (image-to-video for Veo 3.1)
322
+ - `image`: Optional input image for image-to-video generation
323
+ - `lastFrame`: Optional last frame for frame interpolation (Veo 3.1)
324
+ - `referenceImages`: Optional reference images array (only supported in Veo 3.1)
325
+ - `outputFileType`: Output format - `"url"`, `"file"`, or `"base64"`
326
+
327
+ **Reference:** [Google Gemini Video API Documentation](https://ai.google.dev/api/generate-videos)
328
+
329
+ ### General Notes
330
+
331
+ Video generation may take longer than image or text generation. The `outputFileType` parameter determines how the generated video is returned:
332
+ - `url`: Returns a URL to the generated video (recommended for web applications)
333
+ - `file`: Returns the video file data directly
334
+ - `base64`: Returns base64-encoded video data
231
335
 
232
336
  ## Streaming Usage
233
337
 
@@ -194,7 +194,7 @@ function findVideoModel(provider) {
194
194
  }
195
195
  const parseModel = (model) => {
196
196
  // replace first ':' with '/' to compatible with `provider:model-name` format
197
- model = model.replace(/^(\w+)(:)/, "$1/");
197
+ model = model.replace(/^([\w-]+)(:)/, "$1/");
198
198
  const { provider, name } = model.match(/(?<provider>[^/]*)(\/(?<name>.*))?/)?.groups ?? {};
199
199
  return { provider: provider?.replace(/-/g, ""), model: name };
200
200
  };
@@ -185,7 +185,7 @@ export function findVideoModel(provider) {
185
185
  }
186
186
  export const parseModel = (model) => {
187
187
  // replace first ':' with '/' to compatible with `provider:model-name` format
188
- model = model.replace(/^(\w+)(:)/, "$1/");
188
+ model = model.replace(/^([\w-]+)(:)/, "$1/");
189
189
  const { provider, name } = model.match(/(?<provider>[^/]*)(\/(?<name>.*))?/)?.groups ?? {};
190
190
  return { provider: provider?.replace(/-/g, ""), model: name };
191
191
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/aigne-hub",
3
- "version": "0.10.5-beta.1",
3
+ "version": "0.10.5-beta.2",
4
4
  "description": "AIGNE Hub SDK for integrating with Hub AI models",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -39,20 +39,20 @@
39
39
  "https-proxy-agent": "^7.0.6",
40
40
  "ufo": "^1.6.1",
41
41
  "zod": "^3.25.67",
42
- "@aigne/anthropic": "^0.14.5-beta.1",
43
- "@aigne/bedrock": "^0.10.10-beta.1",
44
- "@aigne/core": "^1.65.1-beta.1",
45
- "@aigne/deepseek": "^0.7.51-beta.1",
46
- "@aigne/doubao": "^1.1.5-beta.1",
47
- "@aigne/gemini": "^0.14.5-beta.1",
48
- "@aigne/ideogram": "^0.4.5-beta.1",
49
- "@aigne/open-router": "^0.7.51-beta.1",
50
- "@aigne/ollama": "^0.7.51-beta.1",
51
- "@aigne/openai": "^0.16.5-beta.1",
42
+ "@aigne/anthropic": "^0.14.5-beta.2",
43
+ "@aigne/bedrock": "^0.10.10-beta.2",
44
+ "@aigne/deepseek": "^0.7.51-beta.2",
45
+ "@aigne/core": "^1.65.1-beta.2",
46
+ "@aigne/doubao": "^1.1.5-beta.2",
47
+ "@aigne/gemini": "^0.14.5-beta.2",
48
+ "@aigne/ollama": "^0.7.51-beta.2",
49
+ "@aigne/ideogram": "^0.4.5-beta.2",
50
+ "@aigne/openai": "^0.16.5-beta.2",
51
+ "@aigne/open-router": "^0.7.51-beta.2",
52
52
  "@aigne/platform-helpers": "^0.6.3",
53
- "@aigne/poe": "^1.0.31-beta.1",
54
- "@aigne/transport": "^0.15.14-beta.1",
55
- "@aigne/xai": "^0.7.51-beta.1"
53
+ "@aigne/transport": "^0.15.14-beta.2",
54
+ "@aigne/xai": "^0.7.51-beta.2",
55
+ "@aigne/poe": "^1.0.31-beta.2"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/bun": "^1.2.22",
@@ -61,7 +61,7 @@
61
61
  "npm-run-all": "^4.1.5",
62
62
  "rimraf": "^6.0.1",
63
63
  "typescript": "^5.9.2",
64
- "@aigne/test-utils": "^0.5.58-beta.1"
64
+ "@aigne/test-utils": "^0.5.58-beta.2"
65
65
  },
66
66
  "scripts": {
67
67
  "lint": "tsc --noEmit",