https://github.com/rwxbytes/d-id
A lib crate for interacting with D-ID's Api
https://github.com/rwxbytes/d-id
ai animation api text-to-video
Last synced: 8 months ago
JSON representation
A lib crate for interacting with D-ID's Api
- Host: GitHub
- URL: https://github.com/rwxbytes/d-id
- Owner: rwxbytes
- Created: 2023-10-02T23:14:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-17T16:23:41.000Z (over 2 years ago)
- Last Synced: 2025-02-07T14:19:48.340Z (over 1 year ago)
- Topics: ai, animation, api, text-to-video
- Language: Rust
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A lib crate for interacting with [D-ID's](https://docs.d-id.com/reference/get-started) Api
| API | Support |
|----------------|---------|
| Live Streaming | ❌ |
## ⚙️ Requirements
- Set API key as environment variable `D_ID_API_KEY`
## 🗣️ Usage
## Talks
- Create talking head videos from just text or audio
```rust
use d_id::{get_talk, TalkRequestBodyBuilder, upload_image_by_file, Result};
#[tokio::main]
async fn main() -> Result<()> {
let image = upload_image_by_file("img_test.jpg").await?;
let req= TalkRequestBodyBuilder::with_text_script()
.source_url(&image.url)?
.input("Hello, world!")?
.build()?;
let new_talk = req.create_talk().await?;
let talk = get_talk(&new_talk.id).await?;
println!("{:#?}", talk);
Ok(())
}
```