Skip to content

codegen: resync gen/ from EF 2bb39f6a - #512

Merged
somanshreddy merged 2 commits into
mainfrom
sync/cli-codegen-2bb39f6a
Oct 24, 2026
Merged

somanshreddy merged 2 commits into
mainfrom
sync/cli-codegen-2bb39f6a

Conversation

@heygen-rui-bot

Copy link
Copy Markdown
Contributor

Auto-generated PR: a production deploy shipped an updated OpenAPI spec. This PR contains the CLI command definitions regenerated from the now-live prod spec in gen/.

What changed

New commands

  • heygen model audio sts create -- POST /v3/models/audio/sts
  • heygen model images create -- POST /v3/models/images
  • heygen model images get -- GET /v3/models/images/{generation_id}

Changed commands

  • heygen model audio tts create: added --end-user-id, --expressiveness-boost, --model, --with-timestamps; --language now optional
  • heygen model audio voices create: removed --language, --mode, --name, --voice-id
  • heygen model audio voices list: added --type
  • heygen voice speech create: --engine accepts heygen_voice
  • heygen webhook endpoints create: --events accepts video_generation.fail, video_generation.success
  • heygen webhook endpoints update: --events accepts video_generation.fail, video_generation.success
  • heygen webhook events list: --event-type accepts video_generation.fail, video_generation.success

Public command surface only; commands hidden from --help are not listed.
Compared against heygen-cli main at 517c3f4f792b7cdd2d4ec613bb3256114da3b54f.

If CI fails (e.g. missing examples), fix the issue and push to this branch.

Source commit: 2bb39f6a68b79ea24c194146b3242a8591b9f865
Triggered by: https://github.com/heygen-com/experiment-framework/commit/2bb39f6a68b79ea24c194146b3242a8591b9f865

@github-actions

Copy link
Copy Markdown
Contributor

Command surface: 7 existing command(s) changed

Changed — these already existed, so a change can break existing calls.

