'The video generation mode: "text_to_video", "image_to_video", "first_last_frame", or "reference_to_video".',
},
),
model: Type.Union([modelSchemas,Type.Null()],{
description:`The video model to use, in "provider:modelId" format. Available enabled models: ${modelIdentifiers.join(', ')}. Pass null to use the first enabled model (${modelIdentifiers[0]}).`,
}),
outputFileName: Type.Union([
Type.String({
description:
'Optional desired filename for the generated video (e.g. "intro.mp4"). Set to null for auto-generated name.',
}),
Type.Null(),
]),
textToVideoConfig: Type.Union([
Type.Object(
{
prompt: Type.String({
description:'Text prompt describing the desired video scene, action, and motion.',
}),
},
{additionalProperties: false},
),
Type.Null(),
]),
imageToVideoConfig: Type.Union([
Type.Object(
{
image: Type.String({
description:
'Storage S3 key of the image to animate. Call read_asset with s3KeyOnly: true to obtain the S3 key of an image asset or video frame without loading its content into context.',
}),
prompt: Type.Union([
Type.String({
description:'Optional motion prompt describing how the image should animate.',
}),
Type.Null(),
]),
},
{additionalProperties: false},
),
Type.Null(),
]),
firstLastFrameConfig: Type.Union([
Type.Object(
{
firstFrame: Type.Union([
Type.String({
description:
'Storage S3 key of the starting frame image. Call read_asset with s3KeyOnly: true to obtain the S3 key.',
}),
Type.Null(),
]),
lastFrame: Type.Union([
Type.String({
description:
'Storage S3 key of the ending frame image. Call read_asset with s3KeyOnly: true to obtain the S3 key.',
}),
Type.Null(),
]),
prompt: Type.Union([
Type.String({description:'Optional prompt describing the transition.'}),
Type.Null(),
]),
},
{additionalProperties: false},
),
Type.Null(),
]),
referenceToVideoConfig: Type.Union([
Type.Object(
{
references: Type.Array(Type.String(),{
description:
'List of storage S3 keys for style/motion/character reference images. Call read_asset with s3KeyOnly: true to obtain the S3 keys.',
}),
prompt: Type.Union([
Type.String({description:'Prompt describing the video to generate.'}),
Type.Null(),
]),
},
{additionalProperties: false},
),
Type.Null(),
]),
aspectRatio: Type.Union([
Type.String({
description:
'Optional aspect ratio: "16:9", "9:16", "1:1", or "adaptive", or null for default.',
}),
Type.Null(),
]),
resolution: Type.Union([
Type.String({
description:'Optional target video resolution, e.g. "1280x720", or null for default.',
}),
Type.Null(),
]),
duration: Type.Union([
Type.Integer({description:'Optional duration in seconds, or null for default.'}),
Type.Null(),
]),
fps: Type.Union([
Type.Integer({description:'Optional frames per second, or null for default.'}),
Type.Null(),
]),
generateAudio: Type.Union([
Type.Boolean({
description:'Whether to generate audio alongside video, or null for default.',
}),
Type.Null(),
]),
seed: Type.Union([
Type.Integer({
description:
'Optional random seed for reproducible video generation, or null for random.',
'Generate a video using a configured video model. Supports text-to-video, image-to-video (using an S3 image key from read_asset), first/last frame (using S3 image keys from read_asset), and reference-to-video (using S3 image keys from read_asset). The generated file is saved in the local .pi/ directory.',
text:`Successfully generated video using model "${modelConfig.modelId}" (${modelConfig.provider}) in mode "${p.mode}". Saved to "${relativePath}". Size: ${(buffer.length/(1024*1024)).toFixed(2)} MB.`,