You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`resolution`| string | Resolution hint: `480P`, `720P`, or `1080P`|
73
+
|`durationSeconds`| number | Target duration in seconds. OpenClaw may round to the nearest provider-supported value|
74
+
|`audio`| boolean | Enable generated audio when the provider supports it |
75
+
|`watermark`| boolean | Toggle provider watermarking when supported |
76
+
|`filename`| string | Output filename hint |
77
+
78
+
Not all providers support all parameters. The tool validates provider capability limits before it submits the request. When a provider or model only supports a discrete set of video lengths, OpenClaw rounds `durationSeconds` to the nearest supported value and reports the normalized duration in the tool result.
@@ -371,6 +374,10 @@ function validateVideoGenerationCapabilities(params: {
371
374
if(
372
375
typeofparams.durationSeconds==="number"&&
373
376
Number.isFinite(params.durationSeconds)&&
377
+
!resolveVideoGenerationSupportedDurations({
378
+
provider,
379
+
model: params.model,
380
+
})&&
374
381
typeofcaps.maxDurationSeconds==="number"&&
375
382
params.durationSeconds>caps.maxDurationSeconds
376
383
){
@@ -535,7 +542,7 @@ export function createVideoGenerateTool(options?: {
535
542
name: "video_generate",
536
543
displaySummary: "Generate videos",
537
544
description:
538
-
"Generate videos using configured providers. Generated videos are saved under OpenClaw-managed media storage and delivered automatically as attachments.",
545
+
"Generate videos using configured providers. Generated videos are saved under OpenClaw-managed media storage and delivered automatically as attachments. Duration requests may be rounded to the nearest provider-supported value.",
539
546
parameters: VideoGenerateToolSchema,
540
547
execute: async(_toolCallId,rawArgs)=>{
541
548
constargs=rawArgsasRecord<string,unknown>;
@@ -564,6 +571,17 @@ export function createVideoGenerateTool(options?: {
0 commit comments