heygen model audio tts create
+ 			Name: "end-user-id",
+ 			Type: "string",
+ 			Default: "",
+ 			Required: false,
+ 			Enum: nil,
+ 			Min: nil,
+ 			Max: nil,
+ 			Source: "body",
+ 			JSONName: "end_user_id",
+ 			Name: "expressiveness-boost",
+ 			Type: "float64",
+ 			Default: "1",
+ 			Required: false,
+ 			Enum: nil,
+ 			Min: intPtr(0),
+ 			Max: intPtr(1),
+ 			Source: "body",
+ 			JSONName: "expressiveness_boost",
- 			Required: true,
---
+ 			Required: false,
+ 			Name: "model",
+ 			Type: "string",
+ 			Default: "heygen-voice-1",
+ 			Required: false,
+ 			Enum: []string{"heygen-voice-1", "heygen-voice-1-turbo", "heygen-voice-1-turbo-free"},
+ 			Min: nil,
+ 			Max: nil,
+ 			Source: "body",
+ 			JSONName: "model",
+ 			Name: "with-timestamps",
+ 			Type: "bool",
+ 			Default: "false",
+ 			Required: false,
+ 			Enum: nil,
+ 			Min: nil,
+ 			Max: nil,
+ 			Source: "body",
+ 			JSONName: "with_timestamps",
heygen model audio voices create
- 			Name: "language",
- 			Type: "string",
- 			Default: "",
- 			Required: false,
- 			Enum: nil,
- 			Min: nil,
- 			Max: nil,
- 			Source: "body",
- 			JSONName: "language",
- 			Name: "mode",
- 			Type: "string",
- 			Default: "",
- 			Required: false,
- 			Enum: []string{"professional"},
- 			Min: nil,
- 			Max: nil,
- 			Source: "body",
- 			JSONName: "mode",
- 			Name: "name",
- 			Type: "string",
- 			Default: "",
- 			Required: false,
- 			Enum: nil,
- 			Min: nil,
- 			Max: nil,
- 			Source: "body",
- 			JSONName: "name",
- 			Name: "voice-id",
- 			Type: "string",
- 			Default: "",
- 			Required: false,
- 			Enum: nil,
- 			Min: nil,
- 			Max: nil,
- 			Source: "body",
- 			JSONName: "voice_id",
heygen model audio voices list
+ 			Name: "type",
+ 			Type: "string",
+ 			Default: "private",
+ 			Required: false,
+ 			Enum: []string{"private", "public"},
+ 			Min: nil,
+ 			Max: nil,
+ 			Source: "query",
+ 			JSONName: "type",
heygen voice speech create
- 			Enum: []string{"starfish", "orca", "elevenlabs", "elevenlabs_v3"},
---
+ 			Enum: []string{"heygen_voice", "starfish", "orca", "elevenlabs", "elevenlabs_v3"},
heygen webhook endpoints create
- 			Enum: []string{"avatar_video.success", "avatar_video.fail", "avatar_video_gif.success", "avatar_video_gif.fail", "video_translate.success", "video_translate.fail", "video_translate.preflight.validation_failed", "video_translate.preflight.download_failed", "personalized_video", "instant_avatar.success", "instant_avatar.fail", "photo_avatar_generation.success", "photo_avatar_generation.fail", "photo_avatar_train.success", "photo_avatar_train.fail", "photo_avatar_add_motion.success", "photo_avatar_add_motion.fail", "proofread_creation.success", "proofread_creation.fail", "live_avatar.success", "live_avatar.fail", "avatar_video_caption.success", "avatar_video_caption.fail", "video_agent.success", "video_agent.fail", "hyperframes_video.success", "hyperframes_video.fail", "ai_clipping.success", "ai_clipping.fail", "filler_word_removal.success", "filler_word_removal.fail", "podcast.success", "podcast.fail", "batch.finished"},
---
+ 			Enum: []string{"avatar_video.success", "avatar_video.fail", "avatar_video_gif.success", "avatar_video_gif.fail", "video_translate.success", "video_translate.fail", "video_translate.preflight.validation_failed", "video_translate.preflight.download_failed", "personalized_video", "instant_avatar.success", "instant_avatar.fail", "photo_avatar_generation.success", "photo_avatar_generation.fail", "photo_avatar_train.success", "photo_avatar_train.fail", "photo_avatar_add_motion.success", "photo_avatar_add_motion.fail", "proofread_creation.success", "proofread_creation.fail", "live_avatar.success", "live_avatar.fail", "avatar_video_caption.success", "avatar_video_caption.fail", "video_agent.success", "video_agent.fail", "hyperframes_video.success", "hyperframes_video.fail", "ai_clipping.success", "ai_clipping.fail", "filler_word_removal.success", "filler_word_removal.fail", "podcast.success", "podcast.fail", "batch.finished", "video_generation.success", "video_generation.fail"},
heygen webhook endpoints update
- 			Enum: []string{"avatar_video.success", "avatar_video.fail", "avatar_video_gif.success", "avatar_video_gif.fail", "video_translate.success", "video_translate.fail", "video_translate.preflight.validation_failed", "video_translate.preflight.download_failed", "personalized_video", "instant_avatar.success", "instant_avatar.fail", "photo_avatar_generation.success", "photo_avatar_generation.fail", "photo_avatar_train.success", "photo_avatar_train.fail", "photo_avatar_add_motion.success", "photo_avatar_add_motion.fail", "proofread_creation.success", "proofread_creation.fail", "live_avatar.success", "live_avatar.fail", "avatar_video_caption.success", "avatar_video_caption.fail", "video_agent.success", "video_agent.fail", "hyperframes_video.success", "hyperframes_video.fail", "ai_clipping.success", "ai_clipping.fail", "filler_word_removal.success", "filler_word_removal.fail", "podcast.success", "podcast.fail", "batch.finished"},
---
+ 			Enum: []string{"avatar_video.success", "avatar_video.fail", "avatar_video_gif.success", "avatar_video_gif.fail", "video_translate.success", "video_translate.fail", "video_translate.preflight.validation_failed", "video_translate.preflight.download_failed", "personalized_video", "instant_avatar.success", "instant_avatar.fail", "photo_avatar_generation.success", "photo_avatar_generation.fail", "photo_avatar_train.success", "photo_avatar_train.fail", "photo_avatar_add_motion.success", "photo_avatar_add_motion.fail", "proofread_creation.success", "proofread_creation.fail", "live_avatar.success", "live_avatar.fail", "avatar_video_caption.success", "avatar_video_caption.fail", "video_agent.success", "video_agent.fail", "hyperframes_video.success", "hyperframes_video.fail", "ai_clipping.success", "ai_clipping.fail", "filler_word_removal.success", "filler_word_removal.fail", "podcast.success", "podcast.fail", "batch.finished", "video_generation.success", "video_generation.fail"},
heygen webhook events list
- 			Enum: []string{"avatar_video.success", "avatar_video.fail", "avatar_video_gif.success", "avatar_video_gif.fail", "video_translate.success", "video_translate.fail", "video_translate.preflight.validation_failed", "video_translate.preflight.download_failed", "personalized_video", "instant_avatar.success", "instant_avatar.fail", "photo_avatar_generation.success", "photo_avatar_generation.fail", "photo_avatar_train.success", "photo_avatar_train.fail", "photo_avatar_add_motion.success", "photo_avatar_add_motion.fail", "proofread_creation.success", "proofread_creation.fail", "live_avatar.success", "live_avatar.fail", "avatar_video_caption.success", "avatar_video_caption.fail", "video_agent.success", "video_agent.fail", "hyperframes_video.success", "hyperframes_video.fail", "ai_clipping.success", "ai_clipping.fail", "filler_word_removal.success", "filler_word_removal.fail", "podcast.success", "podcast.fail", "batch.finished"},
---
+ 			Enum: []string{"avatar_video.success", "avatar_video.fail", "avatar_video_gif.success", "avatar_video_gif.fail", "video_translate.success", "video_translate.fail", "video_translate.preflight.validation_failed", "video_translate.preflight.download_failed", "personalized_video", "instant_avatar.success", "instant_avatar.fail", "photo_avatar_generation.success", "photo_avatar_generation.fail", "photo_avatar_train.success", "photo_avatar_train.fail", "photo_avatar_add_motion.success", "photo_avatar_add_motion.fail", "proofread_creation.success", "proofread_creation.fail", "live_avatar.success", "live_avatar.fail", "avatar_video_caption.success", "avatar_video_caption.fail", "video_agent.success", "video_agent.fail", "hyperframes_video.success", "hyperframes_video.fail", "ai_clipping.success", "ai_clipping.fail", "filler_word_removal.success", "filler_word_removal.fail", "podcast.success", "podcast.fail", "batch.finished", "video_generation.success", "video_generation.fail"},

