everypixel-cli 0.5.2__tar.gz → 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/CHANGELOG.md +10 -0
  2. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/PKG-INFO +57 -9
  3. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/README.md +57 -9
  4. everypixel_cli-0.6.1/src/everypixel_cli/__init__.py +1 -0
  5. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/application/services.py +196 -42
  6. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/cli.py +118 -7
  7. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/mcp_server.py +71 -5
  8. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/openapi.py +17 -0
  9. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/resources/openapi.json +2496 -408
  10. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/schemas.py +410 -211
  11. everypixel_cli-0.5.2/src/everypixel_cli/__init__.py +0 -1
  12. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/.gitignore +0 -0
  13. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/LICENSE +0 -0
  14. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/pyproject.toml +0 -0
  15. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/__main__.py +0 -0
  16. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/application/__init__.py +0 -0
  17. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/application/chat.py +0 -0
  18. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/application/models.py +0 -0
  19. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/application/serialization.py +0 -0
  20. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/client.py +0 -0
  21. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/config.py +0 -0
  22. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/errors.py +0 -0
  23. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/files.py +0 -0
  24. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/output.py +0 -0
  25. {everypixel_cli-0.5.2 → everypixel_cli-0.6.1}/src/everypixel_cli/resources/__init__.py +0 -0
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.1] - 2026-11-18
4
+
5
+ - Add Gemini Omni 1.2 Flash video generation and editing.
6
+ - Add HeyGen Avatar 6 and Turbo photo animation with audio and 2K output.
7
+
8
+ ## [0.6.0] - 2026-11-16
9
+
10
+ - Add GPT Image 2.6 Sunburst with format, compression, and animation controls.
11
+ - Add HeyGen Avatar 4, video lipsync, translation, and voice/language catalogs.
12
+
3
13
  ## [0.5.2] - 2026-11-04
4
14
 
5
15
  - Add Seedance seeds and Seedance 2.5 draft previews with final rendering.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: everypixel-cli
3
- Version: 0.5.2
3
+ Version: 0.6.1
4
4
  Summary: Official command line interface for Everypixel API
5
5
  Project-URL: Homepage, https://labs.everypixel.com
6
6
  Project-URL: Repository, https://github.com/everypixel/everypixel-cli
@@ -198,15 +198,30 @@ Recraft V4.1 vector models (`recraftv4_1_vector`, `recraftv4_1_pro_vector`)
198
198
  produce SVG files and accept optional JSON palette `--controls`. Use `--size`
199
199
  to select their aspect ratio. Raster models also accept `--resolution`.
200
200
 
201
- `--lora-url` is supported only by `zimage`.
201
+ `--lora-url` applies only to `zimage`. Source-image generation with `--image`
202
+ uses `zimage` or `flux2 --style transparent`; use `image edit` for other modes.
203
+ `--megapixel-ratio` applies only to `flux2` and `qwen` editing; these editing
204
+ models do not accept `--resolution`.
202
205
 
203
- GPT Image models are `gpt-image-2` and `gpt-image-2.5-sunburst`. Both generation
204
- and editing accept `--quality low|medium|high` (default: `medium`); Sunburst also
205
- supports `xhigh` and `max`. Use `--size square` with `--resolution 3k`.
206
+ GPT Image models are `gpt-image-2`, `gpt-image-2.5-sunburst`, and
207
+ `gpt-image-2.6-sunburst`. Generation and editing accept
208
+ `--quality low|medium|high` (default: `medium`); both Sunburst models also accept
209
+ `xhigh` and `max`. Use `--size square` with `--resolution 3k`.
210
+
211
+ GPT Image 2.6 accepts `--complexity low|medium|high` and
212
+ `--output-format png|jpeg|webp|gif`; generation also accepts `svg`.
213
+ `--output-compression 0..100` applies only to JPEG/WebP. GIF accepts
214
+ `--frame-count 2..16` and `--frame-duration-ms 20..2000`; omit `--size` and
215
+ `--resolution` because GIF sizing is automatic. These controls apply only to
216
+ GPT Image 2.6.
206
217
 
