This example assumes using Runway; is in scope and apiKey contains your Runway API key.
1 2 3 4 5 6 7 8 91011121314151617181920212223
usingvarclient=newRunwayClient(apiKey);varavatar=awaitclient.Avatars.CreateAvatarsAsync(xRunwayVersion:"2024-11-06",request:newCreateAvatarsRequest{Name="Hackathon Producer",ReferenceImage="https://example.com/reference.jpg",Personality="You are a concise creative producer who helps teams turn rough ideas into practical video plans.",StartScript="Tell me what you want to make and I will help shape the shot list.",Voice=newCreateAvatarsRequestVoiceRunwayLivePresetVoice{PresetId=CreateAvatarsRequestVoiceRunwayLivePresetVoicePresetId.Adrian,},ImageProcessing=CreateAvatarsRequestImageProcessing.Optimize,});varavatarId=avatar.Match(processing:processing=>processing!.Id,ready:ready=>ready!.Id,failed:failed=>failed!.Id);Console.WriteLine($"Avatar ID: {avatarId}");