New commands — additive, nothing existing can break.

  • heygen model audio sts create
  • heygen model images create
  • heygen model images get

Reference only, never blocking. See RELEASE.md "Checking for Regressions" for how to read this.

@somanshreddy

Copy link
Copy Markdown
Collaborator

Pushed 234b1fa to fix CI:

  • Added the missing examples for model audio sts create, model images create and model images get. Each was checked against the EF request models at 2bb39f6a.
  • This spec removes the --name, --language, --mode and --voice-id flags from model audio voices create, so its old examples failed with an unknown-flag error. Those fields now go in -d, and there's a new example for instant mode.
  • Removed the video-translate caption get example. Its endpoint is no longer in the spec.
  • Regenerated gen/ from openapi/external-api.json at 2bb39f6a. This also repairs a corrupted em dash (U+FFFD bytes) in the bot's gen/video.go.

The govulncheck failure is the Go standard-library issue that also fails on main. #513 fixes it, so this PR needs a rebase after #513 merges.

🤖 Generated with Claude Code

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. I checked every new and changed example body against openapi/external-api.json at EF 2bb39f6a:

  • sts create: CreateSpeechConversionRequest.audio is a single discriminated AssetUrl | AssetId | AssetBase64 object (not an array), and voice_id is required. Both examples send one audio object plus --voice-id. --remove-background-noise and --idempotency-key exist as generated flags. The "instant voices" wording matches the endpoint description, which says professional clones are not supported.
  • voices create: the body is anyOf[CreateModelAudioVoiceRequest (mode=professional), CreateInstantAudioVoiceRequest (mode=instant)], and both take audio as a list (1 to 10 items). The instant example sets mode, name and audio, which are exactly the instant variant's required fields. The professional example sets mode and audio (both required) plus optional name and language. The retrain example sets mode=professional plus voice_id, which only the professional variant accepts. So the move into -d is correct now that those flags are gone.
  • images create: model is the const heygen-image-1, and identity_images and reference_images are both required arrays (reference_images allows at most 1 item, and both examples send 1). num_images 4 is within the 1 to 5 range, and 9:16 is in the aspect-ratio enum.
  • Dropped video-translate caption get example: the /caption path is absent from the spec, and no caption command exists in gen/ on main either, so it was already an orphan.

