magic_hour 0.40.0__py3-none-any.whl → 0.44.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. magic_hour/README.md +2 -3
  2. magic_hour/environment.py +1 -1
  3. magic_hour/helpers/download.py +2 -0
  4. magic_hour/resources/v1/README.md +2 -3
  5. magic_hour/resources/v1/ai_clothes_changer/README.md +13 -14
  6. magic_hour/resources/v1/ai_face_editor/README.md +26 -27
  7. magic_hour/resources/v1/ai_gif_generator/README.md +12 -13
  8. magic_hour/resources/v1/ai_gif_generator/client.py +2 -2
  9. magic_hour/resources/v1/ai_headshot_generator/README.md +13 -14
  10. magic_hour/resources/v1/ai_headshot_generator/client.py +2 -2
  11. magic_hour/resources/v1/ai_image_editor/README.md +24 -17
  12. magic_hour/resources/v1/ai_image_editor/client.py +40 -10
  13. magic_hour/resources/v1/ai_image_generator/README.md +26 -18
  14. magic_hour/resources/v1/ai_image_generator/client.py +14 -6
  15. magic_hour/resources/v1/ai_image_upscaler/README.md +14 -15
  16. magic_hour/resources/v1/ai_meme_generator/README.md +12 -13
  17. magic_hour/resources/v1/ai_photo_editor/README.md +22 -23
  18. magic_hour/resources/v1/ai_qr_code_generator/README.md +13 -14
  19. magic_hour/resources/v1/ai_qr_code_generator/client.py +4 -4
  20. magic_hour/resources/v1/ai_talking_photo/README.md +16 -17
  21. magic_hour/resources/v1/ai_voice_cloner/README.md +62 -0
  22. magic_hour/resources/v1/ai_voice_cloner/__init__.py +4 -0
  23. magic_hour/resources/v1/ai_voice_cloner/client.py +272 -0
  24. magic_hour/resources/v1/ai_voice_generator/README.md +66 -10
  25. magic_hour/resources/v1/ai_voice_generator/client.py +122 -0
  26. magic_hour/resources/v1/animation/README.md +24 -25
  27. magic_hour/resources/v1/audio_projects/README.md +58 -13
  28. magic_hour/resources/v1/audio_projects/__init__.py +10 -2
  29. magic_hour/resources/v1/audio_projects/client.py +137 -0
  30. magic_hour/resources/v1/audio_projects/client_test.py +520 -0
  31. magic_hour/resources/v1/auto_subtitle_generator/README.md +15 -16
  32. magic_hour/resources/v1/client.py +6 -0
  33. magic_hour/resources/v1/face_detection/README.md +21 -20
  34. magic_hour/resources/v1/face_swap/README.md +23 -25
  35. magic_hour/resources/v1/face_swap/client.py +2 -2
  36. magic_hour/resources/v1/face_swap_photo/README.md +13 -14
  37. magic_hour/resources/v1/files/README.md +1 -5
  38. magic_hour/resources/v1/files/upload_urls/README.md +11 -10
  39. magic_hour/resources/v1/files/upload_urls/client.py +6 -4
  40. magic_hour/resources/v1/image_background_remover/README.md +11 -12
  41. magic_hour/resources/v1/image_projects/README.md +12 -16
  42. magic_hour/resources/v1/image_to_video/README.md +19 -21
  43. magic_hour/resources/v1/lip_sync/README.md +27 -21
  44. magic_hour/resources/v1/lip_sync/client.py +15 -0
  45. magic_hour/resources/v1/photo_colorizer/README.md +10 -11
  46. magic_hour/resources/v1/text_to_video/README.md +15 -17
  47. magic_hour/resources/v1/video_projects/README.md +12 -16
  48. magic_hour/resources/v1/video_to_video/README.md +24 -26
  49. magic_hour/types/models/__init__.py +2 -0
  50. magic_hour/types/models/v1_ai_voice_cloner_create_response.py +27 -0
  51. magic_hour/types/models/v1_audio_projects_get_response.py +1 -1
  52. magic_hour/types/models/v1_video_projects_get_response.py +1 -1
  53. magic_hour/types/params/__init__.py +26 -0
  54. magic_hour/types/params/v1_ai_image_editor_create_body_assets.py +18 -4
  55. magic_hour/types/params/v1_ai_image_editor_create_body_style.py +13 -0
  56. magic_hour/types/params/v1_ai_image_editor_generate_body_assets.py +12 -1
  57. magic_hour/types/params/v1_ai_image_generator_create_body_style.py +16 -0
  58. magic_hour/types/params/v1_ai_talking_photo_create_body_style.py +6 -4
  59. magic_hour/types/params/v1_ai_voice_cloner_create_body.py +49 -0
  60. magic_hour/types/params/v1_ai_voice_cloner_create_body_assets.py +33 -0
  61. magic_hour/types/params/v1_ai_voice_cloner_create_body_style.py +28 -0
  62. magic_hour/types/params/v1_ai_voice_cloner_generate_body_assets.py +28 -0
  63. magic_hour/types/params/v1_ai_voice_generator_create_body_style.py +382 -2
  64. magic_hour/types/params/v1_face_swap_create_body_style.py +1 -1
  65. magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +1 -1
  66. magic_hour/types/params/v1_lip_sync_create_body.py +12 -0
  67. magic_hour/types/params/v1_lip_sync_create_body_style.py +37 -0
  68. magic_hour/types/params/v1_video_to_video_create_body.py +1 -1
  69. magic_hour/types/params/v1_video_to_video_create_body_style.py +32 -4
  70. {magic_hour-0.40.0.dist-info → magic_hour-0.44.0.dist-info}/METADATA +77 -62
  71. {magic_hour-0.40.0.dist-info → magic_hour-0.44.0.dist-info}/RECORD +73 -63
  72. {magic_hour-0.40.0.dist-info → magic_hour-0.44.0.dist-info}/LICENSE +0 -0
  73. {magic_hour-0.40.0.dist-info → magic_hour-0.44.0.dist-info}/WHEEL +0 -0
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Image To Video Generate Workflow <a name="generate"></a>
@@ -63,30 +61,30 @@ res = await client.v1.image_to_video.generate(
63
61
  ```
64
62
 
65
63
  <!-- CUSTOM DOCS END -->
64
+
66
65
  ### Image-to-Video <a name="create"></a>
67
66
 
68
67
  Create a Image To Video video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
69
-
68
+
70
69
  Get more information about this mode at our [product page](https://magichour.ai/products/image-to-video).
71
-
72
70
 
73
71
  **API Endpoint**: `POST /v1/image-to-video`
74
72
 
75
73
  #### Parameters
76
74
 
77
- | Parameter | Required | Deprecated | Description | Example |
78
- |-----------|:--------:|:----------:|-------------|--------|
79
- | `assets` | | | Provide the assets for image-to-video. | `{"image_file_path": "api-assets/id/1234.png"}` |
80
- | `└─ image_file_path` | | | The path of the image file. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
81
- | `end_seconds` | | | The total duration of the output video in seconds. | `5.0` |
82
- | `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` |
83
- | `name` | | | The name of video. This value is mainly used for your own identification of the video. | `"Image To Video video"` |
84
- | `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"` |
85
- | `style` | | | Attributed used to dictate the style of the output | `{"prompt": "a dog running"}` |
86
- | `└─ high_quality` | | | Deprecated: Please use `resolution` instead. For backward compatibility, * `false` maps to 720p resolution * `true` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly specify the resolution. | `True` |
87
- | `└─ prompt` | | | The prompt used for the video. | `"a dog running"` |
88
- | `└─ quality_mode` | | | DEPRECATED: Please use `resolution` field instead. For backward compatibility: * `quick` maps to 720p resolution * `studio` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution. | `"quick"` |
89
- | `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` |
75
+ | Parameter | Required | Deprecated | Description | Example |
76
+ | -------------------- | :------: | :--------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
77
+ | `assets` | | | Provide the assets for image-to-video. | `{"image_file_path": "api-assets/id/1234.png"}` |
78
+ | `└─ image_file_path` | | | The path of the image file. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
79
+ | `end_seconds` | | | The total duration of the output video in seconds. | `5.0` |
80
+ | `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` |
81
+ | `name` | | | The name of video. This value is mainly used for your own identification of the video. | `"Image To Video video"` |
82
+ | `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"` |
83
+ | `style` | | | Attributed used to dictate the style of the output | `{"prompt": "a dog running"}` |
84
+ | `└─ high_quality` | | | Deprecated: Please use `resolution` instead. For backward compatibility, * `false` maps to 720p resolution * `true` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly specify the resolution. | `True` |
85
+ | `└─ prompt` | | | The prompt used for the video. | `"a dog running"` |
86
+ | `└─ quality_mode` | | | DEPRECATED: Please use `resolution` field instead. For backward compatibility: * `quick` maps to 720p resolution * `studio` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution. | `"quick"` |
87
+ | `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` |
90
88
 
91
89
  #### Synchronous Client
92
90
 
@@ -101,7 +99,6 @@ res = client.v1.image_to_video.create(
101
99
  name="Image To Video video",
102
100
  resolution="720p",
103
101
  )
104
-
105
102
  ```
106
103
 
107
104
  #### Asynchronous Client
@@ -117,15 +114,16 @@ res = await client.v1.image_to_video.create(
117
114
  name="Image To Video video",
118
115
  resolution="720p",
119
116
  )
120
-
121
117
  ```
122
118
 
123
119
  #### Response
124
120
 
125
121
  ##### Type
122
+
126
123
  [V1ImageToVideoCreateResponse](/magic_hour/types/models/v1_image_to_video_create_response.py)
127
124
 
128
125
  ##### Example
129
- `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
130
-
131
126
 
127
+ ```python
128
+ {"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}
129
+ ```
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Lip Sync Generate Workflow <a name="generate"></a>
@@ -39,6 +37,9 @@ res = client.v1.lip_sync.generate(
39
37
  "video_file_path": "/path/to/1234.mp4",
40
38
  "video_source": "file",
41
39
  },
40
+ style={
41
+ "generation_mode": "lite",
42
+ },
42
43
  end_seconds=15.0,
43
44
  start_seconds=0.0,
44
45
  max_fps_limit=12.0,
@@ -62,6 +63,9 @@ res = await client.v1.lip_sync.generate(
62
63
  "video_file_path": "/path/to/1234.mp4",
63
64
  "video_source": "file",
64
65
  },
66
+ style={
67
+ "generation_mode": "lite",
68
+ },
65
69
  end_seconds=15.0,
66
70
  start_seconds=0.0,
67
71
  max_fps_limit=12.0,
@@ -73,30 +77,32 @@ res = await client.v1.lip_sync.generate(
73
77
  ```
74
78
 
75
79
  <!-- CUSTOM DOCS END -->
80
+
76
81
  ### Lip Sync <a name="create"></a>
77
82
 
78
83
  Create a Lip Sync video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
79
-
84
+
80
85
  Get more information about this mode at our [product page](https://magichour.ai/products/lip-sync).
81
-
82
86
 
83
87
  **API Endpoint**: `POST /v1/lip-sync`
84
88
 
85
89
  #### Parameters
86
90
 
87
- | Parameter | Required | Deprecated | Description | Example |
88
- |-----------|:--------:|:----------:|-------------|--------|
89
- | `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"}` |
90
- | `└─ audio_file_path` | | | The path of the audio file. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.mp3"` |
91
- | `└─ video_file_path` | | | Required if `video_source` is `file`. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.mp4"` |
92
- | `└─ video_source` | | | | `"file"` |
93
- | `└─ youtube_url` | | | Using a youtube video as the input source. This field is required if `video_source` is `youtube` | `"http://www.example.com"` |
94
- | `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` |
95
- | `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` |
96
- | `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` |
97
- | `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` |
98
- | `name` | | | The name of video. This value is mainly used for your own identification of the video. | `"Lip Sync video"` |
99
- | `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` |
91
+ | Parameter | Required | Deprecated | Description | Example |
92
+ | -------------------- | :------: | :--------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
93
+ | `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"}` |
94
+ | `└─ audio_file_path` | | | The path of the audio file. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.mp3"` |
95
+ | `└─ video_file_path` | | | Required if `video_source` is `file`. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.mp4"` |
96
+ | `└─ video_source` | | | | `"file"` |
97
+ | `└─ youtube_url` | | | Using a youtube video as the input source. This field is required if `video_source` is `youtube` | `"http://www.example.com"` |
98
+ | `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` |
99
+ | `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` |
100
+ | `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` |
101
+ | `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` |
102
+ | `name` | | | The name of video. This value is mainly used for your own identification of the video. | `"Lip Sync video"` |
103
+ | `style` | || Attributes used to dictate the style of the output | `{"generation_mode": "lite"}` |
104
+ | `└─ generation_mode` | ✗ | — | A specific version of our lip sync system, optimized for different needs. * `lite` - Fast and affordable lip sync - best for simple videos. Costs 1 credit per frame of video. * `standard` - Natural, accurate lip sync - best for most creators. Costs 1 credit per frame of video. * `pro` - Premium fidelity with enhanced detail - best for professionals. Costs 2 credits per frame of video. Note: `standard` and `pro` are only available for users on Creator, Pro, and Business tiers. | `"lite"` |
105
+ | `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` |
100
106
 
101
107
  #### Synchronous Client
102
108
 
@@ -116,7 +122,6 @@ res = client.v1.lip_sync.create(
116
122
  max_fps_limit=12.0,
117
123
  name="Lip Sync video",
118
124
  )
119
-
120
125
  ```
121
126
 
122
127
  #### Asynchronous Client
@@ -137,15 +142,16 @@ res = await client.v1.lip_sync.create(
137
142
  max_fps_limit=12.0,
138
143
  name="Lip Sync video",
139
144
  )
140
-
141
145
  ```
142
146
 
143
147
  #### Response
144
148
 
145
149
  ##### Type
150
+
146
151
  [V1LipSyncCreateResponse](/magic_hour/types/models/v1_lip_sync_create_response.py)
147
152
 
148
153
  ##### Example
149
- `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
150
-
151
154
 
155
+ ```python
156
+ {"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}
157
+ ```
@@ -39,6 +39,9 @@ class LipSyncClient:
39
39
  name: typing.Union[
40
40
  typing.Optional[str], type_utils.NotGiven
41
41
  ] = type_utils.NOT_GIVEN,
42
+ style: typing.Union[
43
+ typing.Optional[params.V1LipSyncCreateBodyStyle], type_utils.NotGiven
44
+ ] = type_utils.NOT_GIVEN,
42
45
  width: typing.Union[
43
46
  typing.Optional[int], type_utils.NotGiven
44
47
  ] = type_utils.NOT_GIVEN,
@@ -56,6 +59,7 @@ class LipSyncClient:
56
59
  height: `height` is deprecated and no longer influences the output video's resolution.
57
60
  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
61
  name: The name of video. This value is mainly used for your own identification of the video.
62
+ style: Attributes used to dictate the style of the output
59
63
  width: `width` is deprecated and no longer influences the output video's resolution.
60
64
  assets: Provide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
61
65
  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.
@@ -108,6 +112,7 @@ class LipSyncClient:
108
112
  height=height,
109
113
  max_fps_limit=max_fps_limit,
110
114
  name=name,
115
+ style=style,
111
116
  width=width,
112
117
  request_options=request_options,
113
118
  )
@@ -138,6 +143,9 @@ class LipSyncClient:
138
143
  name: typing.Union[
139
144
  typing.Optional[str], type_utils.NotGiven
140
145
  ] = type_utils.NOT_GIVEN,
146
+ style: typing.Union[
147
+ typing.Optional[params.V1LipSyncCreateBodyStyle], type_utils.NotGiven
148
+ ] = type_utils.NOT_GIVEN,
141
149
  width: typing.Union[
142
150
  typing.Optional[int], type_utils.NotGiven
143
151
  ] = type_utils.NOT_GIVEN,
@@ -163,6 +171,7 @@ class LipSyncClient:
163
171
  This field is retained only for backward compatibility and will be removed in a future release.
164
172
  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.
165
173
  name: The name of video. This value is mainly used for your own identification of the video.
174
+ style: Attributes used to dictate the style of the output
166
175
  width: `width` is deprecated and no longer influences the output video's resolution.
167
176
 
168
177
  Output resolution is determined by the **minimum** of:
@@ -202,6 +211,7 @@ class LipSyncClient:
202
211
  "height": height,
203
212
  "max_fps_limit": max_fps_limit,
204
213
  "name": name,
214
+ "style": style,
205
215
  "width": width,
206
216
  "assets": assets,
207
217
  "end_seconds": end_seconds,
@@ -339,6 +349,9 @@ class AsyncLipSyncClient:
339
349
  name: typing.Union[
340
350
  typing.Optional[str], type_utils.NotGiven
341
351
  ] = type_utils.NOT_GIVEN,
352
+ style: typing.Union[
353
+ typing.Optional[params.V1LipSyncCreateBodyStyle], type_utils.NotGiven
354
+ ] = type_utils.NOT_GIVEN,
342
355
  width: typing.Union[
343
356
  typing.Optional[int], type_utils.NotGiven
344
357
  ] = type_utils.NOT_GIVEN,
@@ -364,6 +377,7 @@ class AsyncLipSyncClient:
364
377
  This field is retained only for backward compatibility and will be removed in a future release.
365
378
  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.
366
379
  name: The name of video. This value is mainly used for your own identification of the video.
380
+ style: Attributes used to dictate the style of the output
367
381
  width: `width` is deprecated and no longer influences the output video's resolution.
368
382
 
369
383
  Output resolution is determined by the **minimum** of:
@@ -403,6 +417,7 @@ class AsyncLipSyncClient:
403
417
  "height": height,
404
418
  "max_fps_limit": max_fps_limit,
405
419
  "name": name,
420
+ "style": style,
406
421
  "width": width,
407
422
  "assets": assets,
408
423
  "end_seconds": end_seconds,
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Photo Colorizer Generate Workflow <a name="generate"></a>
@@ -57,6 +55,7 @@ res = await client.v1.photo_colorizer.generate(
57
55
  ```
58
56
 
59
57
  <!-- CUSTOM DOCS END -->
58
+
60
59
  ### Photo Colorizer <a name="create"></a>
61
60
 
62
61
  Colorize image. Each image costs 5 credits.
@@ -65,11 +64,11 @@ Colorize image. Each image costs 5 credits.
65
64
 
66
65
  #### Parameters
67
66
 
68
- | Parameter | Required | Description | Example |
69
- |-----------|:--------:|-------------|--------|
70
- | `assets` | | Provide the assets for photo colorization | `{"image_file_path": "api-assets/id/1234.png"}` |
71
- | `└─ image_file_path` | | The image used to generate the colorized image. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
72
- | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Photo Colorizer image"` |
67
+ | Parameter | Required | Description | Example |
68
+ | -------------------- | :------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
69
+ | `assets` | | Provide the assets for photo colorization | `{"image_file_path": "api-assets/id/1234.png"}` |
70
+ | `└─ image_file_path` | | The image used to generate the colorized image. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
71
+ | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Photo Colorizer image"` |
73
72
 
74
73
  #### Synchronous Client
75
74
 
@@ -81,7 +80,6 @@ client = Client(token=getenv("API_TOKEN"))
81
80
  res = client.v1.photo_colorizer.create(
82
81
  assets={"image_file_path": "api-assets/id/1234.png"}, name="Photo Colorizer image"
83
82
  )
84
-
85
83
  ```
86
84
 
87
85
  #### Asynchronous Client
@@ -94,15 +92,16 @@ client = AsyncClient(token=getenv("API_TOKEN"))
94
92
  res = await client.v1.photo_colorizer.create(
95
93
  assets={"image_file_path": "api-assets/id/1234.png"}, name="Photo Colorizer image"
96
94
  )
97
-
98
95
  ```
99
96
 
100
97
  #### Response
101
98
 
102
99
  ##### Type
100
+
103
101
  [V1PhotoColorizerCreateResponse](/magic_hour/types/models/v1_photo_colorizer_create_response.py)
104
102
 
105
103
  ##### Example
106
- `{"credits_charged": 5, "frame_cost": 5, "id": "cuid-example"}`
107
-
108
104
 
105
+ ```python
106
+ {"credits_charged": 5, "frame_cost": 5, "id": "cuid-example"}
107
+ ```
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Text To Video Generate Workflow <a name="generate"></a>
@@ -65,26 +63,26 @@ res = await client.v1.text_to_video.generate(
65
63
  ```
66
64
 
67
65
  <!-- CUSTOM DOCS END -->
66
+
68
67
  ### Text-to-Video <a name="create"></a>
69
68
 
70
69
  Create a Text To Video video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
71
-
70
+
72
71
  Get more information about this mode at our [product page](https://magichour.ai/products/text-to-video).
73
-
74
72
 
75
73
  **API Endpoint**: `POST /v1/text-to-video`
76
74
 
77
75
  #### Parameters
78
76
 
79
- | Parameter | Required | Description | Example |
80
- |-----------|:--------:|-------------|--------|
81
- | `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` |
82
- | `orientation` | | Determines the orientation of the output video | `"landscape"` |
83
- | `style` | | | `{"prompt": "a dog running"}` |
84
- | `└─ prompt` | | The prompt used for the video. | `"a dog running"` |
85
- | `└─ quality_mode` | | DEPRECATED: Please use `resolution` field instead. For backward compatibility: * `quick` maps to 720p resolution * `studio` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution. | `"quick"` |
86
- | `name` | | The name of video. This value is mainly used for your own identification of the video. | `"Text To Video video"` |
87
- | `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"` |
77
+ | Parameter | Required | Description | Example |
78
+ | ----------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
79
+ | `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` |
80
+ | `orientation` | | Determines the orientation of the output video | `"landscape"` |
81
+ | `style` | | | `{"prompt": "a dog running"}` |
82
+ | `└─ prompt` | | The prompt used for the video. | `"a dog running"` |
83
+ | `└─ quality_mode` | | DEPRECATED: Please use `resolution` field instead. For backward compatibility: * `quick` maps to 720p resolution * `studio` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution. | `"quick"` |
84
+ | `name` | | The name of video. This value is mainly used for your own identification of the video. | `"Text To Video video"` |
85
+ | `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"` |
88
86
 
89
87
  #### Synchronous Client
90
88
 
@@ -100,7 +98,6 @@ res = client.v1.text_to_video.create(
100
98
  name="Text To Video video",
101
99
  resolution="720p",
102
100
  )
103
-
104
101
  ```
105
102
 
106
103
  #### Asynchronous Client
@@ -117,15 +114,16 @@ res = await client.v1.text_to_video.create(
117
114
  name="Text To Video video",
118
115
  resolution="720p",
119
116
  )
120
-
121
117
  ```
122
118
 
123
119
  #### Response
124
120
 
125
121
  ##### Type
122
+
126
123
  [V1TextToVideoCreateResponse](/magic_hour/types/models/v1_text_to_video_create_response.py)
127
124
 
128
125
  ##### Example
129
- `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
130
-
131
126
 
127
+ ```python
128
+ {"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}
129
+ ```
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Check results <a name="check-result"></a>
@@ -32,7 +30,6 @@ res = client.v1.video_projects.check_result(
32
30
  download_outputs=True,
33
31
  download_directory="outputs",
34
32
  )
35
-
36
33
  ```
37
34
 
38
35
  #### Asynchronous Client
@@ -51,6 +48,7 @@ res = await client.v1.video_projects.check_result(
51
48
  ```
52
49
 
53
50
  <!-- CUSTOM DOCS END -->
51
+
54
52
  ### Delete video <a name="delete"></a>
55
53
 
56
54
  Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
@@ -59,9 +57,9 @@ Permanently delete the rendered video. This action is not reversible, please be
59
57
 
60
58
  #### Parameters
61
59
 
62
- | Parameter | Required | Description | Example |
63
- |-----------|:--------:|-------------|--------|
64
- | `id` | | Unique ID of the video project. This value is returned by all of the POST APIs that create a video. | `"cuid-example"` |
60
+ | Parameter | Required | Description | Example |
61
+ | --------- | :------: | --------------------------------------------------------------------------------------------------- | ---------------- |
62
+ | `id` | | Unique ID of the video project. This value is returned by all of the POST APIs that create a video. | `"cuid-example"` |
65
63
 
66
64
  #### Synchronous Client
67
65
 
@@ -71,7 +69,6 @@ from os import getenv
71
69
 
72
70
  client = Client(token=getenv("API_TOKEN"))
73
71
  res = client.v1.video_projects.delete(id="cuid-example")
74
-
75
72
  ```
76
73
 
77
74
  #### Asynchronous Client
@@ -82,7 +79,6 @@ from os import getenv
82
79
 
83
80
  client = AsyncClient(token=getenv("API_TOKEN"))
84
81
  res = await client.v1.video_projects.delete(id="cuid-example")
85
-
86
82
  ```
87
83
 
88
84
  ### Get video details <a name="get"></a>
@@ -90,6 +86,7 @@ res = await client.v1.video_projects.delete(id="cuid-example")
90
86
  Get the details of a video project. The `downloads` field will be empty unless the video was successfully rendered.
91
87
 
92
88
  The video can be one of the following status
89
+
93
90
  - `draft` - not currently used
94
91
  - `queued` - the job is queued and waiting for a GPU
95
92
  - `rendering` - the generation is in progress
@@ -97,14 +94,13 @@ The video can be one of the following status
97
94
  - `error` - an error occurred during rendering
98
95
  - `canceled` - video render is canceled by the user
99
96
 
100
-
101
97
  **API Endpoint**: `GET /v1/video-projects/{id}`
102
98
 
103
99
  #### Parameters
104
100
 
105
- | Parameter | Required | Description | Example |
106
- |-----------|:--------:|-------------|--------|
107
- | `id` | | Unique ID of the video project. This value is returned by all of the POST APIs that create a video. | `"cuid-example"` |
101
+ | Parameter | Required | Description | Example |
102
+ | --------- | :------: | --------------------------------------------------------------------------------------------------- | ---------------- |
103
+ | `id` | | Unique ID of the video project. This value is returned by all of the POST APIs that create a video. | `"cuid-example"` |
108
104
 
109
105
  #### Synchronous Client
110
106
 
@@ -114,7 +110,6 @@ from os import getenv
114
110
 
115
111
  client = Client(token=getenv("API_TOKEN"))
116
112
  res = client.v1.video_projects.get(id="cuid-example")
117
-
118
113
  ```
119
114
 
120
115
  #### Asynchronous Client
@@ -125,15 +120,16 @@ from os import getenv
125
120
 
126
121
  client = AsyncClient(token=getenv("API_TOKEN"))
127
122
  res = await client.v1.video_projects.get(id="cuid-example")
128
-
129
123
  ```
130
124
 
131
125
  #### Response
132
126
 
133
127
  ##### Type
128
+
134
129
  [V1VideoProjectsGetResponse](/magic_hour/types/models/v1_video_projects_get_response.py)
135
130
 
136
131
  ##### Example
137
- `{"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}`
138
-
139
132
 
133
+ ```python
134
+ {"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}
135
+ ```