207
218
  ```bash
208
219
  everypixel image generate "a detailed botanical illustration" \
209
- --model gpt-image-2.5-sunburst --quality high --download ./outputs
220
+ --model gpt-image-2.6-sunburst --quality high --download ./outputs
221
+
222
+ everypixel image generate "a looping animation of a waving cat" \
223
+ --model gpt-image-2.6-sunburst --output-format gif --frame-count 9 \
224
+ --frame-duration-ms 200 --download ./outputs
210
225
  ```
211
226
 
212
227
  Other image models include `flux3`, `gemini-nano-banana-2.1` (Nano Banana 2.1),
@@ -234,16 +249,16 @@ everypixel video edit "continue the scene with a slow camera pan" \
234
249
  --model flux3 --video ./input.mp4 --download ./outputs
235
250
  ```
236
251
 
237
- Generate a video with Gemini Omni 1.1 Flash, then edit the completed task:
252
+ Generate a video with Gemini Omni 1.2 Flash, then edit the completed task:
238
253
 
239
254
  ```bash
240
255
  task_id="$(
241
256
  everypixel video generate "a slow aerial shot over mountain lakes" \
242
- --model gemini-omni-1.1-flash --output-json | jq -er '.task_id'
257
+ --model gemini-omni-1.2-flash --output-json | jq -er '.task_id'
243
258
  )"
244
259
 
245
260
  everypixel video edit "change the scene to sunset" \
246
- --model gemini-omni-1.1-flash --task-id "$task_id" --download ./outputs
261
+ --model gemini-omni-1.2-flash --task-id "$task_id" --download ./outputs
247
262
  ```
248
263
 
249
264
  Gemini Omni editing requires an owned Gemini Omni source task. Other editing
@@ -314,6 +329,39 @@ everypixel audio tts-create --model qwen3 --text "Hello world" \
314
329
  --speaker Ryan --style Warm --language English --download ./outputs
315
330
  ```
316
331
 
332
+ HeyGen video lipsync accepts `--model heygen-speed|heygen-precision` with
333
+ `--video` and `--audio`. Audio and video durations must differ by at most 15%.
334
+ HeyGen Avatar 4 uses `lipsync image --model heygen-avatar-4` with either
335
+ `--audio` or `--text` plus `--voice-id`. Avatar 4 options are
336
+ `--aspect-ratio`, `--expressiveness low|medium|high`, and `--resolution 720p|1080p`
337
+ (default: `1080p`); `--prompt` directs motion. Avatar 4 does not accept `--seed`.
338
+
339
+ HeyGen Avatar 6 (`heygen-avatar-6`, `heygen-avatar-6-turbo`) requires `--image`
340
+ and `--audio`. It accepts
341
+ `--resolution 1080p|2k` (default: `1080p`), preserves the photo's aspect ratio,
342
+ and supports `--expressiveness default|less` plus a motion `--prompt`
343
+ (up to 1200 characters). Text, voice ID, aspect ratio, and seed options belong
344
+ to other models.
345
+
346
+ ```bash
347
+ everypixel lipsync heygen-voices --language English --limit 20
348
+
349
+ everypixel lipsync image --model heygen-avatar-4 --image ./portrait.png \
350
+ --text "Hello!" --voice-id VOICE_ID --download ./outputs
351
+
352
+ everypixel lipsync image --model heygen-avatar-6 --image ./portrait.png \
353
+ --audio ./voice.mp3 --resolution 2k --expressiveness less \
354
+ --download ./outputs
355
+
356
+ everypixel video translation-languages
357
+
358
+ everypixel video translate --video ./input.mp4 --output-language Spanish \
359
+ --model heygen-precision --download ./outputs
360
+ ```
361
+
362
+ Translation creates one task for one target language. Use `--estimate-cost`
363
+ with HeyGen lipsync or translation to request a quote.
364
+
317
365
  `--speaker`, `--style`, `--language`, and `--seed` are Qwen controls;