govulncheck is red here only because of the Go 1.25 stdlib advisories that #513 fixes. Land #513 first, then rebase this.

Need · Size · Reuse · Simpler: needed (prod spec drift), mostly generated code with 18 lines of hand-written examples, reuses the codegen pipeline, nothing simpler.

— Rames

heygen-rui-bot and others added 2 commits October 24, 2026 17:08
Add examples for model audio sts create, model images create and model
images get. Move the voices create examples into -d, since this spec
drops its --name/--language/--mode/--voice-id flags, and add an instant
voice example. Drop the video-translate caption get example, whose
endpoint left the spec. Regenerating gen/ also repairs a corrupted em
dash in gen/video.go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@somanshreddy
somanshreddy force-pushed the sync/cli-codegen-2bb39f6a branch from 234b1fa to 43f0505 Compare October 24, 2026 17:09
@somanshreddy
somanshreddy merged commit ca6cd13 into main Oct 24, 2026
10 checks passed
@somanshreddy
somanshreddy deleted the sync/cli-codegen-2bb39f6a branch October 24, 2026 17:11

@terencechotai2-commits terencechotai2-commits left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-merge review at 43f05052 (merged as ca6cd13 with an identical tree). The examples are correct. One item for the next release: the voices create flag removal breaks scripts written against v0.9.0/v0.10.0. It's declared in the PR body and the surface report, but it needs to land in the release notes.

Example bodies vs EF 2bb39f6a (the part you flagged)

  • I built the CLI at this head and ran every model.yaml example against a capture stub.
  • I then validated each captured body with jsonschema (Draft 2020-12) against openapi/external-api.json at 2bb39f6a.
  • All 13 POST bodies are valid:
    • sts create ×2: audio is one object. The second example sends remove_background_noise: true and the Idempotency-Key header.
    • voices create ×3:
      • instant (audio is a one-item list, as maxItems: 1 requires);
      • professional new, with name (EF's validator requires it without voice_id);
      • professional retrain, with voice_id.
    • images create ×2, plus the tts and videos examples.
  • Negative controls, each rejected by the same validator:
    • sts with audio as a list;
    • an instant voice with audio as an object;
    • an instant voice with two recordings;
    • a voice with no mode;
    • images with two reference_images.
  • The three GETs hit the right paths. The voices delete example still needs --force non-interactively, as on main.

Command surface. Main's gen/ has 114 commands; this head has 117, the three new ones. Nothing is removed. video-translate caption get was already gone from main's gen/, so dropping its example is just cleanup.

Caller impact: model audio voices create

  • --name, --language, --mode and --voice-id shipped in v0.9.0 and v0.10.0 (from #364) and are visible in --help. v0.10.0's own example was --name 'Narrator' --language en --mode professional -d '{"audio":[…]}'.
  • With this build, that invocation exits 2 with unknown flag: --name. The same fields in -d work.
  • RELEASE.md step 4 covers this: the next release needs a Breaking changes entry and a minor bump. changelog-cli files a resync under Internal, so it won't surface on its own.
  • Possible follow-up: these flags went away because the request is now a mode-discriminated union. name, language and mode exist in both variants, so codegen could keep flattening fields shared by every variant.

Related upstream break, already live and outside this PR: EF#56126 (2026-10-09) made mode required. v0.10.0's "retrain" example (--voice-id <id> -d '{"audio":[…]}', no --mode) is now rejected by the API. Worth the same release note.

Run locally: go test ./... at this head, all packages pass. CI: every check passed.

— tai2

@terencechotai2-commits

Copy link
Copy Markdown

Correction to my review above: the example run sent 12 POST bodies (tts 2, sts 2, voices 3, images 2, videos 3), not 13. All 12 are valid against 2bb39f6a.

— tai2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants