GenerateVideo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// https://app.heygen.com/settings?nav=API
// Your Trial Token can be used to test the following HeyGen APIs at no charge:
// Video Generation: Create up to 5 watermarked videos per day. Documentation.
// Interactive Avatar: Create up to 3 concurrent Streaming sessions; up to 300 minutes per month. Documentation.
using var api = new HeyGenApi(apiKey);

await api.CreateVideoAPI.V2VideoGenerateAsync(
    title: "title",
    test: true,
    dimension: new V2VideoGenerateRequestDimension
    {
        Width = 1920,
        Height = 1080,
    },
    aspectRatio: new V2VideoGenerateRequestAspectRatio(),
    callbackId: new V2VideoGenerateRequestCallbackId(),
    videoInputs: new List<V2VideoGenerateRequestVideoInput>
    {
        new()
        {
            Character = new V2VideoGenerateRequestVideoInputCharacter
            {
                AvatarId = "avatarId",
                AvatarStyle = "avatarStyle",
                Type = "type",
            },
            Voice = new V2VideoGenerateRequestVideoInputVoice
            {
                InputText = "inputText",
                Type = "type",
                VoiceId = "voiceId",
            },
        }
    });