318
366
  `--character` applies only to Qwen voice design. ElevenLabs synthesis uses
319
367
  `--voice-id` instead of preset controls. `tts-clone` and `tts-design` default
@@ -164,15 +164,30 @@ Recraft V4.1 vector models (`recraftv4_1_vector`, `recraftv4_1_pro_vector`)
164
164
  produce SVG files and accept optional JSON palette `--controls`. Use `--size`
165
165
  to select their aspect ratio. Raster models also accept `--resolution`.
166
166
 
167
- `--lora-url` is supported only by `zimage`.
168
-
169
- GPT Image models are `gpt-image-2` and `gpt-image-2.5-sunburst`. Both generation
170
- and editing accept `--quality low|medium|high` (default: `medium`); Sunburst also
171
- supports `xhigh` and `max`. Use `--size square` with `--resolution 3k`.
167
+ `--lora-url` applies only to `zimage`. Source-image generation with `--image`
168
+ uses `zimage` or `flux2 --style transparent`; use `image edit` for other modes.
169
+ `--megapixel-ratio` applies only to `flux2` and `qwen` editing; these editing
170
+ models do not accept `--resolution`.
171
+
172
+ GPT Image models are `gpt-image-2`, `gpt-image-2.5-sunburst`, and
173
+ `gpt-image-2.6-sunburst`. Generation and editing accept
174
+ `--quality low|medium|high` (default: `medium`); both Sunburst models also accept
175
+ `xhigh` and `max`. Use `--size square` with `--resolution 3k`.
176
+
177
+ GPT Image 2.6 accepts `--complexity low|medium|high` and
178
+ `--output-format png|jpeg|webp|gif`; generation also accepts `svg`.
179
+ `--output-compression 0..100` applies only to JPEG/WebP. GIF accepts
180
+ `--frame-count 2..16` and `--frame-duration-ms 20..2000`; omit `--size` and
181
+ `--resolution` because GIF sizing is automatic. These controls apply only to
182
+ GPT Image 2.6.
172
183
 
173
184
  ```bash
174
185
  everypixel image generate "a detailed botanical illustration" \
175
- --model gpt-image-2.5-sunburst --quality high --download ./outputs
186
+ --model gpt-image-2.6-sunburst --quality high --download ./outputs
187
+
188
+ everypixel image generate "a looping animation of a waving cat" \
189
+ --model gpt-image-2.6-sunburst --output-format gif --frame-count 9 \
190
+ --frame-duration-ms 200 --download ./outputs
176
191
  ```
177
192
 
178
193
  Other image models include `flux3`, `gemini-nano-banana-2.1` (Nano Banana 2.1),
@@ -200,16 +215,16 @@ everypixel video edit "continue the scene with a slow camera pan" \
200
215
  --model flux3 --video ./input.mp4 --download ./outputs
201
216
  ```
202
217
 
203
- Generate a video with Gemini Omni 1.1 Flash, then edit the completed task:
218
+ Generate a video with Gemini Omni 1.2 Flash, then edit the completed task:
204
219
 
205
220
  ```bash
206
221
  task_id="$(
207
222
  everypixel video generate "a slow aerial shot over mountain lakes" \
208
- --model gemini-omni-1.1-flash --output-json | jq -er '.task_id'
223
+ --model gemini-omni-1.2-flash --output-json | jq -er '.task_id'
209
224
  )"
210
225
 
211
226
  everypixel video edit "change the scene to sunset" \
212
- --model gemini-omni-1.1-flash --task-id "$task_id" --download ./outputs
227
+ --model gemini-omni-1.2-flash --task-id "$task_id" --download ./outputs
213
228
  ```
214
229
 
215
230
  Gemini Omni editing requires an owned Gemini Omni source task. Other editing
@@ -280,6 +295,39 @@ everypixel audio tts-create --model qwen3 --text "Hello world" \
280
295
  --speaker Ryan --style Warm --language English --download ./outputs
281
296
  ```
282
297
 
