magic_hour 0.10.0__py3-none-any.whl → 0.12.0__py3-none-any.whl
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.
Potentially problematic release.
This version of magic_hour might be problematic. Click here for more details.
- magic_hour/environment.py +1 -1
- magic_hour/resources/v1/ai_clothes_changer/client.py +8 -8
- magic_hour/resources/v1/ai_headshot_generator/client.py +12 -12
- magic_hour/resources/v1/ai_image_generator/client.py +10 -10
- magic_hour/resources/v1/ai_image_upscaler/client.py +12 -12
- magic_hour/resources/v1/ai_photo_editor/client.py +12 -12
- magic_hour/resources/v1/ai_qr_code_generator/client.py +10 -10
- magic_hour/resources/v1/ai_talking_photo/README.md +43 -0
- magic_hour/resources/v1/ai_talking_photo/__init__.py +4 -0
- magic_hour/resources/v1/ai_talking_photo/client.py +147 -0
- magic_hour/resources/v1/animation/client.py +10 -10
- magic_hour/resources/v1/client.py +6 -0
- magic_hour/resources/v1/face_swap/client.py +8 -8
- magic_hour/resources/v1/face_swap_photo/client.py +8 -8
- magic_hour/resources/v1/files/upload_urls/README.md +4 -4
- magic_hour/resources/v1/files/upload_urls/client.py +14 -12
- magic_hour/resources/v1/image_background_remover/client.py +8 -8
- magic_hour/resources/v1/image_projects/client.py +4 -4
- magic_hour/resources/v1/image_to_video/client.py +12 -12
- magic_hour/resources/v1/lip_sync/client.py +8 -8
- magic_hour/resources/v1/text_to_video/client.py +10 -10
- magic_hour/resources/v1/video_projects/client.py +4 -4
- magic_hour/resources/v1/video_to_video/client.py +12 -12
- magic_hour/types/models/__init__.py +53 -51
- magic_hour/types/models/{post_v1_ai_clothes_changer_response.py → v1_ai_clothes_changer_create_response.py} +1 -1
- magic_hour/types/models/v1_ai_headshot_generator_create_response.py +25 -0
- magic_hour/types/models/{post_v1_ai_photo_editor_response.py → v1_ai_image_generator_create_response.py} +1 -1
- magic_hour/types/models/{post_v1_ai_image_generator_response.py → v1_ai_image_upscaler_create_response.py} +1 -1
- magic_hour/types/models/{post_v1_face_swap_photo_response.py → v1_ai_photo_editor_create_response.py} +1 -1
- magic_hour/types/models/{post_v1_ai_headshot_generator_response.py → v1_ai_qr_code_generator_create_response.py} +1 -1
- magic_hour/types/models/v1_ai_talking_photo_create_response.py +25 -0
- magic_hour/types/models/{post_v1_text_to_video_response.py → v1_animation_create_response.py} +1 -1
- magic_hour/types/models/{post_v1_face_swap_response.py → v1_face_swap_create_response.py} +1 -1
- magic_hour/types/models/{post_v1_ai_image_upscaler_response.py → v1_face_swap_photo_create_response.py} +1 -1
- magic_hour/types/models/v1_files_upload_urls_create_response.py +21 -0
- magic_hour/types/models/{post_v1_files_upload_urls_response_items_item.py → v1_files_upload_urls_create_response_items_item.py} +2 -2
- magic_hour/types/models/v1_image_background_remover_create_response.py +25 -0
- magic_hour/types/models/{get_v1_image_projects_id_response.py → v1_image_projects_get_response.py} +7 -7
- magic_hour/types/models/{get_v1_image_projects_id_response_downloads_item.py → v1_image_projects_get_response_downloads_item.py} +1 -1
- magic_hour/types/models/{get_v1_video_projects_id_response_error.py → v1_image_projects_get_response_error.py} +2 -2
- magic_hour/types/models/{post_v1_lip_sync_response.py → v1_image_to_video_create_response.py} +1 -1
- magic_hour/types/models/{post_v1_animation_response.py → v1_lip_sync_create_response.py} +1 -1
- magic_hour/types/models/{post_v1_image_to_video_response.py → v1_text_to_video_create_response.py} +1 -1
- magic_hour/types/models/{get_v1_video_projects_id_response.py → v1_video_projects_get_response.py} +10 -11
- magic_hour/types/models/{get_v1_video_projects_id_response_download.py → v1_video_projects_get_response_download.py} +1 -1
- magic_hour/types/models/{get_v1_video_projects_id_response_downloads_item.py → v1_video_projects_get_response_downloads_item.py} +1 -1
- magic_hour/types/models/{get_v1_image_projects_id_response_error.py → v1_video_projects_get_response_error.py} +2 -2
- magic_hour/types/models/v1_video_to_video_create_response.py +25 -0
- magic_hour/types/params/__init__.py +200 -182
- magic_hour/types/params/v1_ai_clothes_changer_create_body.py +40 -0
- magic_hour/types/params/{post_v1_ai_clothes_changer_body_assets.py → v1_ai_clothes_changer_create_body_assets.py} +3 -3
- magic_hour/types/params/v1_ai_headshot_generator_create_body.py +49 -0
- magic_hour/types/params/{post_v1_ai_headshot_generator_body_assets.py → v1_ai_headshot_generator_create_body_assets.py} +3 -3
- magic_hour/types/params/{post_v1_ai_headshot_generator_body_style.py → v1_ai_headshot_generator_create_body_style.py} +4 -4
- magic_hour/types/params/{post_v1_ai_image_generator_body.py → v1_ai_image_generator_create_body.py} +9 -9
- magic_hour/types/params/{post_v1_ai_image_generator_body_style.py → v1_ai_image_generator_create_body_style.py} +4 -4
- magic_hour/types/params/v1_ai_image_upscaler_create_body.py +57 -0
- magic_hour/types/params/{post_v1_ai_image_upscaler_body_assets.py → v1_ai_image_upscaler_create_body_assets.py} +3 -3
- magic_hour/types/params/{post_v1_ai_image_upscaler_body_style.py → v1_ai_image_upscaler_create_body_style.py} +4 -4
- magic_hour/types/params/{post_v1_ai_photo_editor_body.py → v1_ai_photo_editor_create_body.py} +14 -14
- magic_hour/types/params/{post_v1_ai_photo_editor_body_assets.py → v1_ai_photo_editor_create_body_assets.py} +3 -3
- magic_hour/types/params/{post_v1_ai_photo_editor_body_style.py → v1_ai_photo_editor_create_body_style.py} +4 -4
- magic_hour/types/params/{post_v1_ai_qr_code_generator_body.py → v1_ai_qr_code_generator_create_body.py} +9 -9
- magic_hour/types/params/{post_v1_ai_qr_code_generator_body_style.py → v1_ai_qr_code_generator_create_body_style.py} +4 -4
- magic_hour/types/params/v1_ai_talking_photo_create_body.py +56 -0
- magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py +36 -0
- magic_hour/types/params/{post_v1_animation_body.py → v1_animation_create_body.py} +14 -14
- magic_hour/types/params/{post_v1_animation_body_assets.py → v1_animation_create_body_assets.py} +3 -3
- magic_hour/types/params/{post_v1_animation_body_style.py → v1_animation_create_body_style.py} +3 -3
- magic_hour/types/params/{post_v1_face_swap_body.py → v1_face_swap_create_body.py} +9 -9
- magic_hour/types/params/{post_v1_face_swap_body_assets.py → v1_face_swap_create_body_assets.py} +3 -3
- magic_hour/types/params/v1_face_swap_photo_create_body.py +40 -0
- magic_hour/types/params/{post_v1_face_swap_photo_body_assets.py → v1_face_swap_photo_create_body_assets.py} +3 -3
- magic_hour/types/params/v1_files_upload_urls_create_body.py +33 -0
- magic_hour/types/params/{post_v1_files_upload_urls_body_items_item.py → v1_files_upload_urls_create_body_items_item.py} +6 -6
- magic_hour/types/params/v1_image_background_remover_create_body.py +40 -0
- magic_hour/types/params/{post_v1_image_background_remover_body_assets.py → v1_image_background_remover_create_body_assets.py} +3 -3
- magic_hour/types/params/{post_v1_image_to_video_body.py → v1_image_to_video_create_body.py} +14 -14
- magic_hour/types/params/{post_v1_image_to_video_body_assets.py → v1_image_to_video_create_body_assets.py} +3 -3
- magic_hour/types/params/{post_v1_image_to_video_body_style.py → v1_image_to_video_create_body_style.py} +4 -4
- magic_hour/types/params/{post_v1_lip_sync_body.py → v1_lip_sync_create_body.py} +9 -9
- magic_hour/types/params/{post_v1_lip_sync_body_assets.py → v1_lip_sync_create_body_assets.py} +3 -3
- magic_hour/types/params/{post_v1_text_to_video_body.py → v1_text_to_video_create_body.py} +9 -9
- magic_hour/types/params/{post_v1_text_to_video_body_style.py → v1_text_to_video_create_body_style.py} +4 -4
- magic_hour/types/params/{post_v1_video_to_video_body.py → v1_video_to_video_create_body.py} +14 -14
- magic_hour/types/params/{post_v1_video_to_video_body_assets.py → v1_video_to_video_create_body_assets.py} +3 -3
- magic_hour/types/params/{post_v1_video_to_video_body_style.py → v1_video_to_video_create_body_style.py} +14 -4
- {magic_hour-0.10.0.dist-info → magic_hour-0.12.0.dist-info}/METADATA +5 -1
- magic_hour-0.12.0.dist-info/RECORD +139 -0
- magic_hour/types/models/post_v1_ai_qr_code_generator_response.py +0 -25
- magic_hour/types/models/post_v1_files_upload_urls_response.py +0 -21
- magic_hour/types/models/post_v1_image_background_remover_response.py +0 -25
- magic_hour/types/models/post_v1_video_to_video_response.py +0 -25
- magic_hour/types/params/post_v1_ai_clothes_changer_body.py +0 -40
- magic_hour/types/params/post_v1_ai_headshot_generator_body.py +0 -49
- magic_hour/types/params/post_v1_ai_image_upscaler_body.py +0 -57
- magic_hour/types/params/post_v1_face_swap_photo_body.py +0 -40
- magic_hour/types/params/post_v1_files_upload_urls_body.py +0 -31
- magic_hour/types/params/post_v1_image_background_remover_body.py +0 -40
- magic_hour-0.10.0.dist-info/RECORD +0 -133
- {magic_hour-0.10.0.dist-info → magic_hour-0.12.0.dist-info}/LICENSE +0 -0
- {magic_hour-0.10.0.dist-info → magic_hour-0.12.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_ai_headshot_generator_create_body_assets import (
|
|
6
|
+
V1AiHeadshotGeneratorCreateBodyAssets,
|
|
7
|
+
_SerializerV1AiHeadshotGeneratorCreateBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
from .v1_ai_headshot_generator_create_body_style import (
|
|
10
|
+
V1AiHeadshotGeneratorCreateBodyStyle,
|
|
11
|
+
_SerializerV1AiHeadshotGeneratorCreateBodyStyle,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class V1AiHeadshotGeneratorCreateBody(typing_extensions.TypedDict):
|
|
16
|
+
"""
|
|
17
|
+
V1AiHeadshotGeneratorCreateBody
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
assets: typing_extensions.Required[V1AiHeadshotGeneratorCreateBodyAssets]
|
|
21
|
+
"""
|
|
22
|
+
Provide the assets for headshot photo
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
name: typing_extensions.NotRequired[str]
|
|
26
|
+
"""
|
|
27
|
+
The name of image
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
style: typing_extensions.NotRequired[V1AiHeadshotGeneratorCreateBodyStyle]
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class _SerializerV1AiHeadshotGeneratorCreateBody(pydantic.BaseModel):
|
|
34
|
+
"""
|
|
35
|
+
Serializer for V1AiHeadshotGeneratorCreateBody handling case conversions
|
|
36
|
+
and file omissions as dictated by the API
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
model_config = pydantic.ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
assets: _SerializerV1AiHeadshotGeneratorCreateBodyAssets = pydantic.Field(
|
|
44
|
+
alias="assets",
|
|
45
|
+
)
|
|
46
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
47
|
+
style: typing.Optional[_SerializerV1AiHeadshotGeneratorCreateBodyStyle] = (
|
|
48
|
+
pydantic.Field(alias="style", default=None)
|
|
49
|
+
)
|
|
@@ -2,7 +2,7 @@ import pydantic
|
|
|
2
2
|
import typing_extensions
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class V1AiHeadshotGeneratorCreateBodyAssets(typing_extensions.TypedDict):
|
|
6
6
|
"""
|
|
7
7
|
Provide the assets for headshot photo
|
|
8
8
|
"""
|
|
@@ -13,9 +13,9 @@ class PostV1AiHeadshotGeneratorBodyAssets(typing_extensions.TypedDict):
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class _SerializerV1AiHeadshotGeneratorCreateBodyAssets(pydantic.BaseModel):
|
|
17
17
|
"""
|
|
18
|
-
Serializer for
|
|
18
|
+
Serializer for V1AiHeadshotGeneratorCreateBodyAssets handling case conversions
|
|
19
19
|
and file omissions as dictated by the API
|
|
20
20
|
"""
|
|
21
21
|
|
|
@@ -3,9 +3,9 @@ import typing
|
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class V1AiHeadshotGeneratorCreateBodyStyle(typing_extensions.TypedDict):
|
|
7
7
|
"""
|
|
8
|
-
|
|
8
|
+
V1AiHeadshotGeneratorCreateBodyStyle
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
prompt: typing_extensions.NotRequired[str]
|
|
@@ -14,9 +14,9 @@ class PostV1AiHeadshotGeneratorBodyStyle(typing_extensions.TypedDict):
|
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class _SerializerV1AiHeadshotGeneratorCreateBodyStyle(pydantic.BaseModel):
|
|
18
18
|
"""
|
|
19
|
-
Serializer for
|
|
19
|
+
Serializer for V1AiHeadshotGeneratorCreateBodyStyle handling case conversions
|
|
20
20
|
and file omissions as dictated by the API
|
|
21
21
|
"""
|
|
22
22
|
|
magic_hour/types/params/{post_v1_ai_image_generator_body.py → v1_ai_image_generator_create_body.py}
RENAMED
|
@@ -2,15 +2,15 @@ import pydantic
|
|
|
2
2
|
import typing
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
from .v1_ai_image_generator_create_body_style import (
|
|
6
|
+
V1AiImageGeneratorCreateBodyStyle,
|
|
7
|
+
_SerializerV1AiImageGeneratorCreateBodyStyle,
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class V1AiImageGeneratorCreateBody(typing_extensions.TypedDict):
|
|
12
12
|
"""
|
|
13
|
-
|
|
13
|
+
V1AiImageGeneratorCreateBody
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
image_count: typing_extensions.Required[int]
|
|
@@ -27,12 +27,12 @@ class PostV1AiImageGeneratorBody(typing_extensions.TypedDict):
|
|
|
27
27
|
typing_extensions.Literal["landscape", "portrait", "square"]
|
|
28
28
|
]
|
|
29
29
|
|
|
30
|
-
style: typing_extensions.Required[
|
|
30
|
+
style: typing_extensions.Required[V1AiImageGeneratorCreateBodyStyle]
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
class
|
|
33
|
+
class _SerializerV1AiImageGeneratorCreateBody(pydantic.BaseModel):
|
|
34
34
|
"""
|
|
35
|
-
Serializer for
|
|
35
|
+
Serializer for V1AiImageGeneratorCreateBody handling case conversions
|
|
36
36
|
and file omissions as dictated by the API
|
|
37
37
|
"""
|
|
38
38
|
|
|
@@ -49,6 +49,6 @@ class _SerializerPostV1AiImageGeneratorBody(pydantic.BaseModel):
|
|
|
49
49
|
alias="orientation",
|
|
50
50
|
)
|
|
51
51
|
)
|
|
52
|
-
style:
|
|
52
|
+
style: _SerializerV1AiImageGeneratorCreateBodyStyle = pydantic.Field(
|
|
53
53
|
alias="style",
|
|
54
54
|
)
|
|
@@ -2,9 +2,9 @@ import pydantic
|
|
|
2
2
|
import typing_extensions
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class V1AiImageGeneratorCreateBodyStyle(typing_extensions.TypedDict):
|
|
6
6
|
"""
|
|
7
|
-
|
|
7
|
+
V1AiImageGeneratorCreateBodyStyle
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
prompt: typing_extensions.Required[str]
|
|
@@ -13,9 +13,9 @@ class PostV1AiImageGeneratorBodyStyle(typing_extensions.TypedDict):
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class _SerializerV1AiImageGeneratorCreateBodyStyle(pydantic.BaseModel):
|
|
17
17
|
"""
|
|
18
|
-
Serializer for
|
|
18
|
+
Serializer for V1AiImageGeneratorCreateBodyStyle handling case conversions
|
|
19
19
|
and file omissions as dictated by the API
|
|
20
20
|
"""
|
|
21
21
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_ai_image_upscaler_create_body_assets import (
|
|
6
|
+
V1AiImageUpscalerCreateBodyAssets,
|
|
7
|
+
_SerializerV1AiImageUpscalerCreateBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
from .v1_ai_image_upscaler_create_body_style import (
|
|
10
|
+
V1AiImageUpscalerCreateBodyStyle,
|
|
11
|
+
_SerializerV1AiImageUpscalerCreateBodyStyle,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class V1AiImageUpscalerCreateBody(typing_extensions.TypedDict):
|
|
16
|
+
"""
|
|
17
|
+
V1AiImageUpscalerCreateBody
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
assets: typing_extensions.Required[V1AiImageUpscalerCreateBodyAssets]
|
|
21
|
+
"""
|
|
22
|
+
Provide the assets for upscaling
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
name: typing_extensions.NotRequired[str]
|
|
26
|
+
"""
|
|
27
|
+
The name of image
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
scale_factor: typing_extensions.Required[float]
|
|
31
|
+
"""
|
|
32
|
+
How much to scale the image. Must be either 2 or 4
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
style: typing_extensions.Required[V1AiImageUpscalerCreateBodyStyle]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class _SerializerV1AiImageUpscalerCreateBody(pydantic.BaseModel):
|
|
39
|
+
"""
|
|
40
|
+
Serializer for V1AiImageUpscalerCreateBody handling case conversions
|
|
41
|
+
and file omissions as dictated by the API
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
model_config = pydantic.ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
assets: _SerializerV1AiImageUpscalerCreateBodyAssets = pydantic.Field(
|
|
49
|
+
alias="assets",
|
|
50
|
+
)
|
|
51
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
52
|
+
scale_factor: float = pydantic.Field(
|
|
53
|
+
alias="scale_factor",
|
|
54
|
+
)
|
|
55
|
+
style: _SerializerV1AiImageUpscalerCreateBodyStyle = pydantic.Field(
|
|
56
|
+
alias="style",
|
|
57
|
+
)
|
|
@@ -2,7 +2,7 @@ import pydantic
|
|
|
2
2
|
import typing_extensions
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class V1AiImageUpscalerCreateBodyAssets(typing_extensions.TypedDict):
|
|
6
6
|
"""
|
|
7
7
|
Provide the assets for upscaling
|
|
8
8
|
"""
|
|
@@ -13,9 +13,9 @@ class PostV1AiImageUpscalerBodyAssets(typing_extensions.TypedDict):
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class _SerializerV1AiImageUpscalerCreateBodyAssets(pydantic.BaseModel):
|
|
17
17
|
"""
|
|
18
|
-
Serializer for
|
|
18
|
+
Serializer for V1AiImageUpscalerCreateBodyAssets handling case conversions
|
|
19
19
|
and file omissions as dictated by the API
|
|
20
20
|
"""
|
|
21
21
|
|
|
@@ -3,9 +3,9 @@ import typing
|
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class V1AiImageUpscalerCreateBodyStyle(typing_extensions.TypedDict):
|
|
7
7
|
"""
|
|
8
|
-
|
|
8
|
+
V1AiImageUpscalerCreateBodyStyle
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
enhancement: typing_extensions.Required[
|
|
@@ -18,9 +18,9 @@ class PostV1AiImageUpscalerBodyStyle(typing_extensions.TypedDict):
|
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class _SerializerV1AiImageUpscalerCreateBodyStyle(pydantic.BaseModel):
|
|
22
22
|
"""
|
|
23
|
-
Serializer for
|
|
23
|
+
Serializer for V1AiImageUpscalerCreateBodyStyle handling case conversions
|
|
24
24
|
and file omissions as dictated by the API
|
|
25
25
|
"""
|
|
26
26
|
|
magic_hour/types/params/{post_v1_ai_photo_editor_body.py → v1_ai_photo_editor_create_body.py}
RENAMED
|
@@ -2,22 +2,22 @@ import pydantic
|
|
|
2
2
|
import typing
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
from .v1_ai_photo_editor_create_body_assets import (
|
|
6
|
+
V1AiPhotoEditorCreateBodyAssets,
|
|
7
|
+
_SerializerV1AiPhotoEditorCreateBodyAssets,
|
|
8
8
|
)
|
|
9
|
-
from .
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
from .v1_ai_photo_editor_create_body_style import (
|
|
10
|
+
V1AiPhotoEditorCreateBodyStyle,
|
|
11
|
+
_SerializerV1AiPhotoEditorCreateBodyStyle,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class V1AiPhotoEditorCreateBody(typing_extensions.TypedDict):
|
|
16
16
|
"""
|
|
17
|
-
|
|
17
|
+
V1AiPhotoEditorCreateBody
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
assets: typing_extensions.Required[
|
|
20
|
+
assets: typing_extensions.Required[V1AiPhotoEditorCreateBodyAssets]
|
|
21
21
|
"""
|
|
22
22
|
Provide the assets for photo editor
|
|
23
23
|
"""
|
|
@@ -37,12 +37,12 @@ class PostV1AiPhotoEditorBody(typing_extensions.TypedDict):
|
|
|
37
37
|
Deprecated: Please use `.style.steps` instead. Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
|
-
style: typing_extensions.Required[
|
|
40
|
+
style: typing_extensions.Required[V1AiPhotoEditorCreateBodyStyle]
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
class
|
|
43
|
+
class _SerializerV1AiPhotoEditorCreateBody(pydantic.BaseModel):
|
|
44
44
|
"""
|
|
45
|
-
Serializer for
|
|
45
|
+
Serializer for V1AiPhotoEditorCreateBody handling case conversions
|
|
46
46
|
and file omissions as dictated by the API
|
|
47
47
|
"""
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@ class _SerializerPostV1AiPhotoEditorBody(pydantic.BaseModel):
|
|
|
50
50
|
populate_by_name=True,
|
|
51
51
|
)
|
|
52
52
|
|
|
53
|
-
assets:
|
|
53
|
+
assets: _SerializerV1AiPhotoEditorCreateBodyAssets = pydantic.Field(
|
|
54
54
|
alias="assets",
|
|
55
55
|
)
|
|
56
56
|
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
@@ -58,6 +58,6 @@ class _SerializerPostV1AiPhotoEditorBody(pydantic.BaseModel):
|
|
|
58
58
|
alias="resolution",
|
|
59
59
|
)
|
|
60
60
|
steps: typing.Optional[int] = pydantic.Field(alias="steps", default=None)
|
|
61
|
-
style:
|
|
61
|
+
style: _SerializerV1AiPhotoEditorCreateBodyStyle = pydantic.Field(
|
|
62
62
|
alias="style",
|
|
63
63
|
)
|
|
@@ -2,7 +2,7 @@ import pydantic
|
|
|
2
2
|
import typing_extensions
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class V1AiPhotoEditorCreateBodyAssets(typing_extensions.TypedDict):
|
|
6
6
|
"""
|
|
7
7
|
Provide the assets for photo editor
|
|
8
8
|
"""
|
|
@@ -13,9 +13,9 @@ class PostV1AiPhotoEditorBodyAssets(typing_extensions.TypedDict):
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class _SerializerV1AiPhotoEditorCreateBodyAssets(pydantic.BaseModel):
|
|
17
17
|
"""
|
|
18
|
-
Serializer for
|
|
18
|
+
Serializer for V1AiPhotoEditorCreateBodyAssets handling case conversions
|
|
19
19
|
and file omissions as dictated by the API
|
|
20
20
|
"""
|
|
21
21
|
|
|
@@ -3,9 +3,9 @@ import typing
|
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class V1AiPhotoEditorCreateBodyStyle(typing_extensions.TypedDict):
|
|
7
7
|
"""
|
|
8
|
-
|
|
8
|
+
V1AiPhotoEditorCreateBodyStyle
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
image_description: typing_extensions.Required[str]
|
|
@@ -39,9 +39,9 @@ class PostV1AiPhotoEditorBodyStyle(typing_extensions.TypedDict):
|
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
class
|
|
42
|
+
class _SerializerV1AiPhotoEditorCreateBodyStyle(pydantic.BaseModel):
|
|
43
43
|
"""
|
|
44
|
-
Serializer for
|
|
44
|
+
Serializer for V1AiPhotoEditorCreateBodyStyle handling case conversions
|
|
45
45
|
and file omissions as dictated by the API
|
|
46
46
|
"""
|
|
47
47
|
|
|
@@ -2,15 +2,15 @@ import pydantic
|
|
|
2
2
|
import typing
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
from .v1_ai_qr_code_generator_create_body_style import (
|
|
6
|
+
V1AiQrCodeGeneratorCreateBodyStyle,
|
|
7
|
+
_SerializerV1AiQrCodeGeneratorCreateBodyStyle,
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class V1AiQrCodeGeneratorCreateBody(typing_extensions.TypedDict):
|
|
12
12
|
"""
|
|
13
|
-
|
|
13
|
+
V1AiQrCodeGeneratorCreateBody
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
content: typing_extensions.Required[str]
|
|
@@ -23,12 +23,12 @@ class PostV1AiQrCodeGeneratorBody(typing_extensions.TypedDict):
|
|
|
23
23
|
The name of image
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
|
-
style: typing_extensions.Required[
|
|
26
|
+
style: typing_extensions.Required[V1AiQrCodeGeneratorCreateBodyStyle]
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class _SerializerV1AiQrCodeGeneratorCreateBody(pydantic.BaseModel):
|
|
30
30
|
"""
|
|
31
|
-
Serializer for
|
|
31
|
+
Serializer for V1AiQrCodeGeneratorCreateBody handling case conversions
|
|
32
32
|
and file omissions as dictated by the API
|
|
33
33
|
"""
|
|
34
34
|
|
|
@@ -40,6 +40,6 @@ class _SerializerPostV1AiQrCodeGeneratorBody(pydantic.BaseModel):
|
|
|
40
40
|
alias="content",
|
|
41
41
|
)
|
|
42
42
|
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
43
|
-
style:
|
|
43
|
+
style: _SerializerV1AiQrCodeGeneratorCreateBodyStyle = pydantic.Field(
|
|
44
44
|
alias="style",
|
|
45
45
|
)
|
|
@@ -2,9 +2,9 @@ import pydantic
|
|
|
2
2
|
import typing_extensions
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class V1AiQrCodeGeneratorCreateBodyStyle(typing_extensions.TypedDict):
|
|
6
6
|
"""
|
|
7
|
-
|
|
7
|
+
V1AiQrCodeGeneratorCreateBodyStyle
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
art_style: typing_extensions.Required[str]
|
|
@@ -13,9 +13,9 @@ class PostV1AiQrCodeGeneratorBodyStyle(typing_extensions.TypedDict):
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class _SerializerV1AiQrCodeGeneratorCreateBodyStyle(pydantic.BaseModel):
|
|
17
17
|
"""
|
|
18
|
-
Serializer for
|
|
18
|
+
Serializer for V1AiQrCodeGeneratorCreateBodyStyle handling case conversions
|
|
19
19
|
and file omissions as dictated by the API
|
|
20
20
|
"""
|
|
21
21
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_ai_talking_photo_create_body_assets import (
|
|
6
|
+
V1AiTalkingPhotoCreateBodyAssets,
|
|
7
|
+
_SerializerV1AiTalkingPhotoCreateBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1AiTalkingPhotoCreateBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
Provide the assets for creating a talking photo
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
assets: typing_extensions.Required[V1AiTalkingPhotoCreateBodyAssets]
|
|
17
|
+
"""
|
|
18
|
+
Provide the assets for creating a talking photo
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
end_seconds: typing_extensions.Required[float]
|
|
22
|
+
"""
|
|
23
|
+
The end time of the input video in seconds
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
name: typing_extensions.NotRequired[str]
|
|
27
|
+
"""
|
|
28
|
+
The name of image
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
start_seconds: typing_extensions.Required[float]
|
|
32
|
+
"""
|
|
33
|
+
The start time of the input video in seconds
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class _SerializerV1AiTalkingPhotoCreateBody(pydantic.BaseModel):
|
|
38
|
+
"""
|
|
39
|
+
Serializer for V1AiTalkingPhotoCreateBody handling case conversions
|
|
40
|
+
and file omissions as dictated by the API
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
model_config = pydantic.ConfigDict(
|
|
44
|
+
populate_by_name=True,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
assets: _SerializerV1AiTalkingPhotoCreateBodyAssets = pydantic.Field(
|
|
48
|
+
alias="assets",
|
|
49
|
+
)
|
|
50
|
+
end_seconds: float = pydantic.Field(
|
|
51
|
+
alias="end_seconds",
|
|
52
|
+
)
|
|
53
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
54
|
+
start_seconds: float = pydantic.Field(
|
|
55
|
+
alias="start_seconds",
|
|
56
|
+
)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AiTalkingPhotoCreateBodyAssets(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
Provide the assets for creating a talking photo
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
audio_file_path: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
The audio file to sync with the image. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
image_file_path: typing_extensions.Required[str]
|
|
16
|
+
"""
|
|
17
|
+
The source image to animate. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class _SerializerV1AiTalkingPhotoCreateBodyAssets(pydantic.BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
Serializer for V1AiTalkingPhotoCreateBodyAssets handling case conversions
|
|
24
|
+
and file omissions as dictated by the API
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
model_config = pydantic.ConfigDict(
|
|
28
|
+
populate_by_name=True,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
audio_file_path: str = pydantic.Field(
|
|
32
|
+
alias="audio_file_path",
|
|
33
|
+
)
|
|
34
|
+
image_file_path: str = pydantic.Field(
|
|
35
|
+
alias="image_file_path",
|
|
36
|
+
)
|
|
@@ -2,22 +2,22 @@ import pydantic
|
|
|
2
2
|
import typing
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
from .v1_animation_create_body_assets import (
|
|
6
|
+
V1AnimationCreateBodyAssets,
|
|
7
|
+
_SerializerV1AnimationCreateBodyAssets,
|
|
8
8
|
)
|
|
9
|
-
from .
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
from .v1_animation_create_body_style import (
|
|
10
|
+
V1AnimationCreateBodyStyle,
|
|
11
|
+
_SerializerV1AnimationCreateBodyStyle,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
class
|
|
15
|
+
class V1AnimationCreateBody(typing_extensions.TypedDict):
|
|
16
16
|
"""
|
|
17
|
-
|
|
17
|
+
V1AnimationCreateBody
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
assets: typing_extensions.Required[
|
|
20
|
+
assets: typing_extensions.Required[V1AnimationCreateBodyAssets]
|
|
21
21
|
"""
|
|
22
22
|
Provide the assets for animation.
|
|
23
23
|
"""
|
|
@@ -42,7 +42,7 @@ class PostV1AnimationBody(typing_extensions.TypedDict):
|
|
|
42
42
|
The name of video
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
|
-
style: typing_extensions.Required[
|
|
45
|
+
style: typing_extensions.Required[V1AnimationCreateBodyStyle]
|
|
46
46
|
"""
|
|
47
47
|
Defines the style of the output video
|
|
48
48
|
"""
|
|
@@ -53,9 +53,9 @@ class PostV1AnimationBody(typing_extensions.TypedDict):
|
|
|
53
53
|
"""
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
class
|
|
56
|
+
class _SerializerV1AnimationCreateBody(pydantic.BaseModel):
|
|
57
57
|
"""
|
|
58
|
-
Serializer for
|
|
58
|
+
Serializer for V1AnimationCreateBody handling case conversions
|
|
59
59
|
and file omissions as dictated by the API
|
|
60
60
|
"""
|
|
61
61
|
|
|
@@ -63,7 +63,7 @@ class _SerializerPostV1AnimationBody(pydantic.BaseModel):
|
|
|
63
63
|
populate_by_name=True,
|
|
64
64
|
)
|
|
65
65
|
|
|
66
|
-
assets:
|
|
66
|
+
assets: _SerializerV1AnimationCreateBodyAssets = pydantic.Field(
|
|
67
67
|
alias="assets",
|
|
68
68
|
)
|
|
69
69
|
end_seconds: float = pydantic.Field(
|
|
@@ -76,7 +76,7 @@ class _SerializerPostV1AnimationBody(pydantic.BaseModel):
|
|
|
76
76
|
alias="height",
|
|
77
77
|
)
|
|
78
78
|
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
79
|
-
style:
|
|
79
|
+
style: _SerializerV1AnimationCreateBodyStyle = pydantic.Field(
|
|
80
80
|
alias="style",
|
|
81
81
|
)
|
|
82
82
|
width: int = pydantic.Field(
|
magic_hour/types/params/{post_v1_animation_body_assets.py → v1_animation_create_body_assets.py}
RENAMED
|
@@ -3,7 +3,7 @@ import typing
|
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class V1AnimationCreateBodyAssets(typing_extensions.TypedDict):
|
|
7
7
|
"""
|
|
8
8
|
Provide the assets for animation.
|
|
9
9
|
"""
|
|
@@ -31,9 +31,9 @@ class PostV1AnimationBodyAssets(typing_extensions.TypedDict):
|
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
class
|
|
34
|
+
class _SerializerV1AnimationCreateBodyAssets(pydantic.BaseModel):
|
|
35
35
|
"""
|
|
36
|
-
Serializer for
|
|
36
|
+
Serializer for V1AnimationCreateBodyAssets handling case conversions
|
|
37
37
|
and file omissions as dictated by the API
|
|
38
38
|
"""
|
|
39
39
|
|
magic_hour/types/params/{post_v1_animation_body_style.py → v1_animation_create_body_style.py}
RENAMED
|
@@ -3,7 +3,7 @@ import typing
|
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class V1AnimationCreateBodyStyle(typing_extensions.TypedDict):
|
|
7
7
|
"""
|
|
8
8
|
Defines the style of the output video
|
|
9
9
|
"""
|
|
@@ -146,9 +146,9 @@ class PostV1AnimationBodyStyle(typing_extensions.TypedDict):
|
|
|
146
146
|
"""
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
class
|
|
149
|
+
class _SerializerV1AnimationCreateBodyStyle(pydantic.BaseModel):
|
|
150
150
|
"""
|
|
151
|
-
Serializer for
|
|
151
|
+
Serializer for V1AnimationCreateBodyStyle handling case conversions
|
|
152
152
|
and file omissions as dictated by the API
|
|
153
153
|
"""
|
|
154
154
|
|