magic_hour 0.26.1__tar.gz → 0.28.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.

Files changed (180) hide show
  1. {magic_hour-0.26.1 → magic_hour-0.28.0}/PKG-INFO +5 -1
  2. {magic_hour-0.26.1 → magic_hour-0.28.0}/README.md +4 -0
  3. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/environment.py +1 -1
  4. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_talking_photo/README.md +2 -2
  5. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_talking_photo/client.py +4 -4
  6. magic_hour-0.28.0/magic_hour/resources/v1/auto_subtitle_generator/README.md +58 -0
  7. magic_hour-0.28.0/magic_hour/resources/v1/auto_subtitle_generator/__init__.py +4 -0
  8. magic_hour-0.28.0/magic_hour/resources/v1/auto_subtitle_generator/client.py +169 -0
  9. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/client.py +10 -0
  10. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/__init__.py +4 -0
  11. magic_hour-0.28.0/magic_hour/types/models/v1_auto_subtitle_generator_create_response.py +35 -0
  12. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/__init__.py +24 -0
  13. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_talking_photo_create_body.py +2 -2
  14. magic_hour-0.28.0/magic_hour/types/params/v1_auto_subtitle_generator_create_body.py +78 -0
  15. magic_hour-0.28.0/magic_hour/types/params/v1_auto_subtitle_generator_create_body_assets.py +28 -0
  16. magic_hour-0.28.0/magic_hour/types/params/v1_auto_subtitle_generator_create_body_style.py +56 -0
  17. magic_hour-0.28.0/magic_hour/types/params/v1_auto_subtitle_generator_create_body_style_custom_config.py +86 -0
  18. {magic_hour-0.26.1 → magic_hour-0.28.0}/pyproject.toml +1 -1
  19. {magic_hour-0.26.1 → magic_hour-0.28.0}/LICENSE +0 -0
  20. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/__init__.py +0 -0
  21. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/client.py +0 -0
  22. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/__init__.py +0 -0
  23. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/api_error.py +0 -0
  24. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/auth.py +0 -0
  25. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/base_client.py +0 -0
  26. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/binary_response.py +0 -0
  27. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/query.py +0 -0
  28. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/request.py +0 -0
  29. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/response.py +0 -0
  30. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/type_utils.py +0 -0
  31. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/core/utils.py +0 -0
  32. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/__init__.py +0 -0
  33. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_clothes_changer/README.md +0 -0
  34. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_clothes_changer/__init__.py +0 -0
  35. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_clothes_changer/client.py +0 -0
  36. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_face_editor/README.md +0 -0
  37. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_face_editor/__init__.py +0 -0
  38. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_face_editor/client.py +0 -0
  39. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_gif_generator/README.md +0 -0
  40. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_gif_generator/__init__.py +0 -0
  41. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_gif_generator/client.py +0 -0
  42. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_headshot_generator/README.md +0 -0
  43. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_headshot_generator/__init__.py +0 -0
  44. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_headshot_generator/client.py +0 -0
  45. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_editor/README.md +0 -0
  46. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_editor/__init__.py +0 -0
  47. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_editor/client.py +0 -0
  48. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_generator/README.md +0 -0
  49. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_generator/__init__.py +0 -0
  50. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_generator/client.py +0 -0
  51. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_upscaler/README.md +0 -0
  52. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_upscaler/__init__.py +0 -0
  53. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_image_upscaler/client.py +0 -0
  54. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_meme_generator/README.md +0 -0
  55. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_meme_generator/__init__.py +0 -0
  56. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_meme_generator/client.py +0 -0
  57. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_photo_editor/README.md +0 -0
  58. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_photo_editor/__init__.py +0 -0
  59. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_photo_editor/client.py +0 -0
  60. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_qr_code_generator/README.md +0 -0
  61. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_qr_code_generator/__init__.py +0 -0
  62. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_qr_code_generator/client.py +0 -0
  63. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/ai_talking_photo/__init__.py +0 -0
  64. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/animation/README.md +0 -0
  65. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/animation/__init__.py +0 -0
  66. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/animation/client.py +0 -0
  67. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/face_swap/README.md +0 -0
  68. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/face_swap/__init__.py +0 -0
  69. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/face_swap/client.py +0 -0
  70. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/face_swap_photo/README.md +0 -0
  71. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/face_swap_photo/__init__.py +0 -0
  72. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/face_swap_photo/client.py +0 -0
  73. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/files/__init__.py +0 -0
  74. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/files/client.py +0 -0
  75. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/files/upload_urls/README.md +0 -0
  76. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/files/upload_urls/__init__.py +0 -0
  77. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/files/upload_urls/client.py +0 -0
  78. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_background_remover/README.md +0 -0
  79. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_background_remover/__init__.py +0 -0
  80. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_background_remover/client.py +0 -0
  81. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_projects/README.md +0 -0
  82. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_projects/__init__.py +0 -0
  83. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_projects/client.py +0 -0
  84. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_to_video/README.md +0 -0
  85. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_to_video/__init__.py +0 -0
  86. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/image_to_video/client.py +0 -0
  87. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/lip_sync/README.md +0 -0
  88. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/lip_sync/__init__.py +0 -0
  89. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/lip_sync/client.py +0 -0
  90. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/photo_colorizer/README.md +0 -0
  91. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/photo_colorizer/__init__.py +0 -0
  92. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/photo_colorizer/client.py +0 -0
  93. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/text_to_video/README.md +0 -0
  94. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/text_to_video/__init__.py +0 -0
  95. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/text_to_video/client.py +0 -0
  96. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/video_projects/README.md +0 -0
  97. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/video_projects/__init__.py +0 -0
  98. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/video_projects/client.py +0 -0
  99. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/video_to_video/README.md +0 -0
  100. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/video_to_video/__init__.py +0 -0
  101. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/resources/v1/video_to_video/client.py +0 -0
  102. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_clothes_changer_create_response.py +0 -0
  103. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_face_editor_create_response.py +0 -0
  104. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_gif_generator_create_response.py +0 -0
  105. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_headshot_generator_create_response.py +0 -0
  106. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_image_editor_create_response.py +0 -0
  107. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_image_generator_create_response.py +0 -0
  108. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_image_upscaler_create_response.py +0 -0
  109. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_meme_generator_create_response.py +0 -0
  110. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_photo_editor_create_response.py +0 -0
  111. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_qr_code_generator_create_response.py +0 -0
  112. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_ai_talking_photo_create_response.py +0 -0
  113. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_animation_create_response.py +0 -0
  114. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_face_swap_create_response.py +0 -0
  115. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_face_swap_photo_create_response.py +0 -0
  116. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_files_upload_urls_create_response.py +0 -0
  117. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_files_upload_urls_create_response_items_item.py +0 -0
  118. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_image_background_remover_create_response.py +0 -0
  119. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_image_projects_get_response.py +0 -0
  120. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_image_projects_get_response_downloads_item.py +0 -0
  121. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_image_projects_get_response_error.py +0 -0
  122. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_image_to_video_create_response.py +0 -0
  123. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_lip_sync_create_response.py +0 -0
  124. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_photo_colorizer_create_response.py +0 -0
  125. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_text_to_video_create_response.py +0 -0
  126. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_video_projects_get_response.py +0 -0
  127. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_video_projects_get_response_download.py +0 -0
  128. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_video_projects_get_response_downloads_item.py +0 -0
  129. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_video_projects_get_response_error.py +0 -0
  130. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/models/v1_video_to_video_create_response.py +0 -0
  131. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_clothes_changer_create_body.py +0 -0
  132. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_clothes_changer_create_body_assets.py +0 -0
  133. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_face_editor_create_body.py +0 -0
  134. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_face_editor_create_body_assets.py +0 -0
  135. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_face_editor_create_body_style.py +0 -0
  136. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_gif_generator_create_body.py +0 -0
  137. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_gif_generator_create_body_style.py +0 -0
  138. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_headshot_generator_create_body.py +0 -0
  139. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_headshot_generator_create_body_assets.py +0 -0
  140. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_headshot_generator_create_body_style.py +0 -0
  141. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_image_editor_create_body.py +0 -0
  142. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_image_editor_create_body_assets.py +0 -0
  143. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_image_editor_create_body_style.py +0 -0
  144. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_image_generator_create_body.py +0 -0
  145. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_image_generator_create_body_style.py +0 -0
  146. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_image_upscaler_create_body.py +0 -0
  147. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_image_upscaler_create_body_assets.py +0 -0
  148. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_image_upscaler_create_body_style.py +0 -0
  149. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_meme_generator_create_body.py +0 -0
  150. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_meme_generator_create_body_style.py +0 -0
  151. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_photo_editor_create_body.py +0 -0
  152. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_photo_editor_create_body_assets.py +0 -0
  153. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_photo_editor_create_body_style.py +0 -0
  154. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_qr_code_generator_create_body.py +0 -0
  155. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_qr_code_generator_create_body_style.py +0 -0
  156. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py +0 -0
  157. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_ai_talking_photo_create_body_style.py +0 -0
  158. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_animation_create_body.py +0 -0
  159. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_animation_create_body_assets.py +0 -0
  160. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_animation_create_body_style.py +0 -0
  161. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_face_swap_create_body.py +0 -0
  162. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_face_swap_create_body_assets.py +0 -0
  163. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_face_swap_photo_create_body.py +0 -0
  164. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_face_swap_photo_create_body_assets.py +0 -0
  165. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_files_upload_urls_create_body.py +0 -0
  166. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +0 -0
  167. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_image_background_remover_create_body.py +0 -0
  168. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_image_background_remover_create_body_assets.py +0 -0
  169. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_image_to_video_create_body.py +0 -0
  170. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_image_to_video_create_body_assets.py +0 -0
  171. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_image_to_video_create_body_style.py +0 -0
  172. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_lip_sync_create_body.py +0 -0
  173. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_lip_sync_create_body_assets.py +0 -0
  174. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_photo_colorizer_create_body.py +0 -0
  175. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_photo_colorizer_create_body_assets.py +0 -0
  176. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_text_to_video_create_body.py +0 -0
  177. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_text_to_video_create_body_style.py +0 -0
  178. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_video_to_video_create_body.py +0 -0
  179. {magic_hour-0.26.1 → magic_hour-0.28.0}/magic_hour/types/params/v1_video_to_video_create_body_assets.py +0 -0
  180. {magic_hour-0.26.1 → magic_hour-0.28.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.26.1
3
+ Version: 0.28.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.26.1"
9
+ MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.28.0"
10
10
 
11
11
 
12
12
  def _get_base_url(
@@ -10,8 +10,8 @@ Create a talking photo from an image and audio or text input.
10
10
  | Parameter | Required | Description | Example |
11
11
  |-----------|:--------:|-------------|--------|
12
12
  | `assets` | ✓ | Provide the assets for creating a talking photo | `{"audio_file_path": "api-assets/id/1234.mp3", "image_file_path": "api-assets/id/1234.png"}` |
13
- | `end_seconds` | ✓ | The end time of the input audio in seconds. The maximum duration allowed is 30 seconds. | `15.0` |
14
- | `start_seconds` | ✓ | The start time of the input audio in seconds. The maximum duration allowed is 30 seconds. | `0.0` |
13
+ | `end_seconds` | ✓ | The end time of the input audio in seconds. The maximum duration allowed is 60 seconds. | `15.0` |
14
+ | `start_seconds` | ✓ | The start time of the input audio in seconds. The maximum duration allowed is 60 seconds. | `0.0` |
15
15
  | `name` | ✗ | The name of image | `"Talking Photo image"` |
16
16
  | `style` | ✗ | Attributes used to dictate the style of the output | `{"generation_mode": "expressive", "intensity": 1.5}` |
17
17
 
@@ -40,8 +40,8 @@ class AiTalkingPhotoClient:
40
40
  name: The name of image
41
41
  style: Attributes used to dictate the style of the output
42
42
  assets: Provide the assets for creating a talking photo
43
- end_seconds: The end time of the input audio in seconds. The maximum duration allowed is 30 seconds.
44
- start_seconds: The start time of the input audio in seconds. The maximum duration allowed is 30 seconds.
43
+ end_seconds: The end time of the input audio in seconds. The maximum duration allowed is 60 seconds.
44
+ start_seconds: The start time of the input audio in seconds. The maximum duration allowed is 60 seconds.
45
45
  request_options: Additional options to customize the HTTP request
46
46
 
47
47
  Returns:
@@ -113,8 +113,8 @@ class AsyncAiTalkingPhotoClient:
113
113
  name: The name of image
114
114
  style: Attributes used to dictate the style of the output
115
115
  assets: Provide the assets for creating a talking photo
116
- end_seconds: The end time of the input audio in seconds. The maximum duration allowed is 30 seconds.
117
- start_seconds: The start time of the input audio in seconds. The maximum duration allowed is 30 seconds.
116
+ end_seconds: The end time of the input audio in seconds. The maximum duration allowed is 60 seconds.
117
+ start_seconds: The start time of the input audio in seconds. The maximum duration allowed is 60 seconds.
118
118
  request_options: Additional options to customize the HTTP request
119
119
 
120
120
  Returns:
@@ -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,4 @@
1
+ from .client import AsyncAutoSubtitleGeneratorClient, AutoSubtitleGeneratorClient
2
+
3
+
4
+ __all__ = ["AsyncAutoSubtitleGeneratorClient", "AutoSubtitleGeneratorClient"]
@@ -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",
@@ -24,7 +24,7 @@ class V1AiTalkingPhotoCreateBody(typing_extensions.TypedDict):
24
24
 
25
25
  end_seconds: typing_extensions.Required[float]
26
26
  """
27
- The end time of the input audio in seconds. The maximum duration allowed is 30 seconds.
27
+ The end time of the input audio in seconds. The maximum duration allowed is 60 seconds.
28
28
  """
29
29
 
30
30
  name: typing_extensions.NotRequired[str]
@@ -34,7 +34,7 @@ class V1AiTalkingPhotoCreateBody(typing_extensions.TypedDict):
34
34
 
35
35
  start_seconds: typing_extensions.Required[float]
36
36
  """
37
- The start time of the input audio in seconds. The maximum duration allowed is 30 seconds.
37
+ The start time of the input audio in seconds. The maximum duration allowed is 60 seconds.
38
38
  """
39
39
 
40
40
  style: typing_extensions.NotRequired[V1AiTalkingPhotoCreateBodyStyle]
@@ -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)