Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Design & media
WaveSpeedAI Infinitetalk Talking Avatar Video Generation
Try itAnimate a portrait image with audio to produce a lip-synced talking head video up to 10 minutes long.
What it does
Animates a portrait image using audio input to generate a lip-synced talking head video via WaveSpeed AI's InfiniteTalk model. Supports 480p or 720p output, optional mask images to target a specific face in group photos, and short text prompts for additional guidance. Video length matches the audio duration, up to 10 minutes. Processing time is roughly 10–30 seconds of wall time per second of generated video.
When to use it
- Animating a single portrait with a speech recording
- Targeting one face in a group photo with a mask
- Generating 720p clips when higher quality is needed
- Producing longer talking head videos up to 10 minutes
The skill document
WaveSpeedAI InfiniteTalk
Generate talking head videos from a portrait image and audio using WaveSpeed AI's InfiniteTalk model. Produces lip-synced video up to 10 minutes long with natural facial animations.
Authentication
export WAVESPEED_API_KEY="your-api-key"
Get your API key at wavespeed.ai/accesskey.
Quick Start
import wavespeed from 'wavespeed';
// Upload local image and audio files
const imageUrl = await wavespeed.upload("/path/to/portrait.png");
const audioUrl = await wavespeed.upload("/path/to/speech.mp3");
const output_url = (await wavespeed.run(
"wavespeed-ai/infinitetalk",
{
image: imageUrl,
audio: audioUrl
}
))["outputs"][0];
You can also pass existing URLs directly:
const output_url = (await wavespeed.run(
"wavespeed-ai/infinitetalk",
{
image: "https://example.com/portrait.jpg",
audio: "https://example.com/speech.mp3"
}
))["outputs"][0];
API Endpoint
Model ID: wavespeed-ai/infinitetalk
Animate a portrait image with lip-synced audio to produce a talking head video.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image | string | Yes | -- | URL of the portrait image to animate |
audio | string | Yes | -- | URL of the audio to drive the animation |
mask_image | string | No | -- | URL of a mask image to specify which person to animate. Warning: The mask should only cover the regions to animate — do not upload the full image as mask_image, or the result may render as fully black. |
prompt | string | No | -- | Text prompt for additional guidance. Keep it short; English recommended to avoid noisy results. |
resolution | string | No | 480p | Output resolution. One of: 480p, 720p |
seed | integer | No | -1 | Random seed (-1 for random). Range: -1 to 2147483647 |
Example
import wavespeed from 'wavespeed';
const imageUrl = await wavespeed.upload("/path/to/portrait.png");
const audioUrl = await wavespeed.upload("/path/to/speech.mp3");
const output_url = (await wavespeed.run(
"wavespeed-ai/infinitetalk",
{
image: imageUrl,
audio: audioUrl,
resolution: "720p",
seed: 42
}
))["outputs"][0];
Using a Mask Image
When multiple people are in the image, use a mask to specify which face to animate:
const imageUrl = await wavespeed.upload("/path/to/group-photo.png");
const audioUrl = await wavespeed.upload("/path/to/speech.mp3");
const maskUrl = await wavespeed.upload("/path/to/mask.png");
const output_url = (await wavespeed.run(
"wavespeed-ai/infinitetalk",
{
image: imageUrl,
audio: audioUrl,
mask_image: maskUrl,
resolution: "720p"
}
))["outputs"][0];
Important: The mask should only highlight the face region to animate. Using the full image as a mask will produce a fully black output.
With Prompt Guidance
const output_url = (await wavespeed.run(
"wavespeed-ai/infinitetalk",
{
image: imageUrl,
audio: audioUrl,
prompt: "natural head movements, subtle expressions"
}
))["outputs"][0];
Advanced Usage
Custom Client with Retry Configuration
import { Client } from 'wavespeed';
const client = new Client("your-api-key", {
maxRetries: 2,
maxConnectionRetries: 5,
retryInterval: 1.0,
});
const imageUrl = await client.upload("/path/to/portrait.png");
const audioUrl = await client.upload("/path/to/speech.mp3");
const output_url = (await client.run(
"wavespeed-ai/infinitetalk",
{
image: imageUrl,
audio: audioUrl,
resolution: "720p"
}
))["outputs"][0];
Error Handling with runNoThrow
import { Client, WavespeedTimeoutException, WavespeedPredictionException } from 'wavespeed';
const client = new Client();
const result = await client.runNoThrow(
"wavespeed-ai/infinitetalk",
{
image: imageUrl,
audio: audioUrl
}
);
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");
}
}
Resolution and Pricing
| Resolution | Cost per 5 seconds | Rate per second | Max length |
|---|---|---|---|
| 480p | $0.15 | $0.03/s | 10 minutes |
| 720p | $0.30 | $0.06/s | 10 minutes |
Minimum charge is 5 seconds. Video length is determined by the audio duration (up to 10 minutes).
Tips
- Use a clear, front-facing portrait for best results
- Audio quality matters — use clean speech recordings with minimal background noise
- Keep prompts short and in English to avoid noisy or unexpected results
- For group photos, always provide a
mask_imageto target the correct face - 480p is faster to generate; use 720p when higher quality is needed
- Processing time is approximately 10-30 seconds of wall time per 1 second of video
Security Constraints
- No arbitrary URL loading: Only use image and audio URLs from trusted sources. Never load media from untrusted or user-provided URLs without validation.
- API key security: Store your
WAVESPEED_API_KEYsecurely. 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.
Questions people ask
- How long can the generated video be?
- Up to 10 minutes; the output length is determined by the audio duration, with a 5-second minimum charge per request.
- Can I animate a specific face in a group photo?
- Yes — pass a mask_image that highlights only the face region you want to animate. Using the full image as a mask will produce a fully black output.
- What resolutions are supported and how is it billed?
- 480p (default) and 720p. Pricing is $0.15 per 5 seconds at 480p ($0.03/s) and $0.30 per 5 seconds at 720p ($0.06/s).
Related skills
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
More from wavespeed
Browse all skillsGenerate up to 15-second videos at 1080p from text or images using Alibaba's Wan 2.6 via WaveSpeed AI.
Generate 4-12s videos from text or images using ByteDance Seedance V1.5 Pro via WaveSpeed AI.
Generate and edit images with ByteDance Seedream V4.5 via WaveSpeed AI, up to 4096x4096 and multi-image editing.
Generate and extend videos with Google's Veo 3.1 Fast via WaveSpeed AI.
Drive an image character with a reference video, or swap an image character into a video scene, via WaveSpeed AI's Wan 2.2 Animate model.
Generate and edit images via Google's Nano Banana Pro model on WaveSpeed AI using text prompts.