← 返回
内容创作 Key 中文

WaveSpeedAI Veo 3.1 Fast Video Generation

Generate and extend videos using Google's Veo 3.1 Fast model via WaveSpeed AI. Supports text-to-video, image-to-video, and video extension. Features up to 4K...
通过 WaveSpeed AI 使用 Google Veo 3.1 Fast 模型生成和扩展视频。支持文生视频、图生视频及视频扩展,具备最高 4K 画质...
chengzeyi
内容创作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 522
下载
💾 21
安装
1
版本
#latest

概述

WaveSpeedAI Veo 3.1 Fast Video Generation

Generate and extend videos using Google's Veo 3.1 Fast model via the WaveSpeed AI platform. Supports text-to-video, image-to-video, and video extension with up to 4K resolution and optional audio generation.

Authentication

export WAVESPEED_API_KEY="your-api-key"

Get your API key at wavespeed.ai/accesskey.

Quick Start

Text-to-Video

import wavespeed from 'wavespeed';

const output_url = (await wavespeed.run(
  "google/veo3.1-fast/text-to-video",
  { prompt: "A drone shot flying over a lush tropical island at sunrise" }
))["outputs"][0];

Image-to-Video

The image parameter accepts an image URL. If you have a local file, upload it first with wavespeed.upload() to get a URL.

import wavespeed from 'wavespeed';

const imageUrl = await wavespeed.upload("/path/to/photo.png");

const output_url = (await wavespeed.run(
  "google/veo3.1-fast/image-to-video",
  {
    image: imageUrl,
    prompt: "The flowers sway gently in the breeze"
  }
))["outputs"][0];

Video Extend

Extend a Veo-generated video by 7 seconds per run (up to 20 extensions, 148 seconds total):

// First, generate a video
const video_url = (await wavespeed.run(
  "google/veo3.1-fast/text-to-video",
  { prompt: "A cat walking through a garden" }
))["outputs"][0];

// Then extend it
const extended_url = (await wavespeed.run(
  "google/veo3.1-fast/video-extend",
  {
    video: video_url,
    prompt: "The cat jumps onto a fence and looks around"
  }
))["outputs"][0];

API Endpoints

Text-to-Video

Model ID: google/veo3.1-fast/text-to-video

Generate videos from text prompts with optional audio.

Parameters

ParameterTypeRequiredDefaultDescription
-------------------------------------------------
promptstringYes--Text description of the video to generate
aspect_ratiostringNo16:9Aspect ratio. One of: 16:9, 9:16
durationintegerNo8Duration in seconds. One of: 4, 6, 8
resolutionstringNo1080pVideo resolution. One of: 720p, 1080p, 4k
generate_audiobooleanNotrueGenerate accompanying audio
negative_promptstringNo--Text describing unwanted elements
seedintegerNo--Random seed for reproducibility. Range: -1 to 2147483647

Example

import wavespeed from 'wavespeed';

const output_url = (await wavespeed.run(
  "google/veo3.1-fast/text-to-video",
  {
    prompt: "A timelapse of a city skyline transitioning from day to night, cinematic",
    negative_prompt: "blurry, low quality",
    aspect_ratio: "16:9",
    duration: 8,
    resolution: "1080p",
    generate_audio: true
  }
))["outputs"][0];

Image-to-Video

Model ID: google/veo3.1-fast/image-to-video

Animate a source image into a video. Optionally provide an end-frame reference image.

Parameters

ParameterTypeRequiredDefaultDescription
-------------------------------------------------
imagestringYes--URL of the source image (clear, high-quality still image)
promptstringYes--Text description of the desired motion/animation
last_imagestringNo--URL of an end-frame reference image
aspect_ratiostringNo16:9Aspect ratio. One of: 16:9, 9:16
durationintegerNo8Duration in seconds. One of: 4, 6, 8
resolutionstringNo1080pVideo resolution. One of: 720p, 1080p, 4k
generate_audiobooleanNotrueGenerate accompanying audio
negative_promptstringNo--Text describing unwanted elements
seedintegerNo--Random seed for reproducibility. Range: -1 to 2147483647

Example

import wavespeed from 'wavespeed';

const imageUrl = await wavespeed.upload("/path/to/landscape.png");

const output_url = (await wavespeed.run(
  "google/veo3.1-fast/image-to-video",
  {
    image: imageUrl,
    prompt: "Clouds drift slowly across the sky, water ripples gently",
    resolution: "1080p",
    duration: 8,
    generate_audio: true
  }
))["outputs"][0];

