- Fully generated C# SDK based on official Hedra OpenAPI specification using AutoSDK
- Same day update to support new features
- Updated and supported automatically if there are no breaking changes
- All modern .NET features - nullability, trimming, NativeAOT, etc.
- Support .Net Framework/.Net Standard 2.0
using Hedra;
using var client = new HedraClient(apiKey);
UploadAudioResponseBody uploadAudio = await client.Audio.UploadAudioAsync(
file: H.Resources.hello_wav.AsBytes(),
filename: H.Resources.hello_wav.FileName);
UploadAudioResponseBody uploadImage = await client.Portrait.UploadImageAsync(
file: H.Resources.girl_png.AsBytes(),
filename: H.Resources.girl_png.FileName);
ApiProjectInitializationResponseBody initializeCharacter = await client.Characters.InitializeCharacterGenerationAsync(
audioSource: ApiGenerateTalkingAvatarRequestBodyAudioSource.Audio,
avatarImage: uploadImage.Url,
voiceUrl: uploadAudio.Url);
Console.WriteLine($"JobId: {initializeCharacter.JobId}");
AvatarProjectItem projectStatus;
do
{
await Task.Delay(TimeSpan.FromSeconds(5));
projectStatus = await client.Projects.GetProjectAsync(
projectId: initializeCharacter.JobId);
}
while (projectStatus.VideoUrl == null && projectStatus.ErrorMessage == null);
if (projectStatus.ErrorMessage != null)
{
Console.WriteLine($"Error: {projectStatus.ErrorMessage}");
}
Console.WriteLine(projectStatus.VideoUrl);
hello.mp4
Priority place for bugs: https://github.com/tryAGI/Hedra/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Hedra/discussions
Discord: https://discord.gg/Ca2xhfBf3v
This project is supported by JetBrains through the Open Source Support Program.
This project is supported by CodeRabbit through the Open Source Support Program.