magic_hour 0.10.0__py3-none-any.whl → 0.11.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/animation/client.py +10 -10
- 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 +51 -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/{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 +188 -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/{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} +4 -4
- {magic_hour-0.10.0.dist-info → magic_hour-0.11.0.dist-info}/METADATA +1 -1
- magic_hour-0.11.0.dist-info/RECORD +133 -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.11.0.dist-info}/LICENSE +0 -0
- {magic_hour-0.10.0.dist-info → magic_hour-0.11.0.dist-info}/WHEEL +0 -0
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -2,18 +2,18 @@ import pydantic
|
|
|
2
2
|
import typing
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
from .v1_face_swap_create_body_assets import (
|
|
6
|
+
V1FaceSwapCreateBodyAssets,
|
|
7
|
+
_SerializerV1FaceSwapCreateBodyAssets,
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class V1FaceSwapCreateBody(typing_extensions.TypedDict):
|
|
12
12
|
"""
|
|
13
|
-
|
|
13
|
+
V1FaceSwapCreateBody
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
|
-
assets: typing_extensions.Required[
|
|
16
|
+
assets: typing_extensions.Required[V1FaceSwapCreateBodyAssets]
|
|
17
17
|
"""
|
|
18
18
|
Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
|
|
19
19
|
"""
|
|
@@ -44,9 +44,9 @@ class PostV1FaceSwapBody(typing_extensions.TypedDict):
|
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
class
|
|
47
|
+
class _SerializerV1FaceSwapCreateBody(pydantic.BaseModel):
|
|
48
48
|
"""
|
|
49
|
-
Serializer for
|
|
49
|
+
Serializer for V1FaceSwapCreateBody handling case conversions
|
|
50
50
|
and file omissions as dictated by the API
|
|
51
51
|
"""
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ class _SerializerPostV1FaceSwapBody(pydantic.BaseModel):
|
|
|
54
54
|
populate_by_name=True,
|
|
55
55
|
)
|
|
56
56
|
|
|
57
|
-
assets:
|
|
57
|
+
assets: _SerializerV1FaceSwapCreateBodyAssets = pydantic.Field(
|
|
58
58
|
alias="assets",
|
|
59
59
|
)
|
|
60
60
|
end_seconds: float = pydantic.Field(
|
magic_hour/types/params/{post_v1_face_swap_body_assets.py → v1_face_swap_create_body_assets.py}
RENAMED
|
@@ -3,7 +3,7 @@ import typing
|
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class V1FaceSwapCreateBodyAssets(typing_extensions.TypedDict):
|
|
7
7
|
"""
|
|
8
8
|
Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
|
|
9
9
|
"""
|
|
@@ -28,9 +28,9 @@ class PostV1FaceSwapBodyAssets(typing_extensions.TypedDict):
|
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
class
|
|
31
|
+
class _SerializerV1FaceSwapCreateBodyAssets(pydantic.BaseModel):
|
|
32
32
|
"""
|
|
33
|
-
Serializer for
|
|
33
|
+
Serializer for V1FaceSwapCreateBodyAssets handling case conversions
|
|
34
34
|
and file omissions as dictated by the API
|
|
35
35
|
"""
|
|
36
36
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_face_swap_photo_create_body_assets import (
|
|
6
|
+
V1FaceSwapPhotoCreateBodyAssets,
|
|
7
|
+
_SerializerV1FaceSwapPhotoCreateBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1FaceSwapPhotoCreateBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
V1FaceSwapPhotoCreateBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
assets: typing_extensions.Required[V1FaceSwapPhotoCreateBodyAssets]
|
|
17
|
+
"""
|
|
18
|
+
Provide the assets for face swap photo
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: typing_extensions.NotRequired[str]
|
|
22
|
+
"""
|
|
23
|
+
The name of image
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class _SerializerV1FaceSwapPhotoCreateBody(pydantic.BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for V1FaceSwapPhotoCreateBody handling case conversions
|
|
30
|
+
and file omissions as dictated by the API
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
model_config = pydantic.ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
assets: _SerializerV1FaceSwapPhotoCreateBodyAssets = pydantic.Field(
|
|
38
|
+
alias="assets",
|
|
39
|
+
)
|
|
40
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
@@ -2,7 +2,7 @@ import pydantic
|
|
|
2
2
|
import typing_extensions
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class V1FaceSwapPhotoCreateBodyAssets(typing_extensions.TypedDict):
|
|
6
6
|
"""
|
|
7
7
|
Provide the assets for face swap photo
|
|
8
8
|
"""
|
|
@@ -18,9 +18,9 @@ class PostV1FaceSwapPhotoBodyAssets(typing_extensions.TypedDict):
|
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class _SerializerV1FaceSwapPhotoCreateBodyAssets(pydantic.BaseModel):
|
|
22
22
|
"""
|
|
23
|
-
Serializer for
|
|
23
|
+
Serializer for V1FaceSwapPhotoCreateBodyAssets handling case conversions
|
|
24
24
|
and file omissions as dictated by the API
|
|
25
25
|
"""
|
|
26
26
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_files_upload_urls_create_body_items_item import (
|
|
6
|
+
V1FilesUploadUrlsCreateBodyItemsItem,
|
|
7
|
+
_SerializerV1FilesUploadUrlsCreateBodyItemsItem,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1FilesUploadUrlsCreateBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
V1FilesUploadUrlsCreateBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
items: typing_extensions.Required[typing.List[V1FilesUploadUrlsCreateBodyItemsItem]]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class _SerializerV1FilesUploadUrlsCreateBody(pydantic.BaseModel):
|
|
20
|
+
"""
|
|
21
|
+
Serializer for V1FilesUploadUrlsCreateBody handling case conversions
|
|
22
|
+
and file omissions as dictated by the API
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
model_config = pydantic.ConfigDict(
|
|
26
|
+
populate_by_name=True,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
items: typing.List[_SerializerV1FilesUploadUrlsCreateBodyItemsItem] = (
|
|
30
|
+
pydantic.Field(
|
|
31
|
+
alias="items",
|
|
32
|
+
)
|
|
33
|
+
)
|
|
@@ -2,9 +2,9 @@ import pydantic
|
|
|
2
2
|
import typing_extensions
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class V1FilesUploadUrlsCreateBodyItemsItem(typing_extensions.TypedDict):
|
|
6
6
|
"""
|
|
7
|
-
|
|
7
|
+
V1FilesUploadUrlsCreateBodyItemsItem
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
extension: typing_extensions.Required[str]
|
|
@@ -12,7 +12,7 @@ class PostV1FilesUploadUrlsBodyItemsItem(typing_extensions.TypedDict):
|
|
|
12
12
|
the extension of the file to upload. Do not include the dot (.) before the extension.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
type_: typing_extensions.Required[
|
|
16
16
|
typing_extensions.Literal["audio", "image", "video"]
|
|
17
17
|
]
|
|
18
18
|
"""
|
|
@@ -20,9 +20,9 @@ class PostV1FilesUploadUrlsBodyItemsItem(typing_extensions.TypedDict):
|
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class
|
|
23
|
+
class _SerializerV1FilesUploadUrlsCreateBodyItemsItem(pydantic.BaseModel):
|
|
24
24
|
"""
|
|
25
|
-
Serializer for
|
|
25
|
+
Serializer for V1FilesUploadUrlsCreateBodyItemsItem handling case conversions
|
|
26
26
|
and file omissions as dictated by the API
|
|
27
27
|
"""
|
|
28
28
|
|
|
@@ -33,6 +33,6 @@ class _SerializerPostV1FilesUploadUrlsBodyItemsItem(pydantic.BaseModel):
|
|
|
33
33
|
extension: str = pydantic.Field(
|
|
34
34
|
alias="extension",
|
|
35
35
|
)
|
|
36
|
-
|
|
36
|
+
type_: typing_extensions.Literal["audio", "image", "video"] = pydantic.Field(
|
|
37
37
|
alias="type",
|
|
38
38
|
)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_image_background_remover_create_body_assets import (
|
|
6
|
+
V1ImageBackgroundRemoverCreateBodyAssets,
|
|
7
|
+
_SerializerV1ImageBackgroundRemoverCreateBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1ImageBackgroundRemoverCreateBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
V1ImageBackgroundRemoverCreateBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
assets: typing_extensions.Required[V1ImageBackgroundRemoverCreateBodyAssets]
|
|
17
|
+
"""
|
|
18
|
+
Provide the assets for background removal
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: typing_extensions.NotRequired[str]
|
|
22
|
+
"""
|
|
23
|
+
The name of image
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class _SerializerV1ImageBackgroundRemoverCreateBody(pydantic.BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for V1ImageBackgroundRemoverCreateBody handling case conversions
|
|
30
|
+
and file omissions as dictated by the API
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
model_config = pydantic.ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
assets: _SerializerV1ImageBackgroundRemoverCreateBodyAssets = pydantic.Field(
|
|
38
|
+
alias="assets",
|
|
39
|
+
)
|
|
40
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
@@ -2,7 +2,7 @@ import pydantic
|
|
|
2
2
|
import typing_extensions
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class V1ImageBackgroundRemoverCreateBodyAssets(typing_extensions.TypedDict):
|
|
6
6
|
"""
|
|
7
7
|
Provide the assets for background removal
|
|
8
8
|
"""
|
|
@@ -13,9 +13,9 @@ class PostV1ImageBackgroundRemoverBodyAssets(typing_extensions.TypedDict):
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class _SerializerV1ImageBackgroundRemoverCreateBodyAssets(pydantic.BaseModel):
|
|
17
17
|
"""
|
|
18
|
-
Serializer for
|
|
18
|
+
Serializer for V1ImageBackgroundRemoverCreateBodyAssets handling case conversions
|
|
19
19
|
and file omissions as dictated by the API
|
|
20
20
|
"""
|
|
21
21
|
|