magic_hour 0.26.1__tar.gz → 0.27.0__tar.gz
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-0.26.1 → magic_hour-0.27.0}/PKG-INFO +5 -1
- {magic_hour-0.26.1 → magic_hour-0.27.0}/README.md +4 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/environment.py +1 -1
- magic_hour-0.27.0/magic_hour/resources/v1/auto_subtitle_generator/README.md +58 -0
- magic_hour-0.27.0/magic_hour/resources/v1/auto_subtitle_generator/__init__.py +4 -0
- magic_hour-0.27.0/magic_hour/resources/v1/auto_subtitle_generator/client.py +169 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/client.py +10 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/__init__.py +4 -0
- magic_hour-0.27.0/magic_hour/types/models/v1_auto_subtitle_generator_create_response.py +35 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/__init__.py +24 -0
- magic_hour-0.27.0/magic_hour/types/params/v1_auto_subtitle_generator_create_body.py +78 -0
- magic_hour-0.27.0/magic_hour/types/params/v1_auto_subtitle_generator_create_body_assets.py +28 -0
- magic_hour-0.27.0/magic_hour/types/params/v1_auto_subtitle_generator_create_body_style.py +56 -0
- magic_hour-0.27.0/magic_hour/types/params/v1_auto_subtitle_generator_create_body_style_custom_config.py +86 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/pyproject.toml +1 -1
- {magic_hour-0.26.1 → magic_hour-0.27.0}/LICENSE +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/api_error.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/auth.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/base_client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/binary_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/query.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/request.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/type_utils.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/core/utils.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_clothes_changer/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_clothes_changer/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_clothes_changer/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_face_editor/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_face_editor/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_face_editor/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_gif_generator/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_gif_generator/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_gif_generator/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_headshot_generator/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_headshot_generator/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_headshot_generator/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_editor/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_editor/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_editor/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_generator/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_generator/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_generator/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_upscaler/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_upscaler/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_image_upscaler/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_meme_generator/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_meme_generator/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_meme_generator/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_photo_editor/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_photo_editor/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_photo_editor/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_qr_code_generator/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_qr_code_generator/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_qr_code_generator/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_talking_photo/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_talking_photo/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/ai_talking_photo/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/animation/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/animation/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/animation/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/face_swap/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/face_swap/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/face_swap/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/face_swap_photo/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/face_swap_photo/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/face_swap_photo/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/files/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/files/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/files/upload_urls/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/files/upload_urls/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/files/upload_urls/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_background_remover/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_background_remover/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_background_remover/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_projects/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_projects/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_projects/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_to_video/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_to_video/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/image_to_video/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/lip_sync/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/lip_sync/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/lip_sync/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/photo_colorizer/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/photo_colorizer/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/photo_colorizer/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/text_to_video/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/text_to_video/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/text_to_video/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/video_projects/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/video_projects/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/video_projects/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/video_to_video/README.md +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/video_to_video/__init__.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/resources/v1/video_to_video/client.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_clothes_changer_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_face_editor_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_gif_generator_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_headshot_generator_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_image_editor_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_image_generator_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_image_upscaler_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_meme_generator_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_photo_editor_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_qr_code_generator_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_ai_talking_photo_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_animation_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_face_swap_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_face_swap_photo_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_files_upload_urls_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_files_upload_urls_create_response_items_item.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_image_background_remover_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_image_projects_get_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_image_projects_get_response_downloads_item.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_image_projects_get_response_error.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_image_to_video_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_lip_sync_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_photo_colorizer_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_text_to_video_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_video_projects_get_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_video_projects_get_response_download.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_video_projects_get_response_downloads_item.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_video_projects_get_response_error.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/models/v1_video_to_video_create_response.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_clothes_changer_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_clothes_changer_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_face_editor_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_face_editor_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_face_editor_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_gif_generator_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_gif_generator_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_headshot_generator_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_headshot_generator_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_headshot_generator_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_image_editor_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_image_editor_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_image_editor_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_image_generator_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_image_generator_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_image_upscaler_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_image_upscaler_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_image_upscaler_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_meme_generator_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_meme_generator_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_photo_editor_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_photo_editor_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_photo_editor_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_qr_code_generator_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_qr_code_generator_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_talking_photo_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_ai_talking_photo_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_animation_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_animation_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_animation_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_face_swap_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_face_swap_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_face_swap_photo_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_face_swap_photo_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_files_upload_urls_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_image_background_remover_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_image_background_remover_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_image_to_video_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_image_to_video_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_image_to_video_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_lip_sync_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_lip_sync_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_photo_colorizer_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_photo_colorizer_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_text_to_video_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_text_to_video_create_body_style.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_video_to_video_create_body.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_video_to_video_create_body_assets.py +0 -0
- {magic_hour-0.26.1 → magic_hour-0.27.0}/magic_hour/types/params/v1_video_to_video_create_body_style.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: magic_hour
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.0
|
|
4
4
|
Summary: Python SDK for Magic Hour API
|
|
5
5
|
Requires-Python: >=3.8,<4.0
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -107,6 +107,10 @@ client = AsyncClient(token="my api key")
|
|
|
107
107
|
|
|
108
108
|
* [create](magic_hour/resources/v1/animation/README.md#create) - Animation
|
|
109
109
|
|
|
110
|
+
### [v1.auto_subtitle_generator](magic_hour/resources/v1/auto_subtitle_generator/README.md)
|
|
111
|
+
|
|
112
|
+
* [create](magic_hour/resources/v1/auto_subtitle_generator/README.md#create) - Auto Subtitle Generator
|
|
113
|
+
|
|
110
114
|
### [v1.face_swap](magic_hour/resources/v1/face_swap/README.md)
|
|
111
115
|
|
|
112
116
|
* [create](magic_hour/resources/v1/face_swap/README.md#create) - Face Swap video
|
|
@@ -89,6 +89,10 @@ client = AsyncClient(token="my api key")
|
|
|
89
89
|
|
|
90
90
|
* [create](magic_hour/resources/v1/animation/README.md#create) - Animation
|
|
91
91
|
|
|
92
|
+
### [v1.auto_subtitle_generator](magic_hour/resources/v1/auto_subtitle_generator/README.md)
|
|
93
|
+
|
|
94
|
+
* [create](magic_hour/resources/v1/auto_subtitle_generator/README.md#create) - Auto Subtitle Generator
|
|
95
|
+
|
|
92
96
|
### [v1.face_swap](magic_hour/resources/v1/face_swap/README.md)
|
|
93
97
|
|
|
94
98
|
* [create](magic_hour/resources/v1/face_swap/README.md#create) - Face Swap video
|
|
@@ -6,7 +6,7 @@ class Environment(enum.Enum):
|
|
|
6
6
|
"""Pre-defined base URLs for the API"""
|
|
7
7
|
|
|
8
8
|
ENVIRONMENT = "https://api.magichour.ai"
|
|
9
|
-
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.
|
|
9
|
+
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.27.0"
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def _get_base_url(
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
### Auto Subtitle Generator <a name="create"></a>
|
|
3
|
+
|
|
4
|
+
Automatically generate subtitles for your video in multiple languages.
|
|
5
|
+
|
|
6
|
+
**API Endpoint**: `POST /v1/auto-subtitle-generator`
|
|
7
|
+
|
|
8
|
+
#### Parameters
|
|
9
|
+
|
|
10
|
+
| Parameter | Required | Description | Example |
|
|
11
|
+
|-----------|:--------:|-------------|--------|
|
|
12
|
+
| `assets` | ✓ | Provide the assets for auto subtitle generator | `{"video_file_path": "api-assets/id/1234.mp4"}` |
|
|
13
|
+
| `end_seconds` | ✓ | The end time of the input video in seconds | `15.0` |
|
|
14
|
+
| `start_seconds` | ✓ | The start time of the input video in seconds | `0.0` |
|
|
15
|
+
| `style` | ✓ | Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided. * If only `.style.template` is provided, default values for the template will be used. * If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`. * If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used. To use custom config only, the following `custom_config` params are required: * `.style.custom_config.font` * `.style.custom_config.text_color` * `.style.custom_config.vertical_position` * `.style.custom_config.horizontal_position` | `{}` |
|
|
16
|
+
| `name` | ✗ | The name of video | `"Auto Subtitle video"` |
|
|
17
|
+
|
|
18
|
+
#### Synchronous Client
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
from magic_hour import Client
|
|
22
|
+
from os import getenv
|
|
23
|
+
|
|
24
|
+
client = Client(token=getenv("API_TOKEN"))
|
|
25
|
+
res = client.v1.auto_subtitle_generator.create(
|
|
26
|
+
assets={"video_file_path": "api-assets/id/1234.mp4"},
|
|
27
|
+
end_seconds=15.0,
|
|
28
|
+
start_seconds=0.0,
|
|
29
|
+
style={},
|
|
30
|
+
name="Auto Subtitle video",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### Asynchronous Client
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from magic_hour import AsyncClient
|
|
39
|
+
from os import getenv
|
|
40
|
+
|
|
41
|
+
client = AsyncClient(token=getenv("API_TOKEN"))
|
|
42
|
+
res = await client.v1.auto_subtitle_generator.create(
|
|
43
|
+
assets={"video_file_path": "api-assets/id/1234.mp4"},
|
|
44
|
+
end_seconds=15.0,
|
|
45
|
+
start_seconds=0.0,
|
|
46
|
+
style={},
|
|
47
|
+
name="Auto Subtitle video",
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Response
|
|
53
|
+
|
|
54
|
+
##### Type
|
|
55
|
+
[V1AutoSubtitleGeneratorCreateResponse](/magic_hour/types/models/v1_auto_subtitle_generator_create_response.py)
|
|
56
|
+
|
|
57
|
+
##### Example
|
|
58
|
+
`{"credits_charged": 450, "estimated_frame_cost": 450, "id": "clx7uu86w0a5qp55yxz315r6r"}`
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
|
|
3
|
+
from magic_hour.core import (
|
|
4
|
+
AsyncBaseClient,
|
|
5
|
+
RequestOptions,
|
|
6
|
+
SyncBaseClient,
|
|
7
|
+
default_request_options,
|
|
8
|
+
to_encodable,
|
|
9
|
+
type_utils,
|
|
10
|
+
)
|
|
11
|
+
from magic_hour.types import models, params
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AutoSubtitleGeneratorClient:
|
|
15
|
+
def __init__(self, *, base_client: SyncBaseClient):
|
|
16
|
+
self._base_client = base_client
|
|
17
|
+
|
|
18
|
+
def create(
|
|
19
|
+
self,
|
|
20
|
+
*,
|
|
21
|
+
assets: params.V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
22
|
+
end_seconds: float,
|
|
23
|
+
start_seconds: float,
|
|
24
|
+
style: params.V1AutoSubtitleGeneratorCreateBodyStyle,
|
|
25
|
+
name: typing.Union[
|
|
26
|
+
typing.Optional[str], type_utils.NotGiven
|
|
27
|
+
] = type_utils.NOT_GIVEN,
|
|
28
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
29
|
+
) -> models.V1AutoSubtitleGeneratorCreateResponse:
|
|
30
|
+
"""
|
|
31
|
+
Auto Subtitle Generator
|
|
32
|
+
|
|
33
|
+
Automatically generate subtitles for your video in multiple languages.
|
|
34
|
+
|
|
35
|
+
POST /v1/auto-subtitle-generator
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
name: The name of video
|
|
39
|
+
assets: Provide the assets for auto subtitle generator
|
|
40
|
+
end_seconds: The end time of the input video in seconds
|
|
41
|
+
start_seconds: The start time of the input video in seconds
|
|
42
|
+
style: Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
43
|
+
* If only `.style.template` is provided, default values for the template will be used.
|
|
44
|
+
* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
45
|
+
* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
46
|
+
|
|
47
|
+
To use custom config only, the following `custom_config` params are required:
|
|
48
|
+
* `.style.custom_config.font`
|
|
49
|
+
* `.style.custom_config.text_color`
|
|
50
|
+
* `.style.custom_config.vertical_position`
|
|
51
|
+
* `.style.custom_config.horizontal_position`
|
|
52
|
+
|
|
53
|
+
request_options: Additional options to customize the HTTP request
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
Success
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
ApiError: A custom exception class that provides additional context
|
|
60
|
+
for API errors, including the HTTP status code and response body.
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
```py
|
|
64
|
+
client.v1.auto_subtitle_generator.create(
|
|
65
|
+
assets={"video_file_path": "api-assets/id/1234.mp4"},
|
|
66
|
+
end_seconds=15.0,
|
|
67
|
+
start_seconds=0.0,
|
|
68
|
+
style={},
|
|
69
|
+
name="Auto Subtitle video",
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
"""
|
|
73
|
+
_json = to_encodable(
|
|
74
|
+
item={
|
|
75
|
+
"name": name,
|
|
76
|
+
"assets": assets,
|
|
77
|
+
"end_seconds": end_seconds,
|
|
78
|
+
"start_seconds": start_seconds,
|
|
79
|
+
"style": style,
|
|
80
|
+
},
|
|
81
|
+
dump_with=params._SerializerV1AutoSubtitleGeneratorCreateBody,
|
|
82
|
+
)
|
|
83
|
+
return self._base_client.request(
|
|
84
|
+
method="POST",
|
|
85
|
+
path="/v1/auto-subtitle-generator",
|
|
86
|
+
auth_names=["bearerAuth"],
|
|
87
|
+
json=_json,
|
|
88
|
+
cast_to=models.V1AutoSubtitleGeneratorCreateResponse,
|
|
89
|
+
request_options=request_options or default_request_options(),
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class AsyncAutoSubtitleGeneratorClient:
|
|
94
|
+
def __init__(self, *, base_client: AsyncBaseClient):
|
|
95
|
+
self._base_client = base_client
|
|
96
|
+
|
|
97
|
+
async def create(
|
|
98
|
+
self,
|
|
99
|
+
*,
|
|
100
|
+
assets: params.V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
101
|
+
end_seconds: float,
|
|
102
|
+
start_seconds: float,
|
|
103
|
+
style: params.V1AutoSubtitleGeneratorCreateBodyStyle,
|
|
104
|
+
name: typing.Union[
|
|
105
|
+
typing.Optional[str], type_utils.NotGiven
|
|
106
|
+
] = type_utils.NOT_GIVEN,
|
|
107
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
108
|
+
) -> models.V1AutoSubtitleGeneratorCreateResponse:
|
|
109
|
+
"""
|
|
110
|
+
Auto Subtitle Generator
|
|
111
|
+
|
|
112
|
+
Automatically generate subtitles for your video in multiple languages.
|
|
113
|
+
|
|
114
|
+
POST /v1/auto-subtitle-generator
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
name: The name of video
|
|
118
|
+
assets: Provide the assets for auto subtitle generator
|
|
119
|
+
end_seconds: The end time of the input video in seconds
|
|
120
|
+
start_seconds: The start time of the input video in seconds
|
|
121
|
+
style: Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
122
|
+
* If only `.style.template` is provided, default values for the template will be used.
|
|
123
|
+
* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
124
|
+
* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
125
|
+
|
|
126
|
+
To use custom config only, the following `custom_config` params are required:
|
|
127
|
+
* `.style.custom_config.font`
|
|
128
|
+
* `.style.custom_config.text_color`
|
|
129
|
+
* `.style.custom_config.vertical_position`
|
|
130
|
+
* `.style.custom_config.horizontal_position`
|
|
131
|
+
|
|
132
|
+
request_options: Additional options to customize the HTTP request
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
Success
|
|
136
|
+
|
|
137
|
+
Raises:
|
|
138
|
+
ApiError: A custom exception class that provides additional context
|
|
139
|
+
for API errors, including the HTTP status code and response body.
|
|
140
|
+
|
|
141
|
+
Examples:
|
|
142
|
+
```py
|
|
143
|
+
await client.v1.auto_subtitle_generator.create(
|
|
144
|
+
assets={"video_file_path": "api-assets/id/1234.mp4"},
|
|
145
|
+
end_seconds=15.0,
|
|
146
|
+
start_seconds=0.0,
|
|
147
|
+
style={},
|
|
148
|
+
name="Auto Subtitle video",
|
|
149
|
+
)
|
|
150
|
+
```
|
|
151
|
+
"""
|
|
152
|
+
_json = to_encodable(
|
|
153
|
+
item={
|
|
154
|
+
"name": name,
|
|
155
|
+
"assets": assets,
|
|
156
|
+
"end_seconds": end_seconds,
|
|
157
|
+
"start_seconds": start_seconds,
|
|
158
|
+
"style": style,
|
|
159
|
+
},
|
|
160
|
+
dump_with=params._SerializerV1AutoSubtitleGeneratorCreateBody,
|
|
161
|
+
)
|
|
162
|
+
return await self._base_client.request(
|
|
163
|
+
method="POST",
|
|
164
|
+
path="/v1/auto-subtitle-generator",
|
|
165
|
+
auth_names=["bearerAuth"],
|
|
166
|
+
json=_json,
|
|
167
|
+
cast_to=models.V1AutoSubtitleGeneratorCreateResponse,
|
|
168
|
+
request_options=request_options or default_request_options(),
|
|
169
|
+
)
|
|
@@ -44,6 +44,10 @@ from magic_hour.resources.v1.ai_talking_photo import (
|
|
|
44
44
|
AsyncAiTalkingPhotoClient,
|
|
45
45
|
)
|
|
46
46
|
from magic_hour.resources.v1.animation import AnimationClient, AsyncAnimationClient
|
|
47
|
+
from magic_hour.resources.v1.auto_subtitle_generator import (
|
|
48
|
+
AsyncAutoSubtitleGeneratorClient,
|
|
49
|
+
AutoSubtitleGeneratorClient,
|
|
50
|
+
)
|
|
47
51
|
from magic_hour.resources.v1.face_swap import AsyncFaceSwapClient, FaceSwapClient
|
|
48
52
|
from magic_hour.resources.v1.face_swap_photo import (
|
|
49
53
|
AsyncFaceSwapPhotoClient,
|
|
@@ -102,6 +106,9 @@ class V1Client:
|
|
|
102
106
|
)
|
|
103
107
|
self.ai_talking_photo = AiTalkingPhotoClient(base_client=self._base_client)
|
|
104
108
|
self.animation = AnimationClient(base_client=self._base_client)
|
|
109
|
+
self.auto_subtitle_generator = AutoSubtitleGeneratorClient(
|
|
110
|
+
base_client=self._base_client
|
|
111
|
+
)
|
|
105
112
|
self.face_swap = FaceSwapClient(base_client=self._base_client)
|
|
106
113
|
self.face_swap_photo = FaceSwapPhotoClient(base_client=self._base_client)
|
|
107
114
|
self.files = FilesClient(base_client=self._base_client)
|
|
@@ -144,6 +151,9 @@ class AsyncV1Client:
|
|
|
144
151
|
)
|
|
145
152
|
self.ai_talking_photo = AsyncAiTalkingPhotoClient(base_client=self._base_client)
|
|
146
153
|
self.animation = AsyncAnimationClient(base_client=self._base_client)
|
|
154
|
+
self.auto_subtitle_generator = AsyncAutoSubtitleGeneratorClient(
|
|
155
|
+
base_client=self._base_client
|
|
156
|
+
)
|
|
147
157
|
self.face_swap = AsyncFaceSwapClient(base_client=self._base_client)
|
|
148
158
|
self.face_swap_photo = AsyncFaceSwapPhotoClient(base_client=self._base_client)
|
|
149
159
|
self.files = AsyncFilesClient(base_client=self._base_client)
|
|
@@ -12,6 +12,9 @@ from .v1_ai_photo_editor_create_response import V1AiPhotoEditorCreateResponse
|
|
|
12
12
|
from .v1_ai_qr_code_generator_create_response import V1AiQrCodeGeneratorCreateResponse
|
|
13
13
|
from .v1_ai_talking_photo_create_response import V1AiTalkingPhotoCreateResponse
|
|
14
14
|
from .v1_animation_create_response import V1AnimationCreateResponse
|
|
15
|
+
from .v1_auto_subtitle_generator_create_response import (
|
|
16
|
+
V1AutoSubtitleGeneratorCreateResponse,
|
|
17
|
+
)
|
|
15
18
|
from .v1_face_swap_create_response import V1FaceSwapCreateResponse
|
|
16
19
|
from .v1_face_swap_photo_create_response import V1FaceSwapPhotoCreateResponse
|
|
17
20
|
from .v1_files_upload_urls_create_response import V1FilesUploadUrlsCreateResponse
|
|
@@ -52,6 +55,7 @@ __all__ = [
|
|
|
52
55
|
"V1AiQrCodeGeneratorCreateResponse",
|
|
53
56
|
"V1AiTalkingPhotoCreateResponse",
|
|
54
57
|
"V1AnimationCreateResponse",
|
|
58
|
+
"V1AutoSubtitleGeneratorCreateResponse",
|
|
55
59
|
"V1FaceSwapCreateResponse",
|
|
56
60
|
"V1FaceSwapPhotoCreateResponse",
|
|
57
61
|
"V1FilesUploadUrlsCreateResponse",
|
|
@@ -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
|
+
"""
|
|
@@ -122,6 +122,22 @@ from .v1_animation_create_body_style import (
|
|
|
122
122
|
V1AnimationCreateBodyStyle,
|
|
123
123
|
_SerializerV1AnimationCreateBodyStyle,
|
|
124
124
|
)
|
|
125
|
+
from .v1_auto_subtitle_generator_create_body import (
|
|
126
|
+
V1AutoSubtitleGeneratorCreateBody,
|
|
127
|
+
_SerializerV1AutoSubtitleGeneratorCreateBody,
|
|
128
|
+
)
|
|
129
|
+
from .v1_auto_subtitle_generator_create_body_assets import (
|
|
130
|
+
V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
131
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyAssets,
|
|
132
|
+
)
|
|
133
|
+
from .v1_auto_subtitle_generator_create_body_style import (
|
|
134
|
+
V1AutoSubtitleGeneratorCreateBodyStyle,
|
|
135
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyle,
|
|
136
|
+
)
|
|
137
|
+
from .v1_auto_subtitle_generator_create_body_style_custom_config import (
|
|
138
|
+
V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
139
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
140
|
+
)
|
|
125
141
|
from .v1_face_swap_create_body import (
|
|
126
142
|
V1FaceSwapCreateBody,
|
|
127
143
|
_SerializerV1FaceSwapCreateBody,
|
|
@@ -233,6 +249,10 @@ __all__ = [
|
|
|
233
249
|
"V1AnimationCreateBody",
|
|
234
250
|
"V1AnimationCreateBodyAssets",
|
|
235
251
|
"V1AnimationCreateBodyStyle",
|
|
252
|
+
"V1AutoSubtitleGeneratorCreateBody",
|
|
253
|
+
"V1AutoSubtitleGeneratorCreateBodyAssets",
|
|
254
|
+
"V1AutoSubtitleGeneratorCreateBodyStyle",
|
|
255
|
+
"V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig",
|
|
236
256
|
"V1FaceSwapCreateBody",
|
|
237
257
|
"V1FaceSwapCreateBodyAssets",
|
|
238
258
|
"V1FaceSwapPhotoCreateBody",
|
|
@@ -284,6 +304,10 @@ __all__ = [
|
|
|
284
304
|
"_SerializerV1AnimationCreateBody",
|
|
285
305
|
"_SerializerV1AnimationCreateBodyAssets",
|
|
286
306
|
"_SerializerV1AnimationCreateBodyStyle",
|
|
307
|
+
"_SerializerV1AutoSubtitleGeneratorCreateBody",
|
|
308
|
+
"_SerializerV1AutoSubtitleGeneratorCreateBodyAssets",
|
|
309
|
+
"_SerializerV1AutoSubtitleGeneratorCreateBodyStyle",
|
|
310
|
+
"_SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig",
|
|
287
311
|
"_SerializerV1FaceSwapCreateBody",
|
|
288
312
|
"_SerializerV1FaceSwapCreateBodyAssets",
|
|
289
313
|
"_SerializerV1FaceSwapPhotoCreateBody",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_auto_subtitle_generator_create_body_assets import (
|
|
6
|
+
V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
7
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
from .v1_auto_subtitle_generator_create_body_style import (
|
|
10
|
+
V1AutoSubtitleGeneratorCreateBodyStyle,
|
|
11
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyle,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class V1AutoSubtitleGeneratorCreateBody(typing_extensions.TypedDict):
|
|
16
|
+
"""
|
|
17
|
+
V1AutoSubtitleGeneratorCreateBody
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
assets: typing_extensions.Required[V1AutoSubtitleGeneratorCreateBodyAssets]
|
|
21
|
+
"""
|
|
22
|
+
Provide the assets for auto subtitle generator
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
end_seconds: typing_extensions.Required[float]
|
|
26
|
+
"""
|
|
27
|
+
The end time of the input video in seconds
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
name: typing_extensions.NotRequired[str]
|
|
31
|
+
"""
|
|
32
|
+
The name of video
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
start_seconds: typing_extensions.Required[float]
|
|
36
|
+
"""
|
|
37
|
+
The start time of the input video in seconds
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
style: typing_extensions.Required[V1AutoSubtitleGeneratorCreateBodyStyle]
|
|
41
|
+
"""
|
|
42
|
+
Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
43
|
+
* If only `.style.template` is provided, default values for the template will be used.
|
|
44
|
+
* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
45
|
+
* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
46
|
+
|
|
47
|
+
To use custom config only, the following `custom_config` params are required:
|
|
48
|
+
* `.style.custom_config.font`
|
|
49
|
+
* `.style.custom_config.text_color`
|
|
50
|
+
* `.style.custom_config.vertical_position`
|
|
51
|
+
* `.style.custom_config.horizontal_position`
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class _SerializerV1AutoSubtitleGeneratorCreateBody(pydantic.BaseModel):
|
|
57
|
+
"""
|
|
58
|
+
Serializer for V1AutoSubtitleGeneratorCreateBody handling case conversions
|
|
59
|
+
and file omissions as dictated by the API
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
model_config = pydantic.ConfigDict(
|
|
63
|
+
populate_by_name=True,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
assets: _SerializerV1AutoSubtitleGeneratorCreateBodyAssets = pydantic.Field(
|
|
67
|
+
alias="assets",
|
|
68
|
+
)
|
|
69
|
+
end_seconds: float = pydantic.Field(
|
|
70
|
+
alias="end_seconds",
|
|
71
|
+
)
|
|
72
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
73
|
+
start_seconds: float = pydantic.Field(
|
|
74
|
+
alias="start_seconds",
|
|
75
|
+
)
|
|
76
|
+
style: _SerializerV1AutoSubtitleGeneratorCreateBodyStyle = pydantic.Field(
|
|
77
|
+
alias="style",
|
|
78
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AutoSubtitleGeneratorCreateBodyAssets(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
Provide the assets for auto subtitle generator
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
video_file_path: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
This is the video used to add subtitles. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class _SerializerV1AutoSubtitleGeneratorCreateBodyAssets(pydantic.BaseModel):
|
|
17
|
+
"""
|
|
18
|
+
Serializer for V1AutoSubtitleGeneratorCreateBodyAssets 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
|
+
video_file_path: str = pydantic.Field(
|
|
27
|
+
alias="video_file_path",
|
|
28
|
+
)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_auto_subtitle_generator_create_body_style_custom_config import (
|
|
6
|
+
V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
7
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1AutoSubtitleGeneratorCreateBodyStyle(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
14
|
+
* If only `.style.template` is provided, default values for the template will be used.
|
|
15
|
+
* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
16
|
+
* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
17
|
+
|
|
18
|
+
To use custom config only, the following `custom_config` params are required:
|
|
19
|
+
* `.style.custom_config.font`
|
|
20
|
+
* `.style.custom_config.text_color`
|
|
21
|
+
* `.style.custom_config.vertical_position`
|
|
22
|
+
* `.style.custom_config.horizontal_position`
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
custom_config: typing_extensions.NotRequired[
|
|
27
|
+
V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig
|
|
28
|
+
]
|
|
29
|
+
"""
|
|
30
|
+
Custom subtitle configuration.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
template: typing_extensions.NotRequired[
|
|
34
|
+
typing_extensions.Literal["cinematic", "highlight", "karaoke", "minimalist"]
|
|
35
|
+
]
|
|
36
|
+
"""
|
|
37
|
+
Preset subtitle templates. Please visit https://magichour.ai/create/auto-subtitle-generator to see the style of the existing templates.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class _SerializerV1AutoSubtitleGeneratorCreateBodyStyle(pydantic.BaseModel):
|
|
42
|
+
"""
|
|
43
|
+
Serializer for V1AutoSubtitleGeneratorCreateBodyStyle handling case conversions
|
|
44
|
+
and file omissions as dictated by the API
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
model_config = pydantic.ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
custom_config: typing.Optional[
|
|
52
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig
|
|
53
|
+
] = pydantic.Field(alias="custom_config", default=None)
|
|
54
|
+
template: typing.Optional[
|
|
55
|
+
typing_extensions.Literal["cinematic", "highlight", "karaoke", "minimalist"]
|
|
56
|
+
] = pydantic.Field(alias="template", default=None)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig(typing_extensions.TypedDict):
|
|
7
|
+
"""
|
|
8
|
+
Custom subtitle configuration.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
font: typing_extensions.NotRequired[str]
|
|
12
|
+
"""
|
|
13
|
+
Font name from Google Fonts. Not all fonts support all languages or character sets.
|
|
14
|
+
We recommend verifying language support and appearance directly on https://fonts.google.com before use.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
font_size: typing_extensions.NotRequired[float]
|
|
18
|
+
"""
|
|
19
|
+
Font size in pixels. If not provided, the font size is automatically calculated based on the video resolution.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
font_style: typing_extensions.NotRequired[str]
|
|
23
|
+
"""
|
|
24
|
+
Font style (e.g., normal, italic, bold)
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
highlighted_text_color: typing_extensions.NotRequired[str]
|
|
28
|
+
"""
|
|
29
|
+
Color used to highlight the current spoken text
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
horizontal_position: typing_extensions.NotRequired[str]
|
|
33
|
+
"""
|
|
34
|
+
Horizontal alignment of the text (e.g., left, center, right)
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
stroke_color: typing_extensions.NotRequired[str]
|
|
38
|
+
"""
|
|
39
|
+
Stroke (outline) color of the text
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
stroke_width: typing_extensions.NotRequired[float]
|
|
43
|
+
"""
|
|
44
|
+
Width of the text stroke in pixels. If `stroke_color` is provided, but `stroke_width` is not, the `stroke_width` will be calculated automatically based on the font size.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
text_color: typing_extensions.NotRequired[str]
|
|
48
|
+
"""
|
|
49
|
+
Primary text color in hex format
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
vertical_position: typing_extensions.NotRequired[str]
|
|
53
|
+
"""
|
|
54
|
+
Vertical alignment of the text (e.g., top, center, bottom)
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class _SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig(pydantic.BaseModel):
|
|
59
|
+
"""
|
|
60
|
+
Serializer for V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig handling case conversions
|
|
61
|
+
and file omissions as dictated by the API
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
model_config = pydantic.ConfigDict(
|
|
65
|
+
populate_by_name=True,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
font: typing.Optional[str] = pydantic.Field(alias="font", default=None)
|
|
69
|
+
font_size: typing.Optional[float] = pydantic.Field(alias="font_size", default=None)
|
|
70
|
+
font_style: typing.Optional[str] = pydantic.Field(alias="font_style", default=None)
|
|
71
|
+
highlighted_text_color: typing.Optional[str] = pydantic.Field(
|
|
72
|
+
alias="highlighted_text_color", default=None
|
|
73
|
+
)
|
|
74
|
+
horizontal_position: typing.Optional[str] = pydantic.Field(
|
|
75
|
+
alias="horizontal_position", default=None
|
|
76
|
+
)
|
|
77
|
+
stroke_color: typing.Optional[str] = pydantic.Field(
|
|
78
|
+
alias="stroke_color", default=None
|
|
79
|
+
)
|
|
80
|
+
stroke_width: typing.Optional[float] = pydantic.Field(
|
|
81
|
+
alias="stroke_width", default=None
|
|
82
|
+
)
|
|
83
|
+
text_color: typing.Optional[str] = pydantic.Field(alias="text_color", default=None)
|
|
84
|
+
vertical_position: typing.Optional[str] = pydantic.Field(
|
|
85
|
+
alias="vertical_position", default=None
|
|
86
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|