298
+ HeyGen video lipsync accepts `--model heygen-speed|heygen-precision` with
299
+ `--video` and `--audio`. Audio and video durations must differ by at most 15%.
300
+ HeyGen Avatar 4 uses `lipsync image --model heygen-avatar-4` with either
301
+ `--audio` or `--text` plus `--voice-id`. Avatar 4 options are
302
+ `--aspect-ratio`, `--expressiveness low|medium|high`, and `--resolution 720p|1080p`
303
+ (default: `1080p`); `--prompt` directs motion. Avatar 4 does not accept `--seed`.
304
+
305
+ HeyGen Avatar 6 (`heygen-avatar-6`, `heygen-avatar-6-turbo`) requires `--image`
306
+ and `--audio`. It accepts
307
+ `--resolution 1080p|2k` (default: `1080p`), preserves the photo's aspect ratio,
308
+ and supports `--expressiveness default|less` plus a motion `--prompt`
309
+ (up to 1200 characters). Text, voice ID, aspect ratio, and seed options belong
310
+ to other models.
311
+
312
+ ```bash
313
+ everypixel lipsync heygen-voices --language English --limit 20
314
+
315
+ everypixel lipsync image --model heygen-avatar-4 --image ./portrait.png \
316
+ --text "Hello!" --voice-id VOICE_ID --download ./outputs
317
+
318
+ everypixel lipsync image --model heygen-avatar-6 --image ./portrait.png \
319
+ --audio ./voice.mp3 --resolution 2k --expressiveness less \
320
+ --download ./outputs
321
+
322
+ everypixel video translation-languages
323
+
324
+ everypixel video translate --video ./input.mp4 --output-language Spanish \
325
+ --model heygen-precision --download ./outputs
326
+ ```
327
+
328
+ Translation creates one task for one target language. Use `--estimate-cost`
329
+ with HeyGen lipsync or translation to request a quote.
330
+
283
331
  `--speaker`, `--style`, `--language`, and `--seed` are Qwen controls;
284
332
  `--character` applies only to Qwen voice design. ElevenLabs synthesis uses
285
333
  `--voice-id` instead of preset controls. `tts-clone` and `tts-design` default
