magic_hour 0.9.5__py3-none-any.whl → 0.44.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.
- magic_hour/README.md +34 -0
- magic_hour/__init__.py +1 -1
- magic_hour/client.py +8 -17
- magic_hour/environment.py +13 -1
- magic_hour/helpers/__init__.py +4 -0
- magic_hour/helpers/download.py +77 -0
- magic_hour/helpers/logger.py +8 -0
- magic_hour/resources/v1/README.md +32 -0
- magic_hour/resources/v1/ai_clothes_changer/README.md +94 -5
- magic_hour/resources/v1/ai_clothes_changer/client.py +161 -16
- magic_hour/resources/v1/ai_face_editor/README.md +195 -0
- magic_hour/resources/v1/ai_face_editor/__init__.py +4 -0
- magic_hour/resources/v1/ai_face_editor/client.py +324 -0
- magic_hour/resources/v1/ai_gif_generator/README.md +116 -0
- magic_hour/resources/v1/ai_gif_generator/__init__.py +4 -0
- magic_hour/resources/v1/ai_gif_generator/client.py +257 -0
- magic_hour/resources/v1/ai_headshot_generator/README.md +81 -3
- magic_hour/resources/v1/ai_headshot_generator/client.py +167 -18
- magic_hour/resources/v1/ai_image_editor/README.md +125 -0
- magic_hour/resources/v1/ai_image_editor/__init__.py +4 -0
- magic_hour/resources/v1/ai_image_editor/client.py +290 -0
- magic_hour/resources/v1/ai_image_generator/README.md +99 -5
- magic_hour/resources/v1/ai_image_generator/client.py +170 -24
- magic_hour/resources/v1/ai_image_upscaler/README.md +89 -3
- magic_hour/resources/v1/ai_image_upscaler/client.py +173 -20
- magic_hour/resources/v1/ai_meme_generator/README.md +129 -0
- magic_hour/resources/v1/ai_meme_generator/__init__.py +4 -0
- magic_hour/resources/v1/ai_meme_generator/client.py +253 -0
- magic_hour/resources/v1/ai_photo_editor/README.md +119 -4
- magic_hour/resources/v1/ai_photo_editor/client.py +199 -18
- magic_hour/resources/v1/ai_qr_code_generator/README.md +84 -3
- magic_hour/resources/v1/ai_qr_code_generator/client.py +140 -18
- magic_hour/resources/v1/ai_talking_photo/README.md +137 -0
- magic_hour/resources/v1/ai_talking_photo/__init__.py +4 -0
- magic_hour/resources/v1/ai_talking_photo/client.py +326 -0
- magic_hour/resources/v1/ai_voice_cloner/README.md +62 -0
- magic_hour/resources/v1/ai_voice_cloner/__init__.py +4 -0
- magic_hour/resources/v1/ai_voice_cloner/client.py +272 -0
- magic_hour/resources/v1/ai_voice_generator/README.md +112 -0
- magic_hour/resources/v1/ai_voice_generator/__init__.py +4 -0
- magic_hour/resources/v1/ai_voice_generator/client.py +241 -0
- magic_hour/resources/v1/animation/README.md +128 -6
- magic_hour/resources/v1/animation/client.py +247 -22
- magic_hour/resources/v1/audio_projects/README.md +135 -0
- magic_hour/resources/v1/audio_projects/__init__.py +12 -0
- magic_hour/resources/v1/audio_projects/client.py +310 -0
- magic_hour/resources/v1/audio_projects/client_test.py +520 -0
- magic_hour/resources/v1/auto_subtitle_generator/README.md +128 -0
- magic_hour/resources/v1/auto_subtitle_generator/__init__.py +4 -0
- magic_hour/resources/v1/auto_subtitle_generator/client.py +346 -0
- magic_hour/resources/v1/client.py +75 -1
- magic_hour/resources/v1/face_detection/README.md +157 -0
- magic_hour/resources/v1/face_detection/__init__.py +12 -0
- magic_hour/resources/v1/face_detection/client.py +380 -0
- magic_hour/resources/v1/face_swap/README.md +137 -9
- magic_hour/resources/v1/face_swap/client.py +329 -38
- magic_hour/resources/v1/face_swap_photo/README.md +118 -3
- magic_hour/resources/v1/face_swap_photo/client.py +199 -14
- magic_hour/resources/v1/files/README.md +39 -0
- magic_hour/resources/v1/files/client.py +351 -1
- magic_hour/resources/v1/files/client_test.py +414 -0
- magic_hour/resources/v1/files/upload_urls/README.md +38 -17
- magic_hour/resources/v1/files/upload_urls/client.py +38 -34
- magic_hour/resources/v1/image_background_remover/README.md +96 -5
- magic_hour/resources/v1/image_background_remover/client.py +151 -16
- magic_hour/resources/v1/image_projects/README.md +82 -10
- magic_hour/resources/v1/image_projects/__init__.py +10 -2
- magic_hour/resources/v1/image_projects/client.py +154 -16
- magic_hour/resources/v1/image_projects/client_test.py +527 -0
- magic_hour/resources/v1/image_to_video/README.md +96 -11
- magic_hour/resources/v1/image_to_video/client.py +282 -38
- magic_hour/resources/v1/lip_sync/README.md +112 -9
- magic_hour/resources/v1/lip_sync/client.py +288 -34
- magic_hour/resources/v1/photo_colorizer/README.md +107 -0
- magic_hour/resources/v1/photo_colorizer/__init__.py +4 -0
- magic_hour/resources/v1/photo_colorizer/client.py +248 -0
- magic_hour/resources/v1/text_to_video/README.md +96 -7
- magic_hour/resources/v1/text_to_video/client.py +204 -18
- magic_hour/resources/v1/video_projects/README.md +81 -9
- magic_hour/resources/v1/video_projects/__init__.py +10 -2
- magic_hour/resources/v1/video_projects/client.py +151 -14
- magic_hour/resources/v1/video_projects/client_test.py +527 -0
- magic_hour/resources/v1/video_to_video/README.md +119 -15
- magic_hour/resources/v1/video_to_video/client.py +299 -46
- magic_hour/types/models/__init__.py +92 -56
- magic_hour/types/models/v1_ai_clothes_changer_create_response.py +33 -0
- magic_hour/types/models/v1_ai_face_editor_create_response.py +33 -0
- magic_hour/types/models/v1_ai_gif_generator_create_response.py +33 -0
- magic_hour/types/models/v1_ai_headshot_generator_create_response.py +33 -0
- magic_hour/types/models/v1_ai_image_editor_create_response.py +33 -0
- magic_hour/types/models/v1_ai_image_generator_create_response.py +33 -0
- magic_hour/types/models/v1_ai_image_upscaler_create_response.py +33 -0
- magic_hour/types/models/v1_ai_meme_generator_create_response.py +33 -0
- magic_hour/types/models/v1_ai_photo_editor_create_response.py +33 -0
- magic_hour/types/models/v1_ai_qr_code_generator_create_response.py +33 -0
- magic_hour/types/models/v1_ai_talking_photo_create_response.py +35 -0
- magic_hour/types/models/v1_ai_voice_cloner_create_response.py +27 -0
- magic_hour/types/models/v1_ai_voice_generator_create_response.py +27 -0
- magic_hour/types/models/v1_animation_create_response.py +35 -0
- magic_hour/types/models/v1_audio_projects_get_response.py +72 -0
- magic_hour/types/models/v1_audio_projects_get_response_downloads_item.py +19 -0
- magic_hour/types/models/{get_v1_image_projects_id_response_error.py → v1_audio_projects_get_response_error.py} +2 -2
- magic_hour/types/models/v1_auto_subtitle_generator_create_response.py +35 -0
- magic_hour/types/models/v1_face_detection_create_response.py +25 -0
- magic_hour/types/models/v1_face_detection_get_response.py +45 -0
- magic_hour/types/models/v1_face_detection_get_response_faces_item.py +25 -0
- magic_hour/types/models/v1_face_swap_create_response.py +35 -0
- magic_hour/types/models/v1_face_swap_photo_create_response.py +33 -0
- magic_hour/types/models/v1_files_upload_urls_create_response.py +24 -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 +33 -0
- magic_hour/types/models/{get_v1_image_projects_id_response.py → v1_image_projects_get_response.py} +20 -18
- magic_hour/types/models/{get_v1_video_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/v1_image_to_video_create_response.py +35 -0
- magic_hour/types/models/v1_lip_sync_create_response.py +35 -0
- magic_hour/types/models/v1_photo_colorizer_create_response.py +33 -0
- magic_hour/types/models/v1_text_to_video_create_response.py +35 -0
- magic_hour/types/models/{get_v1_video_projects_id_response.py → v1_video_projects_get_response.py} +26 -23
- 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_image_projects_id_response_downloads_item.py → v1_video_projects_get_response_downloads_item.py} +1 -1
- magic_hour/types/models/v1_video_projects_get_response_error.py +25 -0
- magic_hour/types/models/v1_video_to_video_create_response.py +35 -0
- magic_hour/types/params/__init__.py +422 -176
- magic_hour/types/params/v1_ai_clothes_changer_create_body.py +40 -0
- magic_hour/types/params/v1_ai_clothes_changer_create_body_assets.py +58 -0
- magic_hour/types/params/v1_ai_clothes_changer_generate_body_assets.py +33 -0
- magic_hour/types/params/v1_ai_face_editor_create_body.py +52 -0
- magic_hour/types/params/v1_ai_face_editor_create_body_assets.py +33 -0
- magic_hour/types/params/v1_ai_face_editor_create_body_style.py +137 -0
- magic_hour/types/params/v1_ai_face_editor_generate_body_assets.py +17 -0
- magic_hour/types/params/v1_ai_gif_generator_create_body.py +47 -0
- magic_hour/types/params/{post_v1_ai_image_generator_body_style.py → v1_ai_gif_generator_create_body_style.py} +5 -5
- magic_hour/types/params/v1_ai_headshot_generator_create_body.py +49 -0
- magic_hour/types/params/v1_ai_headshot_generator_create_body_assets.py +33 -0
- magic_hour/types/params/v1_ai_headshot_generator_create_body_style.py +27 -0
- magic_hour/types/params/v1_ai_headshot_generator_generate_body_assets.py +17 -0
- magic_hour/types/params/v1_ai_image_editor_create_body.py +49 -0
- magic_hour/types/params/v1_ai_image_editor_create_body_assets.py +47 -0
- magic_hour/types/params/v1_ai_image_editor_create_body_style.py +41 -0
- magic_hour/types/params/v1_ai_image_editor_generate_body_assets.py +28 -0
- magic_hour/types/params/{post_v1_ai_image_generator_body.py → v1_ai_image_generator_create_body.py} +17 -11
- magic_hour/types/params/v1_ai_image_generator_create_body_style.py +127 -0
- magic_hour/types/params/v1_ai_image_upscaler_create_body.py +59 -0
- magic_hour/types/params/v1_ai_image_upscaler_create_body_assets.py +33 -0
- 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/v1_ai_image_upscaler_generate_body_assets.py +17 -0
- magic_hour/types/params/v1_ai_meme_generator_create_body.py +37 -0
- magic_hour/types/params/v1_ai_meme_generator_create_body_style.py +73 -0
- magic_hour/types/params/{post_v1_ai_photo_editor_body.py → v1_ai_photo_editor_create_body.py} +15 -15
- magic_hour/types/params/v1_ai_photo_editor_create_body_assets.py +33 -0
- magic_hour/types/params/{post_v1_ai_photo_editor_body_style.py → v1_ai_photo_editor_create_body_style.py} +20 -4
- magic_hour/types/params/v1_ai_photo_editor_generate_body_assets.py +17 -0
- magic_hour/types/params/v1_ai_qr_code_generator_create_body.py +45 -0
- 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 +68 -0
- magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py +46 -0
- magic_hour/types/params/v1_ai_talking_photo_create_body_style.py +44 -0
- magic_hour/types/params/v1_ai_talking_photo_generate_body_assets.py +26 -0
- magic_hour/types/params/v1_ai_voice_cloner_create_body.py +49 -0
- magic_hour/types/params/v1_ai_voice_cloner_create_body_assets.py +33 -0
- magic_hour/types/params/v1_ai_voice_cloner_create_body_style.py +28 -0
- magic_hour/types/params/v1_ai_voice_cloner_generate_body_assets.py +28 -0
- magic_hour/types/params/v1_ai_voice_generator_create_body.py +40 -0
- magic_hour/types/params/v1_ai_voice_generator_create_body_style.py +440 -0
- magic_hour/types/params/{post_v1_animation_body.py → v1_animation_create_body.py} +16 -16
- magic_hour/types/params/{post_v1_animation_body_assets.py → v1_animation_create_body_assets.py} +15 -5
- magic_hour/types/params/{post_v1_animation_body_style.py → v1_animation_create_body_style.py} +13 -10
- magic_hour/types/params/v1_animation_generate_body_assets.py +39 -0
- magic_hour/types/params/v1_auto_subtitle_generator_create_body.py +78 -0
- magic_hour/types/params/v1_auto_subtitle_generator_create_body_assets.py +33 -0
- magic_hour/types/params/v1_auto_subtitle_generator_create_body_style.py +56 -0
- magic_hour/types/params/v1_auto_subtitle_generator_create_body_style_custom_config.py +86 -0
- magic_hour/types/params/v1_auto_subtitle_generator_generate_body_assets.py +17 -0
- magic_hour/types/params/v1_face_detection_create_body.py +44 -0
- magic_hour/types/params/v1_face_detection_create_body_assets.py +33 -0
- magic_hour/types/params/v1_face_detection_generate_body_assets.py +17 -0
- magic_hour/types/params/v1_face_swap_create_body.py +92 -0
- magic_hour/types/params/v1_face_swap_create_body_assets.py +91 -0
- magic_hour/types/params/v1_face_swap_create_body_assets_face_mappings_item.py +44 -0
- magic_hour/types/params/v1_face_swap_create_body_style.py +33 -0
- magic_hour/types/params/v1_face_swap_generate_body_assets.py +56 -0
- magic_hour/types/params/v1_face_swap_generate_body_assets_face_mappings_item.py +25 -0
- magic_hour/types/params/v1_face_swap_photo_create_body.py +40 -0
- magic_hour/types/params/v1_face_swap_photo_create_body_assets.py +76 -0
- magic_hour/types/params/v1_face_swap_photo_create_body_assets_face_mappings_item.py +44 -0
- magic_hour/types/params/v1_face_swap_photo_generate_body_assets.py +47 -0
- magic_hour/types/params/v1_face_swap_photo_generate_body_assets_face_mappings_item.py +25 -0
- magic_hour/types/params/v1_files_upload_urls_create_body.py +36 -0
- magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +38 -0
- magic_hour/types/params/v1_image_background_remover_create_body.py +40 -0
- magic_hour/types/params/v1_image_background_remover_create_body_assets.py +49 -0
- magic_hour/types/params/v1_image_background_remover_generate_body_assets.py +27 -0
- magic_hour/types/params/v1_image_to_video_create_body.py +101 -0
- magic_hour/types/params/v1_image_to_video_create_body_assets.py +33 -0
- magic_hour/types/params/v1_image_to_video_create_body_style.py +53 -0
- magic_hour/types/params/v1_image_to_video_generate_body_assets.py +17 -0
- magic_hour/types/params/v1_lip_sync_create_body.py +100 -0
- magic_hour/types/params/{post_v1_lip_sync_body_assets.py → v1_lip_sync_create_body_assets.py} +15 -5
- magic_hour/types/params/v1_lip_sync_create_body_style.py +37 -0
- magic_hour/types/params/v1_lip_sync_generate_body_assets.py +36 -0
- magic_hour/types/params/v1_photo_colorizer_create_body.py +40 -0
- magic_hour/types/params/v1_photo_colorizer_create_body_assets.py +33 -0
- magic_hour/types/params/v1_photo_colorizer_generate_body_assets.py +17 -0
- magic_hour/types/params/v1_text_to_video_create_body.py +78 -0
- magic_hour/types/params/v1_text_to_video_create_body_style.py +43 -0
- magic_hour/types/params/v1_video_to_video_create_body.py +101 -0
- magic_hour/types/params/{post_v1_video_to_video_body_assets.py → v1_video_to_video_create_body_assets.py} +9 -4
- magic_hour/types/params/{post_v1_video_to_video_body_style.py → v1_video_to_video_create_body_style.py} +68 -26
- magic_hour/types/params/v1_video_to_video_generate_body_assets.py +27 -0
- magic_hour-0.44.0.dist-info/METADATA +328 -0
- magic_hour-0.44.0.dist-info/RECORD +231 -0
- magic_hour/core/__init__.py +0 -52
- magic_hour/core/api_error.py +0 -56
- magic_hour/core/auth.py +0 -314
- magic_hour/core/base_client.py +0 -618
- magic_hour/core/binary_response.py +0 -23
- magic_hour/core/query.py +0 -106
- magic_hour/core/request.py +0 -156
- magic_hour/core/response.py +0 -293
- magic_hour/core/type_utils.py +0 -28
- magic_hour/core/utils.py +0 -55
- magic_hour/types/models/post_v1_ai_clothes_changer_response.py +0 -25
- magic_hour/types/models/post_v1_ai_headshot_generator_response.py +0 -25
- magic_hour/types/models/post_v1_ai_image_generator_response.py +0 -25
- magic_hour/types/models/post_v1_ai_image_upscaler_response.py +0 -25
- magic_hour/types/models/post_v1_ai_photo_editor_response.py +0 -25
- magic_hour/types/models/post_v1_ai_qr_code_generator_response.py +0 -25
- magic_hour/types/models/post_v1_animation_response.py +0 -25
- magic_hour/types/models/post_v1_face_swap_photo_response.py +0 -25
- magic_hour/types/models/post_v1_face_swap_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_image_to_video_response.py +0 -25
- magic_hour/types/models/post_v1_lip_sync_response.py +0 -25
- magic_hour/types/models/post_v1_text_to_video_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_clothes_changer_body_assets.py +0 -45
- magic_hour/types/params/post_v1_ai_headshot_generator_body.py +0 -40
- magic_hour/types/params/post_v1_ai_headshot_generator_body_assets.py +0 -28
- magic_hour/types/params/post_v1_ai_image_upscaler_body.py +0 -57
- magic_hour/types/params/post_v1_ai_image_upscaler_body_assets.py +0 -28
- magic_hour/types/params/post_v1_ai_photo_editor_body_assets.py +0 -28
- magic_hour/types/params/post_v1_ai_qr_code_generator_body.py +0 -45
- magic_hour/types/params/post_v1_face_swap_body.py +0 -72
- magic_hour/types/params/post_v1_face_swap_body_assets.py +0 -52
- magic_hour/types/params/post_v1_face_swap_photo_body.py +0 -40
- magic_hour/types/params/post_v1_face_swap_photo_body_assets.py +0 -36
- magic_hour/types/params/post_v1_files_upload_urls_body.py +0 -31
- magic_hour/types/params/post_v1_files_upload_urls_body_items_item.py +0 -38
- magic_hour/types/params/post_v1_image_background_remover_body.py +0 -40
- magic_hour/types/params/post_v1_image_background_remover_body_assets.py +0 -28
- magic_hour/types/params/post_v1_image_to_video_body.py +0 -73
- magic_hour/types/params/post_v1_image_to_video_body_assets.py +0 -28
- magic_hour/types/params/post_v1_image_to_video_body_style.py +0 -37
- magic_hour/types/params/post_v1_lip_sync_body.py +0 -80
- magic_hour/types/params/post_v1_text_to_video_body.py +0 -57
- magic_hour/types/params/post_v1_text_to_video_body_style.py +0 -28
- magic_hour/types/params/post_v1_video_to_video_body.py +0 -93
- magic_hour-0.9.5.dist-info/METADATA +0 -133
- magic_hour-0.9.5.dist-info/RECORD +0 -132
- {magic_hour-0.9.5.dist-info → magic_hour-0.44.0.dist-info}/LICENSE +0 -0
- {magic_hour-0.9.5.dist-info → magic_hour-0.44.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AiImageEditorGenerateBodyAssets(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
Provide the assets for image edit
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
image_file_path: typing_extensions.NotRequired[str]
|
|
11
|
+
"""
|
|
12
|
+
Deprecated: Please use `image_file_paths` instead as edits with multiple images are now supported.
|
|
13
|
+
|
|
14
|
+
The image used in the edit. This value is either
|
|
15
|
+
- a direct URL to the image file
|
|
16
|
+
- a path to a local file
|
|
17
|
+
|
|
18
|
+
Note: if the path begins with `api-assets`, it will be assumed to already be uploaded to Magic Hour's storage, and will not be uploaded again.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
image_file_paths: typing_extensions.NotRequired[typing_extensions.List[str]]
|
|
22
|
+
"""
|
|
23
|
+
The image(s) used in the edit, maximum of 10 images. This value is either
|
|
24
|
+
- a direct URL to the video file
|
|
25
|
+
- a path to a local file
|
|
26
|
+
|
|
27
|
+
Note: if the path begins with `api-assets`, it will be assumed to already be uploaded to Magic Hour's storage, and will not be uploaded again.
|
|
28
|
+
"""
|
magic_hour/types/params/{post_v1_ai_image_generator_body.py → v1_ai_image_generator_create_body.py}
RENAMED
|
@@ -2,37 +2,43 @@ 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]
|
|
17
17
|
"""
|
|
18
|
-
|
|
18
|
+
Number of images to generate.
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
name: typing_extensions.NotRequired[str]
|
|
22
22
|
"""
|
|
23
|
-
The name of image
|
|
23
|
+
The name of image. This value is mainly used for your own identification of the image.
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
orientation: typing_extensions.Required[
|
|
27
27
|
typing_extensions.Literal["landscape", "portrait", "square"]
|
|
28
28
|
]
|
|
29
|
+
"""
|
|
30
|
+
The orientation of the output image(s).
|
|
31
|
+
"""
|
|
29
32
|
|
|
30
|
-
style: typing_extensions.Required[
|
|
33
|
+
style: typing_extensions.Required[V1AiImageGeneratorCreateBodyStyle]
|
|
34
|
+
"""
|
|
35
|
+
The art style to use for image generation.
|
|
36
|
+
"""
|
|
31
37
|
|
|
32
38
|
|
|
33
|
-
class
|
|
39
|
+
class _SerializerV1AiImageGeneratorCreateBody(pydantic.BaseModel):
|
|
34
40
|
"""
|
|
35
|
-
Serializer for
|
|
41
|
+
Serializer for V1AiImageGeneratorCreateBody handling case conversions
|
|
36
42
|
and file omissions as dictated by the API
|
|
37
43
|
"""
|
|
38
44
|
|
|
@@ -49,6 +55,6 @@ class _SerializerPostV1AiImageGeneratorBody(pydantic.BaseModel):
|
|
|
49
55
|
alias="orientation",
|
|
50
56
|
)
|
|
51
57
|
)
|
|
52
|
-
style:
|
|
58
|
+
style: _SerializerV1AiImageGeneratorCreateBodyStyle = pydantic.Field(
|
|
53
59
|
alias="style",
|
|
54
60
|
)
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class V1AiImageGeneratorCreateBodyStyle(typing_extensions.TypedDict):
|
|
7
|
+
"""
|
|
8
|
+
The art style to use for image generation.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
prompt: typing_extensions.Required[str]
|
|
12
|
+
"""
|
|
13
|
+
The prompt used for the image(s).
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
quality_mode: typing_extensions.NotRequired[
|
|
17
|
+
typing_extensions.Literal["pro", "standard"]
|
|
18
|
+
]
|
|
19
|
+
"""
|
|
20
|
+
Controls the quality of the generated image. Defaults to 'standard' if not specified.
|
|
21
|
+
|
|
22
|
+
**Options:**
|
|
23
|
+
- `standard` - Standard quality generation. Cost: 5 credits per image.
|
|
24
|
+
- `pro` - Pro quality generation with enhanced details and quality. Cost: 30 credits per image.
|
|
25
|
+
|
|
26
|
+
Note: Pro mode is available for users on Creator, Pro, or Business tier.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
tool: typing_extensions.NotRequired[
|
|
30
|
+
typing_extensions.Literal[
|
|
31
|
+
"ai-anime-generator",
|
|
32
|
+
"ai-art-generator",
|
|
33
|
+
"ai-background-generator",
|
|
34
|
+
"ai-character-generator",
|
|
35
|
+
"ai-face-generator",
|
|
36
|
+
"ai-fashion-generator",
|
|
37
|
+
"ai-icon-generator",
|
|
38
|
+
"ai-illustration-generator",
|
|
39
|
+
"ai-interior-design-generator",
|
|
40
|
+
"ai-landscape-generator",
|
|
41
|
+
"ai-logo-generator",
|
|
42
|
+
"ai-manga-generator",
|
|
43
|
+
"ai-outfit-generator",
|
|
44
|
+
"ai-pattern-generator",
|
|
45
|
+
"ai-photo-generator",
|
|
46
|
+
"ai-sketch-generator",
|
|
47
|
+
"ai-tattoo-generator",
|
|
48
|
+
"album-cover-generator",
|
|
49
|
+
"animated-characters-generator",
|
|
50
|
+
"architecture-generator",
|
|
51
|
+
"book-cover-generator",
|
|
52
|
+
"comic-book-generator",
|
|
53
|
+
"dark-fantasy-ai",
|
|
54
|
+
"disney-ai-generator",
|
|
55
|
+
"dnd-ai-art-generator",
|
|
56
|
+
"emoji-generator",
|
|
57
|
+
"fantasy-map-generator",
|
|
58
|
+
"general",
|
|
59
|
+
"graffiti-generator",
|
|
60
|
+
"movie-poster-generator",
|
|
61
|
+
"optical-illusion-generator",
|
|
62
|
+
"pokemon-generator",
|
|
63
|
+
"south-park-character-generator",
|
|
64
|
+
"superhero-generator",
|
|
65
|
+
"thumbnail-maker",
|
|
66
|
+
]
|
|
67
|
+
]
|
|
68
|
+
"""
|
|
69
|
+
The art style to use for image generation. Defaults to 'general' if not provided.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class _SerializerV1AiImageGeneratorCreateBodyStyle(pydantic.BaseModel):
|
|
74
|
+
"""
|
|
75
|
+
Serializer for V1AiImageGeneratorCreateBodyStyle handling case conversions
|
|
76
|
+
and file omissions as dictated by the API
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
model_config = pydantic.ConfigDict(
|
|
80
|
+
populate_by_name=True,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
prompt: str = pydantic.Field(
|
|
84
|
+
alias="prompt",
|
|
85
|
+
)
|
|
86
|
+
quality_mode: typing.Optional[typing_extensions.Literal["pro", "standard"]] = (
|
|
87
|
+
pydantic.Field(alias="quality_mode", default=None)
|
|
88
|
+
)
|
|
89
|
+
tool: typing.Optional[
|
|
90
|
+
typing_extensions.Literal[
|
|
91
|
+
"ai-anime-generator",
|
|
92
|
+
"ai-art-generator",
|
|
93
|
+
"ai-background-generator",
|
|
94
|
+
"ai-character-generator",
|
|
95
|
+
"ai-face-generator",
|
|
96
|
+
"ai-fashion-generator",
|
|
97
|
+
"ai-icon-generator",
|
|
98
|
+
"ai-illustration-generator",
|
|
99
|
+
"ai-interior-design-generator",
|
|
100
|
+
"ai-landscape-generator",
|
|
101
|
+
"ai-logo-generator",
|
|
102
|
+
"ai-manga-generator",
|
|
103
|
+
"ai-outfit-generator",
|
|
104
|
+
"ai-pattern-generator",
|
|
105
|
+
"ai-photo-generator",
|
|
106
|
+
"ai-sketch-generator",
|
|
107
|
+
"ai-tattoo-generator",
|
|
108
|
+
"album-cover-generator",
|
|
109
|
+
"animated-characters-generator",
|
|
110
|
+
"architecture-generator",
|
|
111
|
+
"book-cover-generator",
|
|
112
|
+
"comic-book-generator",
|
|
113
|
+
"dark-fantasy-ai",
|
|
114
|
+
"disney-ai-generator",
|
|
115
|
+
"dnd-ai-art-generator",
|
|
116
|
+
"emoji-generator",
|
|
117
|
+
"fantasy-map-generator",
|
|
118
|
+
"general",
|
|
119
|
+
"graffiti-generator",
|
|
120
|
+
"movie-poster-generator",
|
|
121
|
+
"optical-illusion-generator",
|
|
122
|
+
"pokemon-generator",
|
|
123
|
+
"south-park-character-generator",
|
|
124
|
+
"superhero-generator",
|
|
125
|
+
"thumbnail-maker",
|
|
126
|
+
]
|
|
127
|
+
] = pydantic.Field(alias="tool", default=None)
|
|
@@ -0,0 +1,59 @@
|
|
|
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. This value is mainly used for your own identification of the 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
|
+
Note: 4x upscale is only available on Creator, Pro, or Business tier.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
style: typing_extensions.Required[V1AiImageUpscalerCreateBodyStyle]
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class _SerializerV1AiImageUpscalerCreateBody(pydantic.BaseModel):
|
|
41
|
+
"""
|
|
42
|
+
Serializer for V1AiImageUpscalerCreateBody handling case conversions
|
|
43
|
+
and file omissions as dictated by the API
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
model_config = pydantic.ConfigDict(
|
|
47
|
+
populate_by_name=True,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
assets: _SerializerV1AiImageUpscalerCreateBodyAssets = pydantic.Field(
|
|
51
|
+
alias="assets",
|
|
52
|
+
)
|
|
53
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
54
|
+
scale_factor: float = pydantic.Field(
|
|
55
|
+
alias="scale_factor",
|
|
56
|
+
)
|
|
57
|
+
style: _SerializerV1AiImageUpscalerCreateBodyStyle = pydantic.Field(
|
|
58
|
+
alias="style",
|
|
59
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AiImageUpscalerCreateBodyAssets(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 value is either
|
|
13
|
+
- a direct URL to the video file
|
|
14
|
+
- `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
15
|
+
|
|
16
|
+
Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
|
|
17
|
+
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class _SerializerV1AiImageUpscalerCreateBodyAssets(pydantic.BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
Serializer for V1AiImageUpscalerCreateBodyAssets 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
|
+
image_file_path: str = pydantic.Field(
|
|
32
|
+
alias="image_file_path",
|
|
33
|
+
)
|
|
@@ -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
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AiImageUpscalerGenerateBodyAssets(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 value is either
|
|
13
|
+
- a direct URL to the image file
|
|
14
|
+
- a path to a local file
|
|
15
|
+
|
|
16
|
+
Note: if the path begins with `api-assets`, it will be assumed to already be uploaded to Magic Hour's storage, and will not be uploaded again.
|
|
17
|
+
"""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_ai_meme_generator_create_body_style import (
|
|
6
|
+
V1AiMemeGeneratorCreateBodyStyle,
|
|
7
|
+
_SerializerV1AiMemeGeneratorCreateBodyStyle,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1AiMemeGeneratorCreateBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
V1AiMemeGeneratorCreateBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
name: typing_extensions.NotRequired[str]
|
|
17
|
+
"""
|
|
18
|
+
The name of the meme.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
style: typing_extensions.Required[V1AiMemeGeneratorCreateBodyStyle]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class _SerializerV1AiMemeGeneratorCreateBody(pydantic.BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
Serializer for V1AiMemeGeneratorCreateBody handling case conversions
|
|
27
|
+
and file omissions as dictated by the API
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
model_config = pydantic.ConfigDict(
|
|
31
|
+
populate_by_name=True,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
35
|
+
style: _SerializerV1AiMemeGeneratorCreateBodyStyle = pydantic.Field(
|
|
36
|
+
alias="style",
|
|
37
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class V1AiMemeGeneratorCreateBodyStyle(typing_extensions.TypedDict):
|
|
7
|
+
"""
|
|
8
|
+
V1AiMemeGeneratorCreateBodyStyle
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
search_web: typing_extensions.NotRequired[bool]
|
|
12
|
+
"""
|
|
13
|
+
Whether to search the web for meme content.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
template: typing_extensions.Required[
|
|
17
|
+
typing_extensions.Literal[
|
|
18
|
+
"Bike Fall",
|
|
19
|
+
"Change My Mind",
|
|
20
|
+
"Disappointed Guy",
|
|
21
|
+
"Drake Hotline Bling",
|
|
22
|
+
"Galaxy Brain",
|
|
23
|
+
"Gru's Plan",
|
|
24
|
+
"Is This a Pigeon",
|
|
25
|
+
"Panik Kalm Panik",
|
|
26
|
+
"Random",
|
|
27
|
+
"Side Eyeing Chloe",
|
|
28
|
+
"Tuxedo Winnie The Pooh",
|
|
29
|
+
"Two Buttons",
|
|
30
|
+
"Waiting Skeleton",
|
|
31
|
+
]
|
|
32
|
+
]
|
|
33
|
+
"""
|
|
34
|
+
To use our templates, pass in one of the enum values.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
topic: typing_extensions.Required[str]
|
|
38
|
+
"""
|
|
39
|
+
The topic of the meme.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class _SerializerV1AiMemeGeneratorCreateBodyStyle(pydantic.BaseModel):
|
|
44
|
+
"""
|
|
45
|
+
Serializer for V1AiMemeGeneratorCreateBodyStyle 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
|
+
search_web: typing.Optional[bool] = pydantic.Field(alias="searchWeb", default=None)
|
|
54
|
+
template: typing_extensions.Literal[
|
|
55
|
+
"Bike Fall",
|
|
56
|
+
"Change My Mind",
|
|
57
|
+
"Disappointed Guy",
|
|
58
|
+
"Drake Hotline Bling",
|
|
59
|
+
"Galaxy Brain",
|
|
60
|
+
"Gru's Plan",
|
|
61
|
+
"Is This a Pigeon",
|
|
62
|
+
"Panik Kalm Panik",
|
|
63
|
+
"Random",
|
|
64
|
+
"Side Eyeing Chloe",
|
|
65
|
+
"Tuxedo Winnie The Pooh",
|
|
66
|
+
"Two Buttons",
|
|
67
|
+
"Waiting Skeleton",
|
|
68
|
+
] = pydantic.Field(
|
|
69
|
+
alias="template",
|
|
70
|
+
)
|
|
71
|
+
topic: str = pydantic.Field(
|
|
72
|
+
alias="topic",
|
|
73
|
+
)
|
magic_hour/types/params/{post_v1_ai_photo_editor_body.py → v1_ai_photo_editor_create_body.py}
RENAMED
|
@@ -2,29 +2,29 @@ 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
|
"""
|
|
24
24
|
|
|
25
25
|
name: typing_extensions.NotRequired[str]
|
|
26
26
|
"""
|
|
27
|
-
The name of image
|
|
27
|
+
The name of image. This value is mainly used for your own identification of the image.
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
30
|
resolution: typing_extensions.Required[int]
|
|
@@ -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
|
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AiPhotoEditorCreateBodyAssets(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 is either
|
|
13
|
+
- a direct URL to the video file
|
|
14
|
+
- `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
|
|
15
|
+
|
|
16
|
+
Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
|
|
17
|
+
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class _SerializerV1AiPhotoEditorCreateBodyAssets(pydantic.BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
Serializer for V1AiPhotoEditorCreateBodyAssets 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
|
+
image_file_path: str = pydantic.Field(
|
|
32
|
+
alias="image_file_path",
|
|
33
|
+
)
|
|
@@ -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]
|
|
@@ -38,10 +38,20 @@ class PostV1AiPhotoEditorBodyStyle(typing_extensions.TypedDict):
|
|
|
38
38
|
Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
|
+
upscale_factor: typing_extensions.NotRequired[int]
|
|
42
|
+
"""
|
|
43
|
+
The multiplier applied to an image's original dimensions during the upscaling process. For example, a scale of 2 doubles the width and height (e.g., from 512x512 to 1024x1024).
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
upscale_fidelity: typing_extensions.NotRequired[float]
|
|
47
|
+
"""
|
|
48
|
+
Upscale fidelity refers to the level of quality desired in the generated image. Fidelity value of 1 means more details.
|
|
49
|
+
"""
|
|
50
|
+
|
|
41
51
|
|
|
42
|
-
class
|
|
52
|
+
class _SerializerV1AiPhotoEditorCreateBodyStyle(pydantic.BaseModel):
|
|
43
53
|
"""
|
|
44
|
-
Serializer for
|
|
54
|
+
Serializer for V1AiPhotoEditorCreateBodyStyle handling case conversions
|
|
45
55
|
and file omissions as dictated by the API
|
|
46
56
|
"""
|
|
47
57
|
|
|
@@ -65,3 +75,9 @@ class _SerializerPostV1AiPhotoEditorBodyStyle(pydantic.BaseModel):
|
|
|
65
75
|
alias="prompt_strength",
|
|
66
76
|
)
|
|
67
77
|
steps: typing.Optional[int] = pydantic.Field(alias="steps", default=None)
|
|
78
|
+
upscale_factor: typing.Optional[int] = pydantic.Field(
|
|
79
|
+
alias="upscale_factor", default=None
|
|
80
|
+
)
|
|
81
|
+
upscale_fidelity: typing.Optional[float] = pydantic.Field(
|
|
82
|
+
alias="upscale_fidelity", default=None
|
|
83
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AiPhotoEditorGenerateBodyAssets(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 is either
|
|
13
|
+
- a direct URL to the image file
|
|
14
|
+
- a path to a local file
|
|
15
|
+
|
|
16
|
+
Note: if the path begins with `api-assets`, it will be assumed to already be uploaded to Magic Hour's storage, and will not be uploaded again.
|
|
17
|
+
"""
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_ai_qr_code_generator_create_body_style import (
|
|
6
|
+
V1AiQrCodeGeneratorCreateBodyStyle,
|
|
7
|
+
_SerializerV1AiQrCodeGeneratorCreateBodyStyle,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1AiQrCodeGeneratorCreateBody(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
V1AiQrCodeGeneratorCreateBody
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
content: typing_extensions.Required[str]
|
|
17
|
+
"""
|
|
18
|
+
The content of the QR code.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: typing_extensions.NotRequired[str]
|
|
22
|
+
"""
|
|
23
|
+
The name of image. This value is mainly used for your own identification of the image.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
style: typing_extensions.Required[V1AiQrCodeGeneratorCreateBodyStyle]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class _SerializerV1AiQrCodeGeneratorCreateBody(pydantic.BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
Serializer for V1AiQrCodeGeneratorCreateBody handling case conversions
|
|
32
|
+
and file omissions as dictated by the API
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
model_config = pydantic.ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
content: str = pydantic.Field(
|
|
40
|
+
alias="content",
|
|
41
|
+
)
|
|
42
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
43
|
+
style: _SerializerV1AiQrCodeGeneratorCreateBodyStyle = pydantic.Field(
|
|
44
|
+
alias="style",
|
|
45
|
+
)
|