magic_hour 0.8.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/__init__.py +6 -0
- magic_hour/client.py +61 -0
- magic_hour/core/__init__.py +53 -0
- magic_hour/core/api_error.py +48 -0
- magic_hour/core/auth.py +314 -0
- magic_hour/core/base_client.py +600 -0
- magic_hour/core/binary_response.py +23 -0
- magic_hour/core/request.py +158 -0
- magic_hour/core/response.py +293 -0
- magic_hour/core/type_utils.py +28 -0
- magic_hour/core/utils.py +38 -0
- magic_hour/environment.py +6 -0
- magic_hour/resources/v1/__init__.py +4 -0
- magic_hour/resources/v1/ai_clothes_changer/README.md +41 -0
- magic_hour/resources/v1/ai_clothes_changer/__init__.py +4 -0
- magic_hour/resources/v1/ai_clothes_changer/client.py +129 -0
- magic_hour/resources/v1/ai_headshot_generator/README.md +31 -0
- magic_hour/resources/v1/ai_headshot_generator/__init__.py +4 -0
- magic_hour/resources/v1/ai_headshot_generator/client.py +119 -0
- magic_hour/resources/v1/ai_image_generator/README.md +37 -0
- magic_hour/resources/v1/ai_image_generator/__init__.py +4 -0
- magic_hour/resources/v1/ai_image_generator/client.py +144 -0
- magic_hour/resources/v1/ai_image_upscaler/README.md +37 -0
- magic_hour/resources/v1/ai_image_upscaler/__init__.py +4 -0
- magic_hour/resources/v1/ai_image_upscaler/client.py +143 -0
- magic_hour/resources/v1/ai_photo_editor/README.md +53 -0
- magic_hour/resources/v1/ai_photo_editor/__init__.py +4 -0
- magic_hour/resources/v1/ai_photo_editor/client.py +167 -0
- magic_hour/resources/v1/ai_qr_code_generator/README.md +35 -0
- magic_hour/resources/v1/ai_qr_code_generator/__init__.py +4 -0
- magic_hour/resources/v1/ai_qr_code_generator/client.py +127 -0
- magic_hour/resources/v1/animation/README.md +63 -0
- magic_hour/resources/v1/animation/__init__.py +4 -0
- magic_hour/resources/v1/animation/client.py +179 -0
- magic_hour/resources/v1/client.py +153 -0
- magic_hour/resources/v1/face_swap/README.md +52 -0
- magic_hour/resources/v1/face_swap/__init__.py +4 -0
- magic_hour/resources/v1/face_swap/client.py +165 -0
- magic_hour/resources/v1/face_swap_photo/README.md +39 -0
- magic_hour/resources/v1/face_swap_photo/__init__.py +4 -0
- magic_hour/resources/v1/face_swap_photo/client.py +127 -0
- magic_hour/resources/v1/files/__init__.py +4 -0
- magic_hour/resources/v1/files/client.py +19 -0
- magic_hour/resources/v1/files/upload_urls/README.md +56 -0
- magic_hour/resources/v1/files/upload_urls/__init__.py +4 -0
- magic_hour/resources/v1/files/upload_urls/client.py +142 -0
- magic_hour/resources/v1/image_background_remover/README.md +31 -0
- magic_hour/resources/v1/image_background_remover/__init__.py +4 -0
- magic_hour/resources/v1/image_background_remover/client.py +121 -0
- magic_hour/resources/v1/image_projects/README.md +63 -0
- magic_hour/resources/v1/image_projects/__init__.py +4 -0
- magic_hour/resources/v1/image_projects/client.py +177 -0
- magic_hour/resources/v1/image_to_video/README.md +44 -0
- magic_hour/resources/v1/image_to_video/__init__.py +4 -0
- magic_hour/resources/v1/image_to_video/client.py +165 -0
- magic_hour/resources/v1/lip_sync/README.md +54 -0
- magic_hour/resources/v1/lip_sync/__init__.py +4 -0
- magic_hour/resources/v1/lip_sync/client.py +177 -0
- magic_hour/resources/v1/text_to_video/README.md +40 -0
- magic_hour/resources/v1/text_to_video/__init__.py +4 -0
- magic_hour/resources/v1/text_to_video/client.py +150 -0
- magic_hour/resources/v1/video_projects/README.md +63 -0
- magic_hour/resources/v1/video_projects/__init__.py +4 -0
- magic_hour/resources/v1/video_projects/client.py +177 -0
- magic_hour/resources/v1/video_to_video/README.md +60 -0
- magic_hour/resources/v1/video_to_video/__init__.py +4 -0
- magic_hour/resources/v1/video_to_video/client.py +204 -0
- magic_hour/types/models/__init__.py +60 -0
- magic_hour/types/models/get_v1_image_projects_id_response.py +82 -0
- magic_hour/types/models/get_v1_image_projects_id_response_downloads_item.py +19 -0
- magic_hour/types/models/get_v1_image_projects_id_response_error.py +25 -0
- magic_hour/types/models/get_v1_video_projects_id_response.py +114 -0
- magic_hour/types/models/get_v1_video_projects_id_response_download.py +19 -0
- magic_hour/types/models/get_v1_video_projects_id_response_downloads_item.py +19 -0
- magic_hour/types/models/get_v1_video_projects_id_response_error.py +25 -0
- magic_hour/types/models/post_v1_ai_clothes_changer_response.py +25 -0
- magic_hour/types/models/post_v1_ai_headshot_generator_response.py +25 -0
- magic_hour/types/models/post_v1_ai_image_generator_response.py +25 -0
- magic_hour/types/models/post_v1_ai_image_upscaler_response.py +25 -0
- magic_hour/types/models/post_v1_ai_photo_editor_response.py +25 -0
- magic_hour/types/models/post_v1_ai_qr_code_generator_response.py +25 -0
- magic_hour/types/models/post_v1_animation_response.py +25 -0
- magic_hour/types/models/post_v1_face_swap_photo_response.py +25 -0
- magic_hour/types/models/post_v1_face_swap_response.py +25 -0
- magic_hour/types/models/post_v1_files_upload_urls_response.py +21 -0
- magic_hour/types/models/post_v1_files_upload_urls_response_items_item.py +31 -0
- magic_hour/types/models/post_v1_image_background_remover_response.py +25 -0
- magic_hour/types/models/post_v1_image_to_video_response.py +25 -0
- magic_hour/types/models/post_v1_lip_sync_response.py +25 -0
- magic_hour/types/models/post_v1_text_to_video_response.py +25 -0
- magic_hour/types/models/post_v1_video_to_video_response.py +25 -0
- magic_hour/types/params/__init__.py +205 -0
- magic_hour/types/params/post_v1_ai_clothes_changer_body.py +40 -0
- magic_hour/types/params/post_v1_ai_clothes_changer_body_assets.py +45 -0
- magic_hour/types/params/post_v1_ai_headshot_generator_body.py +40 -0
- magic_hour/types/params/post_v1_ai_headshot_generator_body_assets.py +28 -0
- magic_hour/types/params/post_v1_ai_image_generator_body.py +54 -0
- magic_hour/types/params/post_v1_ai_image_generator_body_style.py +28 -0
- magic_hour/types/params/post_v1_ai_image_upscaler_body.py +54 -0
- magic_hour/types/params/post_v1_ai_image_upscaler_body_assets.py +28 -0
- magic_hour/types/params/post_v1_ai_image_upscaler_body_style.py +36 -0
- magic_hour/types/params/post_v1_ai_photo_editor_body.py +63 -0
- magic_hour/types/params/post_v1_ai_photo_editor_body_assets.py +28 -0
- magic_hour/types/params/post_v1_ai_photo_editor_body_style.py +67 -0
- magic_hour/types/params/post_v1_ai_qr_code_generator_body.py +45 -0
- magic_hour/types/params/post_v1_ai_qr_code_generator_body_style.py +28 -0
- magic_hour/types/params/post_v1_animation_body.py +84 -0
- magic_hour/types/params/post_v1_animation_body_assets.py +55 -0
- magic_hour/types/params/post_v1_animation_body_style.py +279 -0
- magic_hour/types/params/post_v1_face_swap_body.py +72 -0
- magic_hour/types/params/post_v1_face_swap_body_assets.py +52 -0
- magic_hour/types/params/post_v1_face_swap_photo_body.py +40 -0
- magic_hour/types/params/post_v1_face_swap_photo_body_assets.py +36 -0
- magic_hour/types/params/post_v1_files_upload_urls_body.py +31 -0
- magic_hour/types/params/post_v1_files_upload_urls_body_items_item.py +38 -0
- magic_hour/types/params/post_v1_image_background_remover_body.py +40 -0
- magic_hour/types/params/post_v1_image_background_remover_body_assets.py +28 -0
- magic_hour/types/params/post_v1_image_to_video_body.py +73 -0
- magic_hour/types/params/post_v1_image_to_video_body_assets.py +28 -0
- magic_hour/types/params/post_v1_image_to_video_body_style.py +29 -0
- magic_hour/types/params/post_v1_lip_sync_body.py +80 -0
- magic_hour/types/params/post_v1_lip_sync_body_assets.py +52 -0
- magic_hour/types/params/post_v1_text_to_video_body.py +57 -0
- magic_hour/types/params/post_v1_text_to_video_body_style.py +28 -0
- magic_hour/types/params/post_v1_video_to_video_body.py +93 -0
- magic_hour/types/params/post_v1_video_to_video_body_assets.py +44 -0
- magic_hour/types/params/post_v1_video_to_video_body_style.py +199 -0
- magic_hour-0.8.0.dist-info/LICENSE +21 -0
- magic_hour-0.8.0.dist-info/METADATA +138 -0
- magic_hour-0.8.0.dist-info/RECORD +131 -0
- magic_hour-0.8.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
from .post_v1_ai_clothes_changer_body_assets import (
|
|
2
|
+
PostV1AiClothesChangerBodyAssets,
|
|
3
|
+
_SerializerPostV1AiClothesChangerBodyAssets,
|
|
4
|
+
)
|
|
5
|
+
from .post_v1_ai_headshot_generator_body_assets import (
|
|
6
|
+
PostV1AiHeadshotGeneratorBodyAssets,
|
|
7
|
+
_SerializerPostV1AiHeadshotGeneratorBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
from .post_v1_ai_image_generator_body_style import (
|
|
10
|
+
PostV1AiImageGeneratorBodyStyle,
|
|
11
|
+
_SerializerPostV1AiImageGeneratorBodyStyle,
|
|
12
|
+
)
|
|
13
|
+
from .post_v1_ai_image_upscaler_body_assets import (
|
|
14
|
+
PostV1AiImageUpscalerBodyAssets,
|
|
15
|
+
_SerializerPostV1AiImageUpscalerBodyAssets,
|
|
16
|
+
)
|
|
17
|
+
from .post_v1_ai_image_upscaler_body_style import (
|
|
18
|
+
PostV1AiImageUpscalerBodyStyle,
|
|
19
|
+
_SerializerPostV1AiImageUpscalerBodyStyle,
|
|
20
|
+
)
|
|
21
|
+
from .post_v1_ai_photo_editor_body_assets import (
|
|
22
|
+
PostV1AiPhotoEditorBodyAssets,
|
|
23
|
+
_SerializerPostV1AiPhotoEditorBodyAssets,
|
|
24
|
+
)
|
|
25
|
+
from .post_v1_ai_photo_editor_body_style import (
|
|
26
|
+
PostV1AiPhotoEditorBodyStyle,
|
|
27
|
+
_SerializerPostV1AiPhotoEditorBodyStyle,
|
|
28
|
+
)
|
|
29
|
+
from .post_v1_ai_qr_code_generator_body_style import (
|
|
30
|
+
PostV1AiQrCodeGeneratorBodyStyle,
|
|
31
|
+
_SerializerPostV1AiQrCodeGeneratorBodyStyle,
|
|
32
|
+
)
|
|
33
|
+
from .post_v1_animation_body_assets import (
|
|
34
|
+
PostV1AnimationBodyAssets,
|
|
35
|
+
_SerializerPostV1AnimationBodyAssets,
|
|
36
|
+
)
|
|
37
|
+
from .post_v1_animation_body_style import (
|
|
38
|
+
PostV1AnimationBodyStyle,
|
|
39
|
+
_SerializerPostV1AnimationBodyStyle,
|
|
40
|
+
)
|
|
41
|
+
from .post_v1_face_swap_body_assets import (
|
|
42
|
+
PostV1FaceSwapBodyAssets,
|
|
43
|
+
_SerializerPostV1FaceSwapBodyAssets,
|
|
44
|
+
)
|
|
45
|
+
from .post_v1_face_swap_photo_body_assets import (
|
|
46
|
+
PostV1FaceSwapPhotoBodyAssets,
|
|
47
|
+
_SerializerPostV1FaceSwapPhotoBodyAssets,
|
|
48
|
+
)
|
|
49
|
+
from .post_v1_files_upload_urls_body_items_item import (
|
|
50
|
+
PostV1FilesUploadUrlsBodyItemsItem,
|
|
51
|
+
_SerializerPostV1FilesUploadUrlsBodyItemsItem,
|
|
52
|
+
)
|
|
53
|
+
from .post_v1_image_background_remover_body_assets import (
|
|
54
|
+
PostV1ImageBackgroundRemoverBodyAssets,
|
|
55
|
+
_SerializerPostV1ImageBackgroundRemoverBodyAssets,
|
|
56
|
+
)
|
|
57
|
+
from .post_v1_image_to_video_body_assets import (
|
|
58
|
+
PostV1ImageToVideoBodyAssets,
|
|
59
|
+
_SerializerPostV1ImageToVideoBodyAssets,
|
|
60
|
+
)
|
|
61
|
+
from .post_v1_image_to_video_body_style import (
|
|
62
|
+
PostV1ImageToVideoBodyStyle,
|
|
63
|
+
_SerializerPostV1ImageToVideoBodyStyle,
|
|
64
|
+
)
|
|
65
|
+
from .post_v1_lip_sync_body_assets import (
|
|
66
|
+
PostV1LipSyncBodyAssets,
|
|
67
|
+
_SerializerPostV1LipSyncBodyAssets,
|
|
68
|
+
)
|
|
69
|
+
from .post_v1_text_to_video_body_style import (
|
|
70
|
+
PostV1TextToVideoBodyStyle,
|
|
71
|
+
_SerializerPostV1TextToVideoBodyStyle,
|
|
72
|
+
)
|
|
73
|
+
from .post_v1_video_to_video_body_assets import (
|
|
74
|
+
PostV1VideoToVideoBodyAssets,
|
|
75
|
+
_SerializerPostV1VideoToVideoBodyAssets,
|
|
76
|
+
)
|
|
77
|
+
from .post_v1_video_to_video_body_style import (
|
|
78
|
+
PostV1VideoToVideoBodyStyle,
|
|
79
|
+
_SerializerPostV1VideoToVideoBodyStyle,
|
|
80
|
+
)
|
|
81
|
+
from .post_v1_ai_clothes_changer_body import (
|
|
82
|
+
PostV1AiClothesChangerBody,
|
|
83
|
+
_SerializerPostV1AiClothesChangerBody,
|
|
84
|
+
)
|
|
85
|
+
from .post_v1_ai_headshot_generator_body import (
|
|
86
|
+
PostV1AiHeadshotGeneratorBody,
|
|
87
|
+
_SerializerPostV1AiHeadshotGeneratorBody,
|
|
88
|
+
)
|
|
89
|
+
from .post_v1_ai_image_generator_body import (
|
|
90
|
+
PostV1AiImageGeneratorBody,
|
|
91
|
+
_SerializerPostV1AiImageGeneratorBody,
|
|
92
|
+
)
|
|
93
|
+
from .post_v1_ai_image_upscaler_body import (
|
|
94
|
+
PostV1AiImageUpscalerBody,
|
|
95
|
+
_SerializerPostV1AiImageUpscalerBody,
|
|
96
|
+
)
|
|
97
|
+
from .post_v1_ai_photo_editor_body import (
|
|
98
|
+
PostV1AiPhotoEditorBody,
|
|
99
|
+
_SerializerPostV1AiPhotoEditorBody,
|
|
100
|
+
)
|
|
101
|
+
from .post_v1_ai_qr_code_generator_body import (
|
|
102
|
+
PostV1AiQrCodeGeneratorBody,
|
|
103
|
+
_SerializerPostV1AiQrCodeGeneratorBody,
|
|
104
|
+
)
|
|
105
|
+
from .post_v1_animation_body import PostV1AnimationBody, _SerializerPostV1AnimationBody
|
|
106
|
+
from .post_v1_face_swap_body import PostV1FaceSwapBody, _SerializerPostV1FaceSwapBody
|
|
107
|
+
from .post_v1_face_swap_photo_body import (
|
|
108
|
+
PostV1FaceSwapPhotoBody,
|
|
109
|
+
_SerializerPostV1FaceSwapPhotoBody,
|
|
110
|
+
)
|
|
111
|
+
from .post_v1_files_upload_urls_body import (
|
|
112
|
+
PostV1FilesUploadUrlsBody,
|
|
113
|
+
_SerializerPostV1FilesUploadUrlsBody,
|
|
114
|
+
)
|
|
115
|
+
from .post_v1_image_background_remover_body import (
|
|
116
|
+
PostV1ImageBackgroundRemoverBody,
|
|
117
|
+
_SerializerPostV1ImageBackgroundRemoverBody,
|
|
118
|
+
)
|
|
119
|
+
from .post_v1_image_to_video_body import (
|
|
120
|
+
PostV1ImageToVideoBody,
|
|
121
|
+
_SerializerPostV1ImageToVideoBody,
|
|
122
|
+
)
|
|
123
|
+
from .post_v1_lip_sync_body import PostV1LipSyncBody, _SerializerPostV1LipSyncBody
|
|
124
|
+
from .post_v1_text_to_video_body import (
|
|
125
|
+
PostV1TextToVideoBody,
|
|
126
|
+
_SerializerPostV1TextToVideoBody,
|
|
127
|
+
)
|
|
128
|
+
from .post_v1_video_to_video_body import (
|
|
129
|
+
PostV1VideoToVideoBody,
|
|
130
|
+
_SerializerPostV1VideoToVideoBody,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
__all__ = [
|
|
135
|
+
"PostV1AiClothesChangerBody",
|
|
136
|
+
"PostV1AiClothesChangerBodyAssets",
|
|
137
|
+
"PostV1AiHeadshotGeneratorBody",
|
|
138
|
+
"PostV1AiHeadshotGeneratorBodyAssets",
|
|
139
|
+
"PostV1AiImageGeneratorBody",
|
|
140
|
+
"PostV1AiImageGeneratorBodyStyle",
|
|
141
|
+
"PostV1AiImageUpscalerBody",
|
|
142
|
+
"PostV1AiImageUpscalerBodyAssets",
|
|
143
|
+
"PostV1AiImageUpscalerBodyStyle",
|
|
144
|
+
"PostV1AiPhotoEditorBody",
|
|
145
|
+
"PostV1AiPhotoEditorBodyAssets",
|
|
146
|
+
"PostV1AiPhotoEditorBodyStyle",
|
|
147
|
+
"PostV1AiQrCodeGeneratorBody",
|
|
148
|
+
"PostV1AiQrCodeGeneratorBodyStyle",
|
|
149
|
+
"PostV1AnimationBody",
|
|
150
|
+
"PostV1AnimationBodyAssets",
|
|
151
|
+
"PostV1AnimationBodyStyle",
|
|
152
|
+
"PostV1FaceSwapBody",
|
|
153
|
+
"PostV1FaceSwapBodyAssets",
|
|
154
|
+
"PostV1FaceSwapPhotoBody",
|
|
155
|
+
"PostV1FaceSwapPhotoBodyAssets",
|
|
156
|
+
"PostV1FilesUploadUrlsBody",
|
|
157
|
+
"PostV1FilesUploadUrlsBodyItemsItem",
|
|
158
|
+
"PostV1ImageBackgroundRemoverBody",
|
|
159
|
+
"PostV1ImageBackgroundRemoverBodyAssets",
|
|
160
|
+
"PostV1ImageToVideoBody",
|
|
161
|
+
"PostV1ImageToVideoBodyAssets",
|
|
162
|
+
"PostV1ImageToVideoBodyStyle",
|
|
163
|
+
"PostV1LipSyncBody",
|
|
164
|
+
"PostV1LipSyncBodyAssets",
|
|
165
|
+
"PostV1TextToVideoBody",
|
|
166
|
+
"PostV1TextToVideoBodyStyle",
|
|
167
|
+
"PostV1VideoToVideoBody",
|
|
168
|
+
"PostV1VideoToVideoBodyAssets",
|
|
169
|
+
"PostV1VideoToVideoBodyStyle",
|
|
170
|
+
"_SerializerPostV1AiClothesChangerBody",
|
|
171
|
+
"_SerializerPostV1AiClothesChangerBodyAssets",
|
|
172
|
+
"_SerializerPostV1AiHeadshotGeneratorBody",
|
|
173
|
+
"_SerializerPostV1AiHeadshotGeneratorBodyAssets",
|
|
174
|
+
"_SerializerPostV1AiImageGeneratorBody",
|
|
175
|
+
"_SerializerPostV1AiImageGeneratorBodyStyle",
|
|
176
|
+
"_SerializerPostV1AiImageUpscalerBody",
|
|
177
|
+
"_SerializerPostV1AiImageUpscalerBodyAssets",
|
|
178
|
+
"_SerializerPostV1AiImageUpscalerBodyStyle",
|
|
179
|
+
"_SerializerPostV1AiPhotoEditorBody",
|
|
180
|
+
"_SerializerPostV1AiPhotoEditorBodyAssets",
|
|
181
|
+
"_SerializerPostV1AiPhotoEditorBodyStyle",
|
|
182
|
+
"_SerializerPostV1AiQrCodeGeneratorBody",
|
|
183
|
+
"_SerializerPostV1AiQrCodeGeneratorBodyStyle",
|
|
184
|
+
"_SerializerPostV1AnimationBody",
|
|
185
|
+
"_SerializerPostV1AnimationBodyAssets",
|
|
186
|
+
"_SerializerPostV1AnimationBodyStyle",
|
|
187
|
+
"_SerializerPostV1FaceSwapBody",
|
|
188
|
+
"_SerializerPostV1FaceSwapBodyAssets",
|
|
189
|
+
"_SerializerPostV1FaceSwapPhotoBody",
|
|
190
|
+
"_SerializerPostV1FaceSwapPhotoBodyAssets",
|
|
191
|
+
"_SerializerPostV1FilesUploadUrlsBody",
|
|
192
|
+
"_SerializerPostV1FilesUploadUrlsBodyItemsItem",
|
|
193
|
+
"_SerializerPostV1ImageBackgroundRemoverBody",
|
|
194
|
+
"_SerializerPostV1ImageBackgroundRemoverBodyAssets",
|
|
195
|
+
"_SerializerPostV1ImageToVideoBody",
|
|
196
|
+
"_SerializerPostV1ImageToVideoBodyAssets",
|
|
197
|
+
"_SerializerPostV1ImageToVideoBodyStyle",
|
|
198
|
+
"_SerializerPostV1LipSyncBody",
|
|
199
|
+
"_SerializerPostV1LipSyncBodyAssets",
|
|
200
|
+
"_SerializerPostV1TextToVideoBody",
|
|
201
|
+
"_SerializerPostV1TextToVideoBodyStyle",
|
|
202
|
+
"_SerializerPostV1VideoToVideoBody",
|
|
203
|
+
"_SerializerPostV1VideoToVideoBodyAssets",
|
|
204
|
+
"_SerializerPostV1VideoToVideoBodyStyle",
|
|
205
|
+
]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
import typing_extensions
|
|
3
|
+
import pydantic
|
|
4
|
+
|
|
5
|
+
from .post_v1_ai_clothes_changer_body_assets import (
|
|
6
|
+
PostV1AiClothesChangerBodyAssets,
|
|
7
|
+
_SerializerPostV1AiClothesChangerBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PostV1AiClothesChangerBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
PostV1AiClothesChangerBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
assets: typing_extensions.Required[PostV1AiClothesChangerBodyAssets]
|
|
17
|
+
"""
|
|
18
|
+
Provide the assets for clothes changer
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: typing_extensions.NotRequired[str]
|
|
22
|
+
"""
|
|
23
|
+
The name of image
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class _SerializerPostV1AiClothesChangerBody(pydantic.BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for PostV1AiClothesChangerBody 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: _SerializerPostV1AiClothesChangerBodyAssets = pydantic.Field(
|
|
38
|
+
alias="assets",
|
|
39
|
+
)
|
|
40
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import typing_extensions
|
|
2
|
+
import pydantic
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class PostV1AiClothesChangerBodyAssets(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
Provide the assets for clothes changer
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
garment_file_path: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
The image of the outfit. This value can be the `file_path` field from the response of the [upload urls API](/docs/api/tag/files/post/v1/files/upload-urls), or the url of the file.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
garment_type: typing_extensions.Required[
|
|
16
|
+
typing_extensions.Literal["dresses", "lower_body", "upper_body"]
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
person_file_path: typing_extensions.Required[str]
|
|
20
|
+
"""
|
|
21
|
+
The image with the person. This value can be the `file_path` field from the response of the [upload urls API](/docs/api/tag/files/post/v1/files/upload-urls), or the url of the file.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class _SerializerPostV1AiClothesChangerBodyAssets(pydantic.BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Serializer for PostV1AiClothesChangerBodyAssets handling case conversions
|
|
28
|
+
and file omissions as dictated by the API
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
model_config = pydantic.ConfigDict(
|
|
32
|
+
populate_by_name=True,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
garment_file_path: str = pydantic.Field(
|
|
36
|
+
alias="garment_file_path",
|
|
37
|
+
)
|
|
38
|
+
garment_type: typing_extensions.Literal["dresses", "lower_body", "upper_body"] = (
|
|
39
|
+
pydantic.Field(
|
|
40
|
+
alias="garment_type",
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
person_file_path: str = pydantic.Field(
|
|
44
|
+
alias="person_file_path",
|
|
45
|
+
)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
import typing_extensions
|
|
3
|
+
import pydantic
|
|
4
|
+
|
|
5
|
+
from .post_v1_ai_headshot_generator_body_assets import (
|
|
6
|
+
PostV1AiHeadshotGeneratorBodyAssets,
|
|
7
|
+
_SerializerPostV1AiHeadshotGeneratorBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PostV1AiHeadshotGeneratorBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
PostV1AiHeadshotGeneratorBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
assets: typing_extensions.Required[PostV1AiHeadshotGeneratorBodyAssets]
|
|
17
|
+
"""
|
|
18
|
+
Provide the assets for headshot photo
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: typing_extensions.NotRequired[str]
|
|
22
|
+
"""
|
|
23
|
+
The name of image
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class _SerializerPostV1AiHeadshotGeneratorBody(pydantic.BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for PostV1AiHeadshotGeneratorBody 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: _SerializerPostV1AiHeadshotGeneratorBodyAssets = pydantic.Field(
|
|
38
|
+
alias="assets",
|
|
39
|
+
)
|
|
40
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import typing_extensions
|
|
2
|
+
import pydantic
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class PostV1AiHeadshotGeneratorBodyAssets(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
Provide the assets for headshot photo
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
image_file_path: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
The image used to generate the headshot. This image must contain one detectable face. This is the `file_path` field from the response of the [upload urls API](/docs/api/tag/files/post/v1/files/upload-urls)
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class _SerializerPostV1AiHeadshotGeneratorBodyAssets(pydantic.BaseModel):
|
|
17
|
+
"""
|
|
18
|
+
Serializer for PostV1AiHeadshotGeneratorBodyAssets handling case conversions
|
|
19
|
+
and file omissions as dictated by the API
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
model_config = pydantic.ConfigDict(
|
|
23
|
+
populate_by_name=True,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
image_file_path: str = pydantic.Field(
|
|
27
|
+
alias="image_file_path",
|
|
28
|
+
)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
import typing_extensions
|
|
3
|
+
import pydantic
|
|
4
|
+
|
|
5
|
+
from .post_v1_ai_image_generator_body_style import (
|
|
6
|
+
PostV1AiImageGeneratorBodyStyle,
|
|
7
|
+
_SerializerPostV1AiImageGeneratorBodyStyle,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PostV1AiImageGeneratorBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
PostV1AiImageGeneratorBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
image_count: typing_extensions.Required[int]
|
|
17
|
+
"""
|
|
18
|
+
number to images to generate
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: typing_extensions.NotRequired[str]
|
|
22
|
+
"""
|
|
23
|
+
The name of image
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
orientation: typing_extensions.Required[
|
|
27
|
+
typing_extensions.Literal["landscape", "portrait", "square"]
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
style: typing_extensions.Required[PostV1AiImageGeneratorBodyStyle]
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class _SerializerPostV1AiImageGeneratorBody(pydantic.BaseModel):
|
|
34
|
+
"""
|
|
35
|
+
Serializer for PostV1AiImageGeneratorBody 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
|
+
image_count: int = pydantic.Field(
|
|
44
|
+
alias="image_count",
|
|
45
|
+
)
|
|
46
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
47
|
+
orientation: typing_extensions.Literal["landscape", "portrait", "square"] = (
|
|
48
|
+
pydantic.Field(
|
|
49
|
+
alias="orientation",
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
style: _SerializerPostV1AiImageGeneratorBodyStyle = pydantic.Field(
|
|
53
|
+
alias="style",
|
|
54
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import typing_extensions
|
|
2
|
+
import pydantic
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class PostV1AiImageGeneratorBodyStyle(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
PostV1AiImageGeneratorBodyStyle
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
prompt: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
The prompt used for the image.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class _SerializerPostV1AiImageGeneratorBodyStyle(pydantic.BaseModel):
|
|
17
|
+
"""
|
|
18
|
+
Serializer for PostV1AiImageGeneratorBodyStyle handling case conversions
|
|
19
|
+
and file omissions as dictated by the API
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
model_config = pydantic.ConfigDict(
|
|
23
|
+
populate_by_name=True,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
prompt: str = pydantic.Field(
|
|
27
|
+
alias="prompt",
|
|
28
|
+
)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
import typing_extensions
|
|
3
|
+
import pydantic
|
|
4
|
+
|
|
5
|
+
from .post_v1_ai_image_upscaler_body_assets import (
|
|
6
|
+
PostV1AiImageUpscalerBodyAssets,
|
|
7
|
+
_SerializerPostV1AiImageUpscalerBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
from .post_v1_ai_image_upscaler_body_style import (
|
|
10
|
+
PostV1AiImageUpscalerBodyStyle,
|
|
11
|
+
_SerializerPostV1AiImageUpscalerBodyStyle,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class PostV1AiImageUpscalerBody(typing_extensions.TypedDict):
|
|
16
|
+
"""
|
|
17
|
+
PostV1AiImageUpscalerBody
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
assets: typing_extensions.Required[PostV1AiImageUpscalerBodyAssets]
|
|
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
|
+
style: typing_extensions.Required[PostV1AiImageUpscalerBodyStyle]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class _SerializerPostV1AiImageUpscalerBody(pydantic.BaseModel):
|
|
36
|
+
"""
|
|
37
|
+
Serializer for PostV1AiImageUpscalerBody handling case conversions
|
|
38
|
+
and file omissions as dictated by the API
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
model_config = pydantic.ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
assets: _SerializerPostV1AiImageUpscalerBodyAssets = pydantic.Field(
|
|
46
|
+
alias="assets",
|
|
47
|
+
)
|
|
48
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
49
|
+
scale_factor: float = pydantic.Field(
|
|
50
|
+
alias="scale_factor",
|
|
51
|
+
)
|
|
52
|
+
style: _SerializerPostV1AiImageUpscalerBodyStyle = pydantic.Field(
|
|
53
|
+
alias="style",
|
|
54
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import typing_extensions
|
|
2
|
+
import pydantic
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class PostV1AiImageUpscalerBodyAssets(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
Provide the assets for upscaling
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
image_file_path: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
The image to upscale. This is the `file_path` field from the response of the [upload urls API](/docs/api/tag/files/post/v1/files/upload-urls)
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class _SerializerPostV1AiImageUpscalerBodyAssets(pydantic.BaseModel):
|
|
17
|
+
"""
|
|
18
|
+
Serializer for PostV1AiImageUpscalerBodyAssets handling case conversions
|
|
19
|
+
and file omissions as dictated by the API
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
model_config = pydantic.ConfigDict(
|
|
23
|
+
populate_by_name=True,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
image_file_path: str = pydantic.Field(
|
|
27
|
+
alias="image_file_path",
|
|
28
|
+
)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
import typing_extensions
|
|
3
|
+
import pydantic
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class PostV1AiImageUpscalerBodyStyle(typing_extensions.TypedDict):
|
|
7
|
+
"""
|
|
8
|
+
PostV1AiImageUpscalerBodyStyle
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
enhancement: typing_extensions.Required[
|
|
12
|
+
typing_extensions.Literal["Balanced", "Creative", "Resemblance"]
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
prompt: typing_extensions.NotRequired[str]
|
|
16
|
+
"""
|
|
17
|
+
A prompt to guide the final image. This value is ignored if `enhancement` is not Creative
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class _SerializerPostV1AiImageUpscalerBodyStyle(pydantic.BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
Serializer for PostV1AiImageUpscalerBodyStyle 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
|
+
enhancement: typing_extensions.Literal["Balanced", "Creative", "Resemblance"] = (
|
|
32
|
+
pydantic.Field(
|
|
33
|
+
alias="enhancement",
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
prompt: typing.Optional[str] = pydantic.Field(alias="prompt", default=None)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
import typing_extensions
|
|
3
|
+
import pydantic
|
|
4
|
+
|
|
5
|
+
from .post_v1_ai_photo_editor_body_assets import (
|
|
6
|
+
PostV1AiPhotoEditorBodyAssets,
|
|
7
|
+
_SerializerPostV1AiPhotoEditorBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
from .post_v1_ai_photo_editor_body_style import (
|
|
10
|
+
PostV1AiPhotoEditorBodyStyle,
|
|
11
|
+
_SerializerPostV1AiPhotoEditorBodyStyle,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class PostV1AiPhotoEditorBody(typing_extensions.TypedDict):
|
|
16
|
+
"""
|
|
17
|
+
PostV1AiPhotoEditorBody
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
assets: typing_extensions.Required[PostV1AiPhotoEditorBodyAssets]
|
|
21
|
+
"""
|
|
22
|
+
Provide the assets for photo editor
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
name: typing_extensions.NotRequired[str]
|
|
26
|
+
"""
|
|
27
|
+
The name of image
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
resolution: typing_extensions.Required[int]
|
|
31
|
+
"""
|
|
32
|
+
The resolution of the final output image. The allowed value is based on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
steps: typing_extensions.NotRequired[int]
|
|
36
|
+
"""
|
|
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
|
+
"""
|
|
39
|
+
|
|
40
|
+
style: typing_extensions.Required[PostV1AiPhotoEditorBodyStyle]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class _SerializerPostV1AiPhotoEditorBody(pydantic.BaseModel):
|
|
44
|
+
"""
|
|
45
|
+
Serializer for PostV1AiPhotoEditorBody handling case conversions
|
|
46
|
+
and file omissions as dictated by the API
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
model_config = pydantic.ConfigDict(
|
|
50
|
+
populate_by_name=True,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
assets: _SerializerPostV1AiPhotoEditorBodyAssets = pydantic.Field(
|
|
54
|
+
alias="assets",
|
|
55
|
+
)
|
|
56
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
57
|
+
resolution: int = pydantic.Field(
|
|
58
|
+
alias="resolution",
|
|
59
|
+
)
|
|
60
|
+
steps: typing.Optional[int] = pydantic.Field(alias="steps", default=None)
|
|
61
|
+
style: _SerializerPostV1AiPhotoEditorBodyStyle = pydantic.Field(
|
|
62
|
+
alias="style",
|
|
63
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import typing_extensions
|
|
2
|
+
import pydantic
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class PostV1AiPhotoEditorBodyAssets(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
Provide the assets for photo editor
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
image_file_path: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
The image used to generate the output. This value can be either the `file_path` field from the response of the [upload urls API](/docs/api/tag/files/post/v1/files/upload-urls), or the url of the file.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class _SerializerPostV1AiPhotoEditorBodyAssets(pydantic.BaseModel):
|
|
17
|
+
"""
|
|
18
|
+
Serializer for PostV1AiPhotoEditorBodyAssets handling case conversions
|
|
19
|
+
and file omissions as dictated by the API
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
model_config = pydantic.ConfigDict(
|
|
23
|
+
populate_by_name=True,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
image_file_path: str = pydantic.Field(
|
|
27
|
+
alias="image_file_path",
|
|
28
|
+
)
|