@@ -0,0 +1 @@
1
+ __version__ = "0.6.1"
@@ -42,14 +42,19 @@ from ..schemas import (
42
42
  TTSVoiceSavePayload,
43
43
  TTSVoicesPayload,
44
44
  TTSVoiceDeletePayload,
45
- GPT_IMAGE_MODEL_QUALITIES,
45
+ HeyGenImageLipsyncPayload,
46
+ HeyGenAvatar6Payload,
47
+ HeyGenVoicesPayload,
48
+ VideoTranslatePayload,
49
+ RecraftVectorModel,
50
+ ImageEditModel,
51
+ ImageGenerateModel,
46
52
  ImageEditPayload,
47
53
  ImageGeneratePayload,
48
54
  ImageUpscalePayload,
49
55
  ImageVectorizePayload,
50
56
  LipsyncImagePayload,
51
57
  LipsyncVideoPayload,
52
- RecraftGeneratePayload,
53
58
  TaskResponse,
54
59
  VideoEditRequest,
55
60
  VideoGenerateRequest,
@@ -79,6 +84,7 @@ COST_ESTIMATE_ENDPOINTS = frozenset(
79
84
  "image_edit_colors",
80
85
  "video_lipsync",
81
86
  "image_lipsync",
87
+ "video_translate",
82
88
  "video_generate",
83
89
  "video_edit",
84
90
  "video_upscale",
@@ -655,6 +661,7 @@ def _build_omni_video_edit_payload(inputs: _VideoEditInputs) -> dict[str, Any]:
655
661
 
656
662
  _VIDEO_EDIT_BUILDERS: dict[str, Callable[[_VideoEditInputs], dict[str, Any]]] = {
657
663
  "gemini-omni-1.1-flash": _build_omni_video_edit_payload,
664
+ "gemini-omni-1.2-flash": _build_omni_video_edit_payload,
658
665
  "seedance2": _build_seedance_video_edit_payload,
659
666
  "seedance2-mini": _build_seedance_video_edit_payload,
660
667
  "seedance2.5": _build_seedance_video_edit_payload,
@@ -717,10 +724,26 @@ def build_video_edit_payload(
717
724
  return builder(inputs)
718
725
 
719
726
 
720
- _IMAGE_GENERATE_BUILDERS: dict[str, type[BaseModel]] = {
721
- "recraftv4_1_vector": RecraftGeneratePayload,
722
- "recraftv4_1_pro_vector": RecraftGeneratePayload,
723
- }
727
+ _IMAGE_GENERATE_ADAPTER: TypeAdapter[ImageGeneratePayload] = TypeAdapter(
728
+ ImageGeneratePayload
729
+ )
730
+ _IMAGE_EDIT_ADAPTER: TypeAdapter[ImageEditPayload] = TypeAdapter(ImageEditPayload)
731
+
732
+
733
+ def dump_image_payload(payload: BaseModel) -> dict[str, Any]:
734
+ # GIF sizing is automatic; sending materialized size defaults is invalid.
735
+ exclude = (
736
+ {"image_size", "resolution"}
737
+ if getattr(payload, "output_format", None) == "gif"
738
+ else set()
739
+ )
740
+ return payload.model_dump(mode="json", exclude_none=True, exclude=exclude)
741
+
742
+
743
+ def image_fallback_extension(payload: Mapping[str, Any]) -> str:
744
+ if payload.get("model") in get_args(RecraftVectorModel):
745
+ return ".svg"
746
+ return "." + str(payload.get("output_format", "png"))
724
747
 
725
748
 
726
749
  def build_image_generate_payload(**values: Any) -> dict[str, Any]:
@@ -735,22 +758,25 @@ def build_image_generate_payload(**values: Any) -> dict[str, Any]:
735
758
  values["controls"] = json.loads(controls)
736
759
  except json.JSONDecodeError as exc:
737
760
  raise InputParsingError("Unable to parse Recraft controls JSON") from exc
738
- builder = _IMAGE_GENERATE_BUILDERS.get(
739
- values.get("model", "zimage"), ImageGeneratePayload
761
+ return dump_image_payload(
762
+ _IMAGE_GENERATE_ADAPTER.validate_python(
763
+ {key: value for key, value in values.items() if value is not None}
764
+ )
740
765
  )
741
- return builder.model_validate(
742
- {key: value for key, value in values.items() if value is not None}
743
- ).model_dump(mode="json", exclude_none=True)
744
766
 
745
767
 
746
768
  def build_image_edit_payload(**values: Any) -> dict[str, Any]:
747
769
  """Validate image edit payloads and encode every local source image."""
748
770
 
749
771
  images = values.pop("images")
750
- return ImageEditPayload(
751
- **{key: value for key, value in values.items() if value is not None},
752
- image_urls=[media_value(item) for item in images],
753
- ).model_dump(mode="json", exclude_none=True)
772
+ return dump_image_payload(
773
+ _IMAGE_EDIT_ADAPTER.validate_python(
774
+ {
775
+ **{key: value for key, value in values.items() if value is not None},
776
+ "image_urls": [media_value(item) for item in images],
777
+ }
778
+ )
779
+ )
754
780
 
755
781
 
756
782
  def build_image_vectorize_payload(
@@ -860,9 +886,27 @@ def build_lipsync_video_payload(**values: Any) -> dict[str, Any]:
860
886
 
861
887
  video = values.pop("video")
862
888
  audio = values.pop("audio")
863
- return LipsyncVideoPayload(
889
+ payload = LipsyncVideoPayload(
864
890
  **values, video_url=media_value(video), audio_url=media_value(audio)
865
- ).model_dump(exclude_none=True)
891
+ )
892
+ return payload.model_dump(
893
+ exclude_none=True, exclude={"model"} if "model" not in values else set()
894
+ )
895
+
896
+
897
+ _LIPSYNC_IMAGE_BUILDERS: dict[str, type[BaseModel]] = {
898
+ "inftalk": LipsyncImagePayload,
899
+ "ltx23": LipsyncImagePayload,
900
+ "heygen-avatar-4": HeyGenImageLipsyncPayload,
901
+ "heygen-avatar-6": HeyGenAvatar6Payload,
902
+ "heygen-avatar-6-turbo": HeyGenAvatar6Payload,
903
+ }
904
+
905
+
906
+ _LIPSYNC_EXPRESSIVENESS_FIELDS = {
907
+ "heygen-avatar-6": "motion_expressiveness",
908
+ "heygen-avatar-6-turbo": "motion_expressiveness",
909
+ }
866
910
 
867
911
 
868
912
  def build_lipsync_image_payload(**values: Any) -> dict[str, Any]:
@@ -870,9 +914,34 @@ def build_lipsync_image_payload(**values: Any) -> dict[str, Any]:
870
914
 
871
915
  image = values.pop("image")
872
916
  audio = values.pop("audio")
873
- return LipsyncImagePayload(
874
- **values, image_url=media_value(image), audio_url=media_value(audio)
875
- ).model_dump(exclude_none=True)
917
+ expressiveness = values.pop("expressiveness", None)
918
+ if expressiveness is not None:
919
+ field = _LIPSYNC_EXPRESSIVENESS_FIELDS.get(
920
+ values.get("model", "inftalk"), "expressiveness"
921
+ )
922
+ if values.get(field) is not None:
923
+ raise ValidationCLIError("Expressiveness was provided twice")
924
+ values[field] = expressiveness
925
+ builder = _LIPSYNC_IMAGE_BUILDERS.get(
926
+ values.get("model", "inftalk"), LipsyncImagePayload
927
+ )
928
+ return builder.model_validate(
929
+ {
930
+ **{key: value for key, value in values.items() if value is not None},
931
+ "image_url": media_value(image),
932
+ **({"audio_url": media_value(audio)} if audio is not None else {}),
933
+ }
934
+ ).model_dump(mode="json", exclude_none=True)
935
+
936
+
937
+ def build_video_translate_payload(*, video: str, **values: Any) -> dict[str, Any]:
938
+ """Validate translation inputs after encoding local video media."""
939
+ return VideoTranslatePayload.model_validate(
940
+ {
941
+ "video_url": media_value(video),
942
+ **values,
943
+ }
944
+ ).model_dump(mode="json", exclude_none=True)
876
945
 
877
946
 
878
947
  def build_media_payload(
@@ -1016,7 +1085,7 @@ class ApplicationServices:
1016
1085
  *,
1017
1086
  prompt: str,
1018
1087
  model: str,
1019
- image_size: str,
1088
+ image_size: str | None,
1020
1089
  style: str | None,
1021
1090
  image: str | None,
1022
1091
  resolution: str | None,
@@ -1026,6 +1095,11 @@ class ApplicationServices:
1026
1095
  lora_url: str | None = None,
1027
1096
  controls: dict[str, Any] | str | None = None,
1028
1097
  quality: str | None = None,
1098
+ complexity: str | None = None,
1099
+ output_format: str | None = None,
1100
+ output_compression: int | None = None,
1101
+ frame_count: int | None = None,
1102
+ frame_duration_ms: int | None = None,
1029
1103
  ) -> OperationResult:
1030
1104
  payload = build_image_generate_payload(
1031
1105
  prompt=prompt,
@@ -1039,14 +1113,17 @@ class ApplicationServices:
1039
1113
  lora_url=lora_url,
1040
1114
  controls=controls,
1041
1115
  quality=quality,
1116
+ complexity=complexity,
1117
+ output_format=output_format,
1118
+ output_compression=output_compression,
1119
+ frame_count=frame_count,
1120
+ frame_duration_ms=frame_duration_ms,
1042
1121
  )
1043
1122
  return self._execute_async(
1044
1123
  endpoint="/v1/image_generate",
1045
1124
  payload=payload,
1046
1125
  execution=execution,
1047
- fallback_extension=(
1048
- ".svg" if model in _IMAGE_GENERATE_BUILDERS else ".png"
1049
- ),
1126
+ fallback_extension=image_fallback_extension(payload),
1050
1127
  )
1051
1128
 
1052
1129
  def execute_image_vectorize(
@@ -1077,8 +1154,13 @@ class ApplicationServices:
1077
1154
  seed: int,
1078
1155
  callback_url: str | None,
1079
1156
  execution: ExecutionOptions,
1080
- megapixel_ratio: float = 1.0,
1157
+ megapixel_ratio: float | None = None,
1081
1158
  quality: str | None = None,
1159
+ complexity: str | None = None,
1160
+ output_format: str | None = None,
1161
+ output_compression: int | None = None,
1162
+ frame_count: int | None = None,
1163
+ frame_duration_ms: int | None = None,
1082
1164
  ) -> OperationResult:
1083
1165
  payload = build_image_edit_payload(
1084
1166
  prompt=prompt,
@@ -1088,6 +1170,11 @@ class ApplicationServices:
1088
1170
  resolution=resolution,
1089
1171
  megapixel_ratio=megapixel_ratio,
1090
1172
  quality=quality,
1173
+ complexity=complexity,
1174
+ output_format=output_format,
1175
+ output_compression=output_compression,
1176
+ frame_count=frame_count,
1177
+ frame_duration_ms=frame_duration_ms,
1091
1178
  seed=seed,
1092
1179
  callback_url=callback_url,
1093
1180
  )
@@ -1095,7 +1182,7 @@ class ApplicationServices:
1095
1182
  endpoint="/v1/image_edit",
1096
1183
  payload=payload,
1097
1184
  execution=execution,
1098
- fallback_extension=".png",
1185
+ fallback_extension=image_fallback_extension(payload),
1099
1186
  )
1100
1187
 
1101
1188
  def execute_image_upscale(
@@ -1282,8 +1369,10 @@ class ApplicationServices:
1282
1369
  seed: int,
1283
1370
  callback_url: str | None,
1284
1371
  execution: ExecutionOptions,
1372
+ model: str | None = None,
1285
1373
  ) -> OperationResult:
1286
1374
  payload = build_lipsync_video_payload(
1375
+ **({"model": model} if model is not None else {}),
1287
1376
  video=video,
1288
1377
  audio=audio,
1289
1378
  resolution=resolution,
@@ -1302,15 +1391,23 @@ class ApplicationServices:
1302
1391
  self,
1303
1392
  *,
1304
1393
  image: str,
1305
- audio: str,
1394
+ audio: str | None,
1306
1395
  model: str,
1307
- resolution: str,
1396
+ resolution: str | None,
1308
1397
  prompt: str | None,
1309
- seed: int,
1398
+ seed: int | None,
1310
1399
  callback_url: str | None,
1311
1400
  execution: ExecutionOptions,
1401
+ text: str | None = None,
1402
+ voice_id: str | None = None,
1403
+ aspect_ratio: str | None = None,
1404
+ expressiveness: str | None = None,
1312
1405
  ) -> OperationResult:
1313
1406
  payload = build_lipsync_image_payload(
1407
+ text=text,
1408
+ voice_id=voice_id,
1409
+ aspect_ratio=aspect_ratio,
1410
+ expressiveness=expressiveness,
1314
1411
  image=image,
1315
1412
  audio=audio,
1316
1413
  model=model,
@@ -1326,6 +1423,56 @@ class ApplicationServices:
1326
1423
  fallback_extension=".mp4",
1327
1424
  )
1328
1425
 
1426
+ def execute_video_translate(
1427
+ self,
1428
+ *,
1429
+ video: str,
1430
+ output_language: str,
1431
+ model: str = "heygen-speed",
1432
+ callback_url: str | None = None,
1433
+ execution: ExecutionOptions,
1434
+ ) -> OperationResult:
1435
+ payload = build_video_translate_payload(
1436
+ video=video,
1437
+ output_language=output_language,
1438
+ model=model,
1439
+ callback_url=callback_url,
1440
+ )
1441
+ return self._execute_async(
1442
+ endpoint="/v1/video_translate",
1443
+ payload=payload,
1444
+ execution=execution,
1445
+ fallback_extension=".mp4",
1446
+ )
1447
+
1448
+ def list_translation_languages(self) -> OperationResult:
1449
+ return self._operations.execute(
1450
+ OperationRequest(
1451
+ endpoint="/v1/video_translate/languages",
1452
+ method="GET",
1453
+ payload={},
1454
+ execution=ExecutionOptions(),
1455
+ )
1456
+ )
1457
+
1458
+ def list_heygen_voices(
1459
+ self,
1460
+ *,
1461
+ language: str | None = None,
1462
+ limit: int = 20,
1463
+ token: str | None = None,
1464
+ ) -> OperationResult:
1465
+ return self._operations.execute(
1466
+ OperationRequest(
1467
+ endpoint="/v1/heygen/voices",
1468
+ method="GET",
1469
+ payload=HeyGenVoicesPayload(
1470
+ language=language, limit=limit, token=token
1471
+ ).model_dump(exclude_none=True),
1472
+ execution=ExecutionOptions(),
1473
+ )
1474
+ )
1475
+
1329
1476
  def execute_audio_transcribe(
1330
1477
  self,
1331
1478
  *,
@@ -1583,16 +1730,24 @@ class ApplicationServices:
1583
1730
  payload = normalize_image_quality(payload)
1584
1731
  except ValueError as exc:
1585
1732
  raise ValidationCLIError(str(exc)) from exc
1586
- if (
1587
- isinstance(payload.get("model"), str)
1588
- and payload["model"] in GPT_IMAGE_MODEL_QUALITIES
1589
- ):
1590
- image_schema = (
1591
- ImageGeneratePayload
1592
- if path == "/v1/image_generate"
1593
- else ImageEditPayload
1594
- )
1595
- image_schema.model_validate(payload, extra="ignore")
1733
+ image_adapter, models = (
1734
+ (_IMAGE_GENERATE_ADAPTER, ImageGenerateModel)
1735
+ if path == "/v1/image_generate"
1736
+ else (_IMAGE_EDIT_ADAPTER, ImageEditModel)
1737
+ )
1738
+ if "model" not in payload or payload.get("model") in get_args(models):
1739
+ image_adapter.validate_python(payload, extra="ignore")
1740
+ if path == "/v1/image_lipsync":
1741
+ builder = _LIPSYNC_IMAGE_BUILDERS.get(
1742
+ payload.get("model", "inftalk"), LipsyncImagePayload
1743
+ )
1744
+ builder.model_validate(payload, extra="ignore")
1745
+ if path == "/v1/video_lipsync":
1746
+ LipsyncVideoPayload.model_validate(payload, extra="ignore")
1747
+ if path == "/v1/video_translate":
1748
+ VideoTranslatePayload.model_validate(payload, extra="ignore")
1749
+ if path == "/v1/heygen/voices":
1750
+ HeyGenVoicesPayload.model_validate(payload)
1596
1751
  if path == "/v1/video_generate" and payload.get("model") in get_args(
1597
1752
  VideoGenerateModel
1598
1753
  ):
@@ -1645,9 +1800,8 @@ class ApplicationServices:
1645
1800
  payload=payload,
1646
1801
  execution=execution,
1647
1802
  fallback_extension=(
1648
- ".svg"
1649
- if path == "/v1/image_generate"
1650
- and payload.get("model") in _IMAGE_GENERATE_BUILDERS
1803
+ image_fallback_extension(payload)
1804
+ if path in {"/v1/image_generate", "/v1/image_edit"}
1651
1805
  else fallback_extension_for_endpoint(path)
1652
1806
  ),
1653
1807
  )