With End-Frame Reference

const startUrl = await wavespeed.upload("/path/to/start-frame.png");
const endUrl = await wavespeed.upload("/path/to/end-frame.png");

const output_url = (await wavespeed.run(
  "google/veo3.1-fast/image-to-video",
  {
    image: startUrl,
    last_image: endUrl,
    prompt: "Smooth transition from day to night"
  }
))["outputs"][0];

Video Extend

Model ID: google/veo3.1-fast/video-extend

Extend a Veo-generated video by 7 seconds per run. Input must be a Veo-generated video.

Parameters

ParameterTypeRequiredDefaultDescription
-------------------------------------------------
videostringYes--URL of the Veo-generated video to extend. Max 141 seconds.
promptstringNo--Text guidance for the extension
resolutionstringNo1080pVideo resolution. One of: 720p, 1080p
negative_promptstringNo--Text describing unwanted elements
seedintegerNo--Random seed for reproducibility. Range: -1 to 2147483647

Constraints

  • Input video must be Veo-generated (will not work with arbitrary videos)
  • Each run adds +7 seconds to the video
  • Maximum 20 extensions in a chain
  • Maximum final video length: 148 seconds
  • Output is a single MP4 (original + extension appended)
  • Aspect ratio and resolution are inherited from the input video

Example

import wavespeed from 'wavespeed';

// Generate an initial video
const video_url = (await wavespeed.run(
  "google/veo3.1-fast/text-to-video",
  {
    prompt: "A surfer catches a wave at golden hour",
    duration: 8
  }
))["outputs"][0];

// Extend it twice
const extended_once = (await wavespeed.run(
  "google/veo3.1-fast/video-extend",
  {
    video: video_url,
    prompt: "The surfer rides the wave toward shore"
  }
))["outputs"][0];

const extended_twice = (await wavespeed.run(
  "google/veo3.1-fast/video-extend",
  {
    video: extended_once,
    prompt: "The surfer steps off the board and walks on the beach"
  }
))["outputs"][0];

Advanced Usage

Without Audio

const output_url = (await wavespeed.run(
  "google/veo3.1-fast/text-to-video",
  {
    prompt: "A silent timelapse of stars rotating over a desert",
    generate_audio: false
  }
))["outputs"][0];

Custom Client with Retry Configuration

import { Client } from 'wavespeed';

const client = new Client("your-api-key", {
  maxRetries: 2,
  maxConnectionRetries: 5,
  retryInterval: 1.0,
});

const output_url = (await client.run(
  "google/veo3.1-fast/text-to-video",
  { prompt: "Ocean waves crashing on a rocky shore at dawn" }
))["outputs"][0];

Error Handling with runNoThrow

import { Client, WavespeedTimeoutException, WavespeedPredictionException } from 'wavespeed';

const client = new Client();
const result = await client.runNoThrow(
  "google/veo3.1-fast/text-to-video",
  { prompt: "A rocket launching into space" }
);

if (result.outputs) {
  console.log("Video URL:", result.outputs[0]);
  console.log("Task ID:", result.detail.taskId);
} else {
  console.log("Failed:", result.detail.error.message);
  if (result.detail.error instanceof WavespeedTimeoutException) {
    console.log("Request timed out - try increasing timeout");
  } else if (result.detail.error instanceof WavespeedPredictionException) {
    console.log("Prediction failed");
  }
}

Pricing

Text-to-Video / Image-to-Video

ConditionCost
-----------------
With audio (720p or 1080p)$1.20 per generation
Without audio (720p or 1080p)$0.80 per generation

Video Extend

ConditionCost
-----------------
Per run (+7 seconds)$1.05

Prompt Tips

  • Be specific about scene, style, subject actions, camera motion, and mood
  • Use negative_prompt to avoid artifacts: "blurry, low quality, distorted"
  • For image-to-video, use a clear, high-quality still image as input
  • For video extend, describe what should happen next in the scene
  • Video extend chains enable building longer narratives — up to 148 seconds total

Security Constraints

  • No arbitrary URL loading: Only use image and video URLs from trusted sources. Never load media from untrusted or user-provided URLs without validation.
  • API key security: Store your WAVESPEED_API_KEY securely. Do not hardcode it in source files or commit it to version control. Use environment variables or secret management systems.
  • Input validation: Only pass parameters documented above. Validate prompt content and media URLs before sending requests.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 09:07 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,269
content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,017
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,405