-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathavatar.go
More file actions
278 lines (267 loc) · 49.4 KB
/
Copy pathavatar.go
File metadata and controls
278 lines (267 loc) · 49.4 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
// Code generated by heygen-cli/codegen. DO NOT EDIT.
package gen
import "github.com/heygen-com/heygen-cli/internal/command"
var AvatarConsentCreate = &command.Spec{
Group: "avatar",
Name: "consent create",
Summary: "Create Avatar Consent",
Description: "Initiates the consent flow for an avatar group and returns a URL for the user to complete approval in their browser. Required before a private avatar can be used for video generation.",
RequestSchema: "{\n \"description\": \"Request body for POST /v3/avatars/{group_id}/consent.\",\n \"properties\": {\n \"reroute_url\": {\n \"description\": \"Callback URL where the user is redirected after completing consent. Defaults to HeyGen's consent completion page.\",\n \"nullable\": true,\n \"type\": \"string\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"description\": \"Response body for POST /v3/avatars/{group_id}/consent.\",\n \"properties\": {\n \"avatar_group\": {\n \"description\": \"The avatar group associated with this consent.\",\n \"properties\": {\n \"consent_status\": {\n \"description\": \"The status of consent for the group. None means consent is not required.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"created_at\": {\n \"description\": \"Unix timestamp (seconds) when the avatar was created.\",\n \"type\": \"integer\"\n },\n \"default_voice_id\": {\n \"description\": \"Default voice ID for this avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"error\": {\n \"description\": \"Error details. Only present when status is 'failed'.\",\n \"nullable\": true,\n \"properties\": {\n \"code\": {\n \"description\": \"Machine-readable error code.\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"Human-readable error description.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"type\": \"object\"\n },\n \"gender\": {\n \"description\": \"Gender of the avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"id\": {\n \"description\": \"Unique avatar group identifier.\",\n \"type\": \"string\"\n },\n \"looks_count\": {\n \"description\": \"Number of looks (outfits/styles) available for this avatar.\",\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Display name of the avatar.\",\n \"type\": \"string\"\n },\n \"preview_image_url\": {\n \"description\": \"URL to the avatar preview image.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_video_url\": {\n \"description\": \"URL to the avatar preview video.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"status\": {\n \"description\": \"Training status of the avatar group. Only present for private avatars.\",\n \"enum\": [\n \"processing\",\n \"pending_consent\",\n \"failed\",\n \"completed\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"created_at\",\n \"looks_count\"\n ],\n \"type\": \"object\"\n },\n \"url\": {\n \"description\": \"URL to the consent page.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"avatar_group\",\n \"url\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars/{group_id}/consent",
Method: "POST",
BodyEncoding: "json",
Examples: []string{
"# Submit avatar consent\n heygen avatar consent create <group-id>",
},
Args: []command.ArgSpec{
{Name: "group-id", Param: "group_id", Help: ""},
},
Flags: []command.FlagSpec{
{
Name: "reroute-url",
Type: "string",
Default: "",
Help: "Callback URL where the user is redirected after completing consent. Defaults to HeyGen's consent completion page.",
Required: false,
Enum: nil,
Min: nil,
Max: nil,
Source: "body",
JSONName: "reroute_url",
},
},
}
var AvatarCreate = &command.Spec{
Group: "avatar",
Name: "create",
Summary: "Create Avatar",
Description: "Creates a new avatar from an image, video footage, or a text prompt. Supports photo, digital_twin, and prompt types. Avatar training is asynchronous.",
RequestSchema: "{\n \"description\": \"Discriminated union for POST /v3/avatars request body.\",\n \"discriminator\": {\n \"mapping\": {\n \"digital_twin\": \"#/components/schemas/CreateDigitalTwinRequest\",\n \"photo\": \"#/components/schemas/CreatePhotoAvatarRequest\",\n \"prompt\": \"#/components/schemas/CreatePromptAvatarRequest\"\n },\n \"propertyName\": \"type\"\n },\n \"oneOf\": [\n {\n \"properties\": {\n \"avatar_group_id\": {\n \"description\": \"Optional identity you would like to attach the prompted avatar to. By default it will create a new identity.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"name\": {\n \"description\": \"Name of the avatar.\",\n \"type\": \"string\"\n },\n \"prompt\": {\n \"description\": \"Prompt for avatar generation.\",\n \"type\": \"string\"\n },\n \"reference_images\": {\n \"description\": \"Reference images — each as {\\\"type\\\": \\\"url\\\", \\\"url\\\": \\\"https://...\\\"} or {\\\"type\\\": \\\"asset_id\\\", \\\"asset_id\\\": \\\"...\\\"}. Max 3. Will only work with an avatar_group_id.\",\n \"items\": {\n \"discriminator\": {\n \"mapping\": {\n \"asset_id\": \"#/components/schemas/AssetId\",\n \"base64\": \"#/components/schemas/AssetBase64\",\n \"url\": \"#/components/schemas/AssetUrl\"\n },\n \"propertyName\": \"type\"\n },\n \"oneOf\": [\n {\n \"description\": \"Asset input via publicly accessible HTTPS URL.\",\n \"properties\": {\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n },\n \"url\": {\n \"description\": \"Publicly accessible HTTPS URL for the asset\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"url\"\n ],\n \"type\": \"object\"\n },\n {\n \"description\": \"Asset input via HeyGen asset ID from the asset upload endpoint.\",\n \"properties\": {\n \"asset_id\": {\n \"description\": \"HeyGen asset ID from the asset upload endpoint\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"asset_id\"\n ],\n \"type\": \"object\"\n },\n {\n \"description\": \"Asset input via base64-encoded content.\",\n \"properties\": {\n \"data\": {\n \"description\": \"Base64-encoded file content\",\n \"type\": \"string\"\n },\n \"media_type\": {\n \"description\": \"MIME type of the encoded content (e.g. \\\"image/png\\\")\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"media_type\",\n \"data\"\n ],\n \"type\": \"object\"\n }\n ]\n },\n \"nullable\": true,\n \"type\": \"array\"\n },\n \"type\": {\n \"description\": \"Must be 'prompt' for AI-generated avatars.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"name\",\n \"prompt\"\n ],\n \"type\": \"object\"\n },\n {\n \"properties\": {\n \"avatar_group_id\": {\n \"description\": \"Optional identity you would like to attach the digital twin to. By default it will create a new identity.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"file\": {\n \"description\": \"Footage of the avatar — provide as {\\\"type\\\": \\\"url\\\", \\\"url\\\": \\\"https://...\\\"} or {\\\"type\\\": \\\"asset_id\\\", \\\"asset_id\\\": \\\"...\\\"}\",\n \"discriminator\": {\n \"mapping\": {\n \"asset_id\": \"#/components/schemas/AssetId\",\n \"base64\": \"#/components/schemas/AssetBase64\",\n \"url\": \"#/components/schemas/AssetUrl\"\n },\n \"propertyName\": \"type\"\n },\n \"oneOf\": [\n {\n \"description\": \"Asset input via publicly accessible HTTPS URL.\",\n \"properties\": {\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n },\n \"url\": {\n \"description\": \"Publicly accessible HTTPS URL for the asset\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"url\"\n ],\n \"type\": \"object\"\n },\n {\n \"description\": \"Asset input via HeyGen asset ID from the asset upload endpoint.\",\n \"properties\": {\n \"asset_id\": {\n \"description\": \"HeyGen asset ID from the asset upload endpoint\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"asset_id\"\n ],\n \"type\": \"object\"\n },\n {\n \"description\": \"Asset input via base64-encoded content.\",\n \"properties\": {\n \"data\": {\n \"description\": \"Base64-encoded file content\",\n \"type\": \"string\"\n },\n \"media_type\": {\n \"description\": \"MIME type of the encoded content (e.g. \\\"image/png\\\")\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"media_type\",\n \"data\"\n ],\n \"type\": \"object\"\n }\n ]\n },\n \"name\": {\n \"description\": \"Name of the avatar.\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Must be 'digital_twin' for digital twin avatars.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"name\",\n \"file\"\n ],\n \"type\": \"object\"\n },\n {\n \"properties\": {\n \"avatar_group_id\": {\n \"description\": \"Optional identity you would like to attach the photo avatar to. By default it will create a new identity.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"file\": {\n \"description\": \"Photo asset of the avatar — provide as {\\\"type\\\": \\\"url\\\", \\\"url\\\": \\\"https://...\\\"} or {\\\"type\\\": \\\"asset_id\\\", \\\"asset_id\\\": \\\"...\\\"}\",\n \"discriminator\": {\n \"mapping\": {\n \"asset_id\": \"#/components/schemas/AssetId\",\n \"base64\": \"#/components/schemas/AssetBase64\",\n \"url\": \"#/components/schemas/AssetUrl\"\n },\n \"propertyName\": \"type\"\n },\n \"oneOf\": [\n {\n \"description\": \"Asset input via publicly accessible HTTPS URL.\",\n \"properties\": {\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n },\n \"url\": {\n \"description\": \"Publicly accessible HTTPS URL for the asset\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"url\"\n ],\n \"type\": \"object\"\n },\n {\n \"description\": \"Asset input via HeyGen asset ID from the asset upload endpoint.\",\n \"properties\": {\n \"asset_id\": {\n \"description\": \"HeyGen asset ID from the asset upload endpoint\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"asset_id\"\n ],\n \"type\": \"object\"\n },\n {\n \"description\": \"Asset input via base64-encoded content.\",\n \"properties\": {\n \"data\": {\n \"description\": \"Base64-encoded file content\",\n \"type\": \"string\"\n },\n \"media_type\": {\n \"description\": \"MIME type of the encoded content (e.g. \\\"image/png\\\")\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Input type discriminator\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"media_type\",\n \"data\"\n ],\n \"type\": \"object\"\n }\n ]\n },\n \"name\": {\n \"description\": \"Name of the avatar.\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Must be 'photo' for photo-based avatars.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\",\n \"name\",\n \"file\"\n ],\n \"type\": \"object\"\n }\n ]\n}",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"properties\": {\n \"avatar_group\": {\n \"description\": \"The avatar group.\",\n \"nullable\": true,\n \"properties\": {\n \"consent_status\": {\n \"description\": \"The status of consent for the group. None means consent is not required.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"created_at\": {\n \"description\": \"Unix timestamp (seconds) when the avatar was created.\",\n \"type\": \"integer\"\n },\n \"default_voice_id\": {\n \"description\": \"Default voice ID for this avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"error\": {\n \"description\": \"Error details. Only present when status is 'failed'.\",\n \"nullable\": true,\n \"properties\": {\n \"code\": {\n \"description\": \"Machine-readable error code.\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"Human-readable error description.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"type\": \"object\"\n },\n \"gender\": {\n \"description\": \"Gender of the avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"id\": {\n \"description\": \"Unique avatar group identifier.\",\n \"type\": \"string\"\n },\n \"looks_count\": {\n \"description\": \"Number of looks (outfits/styles) available for this avatar.\",\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Display name of the avatar.\",\n \"type\": \"string\"\n },\n \"preview_image_url\": {\n \"description\": \"URL to the avatar preview image.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_video_url\": {\n \"description\": \"URL to the avatar preview video.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"status\": {\n \"description\": \"Training status of the avatar group. Only present for private avatars.\",\n \"enum\": [\n \"processing\",\n \"pending_consent\",\n \"failed\",\n \"completed\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"created_at\",\n \"looks_count\"\n ],\n \"type\": \"object\"\n },\n \"avatar_item\": {\n \"description\": \"The avatar item.\",\n \"nullable\": true,\n \"properties\": {\n \"avatar_type\": {\n \"description\": \"Avatar type — determines engine and parameter compatibility.\",\n \"enum\": [\n \"studio_avatar\",\n \"digital_twin\",\n \"photo_avatar\"\n ],\n \"type\": \"string\"\n },\n \"default_voice_id\": {\n \"description\": \"Default voice ID for this look.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"error\": {\n \"description\": \"Error details. Only present when status is 'failed'.\",\n \"nullable\": true,\n \"properties\": {\n \"code\": {\n \"description\": \"Machine-readable error code.\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"Human-readable error description.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"type\": \"object\"\n },\n \"gender\": {\n \"description\": \"Gender of the avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"group_id\": {\n \"description\": \"ID of the avatar group this look belongs to.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"id\": {\n \"description\": \"Unique look identifier. Pass this as avatar_id to POST /v3/videos.\",\n \"type\": \"string\"\n },\n \"image_height\": {\n \"description\": \"Native height of the look in pixels.\",\n \"nullable\": true,\n \"type\": \"integer\"\n },\n \"image_width\": {\n \"description\": \"Native width of the look in pixels.\",\n \"nullable\": true,\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Display name of the look.\",\n \"type\": \"string\"\n },\n \"preferred_orientation\": {\n \"description\": \"Preferred orientation of the look: 'portrait', 'landscape', or 'square'.\",\n \"enum\": [\n \"portrait\",\n \"landscape\",\n \"square\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_image_url\": {\n \"description\": \"URL to the look preview image.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_video_url\": {\n \"description\": \"URL to the look preview video.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"status\": {\n \"description\": \"Training status of the avatar look: 'processing', 'completed', or 'failed'. Only present for private avatars.\",\n \"enum\": [\n \"processing\",\n \"pending_consent\",\n \"failed\",\n \"completed\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"supported_api_engines\": {\n \"description\": \"Engine values this look supports for POST /v3/videos.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"tags\": {\n \"description\": \"Tags associated with the look.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"avatar_type\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars",
Method: "POST",
BodyEncoding: "json",
Examples: []string{
"# See required fields for avatar creation\n heygen avatar create --request-schema",
},
}
var AvatarDelete = &command.Spec{
Group: "avatar",
Name: "delete",
Summary: "Delete Avatar Group",
Description: "Permanently deletes an avatar group and all its associated looks. Cannot delete public or community groups.",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"description\": \"Response for DELETE /v3/avatars/{group_id}.\",\n \"properties\": {\n \"id\": {\n \"description\": \"ID of the deleted avatar group.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars/{group_id}",
Method: "DELETE",
BodyEncoding: "",
Destructive: true,
Args: []command.ArgSpec{
{Name: "group-id", Param: "group_id", Help: ""},
},
}
var AvatarGet = &command.Spec{
Group: "avatar",
Name: "get",
Summary: "Get Avatar Group",
Description: "Returns details for a specific avatar group including name, gender, preview URLs, looks count, and training status.",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"description\": \"A single avatar group in the list response.\\n\\nGroups are containers for looks (outfits/styles). To determine avatar type\\nand engine compatibility, fetch the looks via GET /v3/avatars/looks.\",\n \"properties\": {\n \"consent_status\": {\n \"description\": \"The status of consent for the group. None means consent is not required.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"created_at\": {\n \"description\": \"Unix timestamp (seconds) when the avatar was created.\",\n \"type\": \"integer\"\n },\n \"default_voice_id\": {\n \"description\": \"Default voice ID for this avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"error\": {\n \"description\": \"Error details. Only present when status is 'failed'.\",\n \"nullable\": true,\n \"properties\": {\n \"code\": {\n \"description\": \"Machine-readable error code.\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"Human-readable error description.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"type\": \"object\"\n },\n \"gender\": {\n \"description\": \"Gender of the avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"id\": {\n \"description\": \"Unique avatar group identifier.\",\n \"type\": \"string\"\n },\n \"looks_count\": {\n \"description\": \"Number of looks (outfits/styles) available for this avatar.\",\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Display name of the avatar.\",\n \"type\": \"string\"\n },\n \"preview_image_url\": {\n \"description\": \"URL to the avatar preview image.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_video_url\": {\n \"description\": \"URL to the avatar preview video.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"status\": {\n \"description\": \"Training status of the avatar group. Only present for private avatars.\",\n \"enum\": [\n \"processing\",\n \"pending_consent\",\n \"failed\",\n \"completed\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"created_at\",\n \"looks_count\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars/{group_id}",
Method: "GET",
BodyEncoding: "",
Examples: []string{
"# Get avatar details\n heygen avatar get <group-id>",
},
Args: []command.ArgSpec{
{Name: "group-id", Param: "group_id", Help: ""},
},
}
var AvatarList = &command.Spec{
Group: "avatar",
Name: "list",
Summary: "List Avatar Groups",
Description: "Returns a paginated list of avatar groups (characters). Each group contains one or more looks. Filterable by ownership.",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"items\": {\n \"description\": \"A single avatar group in the list response.\\n\\nGroups are containers for looks (outfits/styles). To determine avatar type\\nand engine compatibility, fetch the looks via GET /v3/avatars/looks.\",\n \"properties\": {\n \"consent_status\": {\n \"description\": \"The status of consent for the group. None means consent is not required.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"created_at\": {\n \"description\": \"Unix timestamp (seconds) when the avatar was created.\",\n \"type\": \"integer\"\n },\n \"default_voice_id\": {\n \"description\": \"Default voice ID for this avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"error\": {\n \"description\": \"Error details. Only present when status is 'failed'.\",\n \"nullable\": true,\n \"properties\": {\n \"code\": {\n \"description\": \"Machine-readable error code.\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"Human-readable error description.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"type\": \"object\"\n },\n \"gender\": {\n \"description\": \"Gender of the avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"id\": {\n \"description\": \"Unique avatar group identifier.\",\n \"type\": \"string\"\n },\n \"looks_count\": {\n \"description\": \"Number of looks (outfits/styles) available for this avatar.\",\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Display name of the avatar.\",\n \"type\": \"string\"\n },\n \"preview_image_url\": {\n \"description\": \"URL to the avatar preview image.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_video_url\": {\n \"description\": \"URL to the avatar preview video.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"status\": {\n \"description\": \"Training status of the avatar group. Only present for private avatars.\",\n \"enum\": [\n \"processing\",\n \"pending_consent\",\n \"failed\",\n \"completed\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"created_at\",\n \"looks_count\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n },\n \"has_more\": {\n \"description\": \"Whether more pages are available\",\n \"type\": \"boolean\"\n },\n \"next_token\": {\n \"description\": \"Opaque cursor for the next page\",\n \"nullable\": true,\n \"type\": \"string\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars",
Method: "GET",
BodyEncoding: "",
Paginated: true,
Examples: []string{
"# List avatars\n heygen avatar list --limit 10",
},
Flags: []command.FlagSpec{
{
Name: "ownership",
Type: "string",
Default: "",
Help: "Filter by ownership: 'public' for preset avatars, or 'private' for your own. Omit for all.",
Required: false,
Enum: []string{"public", "private"},
Min: nil,
Max: nil,
Source: "query",
JSONName: "ownership",
},
{
Name: "limit",
Type: "int",
Default: "20",
Help: "Maximum number of items to return per page (1-50).",
Required: false,
Enum: nil,
Min: intPtr(1),
Max: intPtr(50),
Source: "query",
JSONName: "limit",
},
{
Name: "token",
Type: "string",
Default: "",
Help: "Opaque cursor token for the next page.",
Required: false,
Enum: nil,
Min: nil,
Max: nil,
Source: "query",
JSONName: "token",
},
},
}
var AvatarLooksDelete = &command.Spec{
Group: "avatar",
Name: "looks delete",
Summary: "Delete Avatar Look",
Description: "Deletes an avatar look and its backing resource. Supported types: photo_avatar, digital_twin, and kit-based looks. Studio avatar (model_index) types cannot be deleted via the API. Deleting the last look in a group does not auto-delete the parent group.",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"description\": \"Response for DELETE /v3/avatars/looks/{look_id}.\",\n \"properties\": {\n \"id\": {\n \"description\": \"ID of the deleted avatar look.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars/looks/{look_id}",
Method: "DELETE",
BodyEncoding: "",
Destructive: true,
Args: []command.ArgSpec{
{Name: "look-id", Param: "look_id", Help: ""},
},
}
var AvatarLooksGet = &command.Spec{
Group: "avatar",
Name: "looks get",
Summary: "Get Avatar Look",
Description: "Returns details for a specific avatar look including supported engines, preferred orientation, preview URLs, and training status.",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"description\": \"A single avatar look in the list response.\\n\\nThe ``id`` field is the look-level identifier to pass as ``avatar_id``\\nto POST /v3/videos.\",\n \"properties\": {\n \"avatar_type\": {\n \"description\": \"Avatar type — determines engine and parameter compatibility.\",\n \"enum\": [\n \"studio_avatar\",\n \"digital_twin\",\n \"photo_avatar\"\n ],\n \"type\": \"string\"\n },\n \"default_voice_id\": {\n \"description\": \"Default voice ID for this look.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"error\": {\n \"description\": \"Error details. Only present when status is 'failed'.\",\n \"nullable\": true,\n \"properties\": {\n \"code\": {\n \"description\": \"Machine-readable error code.\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"Human-readable error description.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"type\": \"object\"\n },\n \"gender\": {\n \"description\": \"Gender of the avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"group_id\": {\n \"description\": \"ID of the avatar group this look belongs to.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"id\": {\n \"description\": \"Unique look identifier. Pass this as avatar_id to POST /v3/videos.\",\n \"type\": \"string\"\n },\n \"image_height\": {\n \"description\": \"Native height of the look in pixels.\",\n \"nullable\": true,\n \"type\": \"integer\"\n },\n \"image_width\": {\n \"description\": \"Native width of the look in pixels.\",\n \"nullable\": true,\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Display name of the look.\",\n \"type\": \"string\"\n },\n \"preferred_orientation\": {\n \"description\": \"Preferred orientation of the look: 'portrait', 'landscape', or 'square'.\",\n \"enum\": [\n \"portrait\",\n \"landscape\",\n \"square\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_image_url\": {\n \"description\": \"URL to the look preview image.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_video_url\": {\n \"description\": \"URL to the look preview video.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"status\": {\n \"description\": \"Training status of the avatar look: 'processing', 'completed', or 'failed'. Only present for private avatars.\",\n \"enum\": [\n \"processing\",\n \"pending_consent\",\n \"failed\",\n \"completed\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"supported_api_engines\": {\n \"description\": \"Engine values this look supports for POST /v3/videos.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"tags\": {\n \"description\": \"Tags associated with the look.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"avatar_type\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars/looks/{look_id}",
Method: "GET",
BodyEncoding: "",
Examples: []string{
"# Get look details\n heygen avatar looks get <look-id>",
},
Args: []command.ArgSpec{
{Name: "look-id", Param: "look_id", Help: ""},
},
}
var AvatarLooksList = &command.Spec{
Group: "avatar",
Name: "looks list",
Summary: "List Avatar Looks",
Description: "Returns a paginated list of avatar looks (outfits, poses, styles). Filterable by group_id, avatar_type, and ownership. The look id is the avatar_id to pass when creating a video.",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"items\": {\n \"description\": \"A single avatar look in the list response.\\n\\nThe ``id`` field is the look-level identifier to pass as ``avatar_id``\\nto POST /v3/videos.\",\n \"properties\": {\n \"avatar_type\": {\n \"description\": \"Avatar type — determines engine and parameter compatibility.\",\n \"enum\": [\n \"studio_avatar\",\n \"digital_twin\",\n \"photo_avatar\"\n ],\n \"type\": \"string\"\n },\n \"default_voice_id\": {\n \"description\": \"Default voice ID for this look.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"error\": {\n \"description\": \"Error details. Only present when status is 'failed'.\",\n \"nullable\": true,\n \"properties\": {\n \"code\": {\n \"description\": \"Machine-readable error code.\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"Human-readable error description.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"type\": \"object\"\n },\n \"gender\": {\n \"description\": \"Gender of the avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"group_id\": {\n \"description\": \"ID of the avatar group this look belongs to.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"id\": {\n \"description\": \"Unique look identifier. Pass this as avatar_id to POST /v3/videos.\",\n \"type\": \"string\"\n },\n \"image_height\": {\n \"description\": \"Native height of the look in pixels.\",\n \"nullable\": true,\n \"type\": \"integer\"\n },\n \"image_width\": {\n \"description\": \"Native width of the look in pixels.\",\n \"nullable\": true,\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Display name of the look.\",\n \"type\": \"string\"\n },\n \"preferred_orientation\": {\n \"description\": \"Preferred orientation of the look: 'portrait', 'landscape', or 'square'.\",\n \"enum\": [\n \"portrait\",\n \"landscape\",\n \"square\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_image_url\": {\n \"description\": \"URL to the look preview image.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_video_url\": {\n \"description\": \"URL to the look preview video.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"status\": {\n \"description\": \"Training status of the avatar look: 'processing', 'completed', or 'failed'. Only present for private avatars.\",\n \"enum\": [\n \"processing\",\n \"pending_consent\",\n \"failed\",\n \"completed\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"supported_api_engines\": {\n \"description\": \"Engine values this look supports for POST /v3/videos.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"tags\": {\n \"description\": \"Tags associated with the look.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"avatar_type\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n },\n \"has_more\": {\n \"description\": \"Whether more pages are available\",\n \"type\": \"boolean\"\n },\n \"next_token\": {\n \"description\": \"Opaque cursor for the next page\",\n \"nullable\": true,\n \"type\": \"string\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars/looks",
Method: "GET",
BodyEncoding: "",
Paginated: true,
Examples: []string{
"# Browse avatar looks\n heygen avatar looks list --limit 10",
},
Flags: []command.FlagSpec{
{
Name: "group-id",
Type: "string",
Default: "",
Help: "Filter looks to a specific avatar group. Returns only looks belonging to this group.",
Required: false,
Enum: nil,
Min: nil,
Max: nil,
Source: "query",
JSONName: "group_id",
},
{
Name: "avatar-type",
Type: "string",
Default: "",
Help: "Filter by avatar type: 'studio_avatar', 'digital_twin', or 'photo_avatar'.",
Required: false,
Enum: []string{"studio_avatar", "digital_twin", "photo_avatar"},
Min: nil,
Max: nil,
Source: "query",
JSONName: "avatar_type",
},
{
Name: "ownership",
Type: "string",
Default: "",
Help: "Filter by ownership: 'public' for preset avatars, or 'private' for your own. Omit for all.",
Required: false,
Enum: []string{"public", "private"},
Min: nil,
Max: nil,
Source: "query",
JSONName: "ownership",
},
{
Name: "limit",
Type: "int",
Default: "20",
Help: "Maximum number of items to return per page (1-50).",
Required: false,
Enum: nil,
Min: intPtr(1),
Max: intPtr(50),
Source: "query",
JSONName: "limit",
},
{
Name: "token",
Type: "string",
Default: "",
Help: "Opaque cursor token for the next page.",
Required: false,
Enum: nil,
Min: nil,
Max: nil,
Source: "query",
JSONName: "token",
},
},
}
var AvatarLooksUpdate = &command.Spec{
Group: "avatar",
Name: "looks update",
Summary: "Update Avatar Look",
Description: "Updates the display name of an avatar look. Only supported for photo avatar and digital twin look types.",
RequestSchema: "{\n \"description\": \"Request body for PATCH /v3/avatars/looks/\\u003clook_id\\u003e.\",\n \"properties\": {\n \"name\": {\n \"description\": \"New display name for the look.\",\n \"nullable\": true,\n \"type\": \"string\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
ResponseSchema: "{\n \"properties\": {\n \"data\": {\n \"description\": \"A single avatar look in the list response.\\n\\nThe ``id`` field is the look-level identifier to pass as ``avatar_id``\\nto POST /v3/videos.\",\n \"properties\": {\n \"avatar_type\": {\n \"description\": \"Avatar type — determines engine and parameter compatibility.\",\n \"enum\": [\n \"studio_avatar\",\n \"digital_twin\",\n \"photo_avatar\"\n ],\n \"type\": \"string\"\n },\n \"default_voice_id\": {\n \"description\": \"Default voice ID for this look.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"error\": {\n \"description\": \"Error details. Only present when status is 'failed'.\",\n \"nullable\": true,\n \"properties\": {\n \"code\": {\n \"description\": \"Machine-readable error code.\",\n \"type\": \"string\"\n },\n \"message\": {\n \"description\": \"Human-readable error description.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"code\",\n \"message\"\n ],\n \"type\": \"object\"\n },\n \"gender\": {\n \"description\": \"Gender of the avatar.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"group_id\": {\n \"description\": \"ID of the avatar group this look belongs to.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"id\": {\n \"description\": \"Unique look identifier. Pass this as avatar_id to POST /v3/videos.\",\n \"type\": \"string\"\n },\n \"image_height\": {\n \"description\": \"Native height of the look in pixels.\",\n \"nullable\": true,\n \"type\": \"integer\"\n },\n \"image_width\": {\n \"description\": \"Native width of the look in pixels.\",\n \"nullable\": true,\n \"type\": \"integer\"\n },\n \"name\": {\n \"description\": \"Display name of the look.\",\n \"type\": \"string\"\n },\n \"preferred_orientation\": {\n \"description\": \"Preferred orientation of the look: 'portrait', 'landscape', or 'square'.\",\n \"enum\": [\n \"portrait\",\n \"landscape\",\n \"square\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_image_url\": {\n \"description\": \"URL to the look preview image.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"preview_video_url\": {\n \"description\": \"URL to the look preview video.\",\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"status\": {\n \"description\": \"Training status of the avatar look: 'processing', 'completed', or 'failed'. Only present for private avatars.\",\n \"enum\": [\n \"processing\",\n \"pending_consent\",\n \"failed\",\n \"completed\"\n ],\n \"nullable\": true,\n \"type\": \"string\"\n },\n \"supported_api_engines\": {\n \"description\": \"Engine values this look supports for POST /v3/videos.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"tags\": {\n \"description\": \"Tags associated with the look.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"id\",\n \"name\",\n \"avatar_type\"\n ],\n \"type\": \"object\"\n }\n },\n \"required\": [],\n \"type\": \"object\"\n}",
Endpoint: "/v3/avatars/looks/{look_id}",
Method: "PATCH",
BodyEncoding: "json",
Examples: []string{
"# Rename a look\n heygen avatar looks update <look-id> --name 'New name'",
},
Args: []command.ArgSpec{
{Name: "look-id", Param: "look_id", Help: ""},
},
Flags: []command.FlagSpec{
{
Name: "name",
Type: "string",
Default: "",
Help: "New display name for the look.",
Required: false,
Enum: nil,
Min: nil,
Max: nil,
Source: "body",
JSONName: "name",
},
},
}