@blockrun/llm 2.2.0 → 2.3.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/README.md +11 -0
- package/dist/index.cjs +6 -0
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -381,6 +381,17 @@ console.log(result.data[0].duration_seconds); // 8
|
|
|
381
381
|
const r2 = await client.generate('the subject turns and smiles', {
|
|
382
382
|
imageUrl: 'https://example.com/portrait.jpg',
|
|
383
383
|
});
|
|
384
|
+
|
|
385
|
+
// Token360 / Seedance options (silently ignored by xAI Grok video)
|
|
386
|
+
const r3 = await client.generate('aerial drone shot over a snowy mountain', {
|
|
387
|
+
model: 'bytedance/seedance-2.0-fast',
|
|
388
|
+
aspectRatio: '21:9',
|
|
389
|
+
resolution: '1080p',
|
|
390
|
+
generateAudio: true, // omit to use the model's default
|
|
391
|
+
seed: 42,
|
|
392
|
+
watermark: false,
|
|
393
|
+
returnLastFrame: true, // useful for clip chaining
|
|
394
|
+
});
|
|
384
395
|
```
|
|
385
396
|
|
|
386
397
|
### Voice Calls
|
package/dist/index.cjs
CHANGED
|
@@ -2413,6 +2413,12 @@ var VideoClient = class {
|
|
|
2413
2413
|
};
|
|
2414
2414
|
if (options?.imageUrl) body.image_url = options.imageUrl;
|
|
2415
2415
|
if (options?.durationSeconds !== void 0) body.duration_seconds = options.durationSeconds;
|
|
2416
|
+
if (options?.aspectRatio) body.aspect_ratio = options.aspectRatio;
|
|
2417
|
+
if (options?.resolution) body.resolution = options.resolution;
|
|
2418
|
+
if (options?.generateAudio !== void 0) body.generate_audio = options.generateAudio;
|
|
2419
|
+
if (options?.seed !== void 0) body.seed = options.seed;
|
|
2420
|
+
if (options?.watermark !== void 0) body.watermark = options.watermark;
|
|
2421
|
+
if (options?.returnLastFrame) body.return_last_frame = true;
|
|
2416
2422
|
const budgetMs = options?.budgetMs ?? DEFAULT_GENERATE_BUDGET_MS;
|
|
2417
2423
|
return this.submitAndPoll(body, budgetMs);
|
|
2418
2424
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -496,6 +496,24 @@ interface VideoGenerateOptions {
|
|
|
496
496
|
imageUrl?: string;
|
|
497
497
|
/** Duration to bill for (defaults to model's default duration) */
|
|
498
498
|
durationSeconds?: number;
|
|
499
|
+
/** Output aspect ratio. Token360 / Seedance only — silently ignored by xAI Grok. */
|
|
500
|
+
aspectRatio?: "adaptive" | "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "9:21";
|
|
501
|
+
/** Output resolution. Token360 / Seedance only. */
|
|
502
|
+
resolution?: "360p" | "480p" | "540p" | "720p" | "1080p" | "1K" | "2K" | "4K";
|
|
503
|
+
/**
|
|
504
|
+
* Whether the model should produce an audio track. Token360 / Seedance only.
|
|
505
|
+
* When omitted, the gateway does not send the flag — Token360 then applies
|
|
506
|
+
* its own upstream default (typically off, occasionally on depending on
|
|
507
|
+
* model variant / prompt). Audio generation is usually a paid surcharge,
|
|
508
|
+
* so callers should expose this as a visible toggle to their users.
|
|
509
|
+
*/
|
|
510
|
+
generateAudio?: boolean;
|
|
511
|
+
/** Reproducibility seed when supported by the model. */
|
|
512
|
+
seed?: number;
|
|
513
|
+
/** Embed the upstream watermark on the output. Defaults to false at the gateway. */
|
|
514
|
+
watermark?: boolean;
|
|
515
|
+
/** Return the last frame as an image alongside the clip — useful for chaining. */
|
|
516
|
+
returnLastFrame?: boolean;
|
|
499
517
|
}
|
|
500
518
|
interface SearchOptions {
|
|
501
519
|
/** Source types to search (e.g. ["web", "x", "news"]) */
|
package/dist/index.d.ts
CHANGED
|
@@ -496,6 +496,24 @@ interface VideoGenerateOptions {
|
|
|
496
496
|
imageUrl?: string;
|
|
497
497
|
/** Duration to bill for (defaults to model's default duration) */
|
|
498
498
|
durationSeconds?: number;
|
|
499
|
+
/** Output aspect ratio. Token360 / Seedance only — silently ignored by xAI Grok. */
|
|
500
|
+
aspectRatio?: "adaptive" | "16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9" | "9:21";
|
|
501
|
+
/** Output resolution. Token360 / Seedance only. */
|
|
502
|
+
resolution?: "360p" | "480p" | "540p" | "720p" | "1080p" | "1K" | "2K" | "4K";
|
|
503
|
+
/**
|
|
504
|
+
* Whether the model should produce an audio track. Token360 / Seedance only.
|
|
505
|
+
* When omitted, the gateway does not send the flag — Token360 then applies
|
|
506
|
+
* its own upstream default (typically off, occasionally on depending on
|
|
507
|
+
* model variant / prompt). Audio generation is usually a paid surcharge,
|
|
508
|
+
* so callers should expose this as a visible toggle to their users.
|
|
509
|
+
*/
|
|
510
|
+
generateAudio?: boolean;
|
|
511
|
+
/** Reproducibility seed when supported by the model. */
|
|
512
|
+
seed?: number;
|
|
513
|
+
/** Embed the upstream watermark on the output. Defaults to false at the gateway. */
|
|
514
|
+
watermark?: boolean;
|
|
515
|
+
/** Return the last frame as an image alongside the clip — useful for chaining. */
|
|
516
|
+
returnLastFrame?: boolean;
|
|
499
517
|
}
|
|
500
518
|
interface SearchOptions {
|
|
501
519
|
/** Source types to search (e.g. ["web", "x", "news"]) */
|
package/dist/index.js
CHANGED
|
@@ -2316,6 +2316,12 @@ var VideoClient = class {
|
|
|
2316
2316
|
};
|
|
2317
2317
|
if (options?.imageUrl) body.image_url = options.imageUrl;
|
|
2318
2318
|
if (options?.durationSeconds !== void 0) body.duration_seconds = options.durationSeconds;
|
|
2319
|
+
if (options?.aspectRatio) body.aspect_ratio = options.aspectRatio;
|
|
2320
|
+
if (options?.resolution) body.resolution = options.resolution;
|
|
2321
|
+
if (options?.generateAudio !== void 0) body.generate_audio = options.generateAudio;
|
|
2322
|
+
if (options?.seed !== void 0) body.seed = options.seed;
|
|
2323
|
+
if (options?.watermark !== void 0) body.watermark = options.watermark;
|
|
2324
|
+
if (options?.returnLastFrame) body.return_last_frame = true;
|
|
2319
2325
|
const budgetMs = options?.budgetMs ?? DEFAULT_GENERATE_BUDGET_MS;
|
|
2320
2326
|
return this.submitAndPoll(body, budgetMs);
|
|
2321
2327
|
}
|