magic_hour 0.33.0__py3-none-any.whl → 0.34.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of magic_hour might be problematic. Click here for more details.

Files changed (105) hide show
  1. magic_hour/client.py +4 -2
  2. magic_hour/core/base_client.py +10 -4
  3. magic_hour/environment.py +1 -1
  4. magic_hour/resources/v1/ai_clothes_changer/README.md +5 -5
  5. magic_hour/resources/v1/ai_clothes_changer/client.py +4 -4
  6. magic_hour/resources/v1/ai_face_editor/README.md +2 -2
  7. magic_hour/resources/v1/ai_face_editor/client.py +2 -2
  8. magic_hour/resources/v1/ai_gif_generator/README.md +2 -2
  9. magic_hour/resources/v1/ai_gif_generator/client.py +2 -2
  10. magic_hour/resources/v1/ai_headshot_generator/README.md +3 -3
  11. magic_hour/resources/v1/ai_headshot_generator/client.py +2 -2
  12. magic_hour/resources/v1/ai_image_editor/README.md +2 -2
  13. magic_hour/resources/v1/ai_image_editor/client.py +2 -2
  14. magic_hour/resources/v1/ai_image_generator/README.md +5 -5
  15. magic_hour/resources/v1/ai_image_generator/client.py +8 -8
  16. magic_hour/resources/v1/ai_image_upscaler/README.md +3 -3
  17. magic_hour/resources/v1/ai_image_upscaler/client.py +8 -4
  18. magic_hour/resources/v1/ai_meme_generator/README.md +1 -1
  19. magic_hour/resources/v1/ai_photo_editor/README.md +2 -2
  20. magic_hour/resources/v1/ai_photo_editor/client.py +2 -2
  21. magic_hour/resources/v1/ai_qr_code_generator/README.md +2 -2
  22. magic_hour/resources/v1/ai_qr_code_generator/client.py +2 -2
  23. magic_hour/resources/v1/ai_talking_photo/README.md +2 -2
  24. magic_hour/resources/v1/ai_talking_photo/client.py +2 -2
  25. magic_hour/resources/v1/animation/README.md +8 -8
  26. magic_hour/resources/v1/animation/client.py +8 -8
  27. magic_hour/resources/v1/auto_subtitle_generator/README.md +4 -4
  28. magic_hour/resources/v1/auto_subtitle_generator/client.py +6 -6
  29. magic_hour/resources/v1/face_detection/README.md +10 -6
  30. magic_hour/resources/v1/face_detection/client.py +12 -4
  31. magic_hour/resources/v1/face_swap/README.md +4 -4
  32. magic_hour/resources/v1/face_swap/client.py +6 -6
  33. magic_hour/resources/v1/face_swap_photo/README.md +2 -2
  34. magic_hour/resources/v1/face_swap_photo/client.py +2 -2
  35. magic_hour/resources/v1/files/upload_urls/README.md +7 -6
  36. magic_hour/resources/v1/files/upload_urls/client.py +14 -12
  37. magic_hour/resources/v1/image_background_remover/README.md +2 -2
  38. magic_hour/resources/v1/image_background_remover/client.py +2 -2
  39. magic_hour/resources/v1/image_projects/README.md +8 -8
  40. magic_hour/resources/v1/image_projects/client.py +10 -10
  41. magic_hour/resources/v1/image_to_video/README.md +7 -9
  42. magic_hour/resources/v1/image_to_video/client.py +10 -8
  43. magic_hour/resources/v1/lip_sync/README.md +4 -4
  44. magic_hour/resources/v1/lip_sync/client.py +6 -6
  45. magic_hour/resources/v1/photo_colorizer/README.md +2 -2
  46. magic_hour/resources/v1/photo_colorizer/client.py +2 -2
  47. magic_hour/resources/v1/text_to_video/README.md +6 -4
  48. magic_hour/resources/v1/text_to_video/client.py +18 -4
  49. magic_hour/resources/v1/video_projects/README.md +7 -7
  50. magic_hour/resources/v1/video_projects/client.py +8 -8
  51. magic_hour/resources/v1/video_to_video/README.md +9 -9
  52. magic_hour/resources/v1/video_to_video/client.py +10 -10
  53. magic_hour/types/models/v1_face_detection_create_response.py +1 -1
  54. magic_hour/types/models/v1_face_detection_get_response.py +1 -1
  55. magic_hour/types/models/v1_files_upload_urls_create_response.py +3 -0
  56. magic_hour/types/models/v1_video_projects_get_response.py +2 -2
  57. magic_hour/types/params/v1_ai_clothes_changer_create_body.py +1 -1
  58. magic_hour/types/params/v1_ai_clothes_changer_create_body_assets.py +15 -2
  59. magic_hour/types/params/v1_ai_face_editor_create_body.py +1 -1
  60. magic_hour/types/params/v1_ai_face_editor_create_body_assets.py +6 -1
  61. magic_hour/types/params/v1_ai_face_editor_create_body_style.py +44 -47
  62. magic_hour/types/params/v1_ai_gif_generator_create_body.py +1 -1
  63. magic_hour/types/params/v1_ai_headshot_generator_create_body.py +1 -1
  64. magic_hour/types/params/v1_ai_headshot_generator_create_body_assets.py +6 -1
  65. magic_hour/types/params/v1_ai_headshot_generator_create_body_style.py +1 -1
  66. magic_hour/types/params/v1_ai_image_editor_create_body.py +1 -1
  67. magic_hour/types/params/v1_ai_image_editor_create_body_assets.py +6 -1
  68. magic_hour/types/params/v1_ai_image_generator_create_body.py +8 -2
  69. magic_hour/types/params/v1_ai_image_generator_create_body_style.py +2 -2
  70. magic_hour/types/params/v1_ai_image_upscaler_create_body.py +4 -2
  71. magic_hour/types/params/v1_ai_image_upscaler_create_body_assets.py +6 -1
  72. magic_hour/types/params/v1_ai_photo_editor_create_body.py +1 -1
  73. magic_hour/types/params/v1_ai_photo_editor_create_body_assets.py +6 -1
  74. magic_hour/types/params/v1_ai_qr_code_generator_create_body.py +1 -1
  75. magic_hour/types/params/v1_ai_talking_photo_create_body.py +1 -1
  76. magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py +12 -2
  77. magic_hour/types/params/v1_animation_create_body.py +2 -2
  78. magic_hour/types/params/v1_animation_create_body_assets.py +12 -2
  79. magic_hour/types/params/v1_animation_create_body_style.py +10 -7
  80. magic_hour/types/params/v1_auto_subtitle_generator_create_body.py +3 -3
  81. magic_hour/types/params/v1_auto_subtitle_generator_create_body_assets.py +6 -1
  82. magic_hour/types/params/v1_face_detection_create_body_assets.py +6 -1
  83. magic_hour/types/params/v1_face_swap_create_body.py +3 -3
  84. magic_hour/types/params/v1_face_swap_create_body_assets.py +12 -2
  85. magic_hour/types/params/v1_face_swap_create_body_assets_face_mappings_item.py +6 -1
  86. magic_hour/types/params/v1_face_swap_photo_create_body.py +1 -1
  87. magic_hour/types/params/v1_face_swap_photo_create_body_assets.py +12 -2
  88. magic_hour/types/params/v1_face_swap_photo_create_body_assets_face_mappings_item.py +6 -1
  89. magic_hour/types/params/v1_files_upload_urls_create_body.py +3 -0
  90. magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +2 -2
  91. magic_hour/types/params/v1_image_background_remover_create_body.py +1 -1
  92. magic_hour/types/params/v1_image_background_remover_create_body_assets.py +12 -2
  93. magic_hour/types/params/v1_image_to_video_create_body.py +4 -2
  94. magic_hour/types/params/v1_image_to_video_create_body_assets.py +6 -1
  95. magic_hour/types/params/v1_lip_sync_create_body.py +3 -3
  96. magic_hour/types/params/v1_lip_sync_create_body_assets.py +12 -2
  97. magic_hour/types/params/v1_photo_colorizer_create_body.py +1 -1
  98. magic_hour/types/params/v1_photo_colorizer_create_body_assets.py +6 -1
  99. magic_hour/types/params/v1_text_to_video_create_body.py +8 -2
  100. magic_hour/types/params/v1_video_to_video_create_body.py +3 -3
  101. magic_hour/types/params/v1_video_to_video_create_body_assets.py +6 -1
  102. {magic_hour-0.33.0.dist-info → magic_hour-0.34.0.dist-info}/METADATA +1 -1
  103. {magic_hour-0.33.0.dist-info → magic_hour-0.34.0.dist-info}/RECORD +105 -105
  104. {magic_hour-0.33.0.dist-info → magic_hour-0.34.0.dist-info}/LICENSE +0 -0
  105. {magic_hour-0.33.0.dist-info → magic_hour-0.34.0.dist-info}/WHEEL +0 -0
@@ -33,12 +33,22 @@ class V1FaceSwapPhotoCreateBodyAssets(typing_extensions.TypedDict):
33
33
  """
34
34
  This is the image from which the face is extracted. The value is required if `face_swap_mode` is `all-faces`.
35
35
 
36
- 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.
36
+ This value is either
37
+ - a direct URL to the video file
38
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
39
+
40
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
41
+
37
42
  """
38
43
 
39
44
  target_file_path: typing_extensions.Required[str]
40
45
  """
41
- This is the image where the face from the source image will be placed. 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.
46
+ This is the image where the face from the source image will be placed. This value is either
47
+ - a direct URL to the video file
48
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
49
+
50
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
51
+
42
52
  """
43
53
 
44
54
 
@@ -9,7 +9,12 @@ class V1FaceSwapPhotoCreateBodyAssetsFaceMappingsItem(typing_extensions.TypedDic
9
9
 
10
10
  new_face: typing_extensions.Required[str]
11
11
  """
12
- The face image that will be used to replace the face in the `original_face`. 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.
12
+ The face image that will be used to replace the face in the `original_face`. This value is either
13
+ - a direct URL to the video file
14
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
15
+
16
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
17
+
13
18
  """
14
19
 
15
20
  original_face: typing_extensions.Required[str]
@@ -14,6 +14,9 @@ class V1FilesUploadUrlsCreateBody(typing_extensions.TypedDict):
14
14
  """
15
15
 
16
16
  items: typing_extensions.Required[typing.List[V1FilesUploadUrlsCreateBodyItemsItem]]
17
+ """
18
+ The list of assets to upload. The response array will match the order of items in the request body.
19
+ """
17
20
 
18
21
 
19
22
  class _SerializerV1FilesUploadUrlsCreateBody(pydantic.BaseModel):
@@ -9,14 +9,14 @@ class V1FilesUploadUrlsCreateBodyItemsItem(typing_extensions.TypedDict):
9
9
 
10
10
  extension: typing_extensions.Required[str]
11
11
  """
12
- the extension of the file to upload. Do not include the dot (.) before the extension.
12
+ The extension of the file to upload. Do not include the dot (.) before the extension. Possible extensions are mp4,m4v,mov,webm,mp3,mpeg,wav,aac,aiff,flac,png,jpg,jpeg,webp,avif,jp2,tiff,bmp
13
13
  """
14
14
 
15
15
  type_: typing_extensions.Required[
16
16
  typing_extensions.Literal["audio", "image", "video"]
17
17
  ]
18
18
  """
19
- The type of asset to upload
19
+ The type of asset to upload. Possible types are video, audio, image
20
20
  """
21
21
 
22
22
 
@@ -20,7 +20,7 @@ class V1ImageBackgroundRemoverCreateBody(typing_extensions.TypedDict):
20
20
 
21
21
  name: typing_extensions.NotRequired[str]
22
22
  """
23
- The name of image
23
+ The name of image. This value is mainly used for your own identification of the image.
24
24
  """
25
25
 
26
26
 
@@ -12,12 +12,22 @@ class V1ImageBackgroundRemoverCreateBodyAssets(typing_extensions.TypedDict):
12
12
  """
13
13
  The image used as the new background for the image_file_path. This image will be resized to match the image in image_file_path. Please make sure the resolution between the images are similar.
14
14
 
15
- 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.
15
+ This value is either
16
+ - a direct URL to the video file
17
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
18
+
19
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
20
+
16
21
  """
17
22
 
18
23
  image_file_path: typing_extensions.Required[str]
19
24
  """
20
- The image to remove the background. 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.
25
+ The image to remove the background. This value is either
26
+ - a direct URL to the video file
27
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
28
+
29
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
30
+
21
31
  """
22
32
 
23
33
 
@@ -36,7 +36,7 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
36
36
 
37
37
  name: typing_extensions.NotRequired[str]
38
38
  """
39
- The name of video
39
+ The name of video. This value is mainly used for your own identification of the video.
40
40
  """
41
41
 
42
42
  resolution: typing_extensions.NotRequired[
@@ -45,10 +45,12 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
45
45
  """
46
46
  Controls the output video resolution. Defaults to `720p` if not specified.
47
47
 
48
+ 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
49
+
48
50
  **Options:**
49
51
  - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
50
52
  - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
51
- - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
53
+ - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
52
54
  """
53
55
 
54
56
  style: typing_extensions.NotRequired[V1ImageToVideoCreateBodyStyle]
@@ -9,7 +9,12 @@ class V1ImageToVideoCreateBodyAssets(typing_extensions.TypedDict):
9
9
 
10
10
  image_file_path: typing_extensions.Required[str]
11
11
  """
12
- The path of the image file. 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.
12
+ The path of the image file. This value is either
13
+ - a direct URL to the video file
14
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
15
+
16
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
17
+
13
18
  """
14
19
 
15
20
 
@@ -20,7 +20,7 @@ class V1LipSyncCreateBody(typing_extensions.TypedDict):
20
20
 
21
21
  end_seconds: typing_extensions.Required[float]
22
22
  """
23
- The end time of the input video in seconds
23
+ The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.
24
24
  """
25
25
 
26
26
  height: typing_extensions.NotRequired[int]
@@ -42,12 +42,12 @@ class V1LipSyncCreateBody(typing_extensions.TypedDict):
42
42
 
43
43
  name: typing_extensions.NotRequired[str]
44
44
  """
45
- The name of video
45
+ The name of video. This value is mainly used for your own identification of the video.
46
46
  """
47
47
 
48
48
  start_seconds: typing_extensions.Required[float]
49
49
  """
50
- The start time of the input video in seconds
50
+ The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
51
51
  """
52
52
 
53
53
  width: typing_extensions.NotRequired[int]
@@ -10,12 +10,22 @@ class V1LipSyncCreateBodyAssets(typing_extensions.TypedDict):
10
10
 
11
11
  audio_file_path: typing_extensions.Required[str]
12
12
  """
13
- The path of the audio file. 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
+ The path of the audio file. This value is either
14
+ - a direct URL to the video file
15
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
16
+
17
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
18
+
14
19
  """
15
20
 
16
21
  video_file_path: typing_extensions.NotRequired[str]
17
22
  """
18
- The path of the input video. This field is required if `video_source` is `file`. 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.
23
+ Required if `video_source` is `file`. This value is either
24
+ - a direct URL to the video file
25
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
26
+
27
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
28
+
19
29
  """
20
30
 
21
31
  video_source: typing_extensions.Required[
@@ -20,7 +20,7 @@ class V1PhotoColorizerCreateBody(typing_extensions.TypedDict):
20
20
 
21
21
  name: typing_extensions.NotRequired[str]
22
22
  """
23
- The name of image
23
+ The name of image. This value is mainly used for your own identification of the image.
24
24
  """
25
25
 
26
26
 
@@ -9,7 +9,12 @@ class V1PhotoColorizerCreateBodyAssets(typing_extensions.TypedDict):
9
9
 
10
10
  image_file_path: typing_extensions.Required[str]
11
11
  """
12
- The image used to generate the colorized image. 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.
12
+ The image used to generate the colorized image. This value is either
13
+ - a direct URL to the video file
14
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
15
+
16
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
17
+
13
18
  """
14
19
 
15
20
 
@@ -16,11 +16,15 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict):
16
16
  end_seconds: typing_extensions.Required[float]
17
17
  """
18
18
  The total duration of the output video in seconds.
19
+
20
+ The value must be greater than or equal to 5 seconds and less than or equal to 60 seconds.
21
+
22
+ Note: For 480p resolution, the value must be either 5 or 10.
19
23
  """
20
24
 
21
25
  name: typing_extensions.NotRequired[str]
22
26
  """
23
- The name of video
27
+ The name of video. This value is mainly used for your own identification of the video.
24
28
  """
25
29
 
26
30
  orientation: typing_extensions.Required[
@@ -36,10 +40,12 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict):
36
40
  """
37
41
  Controls the output video resolution. Defaults to `720p` if not specified.
38
42
 
43
+ 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
44
+
39
45
  **Options:**
40
46
  - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
41
47
  - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
42
- - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
48
+ - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
43
49
  """
44
50
 
45
51
  style: typing_extensions.Required[V1TextToVideoCreateBodyStyle]
@@ -24,7 +24,7 @@ class V1VideoToVideoCreateBody(typing_extensions.TypedDict):
24
24
 
25
25
  end_seconds: typing_extensions.Required[float]
26
26
  """
27
- The end time of the input video in seconds
27
+ The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.
28
28
  """
29
29
 
30
30
  fps_resolution: typing_extensions.NotRequired[
@@ -50,12 +50,12 @@ class V1VideoToVideoCreateBody(typing_extensions.TypedDict):
50
50
 
51
51
  name: typing_extensions.NotRequired[str]
52
52
  """
53
- The name of video
53
+ The name of video. This value is mainly used for your own identification of the video.
54
54
  """
55
55
 
56
56
  start_seconds: typing_extensions.Required[float]
57
57
  """
58
- The start time of the input video in seconds
58
+ The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
59
59
  """
60
60
 
61
61
  style: typing_extensions.Required[V1VideoToVideoCreateBodyStyle]
@@ -10,7 +10,12 @@ class V1VideoToVideoCreateBodyAssets(typing_extensions.TypedDict):
10
10
 
11
11
  video_file_path: typing_extensions.NotRequired[str]
12
12
  """
13
- The path of the input video. This field is required if `video_source` is `file`. 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
+ Required if `video_source` is `file`. This value is either
14
+ - a direct URL to the video file
15
+ - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
16
+
17
+ Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more.
18
+
14
19
  """
15
20
 
16
21
  video_source: typing_extensions.Required[
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: magic_hour
3
- Version: 0.33.0
3
+ Version: 0.34.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