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,72 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_audio_projects_get_response_downloads_item import (
|
|
6
|
+
V1AudioProjectsGetResponseDownloadsItem,
|
|
7
|
+
)
|
|
8
|
+
from .v1_audio_projects_get_response_error import V1AudioProjectsGetResponseError
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1AudioProjectsGetResponse(pydantic.BaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Success
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
model_config = pydantic.ConfigDict(
|
|
17
|
+
arbitrary_types_allowed=True,
|
|
18
|
+
populate_by_name=True,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
created_at: str = pydantic.Field(
|
|
22
|
+
alias="created_at",
|
|
23
|
+
)
|
|
24
|
+
credits_charged: int = pydantic.Field(
|
|
25
|
+
alias="credits_charged",
|
|
26
|
+
)
|
|
27
|
+
"""
|
|
28
|
+
The amount of credits deducted from your account to generate the audio. We charge credits right when the request is made.
|
|
29
|
+
|
|
30
|
+
If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.
|
|
31
|
+
"""
|
|
32
|
+
downloads: typing.List[V1AudioProjectsGetResponseDownloadsItem] = pydantic.Field(
|
|
33
|
+
alias="downloads",
|
|
34
|
+
)
|
|
35
|
+
enabled: bool = pydantic.Field(
|
|
36
|
+
alias="enabled",
|
|
37
|
+
)
|
|
38
|
+
"""
|
|
39
|
+
Indicates whether the resource is deleted
|
|
40
|
+
"""
|
|
41
|
+
error: typing.Optional[V1AudioProjectsGetResponseError] = pydantic.Field(
|
|
42
|
+
alias="error",
|
|
43
|
+
)
|
|
44
|
+
"""
|
|
45
|
+
In the case of an error, this object will contain the error encountered during video render
|
|
46
|
+
"""
|
|
47
|
+
id: str = pydantic.Field(
|
|
48
|
+
alias="id",
|
|
49
|
+
)
|
|
50
|
+
"""
|
|
51
|
+
Unique ID of the audio. This value can be used in the [get audio project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch additional details such as status
|
|
52
|
+
"""
|
|
53
|
+
name: typing.Optional[str] = pydantic.Field(
|
|
54
|
+
alias="name",
|
|
55
|
+
)
|
|
56
|
+
"""
|
|
57
|
+
The name of the audio.
|
|
58
|
+
"""
|
|
59
|
+
status: typing_extensions.Literal[
|
|
60
|
+
"canceled", "complete", "draft", "error", "queued", "rendering"
|
|
61
|
+
] = pydantic.Field(
|
|
62
|
+
alias="status",
|
|
63
|
+
)
|
|
64
|
+
"""
|
|
65
|
+
The status of the audio.
|
|
66
|
+
"""
|
|
67
|
+
type_: str = pydantic.Field(
|
|
68
|
+
alias="type",
|
|
69
|
+
)
|
|
70
|
+
"""
|
|
71
|
+
The type of the audio project. Possible values are VOICE_GENERATOR, VOICE_CHANGER, VOICE_CLONER
|
|
72
|
+
"""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1AudioProjectsGetResponseDownloadsItem(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
The download url and expiration date of the audio project
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
expires_at: str = pydantic.Field(
|
|
15
|
+
alias="expires_at",
|
|
16
|
+
)
|
|
17
|
+
url: str = pydantic.Field(
|
|
18
|
+
alias="url",
|
|
19
|
+
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import pydantic
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class V1AudioProjectsGetResponseError(pydantic.BaseModel):
|
|
5
5
|
"""
|
|
6
6
|
In the case of an error, this object will contain the error encountered during video render
|
|
7
7
|
"""
|
|
@@ -11,7 +11,7 @@ class GetV1ImageProjectsIdResponseError(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
code: str = pydantic.Field(
|
|
15
15
|
alias="code",
|
|
16
16
|
)
|
|
17
17
|
"""
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1AutoSubtitleGeneratorCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
estimated_frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="estimated_frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
29
|
+
"""
|
|
30
|
+
id: str = pydantic.Field(
|
|
31
|
+
alias="id",
|
|
32
|
+
)
|
|
33
|
+
"""
|
|
34
|
+
Unique ID of the video. This value can be used in the [get video project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch additional details such as status
|
|
35
|
+
"""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1FaceDetectionCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
V1FaceDetectionCreateResponse
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The credits charged for the task.
|
|
19
|
+
"""
|
|
20
|
+
id: str = pydantic.Field(
|
|
21
|
+
alias="id",
|
|
22
|
+
)
|
|
23
|
+
"""
|
|
24
|
+
The id of the task. Use this value in the [get face detection details API](/api-reference/files/get-face-detection-details) to get the details of the face detection task.
|
|
25
|
+
"""
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_face_detection_get_response_faces_item import (
|
|
6
|
+
V1FaceDetectionGetResponseFacesItem,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class V1FaceDetectionGetResponse(pydantic.BaseModel):
|
|
11
|
+
"""
|
|
12
|
+
V1FaceDetectionGetResponse
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
model_config = pydantic.ConfigDict(
|
|
16
|
+
arbitrary_types_allowed=True,
|
|
17
|
+
populate_by_name=True,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
credits_charged: int = pydantic.Field(
|
|
21
|
+
alias="credits_charged",
|
|
22
|
+
)
|
|
23
|
+
"""
|
|
24
|
+
The credits charged for the task.
|
|
25
|
+
"""
|
|
26
|
+
faces: typing.List[V1FaceDetectionGetResponseFacesItem] = pydantic.Field(
|
|
27
|
+
alias="faces",
|
|
28
|
+
)
|
|
29
|
+
"""
|
|
30
|
+
The faces detected in the image or video. The list is populated as faces are detected.
|
|
31
|
+
"""
|
|
32
|
+
id: str = pydantic.Field(
|
|
33
|
+
alias="id",
|
|
34
|
+
)
|
|
35
|
+
"""
|
|
36
|
+
The id of the task. This value is returned by the [face detection API](/api-reference/files/face-detection#response-id).
|
|
37
|
+
"""
|
|
38
|
+
status: typing_extensions.Literal["complete", "error", "queued", "rendering"] = (
|
|
39
|
+
pydantic.Field(
|
|
40
|
+
alias="status",
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
"""
|
|
44
|
+
The status of the detection.
|
|
45
|
+
"""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1FaceDetectionGetResponseFacesItem(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
V1FaceDetectionGetResponseFacesItem
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
path: str = pydantic.Field(
|
|
15
|
+
alias="path",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The path to the face image. This should be used in face swap photo/video API calls as `.assets.face_mappings.original_face`
|
|
19
|
+
"""
|
|
20
|
+
url: str = pydantic.Field(
|
|
21
|
+
alias="url",
|
|
22
|
+
)
|
|
23
|
+
"""
|
|
24
|
+
The url to the face image. This is used to render the image in your applications.
|
|
25
|
+
"""
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1FaceSwapCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
estimated_frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="estimated_frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
29
|
+
"""
|
|
30
|
+
id: str = pydantic.Field(
|
|
31
|
+
alias="id",
|
|
32
|
+
)
|
|
33
|
+
"""
|
|
34
|
+
Unique ID of the video. This value can be used in the [get video project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch additional details such as status
|
|
35
|
+
"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1FaceSwapPhotoCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
27
|
+
"""
|
|
28
|
+
id: str = pydantic.Field(
|
|
29
|
+
alias="id",
|
|
30
|
+
)
|
|
31
|
+
"""
|
|
32
|
+
Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
|
|
33
|
+
"""
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
|
|
4
|
+
from .v1_files_upload_urls_create_response_items_item import (
|
|
5
|
+
V1FilesUploadUrlsCreateResponseItemsItem,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class V1FilesUploadUrlsCreateResponse(pydantic.BaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Success
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
model_config = pydantic.ConfigDict(
|
|
15
|
+
arbitrary_types_allowed=True,
|
|
16
|
+
populate_by_name=True,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
items: typing.List[V1FilesUploadUrlsCreateResponseItemsItem] = pydantic.Field(
|
|
20
|
+
alias="items",
|
|
21
|
+
)
|
|
22
|
+
"""
|
|
23
|
+
The list of upload URLs and file paths for the assets. The response array will match the order of items in the request body. Refer to the [Input Files Guide](/integration/input-files) for more details.
|
|
24
|
+
"""
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import pydantic
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class V1FilesUploadUrlsCreateResponseItemsItem(pydantic.BaseModel):
|
|
5
5
|
"""
|
|
6
|
-
|
|
6
|
+
V1FilesUploadUrlsCreateResponseItemsItem
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
model_config = pydantic.ConfigDict(
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1ImageBackgroundRemoverCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
27
|
+
"""
|
|
28
|
+
id: str = pydantic.Field(
|
|
29
|
+
alias="id",
|
|
30
|
+
)
|
|
31
|
+
"""
|
|
32
|
+
Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
|
|
33
|
+
"""
|
magic_hour/types/models/{get_v1_image_projects_id_response.py → v1_image_projects_get_response.py}
RENAMED
|
@@ -2,13 +2,13 @@ import pydantic
|
|
|
2
2
|
import typing
|
|
3
3
|
import typing_extensions
|
|
4
4
|
|
|
5
|
-
from .
|
|
6
|
-
|
|
5
|
+
from .v1_image_projects_get_response_downloads_item import (
|
|
6
|
+
V1ImageProjectsGetResponseDownloadsItem,
|
|
7
7
|
)
|
|
8
|
-
from .
|
|
8
|
+
from .v1_image_projects_get_response_error import V1ImageProjectsGetResponseError
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class V1ImageProjectsGetResponse(pydantic.BaseModel):
|
|
12
12
|
"""
|
|
13
13
|
Success
|
|
14
14
|
"""
|
|
@@ -21,7 +21,15 @@ class GetV1ImageProjectsIdResponse(pydantic.BaseModel):
|
|
|
21
21
|
created_at: str = pydantic.Field(
|
|
22
22
|
alias="created_at",
|
|
23
23
|
)
|
|
24
|
-
|
|
24
|
+
credits_charged: int = pydantic.Field(
|
|
25
|
+
alias="credits_charged",
|
|
26
|
+
)
|
|
27
|
+
"""
|
|
28
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
29
|
+
|
|
30
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
31
|
+
"""
|
|
32
|
+
downloads: typing.List[V1ImageProjectsGetResponseDownloadsItem] = pydantic.Field(
|
|
25
33
|
alias="downloads",
|
|
26
34
|
)
|
|
27
35
|
enabled: bool = pydantic.Field(
|
|
@@ -30,7 +38,7 @@ class GetV1ImageProjectsIdResponse(pydantic.BaseModel):
|
|
|
30
38
|
"""
|
|
31
39
|
Indicates whether the resource is deleted
|
|
32
40
|
"""
|
|
33
|
-
error: typing.Optional[
|
|
41
|
+
error: typing.Optional[V1ImageProjectsGetResponseError] = pydantic.Field(
|
|
34
42
|
alias="error",
|
|
35
43
|
)
|
|
36
44
|
"""
|
|
@@ -66,17 +74,11 @@ class GetV1ImageProjectsIdResponse(pydantic.BaseModel):
|
|
|
66
74
|
alias="total_frame_cost",
|
|
67
75
|
)
|
|
68
76
|
"""
|
|
69
|
-
|
|
70
|
-
"""
|
|
71
|
-
|
|
72
|
-
"AI_HEADSHOT",
|
|
73
|
-
"AI_IMAGE",
|
|
74
|
-
"BACKGROUND_REMOVER",
|
|
75
|
-
"CLOTHES_CHANGER",
|
|
76
|
-
"FACE_SWAP",
|
|
77
|
-
"IMAGE_UPSCALER",
|
|
78
|
-
"PHOTO_EDITOR",
|
|
79
|
-
"QR_CODE",
|
|
80
|
-
] = pydantic.Field(
|
|
77
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
78
|
+
"""
|
|
79
|
+
type_: str = pydantic.Field(
|
|
81
80
|
alias="type",
|
|
82
81
|
)
|
|
82
|
+
"""
|
|
83
|
+
The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER, AI_GIF, AI_SELFIE, AI_IMAGE_EDITOR
|
|
84
|
+
"""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import pydantic
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class V1ImageProjectsGetResponseError(pydantic.BaseModel):
|
|
5
5
|
"""
|
|
6
6
|
In the case of an error, this object will contain the error encountered during video render
|
|
7
7
|
"""
|
|
@@ -11,7 +11,7 @@ class GetV1VideoProjectsIdResponseError(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
code: str = pydantic.Field(
|
|
15
15
|
alias="code",
|
|
16
16
|
)
|
|
17
17
|
"""
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1ImageToVideoCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
estimated_frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="estimated_frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
29
|
+
"""
|
|
30
|
+
id: str = pydantic.Field(
|
|
31
|
+
alias="id",
|
|
32
|
+
)
|
|
33
|
+
"""
|
|
34
|
+
Unique ID of the video. This value can be used in the [get video project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch additional details such as status
|
|
35
|
+
"""
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1LipSyncCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
estimated_frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="estimated_frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
29
|
+
"""
|
|
30
|
+
id: str = pydantic.Field(
|
|
31
|
+
alias="id",
|
|
32
|
+
)
|
|
33
|
+
"""
|
|
34
|
+
Unique ID of the video. This value can be used in the [get video project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch additional details such as status
|
|
35
|
+
"""
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1PhotoColorizerCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
27
|
+
"""
|
|
28
|
+
id: str = pydantic.Field(
|
|
29
|
+
alias="id",
|
|
30
|
+
)
|
|
31
|
+
"""
|
|
32
|
+
Unique ID of the image. This value can be used in the [get image project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch additional details such as status
|
|
33
|
+
"""
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1TextToVideoCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
estimated_frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="estimated_frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
29
|
+
"""
|
|
30
|
+
id: str = pydantic.Field(
|
|
31
|
+
alias="id",
|
|
32
|
+
)
|
|
33
|
+
"""
|
|
34
|
+
Unique ID of the video. This value can be used in the [get video project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch additional details such as status
|
|
35
|
+
"""
|