### Create Avatar Video with Heygen Rust SDK Source: https://github.com/onlycoiners/heygen_rust/blob/main/README.md Demonstrates how to create an AI-generated avatar video using the Heygen Rust SDK. Requires an API key and specifies video inputs including character, voice, and dimensions. ```rust use heygen::HeyGenBot; use serde_json::json; #[tokio::main] async fn main() { // Create a new HeyGen client let client = HeyGenBot::new("your-api-key".to_string(), Some("https://api.heygen.com/v2/")).unwrap(); // Create a video using an avatar let payload = json!({ "video_inputs": [{ "character": { "type": "avatar", "avatar_id": "Angela-inTshirt-20200820", "avatar_style": "normal" }, "voice": { "type": "text", "input_text": "Hello from the HeyGen Rust SDK!", "voice_id": "1bd001e7e50f421d891986aad5158bc8", "speed": 1.1 } }], "dimension": { "width": 1280, "height": 720 } }); // Generate the video match client.create_avatar_video(payload).await { Ok(response) => { if let Some(data) = response.data { println!("Video generated successfully! ID: {}", data.video_id); } } Err(e) => eprintln!("Error generating video: {}", e), } } ``` -------------------------------- ### Add Heygen Dependency to Cargo.toml Source: https://github.com/onlycoiners/heygen_rust/blob/main/README.md Shows how to add the heygen crate as a dependency in your Rust project's Cargo.toml file. ```toml [dependencies] heygen = "0.1.2" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.