everypixel-cli 0.5.2__tar.gz → 0.6.0__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.
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/CHANGELOG.md +5 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/PKG-INFO +43 -6
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/README.md +43 -6
- everypixel_cli-0.6.0/src/everypixel_cli/__init__.py +1 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/application/services.py +178 -42
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/cli.py +113 -7
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/mcp_server.py +71 -5
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/openapi.py +17 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/resources/openapi.json +3416 -1413
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/schemas.py +361 -207
- everypixel_cli-0.5.2/src/everypixel_cli/__init__.py +0 -1
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/.gitignore +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/LICENSE +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/pyproject.toml +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/__main__.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/application/__init__.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/application/chat.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/application/models.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/application/serialization.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/client.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/config.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/errors.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/files.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/output.py +0 -0
- {everypixel_cli-0.5.2 → everypixel_cli-0.6.0}/src/everypixel_cli/resources/__init__.py +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.0] - 2026-11-16
|
|
4
|
+
|
|
5
|
+
- Add GPT Image 2.6 Sunburst with format, compression, and animation controls.
|
|
6
|
+
- Add HeyGen Avatar 4, video lipsync, translation, and voice/language catalogs.
|
|
7
|
+
|
|
3
8
|
## [0.5.2] - 2026-11-04
|
|
4
9
|
|
|
5
10
|
- 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.
|
|
3
|
+
Version: 0.6.0
|
|
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`
|
|
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
|
|
204
|
-
and editing accept
|
|
205
|
-
|
|
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.
|
|
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),
|
|
@@ -314,6 +329,28 @@ 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-only 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
|
+
```bash
|
|
340
|
+
everypixel lipsync heygen-voices --language English --limit 20
|
|
341
|
+
|
|
342
|
+
everypixel lipsync image --model heygen-avatar-4 --image ./portrait.png \
|
|
343
|
+
--text "Hello!" --voice-id VOICE_ID --download ./outputs
|
|
344
|
+
|
|
345
|
+
everypixel video translation-languages
|
|
346
|
+
|
|
347
|
+
everypixel video translate --video ./input.mp4 --output-language Spanish \
|
|
348
|
+
--model heygen-precision --download ./outputs
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Translation creates one task for one target language. Use `--estimate-cost`
|
|
352
|
+
with HeyGen lipsync or translation to request a quote.
|
|
353
|
+
|
|
317
354
|
`--speaker`, `--style`, `--language`, and `--seed` are Qwen controls;
|
|
318
355
|
`--character` applies only to Qwen voice design. ElevenLabs synthesis uses
|
|
319
356
|
`--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`
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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.
|
|
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),
|
|
@@ -280,6 +295,28 @@ 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-only 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
|
+
```bash
|
|
306
|
+
everypixel lipsync heygen-voices --language English --limit 20
|
|
307
|
+
|
|
308
|
+
everypixel lipsync image --model heygen-avatar-4 --image ./portrait.png \
|
|
309
|
+
--text "Hello!" --voice-id VOICE_ID --download ./outputs
|
|
310
|
+
|
|
311
|
+
everypixel video translation-languages
|
|
312
|
+
|
|
313
|
+
everypixel video translate --video ./input.mp4 --output-language Spanish \
|
|
314
|
+
--model heygen-precision --download ./outputs
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Translation creates one task for one target language. Use `--estimate-cost`
|
|
318
|
+
with HeyGen lipsync or translation to request a quote.
|
|
319
|
+
|
|
283
320
|
`--speaker`, `--style`, `--language`, and `--seed` are Qwen controls;
|
|
284
321
|
`--character` applies only to Qwen voice design. ElevenLabs synthesis uses
|
|
285
322
|
`--voice-id` instead of preset controls. `tts-clone` and `tts-design` default
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.0"
|
|
@@ -42,14 +42,18 @@ from ..schemas import (
|
|
|
42
42
|
TTSVoiceSavePayload,
|
|
43
43
|
TTSVoicesPayload,
|
|
44
44
|
TTSVoiceDeletePayload,
|
|
45
|
-
|
|
45
|
+
HeyGenImageLipsyncPayload,
|
|
46
|
+
HeyGenVoicesPayload,
|
|
47
|
+
VideoTranslatePayload,
|
|
48
|
+
RecraftVectorModel,
|
|
49
|
+
ImageEditModel,
|
|
50
|
+
ImageGenerateModel,
|
|
46
51
|
ImageEditPayload,
|
|
47
52
|
ImageGeneratePayload,
|
|
48
53
|
ImageUpscalePayload,
|
|
49
54
|
ImageVectorizePayload,
|
|
50
55
|
LipsyncImagePayload,
|
|
51
56
|
LipsyncVideoPayload,
|
|
52
|
-
RecraftGeneratePayload,
|
|
53
57
|
TaskResponse,
|
|
54
58
|
VideoEditRequest,
|
|
55
59
|
VideoGenerateRequest,
|
|
@@ -79,6 +83,7 @@ COST_ESTIMATE_ENDPOINTS = frozenset(
|
|
|
79
83
|
"image_edit_colors",
|
|
80
84
|
"video_lipsync",
|
|
81
85
|
"image_lipsync",
|
|
86
|
+
"video_translate",
|
|
82
87
|
"video_generate",
|
|
83
88
|
"video_edit",
|
|
84
89
|
"video_upscale",
|
|
@@ -717,10 +722,26 @@ def build_video_edit_payload(
|
|
|
717
722
|
return builder(inputs)
|
|
718
723
|
|
|
719
724
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
725
|
+
_IMAGE_GENERATE_ADAPTER: TypeAdapter[ImageGeneratePayload] = TypeAdapter(
|
|
726
|
+
ImageGeneratePayload
|
|
727
|
+
)
|
|
728
|
+
_IMAGE_EDIT_ADAPTER: TypeAdapter[ImageEditPayload] = TypeAdapter(ImageEditPayload)
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
def dump_image_payload(payload: BaseModel) -> dict[str, Any]:
|
|
732
|
+
# GIF sizing is automatic; sending materialized size defaults is invalid.
|
|
733
|
+
exclude = (
|
|
734
|
+
{"image_size", "resolution"}
|
|
735
|
+
if getattr(payload, "output_format", None) == "gif"
|
|
736
|
+
else set()
|
|
737
|
+
)
|
|
738
|
+
return payload.model_dump(mode="json", exclude_none=True, exclude=exclude)
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
def image_fallback_extension(payload: Mapping[str, Any]) -> str:
|
|
742
|
+
if payload.get("model") in get_args(RecraftVectorModel):
|
|
743
|
+
return ".svg"
|
|
744
|
+
return "." + str(payload.get("output_format", "png"))
|
|
724
745
|
|
|
725
746
|
|
|
726
747
|
def build_image_generate_payload(**values: Any) -> dict[str, Any]:
|
|
@@ -735,22 +756,25 @@ def build_image_generate_payload(**values: Any) -> dict[str, Any]:
|
|
|
735
756
|
values["controls"] = json.loads(controls)
|
|
736
757
|
except json.JSONDecodeError as exc:
|
|
737
758
|
raise InputParsingError("Unable to parse Recraft controls JSON") from exc
|
|
738
|
-
|
|
739
|
-
|
|
759
|
+
return dump_image_payload(
|
|
760
|
+
_IMAGE_GENERATE_ADAPTER.validate_python(
|
|
761
|
+
{key: value for key, value in values.items() if value is not None}
|
|
762
|
+
)
|
|
740
763
|
)
|
|
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
764
|
|
|
745
765
|
|
|
746
766
|
def build_image_edit_payload(**values: Any) -> dict[str, Any]:
|
|
747
767
|
"""Validate image edit payloads and encode every local source image."""
|
|
748
768
|
|
|
749
769
|
images = values.pop("images")
|
|
750
|
-
return
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
770
|
+
return dump_image_payload(
|
|
771
|
+
_IMAGE_EDIT_ADAPTER.validate_python(
|
|
772
|
+
{
|
|
773
|
+
**{key: value for key, value in values.items() if value is not None},
|
|
774
|
+
"image_urls": [media_value(item) for item in images],
|
|
775
|
+
}
|
|
776
|
+
)
|
|
777
|
+
)
|
|
754
778
|
|
|
755
779
|
|
|
756
780
|
def build_image_vectorize_payload(
|
|
@@ -860,9 +884,19 @@ def build_lipsync_video_payload(**values: Any) -> dict[str, Any]:
|
|
|
860
884
|
|
|
861
885
|
video = values.pop("video")
|
|
862
886
|
audio = values.pop("audio")
|
|
863
|
-
|
|
887
|
+
payload = LipsyncVideoPayload(
|
|
864
888
|
**values, video_url=media_value(video), audio_url=media_value(audio)
|
|
865
|
-
)
|
|
889
|
+
)
|
|
890
|
+
return payload.model_dump(
|
|
891
|
+
exclude_none=True, exclude={"model"} if "model" not in values else set()
|
|
892
|
+
)
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
_LIPSYNC_IMAGE_BUILDERS: dict[str, type[BaseModel]] = {
|
|
896
|
+
"inftalk": LipsyncImagePayload,
|
|
897
|
+
"ltx23": LipsyncImagePayload,
|
|
898
|
+
"heygen-avatar-4": HeyGenImageLipsyncPayload,
|
|
899
|
+
}
|
|
866
900
|
|
|
867
901
|
|
|
868
902
|
def build_lipsync_image_payload(**values: Any) -> dict[str, Any]:
|
|
@@ -870,9 +904,26 @@ def build_lipsync_image_payload(**values: Any) -> dict[str, Any]:
|
|
|
870
904
|
|
|
871
905
|
image = values.pop("image")
|
|
872
906
|
audio = values.pop("audio")
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
)
|
|
907
|
+
builder = _LIPSYNC_IMAGE_BUILDERS.get(
|
|
908
|
+
values.get("model", "inftalk"), LipsyncImagePayload
|
|
909
|
+
)
|
|
910
|
+
return builder.model_validate(
|
|
911
|
+
{
|
|
912
|
+
**{key: value for key, value in values.items() if value is not None},
|
|
913
|
+
"image_url": media_value(image),
|
|
914
|
+
**({"audio_url": media_value(audio)} if audio is not None else {}),
|
|
915
|
+
}
|
|
916
|
+
).model_dump(mode="json", exclude_none=True)
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
def build_video_translate_payload(*, video: str, **values: Any) -> dict[str, Any]:
|
|
920
|
+
"""Validate translation inputs after encoding local video media."""
|
|
921
|
+
return VideoTranslatePayload.model_validate(
|
|
922
|
+
{
|
|
923
|
+
"video_url": media_value(video),
|
|
924
|
+
**values,
|
|
925
|
+
}
|
|
926
|
+
).model_dump(mode="json", exclude_none=True)
|
|
876
927
|
|
|
877
928
|
|
|
878
929
|
def build_media_payload(
|
|
@@ -1016,7 +1067,7 @@ class ApplicationServices:
|
|
|
1016
1067
|
*,
|
|
1017
1068
|
prompt: str,
|
|
1018
1069
|
model: str,
|
|
1019
|
-
image_size: str,
|
|
1070
|
+
image_size: str | None,
|
|
1020
1071
|
style: str | None,
|
|
1021
1072
|
image: str | None,
|
|
1022
1073
|
resolution: str | None,
|
|
@@ -1026,6 +1077,11 @@ class ApplicationServices:
|
|
|
1026
1077
|
lora_url: str | None = None,
|
|
1027
1078
|
controls: dict[str, Any] | str | None = None,
|
|
1028
1079
|
quality: str | None = None,
|
|
1080
|
+
complexity: str | None = None,
|
|
1081
|
+
output_format: str | None = None,
|
|
1082
|
+
output_compression: int | None = None,
|
|
1083
|
+
frame_count: int | None = None,
|
|
1084
|
+
frame_duration_ms: int | None = None,
|
|
1029
1085
|
) -> OperationResult:
|
|
1030
1086
|
payload = build_image_generate_payload(
|
|
1031
1087
|
prompt=prompt,
|
|
@@ -1039,14 +1095,17 @@ class ApplicationServices:
|
|
|
1039
1095
|
lora_url=lora_url,
|
|
1040
1096
|
controls=controls,
|
|
1041
1097
|
quality=quality,
|
|
1098
|
+
complexity=complexity,
|
|
1099
|
+
output_format=output_format,
|
|
1100
|
+
output_compression=output_compression,
|
|
1101
|
+
frame_count=frame_count,
|
|
1102
|
+
frame_duration_ms=frame_duration_ms,
|
|
1042
1103
|
)
|
|
1043
1104
|
return self._execute_async(
|
|
1044
1105
|
endpoint="/v1/image_generate",
|
|
1045
1106
|
payload=payload,
|
|
1046
1107
|
execution=execution,
|
|
1047
|
-
fallback_extension=(
|
|
1048
|
-
".svg" if model in _IMAGE_GENERATE_BUILDERS else ".png"
|
|
1049
|
-
),
|
|
1108
|
+
fallback_extension=image_fallback_extension(payload),
|
|
1050
1109
|
)
|
|
1051
1110
|
|
|
1052
1111
|
def execute_image_vectorize(
|
|
@@ -1077,8 +1136,13 @@ class ApplicationServices:
|
|
|
1077
1136
|
seed: int,
|
|
1078
1137
|
callback_url: str | None,
|
|
1079
1138
|
execution: ExecutionOptions,
|
|
1080
|
-
megapixel_ratio: float =
|
|
1139
|
+
megapixel_ratio: float | None = None,
|
|
1081
1140
|
quality: str | None = None,
|
|
1141
|
+
complexity: str | None = None,
|
|
1142
|
+
output_format: str | None = None,
|
|
1143
|
+
output_compression: int | None = None,
|
|
1144
|
+
frame_count: int | None = None,
|
|
1145
|
+
frame_duration_ms: int | None = None,
|
|
1082
1146
|
) -> OperationResult:
|
|
1083
1147
|
payload = build_image_edit_payload(
|
|
1084
1148
|
prompt=prompt,
|
|
@@ -1088,6 +1152,11 @@ class ApplicationServices:
|
|
|
1088
1152
|
resolution=resolution,
|
|
1089
1153
|
megapixel_ratio=megapixel_ratio,
|
|
1090
1154
|
quality=quality,
|
|
1155
|
+
complexity=complexity,
|
|
1156
|
+
output_format=output_format,
|
|
1157
|
+
output_compression=output_compression,
|
|
1158
|
+
frame_count=frame_count,
|
|
1159
|
+
frame_duration_ms=frame_duration_ms,
|
|
1091
1160
|
seed=seed,
|
|
1092
1161
|
callback_url=callback_url,
|
|
1093
1162
|
)
|
|
@@ -1095,7 +1164,7 @@ class ApplicationServices:
|
|
|
1095
1164
|
endpoint="/v1/image_edit",
|
|
1096
1165
|
payload=payload,
|
|
1097
1166
|
execution=execution,
|
|
1098
|
-
fallback_extension=
|
|
1167
|
+
fallback_extension=image_fallback_extension(payload),
|
|
1099
1168
|
)
|
|
1100
1169
|
|
|
1101
1170
|
def execute_image_upscale(
|
|
@@ -1282,8 +1351,10 @@ class ApplicationServices:
|
|
|
1282
1351
|
seed: int,
|
|
1283
1352
|
callback_url: str | None,
|
|
1284
1353
|
execution: ExecutionOptions,
|
|
1354
|
+
model: str | None = None,
|
|
1285
1355
|
) -> OperationResult:
|
|
1286
1356
|
payload = build_lipsync_video_payload(
|
|
1357
|
+
**({"model": model} if model is not None else {}),
|
|
1287
1358
|
video=video,
|
|
1288
1359
|
audio=audio,
|
|
1289
1360
|
resolution=resolution,
|
|
@@ -1302,15 +1373,23 @@ class ApplicationServices:
|
|
|
1302
1373
|
self,
|
|
1303
1374
|
*,
|
|
1304
1375
|
image: str,
|
|
1305
|
-
audio: str,
|
|
1376
|
+
audio: str | None,
|
|
1306
1377
|
model: str,
|
|
1307
|
-
resolution: str,
|
|
1378
|
+
resolution: str | None,
|
|
1308
1379
|
prompt: str | None,
|
|
1309
|
-
seed: int,
|
|
1380
|
+
seed: int | None,
|
|
1310
1381
|
callback_url: str | None,
|
|
1311
1382
|
execution: ExecutionOptions,
|
|
1383
|
+
text: str | None = None,
|
|
1384
|
+
voice_id: str | None = None,
|
|
1385
|
+
aspect_ratio: str | None = None,
|
|
1386
|
+
expressiveness: str | None = None,
|
|
1312
1387
|
) -> OperationResult:
|
|
1313
1388
|
payload = build_lipsync_image_payload(
|
|
1389
|
+
text=text,
|
|
1390
|
+
voice_id=voice_id,
|
|
1391
|
+
aspect_ratio=aspect_ratio,
|
|
1392
|
+
expressiveness=expressiveness,
|
|
1314
1393
|
image=image,
|
|
1315
1394
|
audio=audio,
|
|
1316
1395
|
model=model,
|
|
@@ -1326,6 +1405,56 @@ class ApplicationServices:
|
|
|
1326
1405
|
fallback_extension=".mp4",
|
|
1327
1406
|
)
|
|
1328
1407
|
|
|
1408
|
+
def execute_video_translate(
|
|
1409
|
+
self,
|
|
1410
|
+
*,
|
|
1411
|
+
video: str,
|
|
1412
|
+
output_language: str,
|
|
1413
|
+
model: str = "heygen-speed",
|
|
1414
|
+
callback_url: str | None = None,
|
|
1415
|
+
execution: ExecutionOptions,
|
|
1416
|
+
) -> OperationResult:
|
|
1417
|
+
payload = build_video_translate_payload(
|
|
1418
|
+
video=video,
|
|
1419
|
+
output_language=output_language,
|
|
1420
|
+
model=model,
|
|
1421
|
+
callback_url=callback_url,
|
|
1422
|
+
)
|
|
1423
|
+
return self._execute_async(
|
|
1424
|
+
endpoint="/v1/video_translate",
|
|
1425
|
+
payload=payload,
|
|
1426
|
+
execution=execution,
|
|
1427
|
+
fallback_extension=".mp4",
|
|
1428
|
+
)
|
|
1429
|
+
|
|
1430
|
+
def list_translation_languages(self) -> OperationResult:
|
|
1431
|
+
return self._operations.execute(
|
|
1432
|
+
OperationRequest(
|
|
1433
|
+
endpoint="/v1/video_translate/languages",
|
|
1434
|
+
method="GET",
|
|
1435
|
+
payload={},
|
|
1436
|
+
execution=ExecutionOptions(),
|
|
1437
|
+
)
|
|
1438
|
+
)
|
|
1439
|
+
|
|
1440
|
+
def list_heygen_voices(
|
|
1441
|
+
self,
|
|
1442
|
+
*,
|
|
1443
|
+
language: str | None = None,
|
|
1444
|
+
limit: int = 20,
|
|
1445
|
+
token: str | None = None,
|
|
1446
|
+
) -> OperationResult:
|
|
1447
|
+
return self._operations.execute(
|
|
1448
|
+
OperationRequest(
|
|
1449
|
+
endpoint="/v1/heygen/voices",
|
|
1450
|
+
method="GET",
|
|
1451
|
+
payload=HeyGenVoicesPayload(
|
|
1452
|
+
language=language, limit=limit, token=token
|
|
1453
|
+
).model_dump(exclude_none=True),
|
|
1454
|
+
execution=ExecutionOptions(),
|
|
1455
|
+
)
|
|
1456
|
+
)
|
|
1457
|
+
|
|
1329
1458
|
def execute_audio_transcribe(
|
|
1330
1459
|
self,
|
|
1331
1460
|
*,
|
|
@@ -1583,16 +1712,24 @@ class ApplicationServices:
|
|
|
1583
1712
|
payload = normalize_image_quality(payload)
|
|
1584
1713
|
except ValueError as exc:
|
|
1585
1714
|
raise ValidationCLIError(str(exc)) from exc
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1715
|
+
image_adapter, models = (
|
|
1716
|
+
(_IMAGE_GENERATE_ADAPTER, ImageGenerateModel)
|
|
1717
|
+
if path == "/v1/image_generate"
|
|
1718
|
+
else (_IMAGE_EDIT_ADAPTER, ImageEditModel)
|
|
1719
|
+
)
|
|
1720
|
+
if "model" not in payload or payload.get("model") in get_args(models):
|
|
1721
|
+
image_adapter.validate_python(payload, extra="ignore")
|
|
1722
|
+
if path == "/v1/image_lipsync":
|
|
1723
|
+
builder = _LIPSYNC_IMAGE_BUILDERS.get(
|
|
1724
|
+
payload.get("model", "inftalk"), LipsyncImagePayload
|
|
1725
|
+
)
|
|
1726
|
+
builder.model_validate(payload, extra="ignore")
|
|
1727
|
+
if path == "/v1/video_lipsync":
|
|
1728
|
+
LipsyncVideoPayload.model_validate(payload, extra="ignore")
|
|
1729
|
+
if path == "/v1/video_translate":
|
|
1730
|
+
VideoTranslatePayload.model_validate(payload, extra="ignore")
|
|
1731
|
+
if path == "/v1/heygen/voices":
|
|
1732
|
+
HeyGenVoicesPayload.model_validate(payload)
|
|
1596
1733
|
if path == "/v1/video_generate" and payload.get("model") in get_args(
|
|
1597
1734
|
VideoGenerateModel
|
|
1598
1735
|
):
|
|
@@ -1645,9 +1782,8 @@ class ApplicationServices:
|
|
|
1645
1782
|
payload=payload,
|
|
1646
1783
|
execution=execution,
|
|
1647
1784
|
fallback_extension=(
|
|
1648
|
-
|
|
1649
|
-
if path
|
|
1650
|
-
and payload.get("model") in _IMAGE_GENERATE_BUILDERS
|
|
1785
|
+
image_fallback_extension(payload)
|
|
1786
|
+
if path in {"/v1/image_generate", "/v1/image_edit"}
|
|
1651
1787
|
else fallback_extension_for_endpoint(path)
|
|
1652
1788
|
),
|
|
1653
1789
|
)
|