magic_hour 0.33.1__py3-none-any.whl → 0.35.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 (103) hide show
  1. magic_hour/environment.py +1 -1
  2. magic_hour/resources/v1/ai_clothes_changer/README.md +5 -5
  3. magic_hour/resources/v1/ai_clothes_changer/client.py +4 -4
  4. magic_hour/resources/v1/ai_face_editor/README.md +2 -2
  5. magic_hour/resources/v1/ai_face_editor/client.py +2 -2
  6. magic_hour/resources/v1/ai_gif_generator/README.md +2 -2
  7. magic_hour/resources/v1/ai_gif_generator/client.py +2 -2
  8. magic_hour/resources/v1/ai_headshot_generator/README.md +3 -3
  9. magic_hour/resources/v1/ai_headshot_generator/client.py +2 -2
  10. magic_hour/resources/v1/ai_image_editor/README.md +2 -2
  11. magic_hour/resources/v1/ai_image_editor/client.py +2 -2
  12. magic_hour/resources/v1/ai_image_generator/README.md +5 -5
  13. magic_hour/resources/v1/ai_image_generator/client.py +8 -8
  14. magic_hour/resources/v1/ai_image_upscaler/README.md +3 -3
  15. magic_hour/resources/v1/ai_image_upscaler/client.py +8 -4
  16. magic_hour/resources/v1/ai_meme_generator/README.md +1 -1
  17. magic_hour/resources/v1/ai_photo_editor/README.md +2 -2
  18. magic_hour/resources/v1/ai_photo_editor/client.py +2 -2
  19. magic_hour/resources/v1/ai_qr_code_generator/README.md +2 -2
  20. magic_hour/resources/v1/ai_qr_code_generator/client.py +2 -2
  21. magic_hour/resources/v1/ai_talking_photo/README.md +2 -2
  22. magic_hour/resources/v1/ai_talking_photo/client.py +2 -2
  23. magic_hour/resources/v1/animation/README.md +8 -8
  24. magic_hour/resources/v1/animation/client.py +8 -8
  25. magic_hour/resources/v1/auto_subtitle_generator/README.md +4 -4
  26. magic_hour/resources/v1/auto_subtitle_generator/client.py +6 -6
  27. magic_hour/resources/v1/face_detection/README.md +10 -6
  28. magic_hour/resources/v1/face_detection/client.py +12 -4
  29. magic_hour/resources/v1/face_swap/README.md +6 -10
  30. magic_hour/resources/v1/face_swap/client.py +26 -34
  31. magic_hour/resources/v1/face_swap_photo/README.md +2 -2
  32. magic_hour/resources/v1/face_swap_photo/client.py +2 -2
  33. magic_hour/resources/v1/files/upload_urls/README.md +7 -6
  34. magic_hour/resources/v1/files/upload_urls/client.py +14 -12
  35. magic_hour/resources/v1/image_background_remover/README.md +2 -2
  36. magic_hour/resources/v1/image_background_remover/client.py +2 -2
  37. magic_hour/resources/v1/image_projects/README.md +8 -8
  38. magic_hour/resources/v1/image_projects/client.py +10 -10
  39. magic_hour/resources/v1/image_to_video/README.md +7 -5
  40. magic_hour/resources/v1/image_to_video/client.py +34 -12
  41. magic_hour/resources/v1/lip_sync/README.md +6 -10
  42. magic_hour/resources/v1/lip_sync/client.py +26 -34
  43. magic_hour/resources/v1/photo_colorizer/README.md +2 -2
  44. magic_hour/resources/v1/photo_colorizer/client.py +2 -2
  45. magic_hour/resources/v1/text_to_video/README.md +6 -4
  46. magic_hour/resources/v1/text_to_video/client.py +18 -4
  47. magic_hour/resources/v1/video_projects/README.md +7 -7
  48. magic_hour/resources/v1/video_projects/client.py +8 -8
  49. magic_hour/resources/v1/video_to_video/README.md +11 -15
  50. magic_hour/resources/v1/video_to_video/client.py +30 -38
  51. magic_hour/types/models/v1_face_detection_create_response.py +1 -1
  52. magic_hour/types/models/v1_face_detection_get_response.py +1 -1
  53. magic_hour/types/models/v1_files_upload_urls_create_response.py +3 -0
  54. magic_hour/types/models/v1_video_projects_get_response.py +2 -2
  55. magic_hour/types/params/v1_ai_clothes_changer_create_body.py +1 -1
  56. magic_hour/types/params/v1_ai_clothes_changer_create_body_assets.py +15 -2
  57. magic_hour/types/params/v1_ai_face_editor_create_body.py +1 -1
  58. magic_hour/types/params/v1_ai_face_editor_create_body_assets.py +6 -1
  59. magic_hour/types/params/v1_ai_face_editor_create_body_style.py +44 -47
  60. magic_hour/types/params/v1_ai_gif_generator_create_body.py +1 -1
  61. magic_hour/types/params/v1_ai_headshot_generator_create_body.py +1 -1
  62. magic_hour/types/params/v1_ai_headshot_generator_create_body_assets.py +6 -1
  63. magic_hour/types/params/v1_ai_headshot_generator_create_body_style.py +1 -1
  64. magic_hour/types/params/v1_ai_image_editor_create_body.py +1 -1
  65. magic_hour/types/params/v1_ai_image_editor_create_body_assets.py +6 -1
  66. magic_hour/types/params/v1_ai_image_generator_create_body.py +8 -2
  67. magic_hour/types/params/v1_ai_image_generator_create_body_style.py +2 -2
  68. magic_hour/types/params/v1_ai_image_upscaler_create_body.py +4 -2
  69. magic_hour/types/params/v1_ai_image_upscaler_create_body_assets.py +6 -1
  70. magic_hour/types/params/v1_ai_photo_editor_create_body.py +1 -1
  71. magic_hour/types/params/v1_ai_photo_editor_create_body_assets.py +6 -1
  72. magic_hour/types/params/v1_ai_qr_code_generator_create_body.py +1 -1
  73. magic_hour/types/params/v1_ai_talking_photo_create_body.py +1 -1
  74. magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py +12 -2
  75. magic_hour/types/params/v1_animation_create_body.py +2 -2
  76. magic_hour/types/params/v1_animation_create_body_assets.py +12 -2
  77. magic_hour/types/params/v1_animation_create_body_style.py +10 -7
  78. magic_hour/types/params/v1_auto_subtitle_generator_create_body.py +3 -3
  79. magic_hour/types/params/v1_auto_subtitle_generator_create_body_assets.py +6 -1
  80. magic_hour/types/params/v1_face_detection_create_body_assets.py +6 -1
  81. magic_hour/types/params/v1_face_swap_create_body.py +15 -17
  82. magic_hour/types/params/v1_face_swap_create_body_assets.py +12 -2
  83. magic_hour/types/params/v1_face_swap_create_body_assets_face_mappings_item.py +6 -1
  84. magic_hour/types/params/v1_face_swap_photo_create_body.py +1 -1
  85. magic_hour/types/params/v1_face_swap_photo_create_body_assets.py +12 -2
  86. magic_hour/types/params/v1_face_swap_photo_create_body_assets_face_mappings_item.py +6 -1
  87. magic_hour/types/params/v1_files_upload_urls_create_body.py +3 -0
  88. magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +2 -2
  89. magic_hour/types/params/v1_image_background_remover_create_body.py +1 -1
  90. magic_hour/types/params/v1_image_background_remover_create_body_assets.py +12 -2
  91. magic_hour/types/params/v1_image_to_video_create_body.py +18 -8
  92. magic_hour/types/params/v1_image_to_video_create_body_assets.py +6 -1
  93. magic_hour/types/params/v1_lip_sync_create_body.py +15 -17
  94. magic_hour/types/params/v1_lip_sync_create_body_assets.py +12 -2
  95. magic_hour/types/params/v1_photo_colorizer_create_body.py +1 -1
  96. magic_hour/types/params/v1_photo_colorizer_create_body_assets.py +6 -1
  97. magic_hour/types/params/v1_text_to_video_create_body.py +8 -2
  98. magic_hour/types/params/v1_video_to_video_create_body.py +15 -17
  99. magic_hour/types/params/v1_video_to_video_create_body_assets.py +6 -1
  100. {magic_hour-0.33.1.dist-info → magic_hour-0.35.0.dist-info}/METADATA +1 -1
  101. {magic_hour-0.33.1.dist-info → magic_hour-0.35.0.dist-info}/RECORD +103 -103
  102. {magic_hour-0.33.1.dist-info → magic_hour-0.35.0.dist-info}/LICENSE +0 -0
  103. {magic_hour-0.33.1.dist-info → magic_hour-0.35.0.dist-info}/WHEEL +0 -0
@@ -14,11 +14,11 @@ Get more information about this mode at our [product page](https://magichour.ai/
14
14
  |-----------|:--------:|-------------|--------|
15
15
  | `assets` | ✓ | Provide the assets for image-to-video. | `{"image_file_path": "api-assets/id/1234.png"}` |
16
16
  | `end_seconds` | ✓ | The total duration of the output video in seconds. | `5.0` |
17
- | `height` | ✗ | This field does not affect the output video's resolution. The video's orientation will match that of the input image. It is retained solely for backward compatibility and will be deprecated in the future. | `123` |
18
- | `name` | ✗ | The name of video | `"Image To Video video"` |
19
- | `resolution` | ✗ | Controls the output video resolution. Defaults to `720p` if not specified. **Options:** - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds. - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds. - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier. | `"1080p"` |
17
+ | `height` | ✗ | `height` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
18
+ | `name` | ✗ | The name of video. This value is mainly used for your own identification of the video. | `"Image To Video video"` |
19
+ | `resolution` | ✗ | Controls the output video resolution. Defaults to `720p` if not specified. 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier. **Options:** - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds. - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds. - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. | `"720p"` |
20
20
  | `style` | ✗ | Attributed used to dictate the style of the output | `{"prompt": "a dog running"}` |
21
- | `width` | ✗ | This field does not affect the output video's resolution. The video's orientation will match that of the input image. It is retained solely for backward compatibility and will be deprecated in the future. | `123` |
21
+ | `width` | ✗ | `width` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
22
22
 
23
23
  #### Synchronous Client
24
24
 
@@ -31,6 +31,7 @@ res = client.v1.image_to_video.create(
31
31
  assets={"image_file_path": "api-assets/id/1234.png"},
32
32
  end_seconds=5.0,
33
33
  name="Image To Video video",
34
+ resolution="720p",
34
35
  )
35
36
 
36
37
  ```
@@ -46,6 +47,7 @@ res = await client.v1.image_to_video.create(
46
47
  assets={"image_file_path": "api-assets/id/1234.png"},
47
48
  end_seconds=5.0,
48
49
  name="Image To Video video",
50
+ resolution="720p",
49
51
  )
50
52
 
51
53
  ```
@@ -56,4 +58,4 @@ res = await client.v1.image_to_video.create(
56
58
  [V1ImageToVideoCreateResponse](/magic_hour/types/models/v1_image_to_video_create_response.py)
57
59
 
58
60
  ##### Example
59
- `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "clx7uu86w0a5qp55yxz315r6r"}`
61
+ `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
@@ -50,20 +50,30 @@ class ImageToVideoClient:
50
50
  POST /v1/image-to-video
51
51
 
52
52
  Args:
53
- height: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
53
+ height: `height` is deprecated and no longer influences the output video's resolution.
54
54
 
55
- It is retained solely for backward compatibility and will be deprecated in the future.
56
- name: The name of video
55
+ Output resolution is determined by the **minimum** of:
56
+ - The resolution of the input video
57
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
58
+
59
+ This field is retained only for backward compatibility and will be removed in a future release.
60
+ name: The name of video. This value is mainly used for your own identification of the video.
57
61
  resolution: Controls the output video resolution. Defaults to `720p` if not specified.
58
62
 
63
+ 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
64
+
59
65
  **Options:**
60
66
  - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
61
67
  - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
62
- - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
68
+ - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
63
69
  style: Attributed used to dictate the style of the output
64
- width: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
70
+ width: `width` is deprecated and no longer influences the output video's resolution.
71
+
72
+ Output resolution is determined by the **minimum** of:
73
+ - The resolution of the input video
74
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
65
75
 
66
- It is retained solely for backward compatibility and will be deprecated in the future.
76
+ This field is retained only for backward compatibility and will be removed in a future release.
67
77
  assets: Provide the assets for image-to-video.
68
78
  end_seconds: The total duration of the output video in seconds.
69
79
  request_options: Additional options to customize the HTTP request
@@ -81,6 +91,7 @@ class ImageToVideoClient:
81
91
  assets={"image_file_path": "api-assets/id/1234.png"},
82
92
  end_seconds=5.0,
83
93
  name="Image To Video video",
94
+ resolution="720p",
84
95
  )
85
96
  ```
86
97
  """
@@ -144,20 +155,30 @@ class AsyncImageToVideoClient:
144
155
  POST /v1/image-to-video
145
156
 
146
157
  Args:
147
- height: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
158
+ height: `height` is deprecated and no longer influences the output video's resolution.
148
159
 
149
- It is retained solely for backward compatibility and will be deprecated in the future.
150
- name: The name of video
160
+ Output resolution is determined by the **minimum** of:
161
+ - The resolution of the input video
162
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
163
+
164
+ This field is retained only for backward compatibility and will be removed in a future release.
165
+ name: The name of video. This value is mainly used for your own identification of the video.
151
166
  resolution: Controls the output video resolution. Defaults to `720p` if not specified.
152
167
 
168
+ 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
169
+
153
170
  **Options:**
154
171
  - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
155
172
  - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
156
- - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
173
+ - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
157
174
  style: Attributed used to dictate the style of the output
158
- width: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
175
+ width: `width` is deprecated and no longer influences the output video's resolution.
176
+
177
+ Output resolution is determined by the **minimum** of:
178
+ - The resolution of the input video
179
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
159
180
 
160
- It is retained solely for backward compatibility and will be deprecated in the future.
181
+ This field is retained only for backward compatibility and will be removed in a future release.
161
182
  assets: Provide the assets for image-to-video.
162
183
  end_seconds: The total duration of the output video in seconds.
163
184
  request_options: Additional options to customize the HTTP request
@@ -175,6 +196,7 @@ class AsyncImageToVideoClient:
175
196
  assets={"image_file_path": "api-assets/id/1234.png"},
176
197
  end_seconds=5.0,
177
198
  name="Image To Video video",
199
+ resolution="720p",
178
200
  )
179
201
  ```
180
202
  """
@@ -13,12 +13,12 @@ Get more information about this mode at our [product page](https://magichour.ai/
13
13
  | Parameter | Required | Description | Example |
14
14
  |-----------|:--------:|-------------|--------|
15
15
  | `assets` | ✓ | Provide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used | `{"audio_file_path": "api-assets/id/1234.mp3", "video_file_path": "api-assets/id/1234.mp4", "video_source": "file"}` |
16
- | `end_seconds` | ✓ | The end time of the input video in seconds | `15.0` |
17
- | `start_seconds` | ✓ | The start time of the input video in seconds | `0.0` |
18
- | `height` | ✗ | Used to determine the dimensions of the output video. * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio. * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio. Note: if the video's original resolution is less than the maximum, the video will not be resized. See our [pricing page](https://magichour.ai/pricing) for more details. | `960` |
16
+ | `end_seconds` | ✓ | 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. | `15.0` |
17
+ | `start_seconds` | ✓ | 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. | `0.0` |
18
+ | `height` | ✗ | `height` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
19
19
  | `max_fps_limit` | ✗ | Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required. | `12.0` |
20
- | `name` | ✗ | The name of video | `"Lip Sync video"` |
21
- | `width` | ✗ | Used to determine the dimensions of the output video. * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio. * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio. Note: if the video's original resolution is less than the maximum, the video will not be resized. See our [pricing page](https://magichour.ai/pricing) for more details. | `512` |
20
+ | `name` | ✗ | The name of video. This value is mainly used for your own identification of the video. | `"Lip Sync video"` |
21
+ | `width` | ✗ | `width` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
22
22
 
23
23
  #### Synchronous Client
24
24
 
@@ -35,10 +35,8 @@ res = client.v1.lip_sync.create(
35
35
  },
36
36
  end_seconds=15.0,
37
37
  start_seconds=0.0,
38
- height=960,
39
38
  max_fps_limit=12.0,
40
39
  name="Lip Sync video",
41
- width=512,
42
40
  )
43
41
 
44
42
  ```
@@ -58,10 +56,8 @@ res = await client.v1.lip_sync.create(
58
56
  },
59
57
  end_seconds=15.0,
60
58
  start_seconds=0.0,
61
- height=960,
62
59
  max_fps_limit=12.0,
63
60
  name="Lip Sync video",
64
- width=512,
65
61
  )
66
62
 
67
63
  ```
@@ -72,4 +68,4 @@ res = await client.v1.lip_sync.create(
72
68
  [V1LipSyncCreateResponse](/magic_hour/types/models/v1_lip_sync_create_response.py)
73
69
 
74
70
  ##### Example
75
- `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "clx7uu86w0a5qp55yxz315r6r"}`
71
+ `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
@@ -46,27 +46,25 @@ class LipSyncClient:
46
46
  POST /v1/lip-sync
47
47
 
48
48
  Args:
49
- height: Used to determine the dimensions of the output video.
49
+ height: `height` is deprecated and no longer influences the output video's resolution.
50
50
 
51
- * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
52
- * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
51
+ Output resolution is determined by the **minimum** of:
52
+ - The resolution of the input video
53
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
53
54
 
54
- Note: if the video's original resolution is less than the maximum, the video will not be resized.
55
-
56
- See our [pricing page](https://magichour.ai/pricing) for more details.
55
+ This field is retained only for backward compatibility and will be removed in a future release.
57
56
  max_fps_limit: Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required.
58
- name: The name of video
59
- width: Used to determine the dimensions of the output video.
60
-
61
- * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
62
- * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
57
+ name: The name of video. This value is mainly used for your own identification of the video.
58
+ width: `width` is deprecated and no longer influences the output video's resolution.
63
59
 
64
- Note: if the video's original resolution is less than the maximum, the video will not be resized.
60
+ Output resolution is determined by the **minimum** of:
61
+ - The resolution of the input video
62
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
65
63
 
66
- See our [pricing page](https://magichour.ai/pricing) for more details.
64
+ This field is retained only for backward compatibility and will be removed in a future release.
67
65
  assets: Provide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
68
- end_seconds: The end time of the input video in seconds
69
- start_seconds: The start time of the input video in seconds
66
+ end_seconds: 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.
67
+ start_seconds: 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.
70
68
  request_options: Additional options to customize the HTTP request
71
69
 
72
70
  Returns:
@@ -86,10 +84,8 @@ class LipSyncClient:
86
84
  },
87
85
  end_seconds=15.0,
88
86
  start_seconds=0.0,
89
- height=960,
90
87
  max_fps_limit=12.0,
91
88
  name="Lip Sync video",
92
- width=512,
93
89
  )
94
90
  ```
95
91
  """
@@ -150,27 +146,25 @@ class AsyncLipSyncClient:
150
146
  POST /v1/lip-sync
151
147
 
152
148
  Args:
153
- height: Used to determine the dimensions of the output video.
149
+ height: `height` is deprecated and no longer influences the output video's resolution.
154
150
 
155
- * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
156
- * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
151
+ Output resolution is determined by the **minimum** of:
152
+ - The resolution of the input video
153
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
157
154
 
158
- Note: if the video's original resolution is less than the maximum, the video will not be resized.
159
-
160
- See our [pricing page](https://magichour.ai/pricing) for more details.
155
+ This field is retained only for backward compatibility and will be removed in a future release.
161
156
  max_fps_limit: Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required.
162
- name: The name of video
163
- width: Used to determine the dimensions of the output video.
164
-
165
- * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
166
- * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
157
+ name: The name of video. This value is mainly used for your own identification of the video.
158
+ width: `width` is deprecated and no longer influences the output video's resolution.
167
159
 
168
- Note: if the video's original resolution is less than the maximum, the video will not be resized.
160
+ Output resolution is determined by the **minimum** of:
161
+ - The resolution of the input video
162
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
169
163
 
170
- See our [pricing page](https://magichour.ai/pricing) for more details.
164
+ This field is retained only for backward compatibility and will be removed in a future release.
171
165
  assets: Provide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
172
- end_seconds: The end time of the input video in seconds
173
- start_seconds: The start time of the input video in seconds
166
+ end_seconds: 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.
167
+ start_seconds: 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.
174
168
  request_options: Additional options to customize the HTTP request
175
169
 
176
170
  Returns:
@@ -190,10 +184,8 @@ class AsyncLipSyncClient:
190
184
  },
191
185
  end_seconds=15.0,
192
186
  start_seconds=0.0,
193
- height=960,
194
187
  max_fps_limit=12.0,
195
188
  name="Lip Sync video",
196
- width=512,
197
189
  )
198
190
  ```
199
191
  """
@@ -10,7 +10,7 @@ Colorize image. Each image costs 5 credits.
10
10
  | Parameter | Required | Description | Example |
11
11
  |-----------|:--------:|-------------|--------|
12
12
  | `assets` | ✓ | Provide the assets for photo colorization | `{"image_file_path": "api-assets/id/1234.png"}` |
13
- | `name` | ✗ | The name of image | `"Photo Colorizer image"` |
13
+ | `name` | ✗ | The name of image. This value is mainly used for your own identification of the image. | `"Photo Colorizer image"` |
14
14
 
15
15
  #### Synchronous Client
16
16
 
@@ -44,4 +44,4 @@ res = await client.v1.photo_colorizer.create(
44
44
  [V1PhotoColorizerCreateResponse](/magic_hour/types/models/v1_photo_colorizer_create_response.py)
45
45
 
46
46
  ##### Example
47
- `{"credits_charged": 5, "frame_cost": 5, "id": "clx7uu86w0a5qp55yxz315r6r"}`
47
+ `{"credits_charged": 5, "frame_cost": 5, "id": "cuid-example"}`
@@ -32,7 +32,7 @@ class PhotoColorizerClient:
32
32
  POST /v1/photo-colorizer
33
33
 
34
34
  Args:
35
- name: The name of image
35
+ name: The name of image. This value is mainly used for your own identification of the image.
36
36
  assets: Provide the assets for photo colorization
37
37
  request_options: Additional options to customize the HTTP request
38
38
 
@@ -86,7 +86,7 @@ class AsyncPhotoColorizerClient:
86
86
  POST /v1/photo-colorizer
87
87
 
88
88
  Args:
89
- name: The name of image
89
+ name: The name of image. This value is mainly used for your own identification of the image.
90
90
  assets: Provide the assets for photo colorization
91
91
  request_options: Additional options to customize the HTTP request
92
92
 
@@ -12,11 +12,11 @@ Get more information about this mode at our [product page](https://magichour.ai/
12
12
 
13
13
  | Parameter | Required | Description | Example |
14
14
  |-----------|:--------:|-------------|--------|
15
- | `end_seconds` | ✓ | The total duration of the output video in seconds. | `5.0` |
15
+ | `end_seconds` | ✓ | The total duration of the output video in seconds. The value must be greater than or equal to 5 seconds and less than or equal to 60 seconds. Note: For 480p resolution, the value must be either 5 or 10. | `5.0` |
16
16
  | `orientation` | ✓ | Determines the orientation of the output video | `"landscape"` |
17
17
  | `style` | ✓ | | `{"prompt": "a dog running"}` |
18
- | `name` | ✗ | The name of video | `"Text To Video video"` |
19
- | `resolution` | ✗ | Controls the output video resolution. Defaults to `720p` if not specified. **Options:** - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds. - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds. - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier. | `"1080p"` |
18
+ | `name` | ✗ | The name of video. This value is mainly used for your own identification of the video. | `"Text To Video video"` |
19
+ | `resolution` | ✗ | Controls the output video resolution. Defaults to `720p` if not specified. 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier. **Options:** - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds. - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds. - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. | `"720p"` |
20
20
 
21
21
  #### Synchronous Client
22
22
 
@@ -30,6 +30,7 @@ res = client.v1.text_to_video.create(
30
30
  orientation="landscape",
31
31
  style={"prompt": "a dog running"},
32
32
  name="Text To Video video",
33
+ resolution="720p",
33
34
  )
34
35
 
35
36
  ```
@@ -46,6 +47,7 @@ res = await client.v1.text_to_video.create(
46
47
  orientation="landscape",
47
48
  style={"prompt": "a dog running"},
48
49
  name="Text To Video video",
50
+ resolution="720p",
49
51
  )
50
52
 
51
53
  ```
@@ -56,4 +58,4 @@ res = await client.v1.text_to_video.create(
56
58
  [V1TextToVideoCreateResponse](/magic_hour/types/models/v1_text_to_video_create_response.py)
57
59
 
58
60
  ##### Example
59
- `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "clx7uu86w0a5qp55yxz315r6r"}`
61
+ `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
@@ -42,14 +42,20 @@ class TextToVideoClient:
42
42
  POST /v1/text-to-video
43
43
 
44
44
  Args:
45
- name: The name of video
45
+ name: The name of video. This value is mainly used for your own identification of the video.
46
46
  resolution: 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
  end_seconds: The total duration of the output video in seconds.
55
+
56
+ The value must be greater than or equal to 5 seconds and less than or equal to 60 seconds.
57
+
58
+ Note: For 480p resolution, the value must be either 5 or 10.
53
59
  orientation: Determines the orientation of the output video
54
60
  style: V1TextToVideoCreateBodyStyle
55
61
  request_options: Additional options to customize the HTTP request
@@ -68,6 +74,7 @@ class TextToVideoClient:
68
74
  orientation="landscape",
69
75
  style={"prompt": "a dog running"},
70
76
  name="Text To Video video",
77
+ resolution="720p",
71
78
  )
72
79
  ```
73
80
  """
@@ -121,14 +128,20 @@ class AsyncTextToVideoClient:
121
128
  POST /v1/text-to-video
122
129
 
123
130
  Args:
124
- name: The name of video
131
+ name: The name of video. This value is mainly used for your own identification of the video.
125
132
  resolution: Controls the output video resolution. Defaults to `720p` if not specified.
126
133
 
134
+ 480p and 720p are available on Creator, Pro, or Business tiers. However, 1080p require Pro or Business tier.
135
+
127
136
  **Options:**
128
137
  - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
129
138
  - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
130
- - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
139
+ - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds.
131
140
  end_seconds: The total duration of the output video in seconds.
141
+
142
+ The value must be greater than or equal to 5 seconds and less than or equal to 60 seconds.
143
+
144
+ Note: For 480p resolution, the value must be either 5 or 10.
132
145
  orientation: Determines the orientation of the output video
133
146
  style: V1TextToVideoCreateBodyStyle
134
147
  request_options: Additional options to customize the HTTP request
@@ -147,6 +160,7 @@ class AsyncTextToVideoClient:
147
160
  orientation="landscape",
148
161
  style={"prompt": "a dog running"},
149
162
  name="Text To Video video",
163
+ resolution="720p",
150
164
  )
151
165
  ```
152
166
  """
@@ -9,7 +9,7 @@ Permanently delete the rendered video. This action is not reversible, please be
9
9
 
10
10
  | Parameter | Required | Description | Example |
11
11
  |-----------|:--------:|-------------|--------|
12
- | `id` | ✓ | The id of the video project | `"cm6pvghix03bvyz0zwash6noj"` |
12
+ | `id` | ✓ | Unique ID of the video project. This value is returned by all of the POST APIs that create a video. | `"cuid-example"` |
13
13
 
14
14
  #### Synchronous Client
15
15
 
@@ -18,7 +18,7 @@ from magic_hour import Client
18
18
  from os import getenv
19
19
 
20
20
  client = Client(token=getenv("API_TOKEN"))
21
- res = client.v1.video_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
21
+ res = client.v1.video_projects.delete(id="cuid-example")
22
22
 
23
23
  ```
24
24
 
@@ -29,7 +29,7 @@ from magic_hour import AsyncClient
29
29
  from os import getenv
30
30
 
31
31
  client = AsyncClient(token=getenv("API_TOKEN"))
32
- res = await client.v1.video_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
32
+ res = await client.v1.video_projects.delete(id="cuid-example")
33
33
 
34
34
  ```
35
35
 
@@ -52,7 +52,7 @@ The video can be one of the following status
52
52
 
53
53
  | Parameter | Required | Description | Example |
54
54
  |-----------|:--------:|-------------|--------|
55
- | `id` | ✓ | The id of the video | `"cm6pvghix03bvyz0zwash6noj"` |
55
+ | `id` | ✓ | Unique ID of the video project. This value is returned by all of the POST APIs that create a video. | `"cuid-example"` |
56
56
 
57
57
  #### Synchronous Client
58
58
 
@@ -61,7 +61,7 @@ from magic_hour import Client
61
61
  from os import getenv
62
62
 
63
63
  client = Client(token=getenv("API_TOKEN"))
64
- res = client.v1.video_projects.get(id="cm6pvghix03bvyz0zwash6noj")
64
+ res = client.v1.video_projects.get(id="cuid-example")
65
65
 
66
66
  ```
67
67
 
@@ -72,7 +72,7 @@ from magic_hour import AsyncClient
72
72
  from os import getenv
73
73
 
74
74
  client = AsyncClient(token=getenv("API_TOKEN"))
75
- res = await client.v1.video_projects.get(id="cm6pvghix03bvyz0zwash6noj")
75
+ res = await client.v1.video_projects.get(id="cuid-example")
76
76
 
77
77
  ```
78
78
 
@@ -82,4 +82,4 @@ res = await client.v1.video_projects.get(id="cm6pvghix03bvyz0zwash6noj")
82
82
  [V1VideoProjectsGetResponse](/magic_hour/types/models/v1_video_projects_get_response.py)
83
83
 
84
84
  ##### Example
85
- `{"created_at": "1970-01-01T00:00:00", "credits_charged": 450, "download": {"expires_at": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.mp4"}, "downloads": [{"expires_at": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.mp4"}], "enabled": True, "end_seconds": 15.0, "error": {"code": "no_source_face", "message": "Please use an image with a detectable face"}, "fps": 30.0, "height": 960, "id": "clx7uu86w0a5qp55yxz315r6r", "name": "Example Name", "start_seconds": 0.0, "status": "complete", "total_frame_cost": 450, "type_": "FACE_SWAP", "width": 512}`
85
+ `{"created_at": "1970-01-01T00:00:00", "credits_charged": 450, "download": {"expires_at": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.mp4"}, "downloads": [{"expires_at": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.mp4"}], "enabled": True, "end_seconds": 15.0, "error": {"code": "no_source_face", "message": "Please use an image with a detectable face"}, "fps": 30.0, "height": 960, "id": "cuid-example", "name": "Example Name", "start_seconds": 0.0, "status": "complete", "total_frame_cost": 450, "type_": "FACE_SWAP", "width": 512}`
@@ -24,7 +24,7 @@ class VideoProjectsClient:
24
24
  DELETE /v1/video-projects/{id}
25
25
 
26
26
  Args:
27
- id: The id of the video project
27
+ id: Unique ID of the video project. This value is returned by all of the POST APIs that create a video.
28
28
  request_options: Additional options to customize the HTTP request
29
29
 
30
30
  Returns:
@@ -36,7 +36,7 @@ class VideoProjectsClient:
36
36
 
37
37
  Examples:
38
38
  ```py
39
- client.v1.video_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
39
+ client.v1.video_projects.delete(id="cuid-example")
40
40
  ```
41
41
  """
42
42
  self._base_client.request(
@@ -67,7 +67,7 @@ class VideoProjectsClient:
67
67
  GET /v1/video-projects/{id}
68
68
 
69
69
  Args:
70
- id: The id of the video
70
+ id: Unique ID of the video project. This value is returned by all of the POST APIs that create a video.
71
71
  request_options: Additional options to customize the HTTP request
72
72
 
73
73
  Returns:
@@ -79,7 +79,7 @@ class VideoProjectsClient:
79
79
 
80
80
  Examples:
81
81
  ```py
82
- client.v1.video_projects.get(id="cm6pvghix03bvyz0zwash6noj")
82
+ client.v1.video_projects.get(id="cuid-example")
83
83
  ```
84
84
  """
85
85
  return self._base_client.request(
@@ -106,7 +106,7 @@ class AsyncVideoProjectsClient:
106
106
  DELETE /v1/video-projects/{id}
107
107
 
108
108
  Args:
109
- id: The id of the video project
109
+ id: Unique ID of the video project. This value is returned by all of the POST APIs that create a video.
110
110
  request_options: Additional options to customize the HTTP request
111
111
 
112
112
  Returns:
@@ -118,7 +118,7 @@ class AsyncVideoProjectsClient:
118
118
 
119
119
  Examples:
120
120
  ```py
121
- await client.v1.video_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
121
+ await client.v1.video_projects.delete(id="cuid-example")
122
122
  ```
123
123
  """
124
124
  await self._base_client.request(
@@ -149,7 +149,7 @@ class AsyncVideoProjectsClient:
149
149
  GET /v1/video-projects/{id}
150
150
 
151
151
  Args:
152
- id: The id of the video
152
+ id: Unique ID of the video project. This value is returned by all of the POST APIs that create a video.
153
153
  request_options: Additional options to customize the HTTP request
154
154
 
155
155
  Returns:
@@ -161,7 +161,7 @@ class AsyncVideoProjectsClient:
161
161
 
162
162
  Examples:
163
163
  ```py
164
- await client.v1.video_projects.get(id="cm6pvghix03bvyz0zwash6noj")
164
+ await client.v1.video_projects.get(id="cuid-example")
165
165
  ```
166
166
  """
167
167
  return await self._base_client.request(
@@ -13,13 +13,13 @@ Get more information about this mode at our [product page](https://magichour.ai/
13
13
  | Parameter | Required | Description | Example |
14
14
  |-----------|:--------:|-------------|--------|
15
15
  | `assets` | ✓ | Provide the assets for video-to-video. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used | `{"video_file_path": "api-assets/id/1234.mp4", "video_source": "file"}` |
16
- | `end_seconds` | ✓ | The end time of the input video in seconds | `15.0` |
17
- | `start_seconds` | ✓ | The start time of the input video in seconds | `0.0` |
18
- | `style` | ✓ | | `{"art_style": "3D Render", "model": "Absolute Reality", "prompt": "string", "prompt_type": "append_default", "version": "default"}` |
16
+ | `end_seconds` | ✓ | 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. | `15.0` |
17
+ | `start_seconds` | ✓ | 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. | `0.0` |
18
+ | `style` | ✓ | | `{"art_style": "3D Render", "model": "default", "prompt": "string", "prompt_type": "default", "version": "default"}` |
19
19
  | `fps_resolution` | ✗ | Determines whether the resulting video will have the same frame per second as the original video, or half. * `FULL` - the result video will have the same FPS as the input video * `HALF` - the result video will have half the FPS as the input video | `"HALF"` |
20
- | `height` | ✗ | Used to determine the dimensions of the output video. * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio. * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio. Note: if the video's original resolution is less than the maximum, the video will not be resized. See our [pricing page](https://magichour.ai/pricing) for more details. | `960` |
21
- | `name` | ✗ | The name of video | `"Video To Video video"` |
22
- | `width` | ✗ | Used to determine the dimensions of the output video. * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio. * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio. Note: if the video's original resolution is less than the maximum, the video will not be resized. See our [pricing page](https://magichour.ai/pricing) for more details. | `512` |
20
+ | `height` | ✗ | `height` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
21
+ | `name` | ✗ | The name of video. This value is mainly used for your own identification of the video. | `"Video To Video video"` |
22
+ | `width` | ✗ | `width` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
23
23
 
24
24
  #### Synchronous Client
25
25
 
@@ -34,15 +34,13 @@ res = client.v1.video_to_video.create(
34
34
  start_seconds=0.0,
35
35
  style={
36
36
  "art_style": "3D Render",
37
- "model": "Absolute Reality",
37
+ "model": "default",
38
38
  "prompt": "string",
39
- "prompt_type": "append_default",
39
+ "prompt_type": "default",
40
40
  "version": "default",
41
41
  },
42
42
  fps_resolution="HALF",
43
- height=960,
44
43
  name="Video To Video video",
45
- width=512,
46
44
  )
47
45
 
48
46
  ```
@@ -60,15 +58,13 @@ res = await client.v1.video_to_video.create(
60
58
  start_seconds=0.0,
61
59
  style={
62
60
  "art_style": "3D Render",
63
- "model": "Absolute Reality",
61
+ "model": "default",
64
62
  "prompt": "string",
65
- "prompt_type": "append_default",
63
+ "prompt_type": "default",
66
64
  "version": "default",
67
65
  },
68
66
  fps_resolution="HALF",
69
- height=960,
70
67
  name="Video To Video video",
71
- width=512,
72
68
  )
73
69
 
74
70
  ```
@@ -79,4 +75,4 @@ res = await client.v1.video_to_video.create(
79
75
  [V1VideoToVideoCreateResponse](/magic_hour/types/models/v1_video_to_video_create_response.py)
80
76
 
81
77
  ##### Example
82
- `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "clx7uu86w0a5qp55yxz315r6r"}`
78
+ `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`