magic_hour 0.38.1__py3-none-any.whl → 0.40.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 (50) hide show
  1. magic_hour/README.md +3 -3
  2. magic_hour/environment.py +1 -1
  3. magic_hour/resources/v1/README.md +2 -2
  4. magic_hour/resources/v1/ai_clothes_changer/README.md +4 -3
  5. magic_hour/resources/v1/ai_face_editor/README.md +4 -2
  6. magic_hour/resources/v1/ai_gif_generator/README.md +5 -2
  7. magic_hour/resources/v1/ai_headshot_generator/README.md +4 -2
  8. magic_hour/resources/v1/ai_image_editor/README.md +4 -2
  9. magic_hour/resources/v1/ai_image_generator/README.md +4 -2
  10. magic_hour/resources/v1/ai_image_upscaler/README.md +4 -2
  11. magic_hour/resources/v1/ai_meme_generator/README.md +4 -2
  12. magic_hour/resources/v1/ai_photo_editor/README.md +4 -2
  13. magic_hour/resources/v1/ai_qr_code_generator/README.md +4 -2
  14. magic_hour/resources/v1/ai_talking_photo/README.md +5 -3
  15. magic_hour/resources/v1/ai_voice_generator/README.md +56 -0
  16. magic_hour/resources/v1/ai_voice_generator/__init__.py +4 -0
  17. magic_hour/resources/v1/ai_voice_generator/client.py +119 -0
  18. magic_hour/resources/v1/animation/README.md +4 -2
  19. magic_hour/resources/v1/audio_projects/README.md +90 -0
  20. magic_hour/resources/v1/audio_projects/__init__.py +4 -0
  21. magic_hour/resources/v1/audio_projects/client.py +173 -0
  22. magic_hour/resources/v1/auto_subtitle_generator/README.md +4 -2
  23. magic_hour/resources/v1/client.py +14 -0
  24. magic_hour/resources/v1/face_detection/README.md +4 -2
  25. magic_hour/resources/v1/face_swap/README.md +5 -2
  26. magic_hour/resources/v1/face_swap_photo/README.md +4 -2
  27. magic_hour/resources/v1/files/README.md +4 -1
  28. magic_hour/resources/v1/files/upload_urls/README.md +2 -5
  29. magic_hour/resources/v1/image_background_remover/README.md +4 -2
  30. magic_hour/resources/v1/image_projects/README.md +4 -2
  31. magic_hour/resources/v1/image_to_video/README.md +4 -2
  32. magic_hour/resources/v1/lip_sync/README.md +4 -2
  33. magic_hour/resources/v1/photo_colorizer/README.md +4 -2
  34. magic_hour/resources/v1/text_to_video/README.md +4 -2
  35. magic_hour/resources/v1/video_projects/README.md +4 -2
  36. magic_hour/resources/v1/video_to_video/README.md +9 -9
  37. magic_hour/resources/v1/video_to_video/client.py +0 -2
  38. magic_hour/types/models/__init__.py +10 -0
  39. magic_hour/types/models/v1_ai_voice_generator_create_response.py +27 -0
  40. magic_hour/types/models/v1_audio_projects_get_response.py +72 -0
  41. magic_hour/types/models/v1_audio_projects_get_response_downloads_item.py +19 -0
  42. magic_hour/types/models/v1_audio_projects_get_response_error.py +25 -0
  43. magic_hour/types/params/__init__.py +12 -0
  44. magic_hour/types/params/v1_ai_voice_generator_create_body.py +40 -0
  45. magic_hour/types/params/v1_ai_voice_generator_create_body_style.py +60 -0
  46. magic_hour/types/params/v1_video_to_video_create_body_style.py +21 -19
  47. {magic_hour-0.38.1.dist-info → magic_hour-0.40.0.dist-info}/METADATA +11 -1
  48. {magic_hour-0.38.1.dist-info → magic_hour-0.40.0.dist-info}/RECORD +50 -38
  49. {magic_hour-0.38.1.dist-info → magic_hour-0.40.0.dist-info}/LICENSE +0 -0
  50. {magic_hour-0.38.1.dist-info → magic_hour-0.40.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,173 @@
1
+ import typing
2
+
3
+ from magic_hour.types import models
4
+ from make_api_request import (
5
+ AsyncBaseClient,
6
+ RequestOptions,
7
+ SyncBaseClient,
8
+ default_request_options,
9
+ )
10
+
11
+
12
+ class AudioProjectsClient:
13
+ def __init__(self, *, base_client: SyncBaseClient):
14
+ self._base_client = base_client
15
+
16
+ def delete(
17
+ self, *, id: str, request_options: typing.Optional[RequestOptions] = None
18
+ ) -> None:
19
+ """
20
+ Delete audio
21
+
22
+ Permanently delete the rendered audio file(s). This action is not reversible, please be sure before deleting.
23
+
24
+ DELETE /v1/audio-projects/{id}
25
+
26
+ Args:
27
+ id: Unique ID of the audio project. This value is returned by all of the POST APIs that create an audio.
28
+ request_options: Additional options to customize the HTTP request
29
+
30
+ Returns:
31
+ 204
32
+
33
+ Raises:
34
+ ApiError: A custom exception class that provides additional context
35
+ for API errors, including the HTTP status code and response body.
36
+
37
+ Examples:
38
+ ```py
39
+ client.v1.audio_projects.delete(id="cuid-example")
40
+ ```
41
+ """
42
+ self._base_client.request(
43
+ method="DELETE",
44
+ path=f"/v1/audio-projects/{id}",
45
+ auth_names=["bearerAuth"],
46
+ cast_to=type(None),
47
+ request_options=request_options or default_request_options(),
48
+ )
49
+
50
+ def get(
51
+ self, *, id: str, request_options: typing.Optional[RequestOptions] = None
52
+ ) -> models.V1AudioProjectsGetResponse:
53
+ """
54
+ Get audio details
55
+
56
+ Get the details of a audio project. The `downloads` field will be empty unless the audio was successfully rendered.
57
+
58
+ The audio can be one of the following status
59
+ - `draft` - not currently used
60
+ - `queued` - the job is queued and waiting for a GPU
61
+ - `rendering` - the generation is in progress
62
+ - `complete` - the audio is successful created
63
+ - `error` - an error occurred during rendering
64
+ - `canceled` - audio render is canceled by the user
65
+
66
+
67
+ GET /v1/audio-projects/{id}
68
+
69
+ Args:
70
+ id: Unique ID of the audio project. This value is returned by all of the POST APIs that create an audio.
71
+ request_options: Additional options to customize the HTTP request
72
+
73
+ Returns:
74
+ Success
75
+
76
+ Raises:
77
+ ApiError: A custom exception class that provides additional context
78
+ for API errors, including the HTTP status code and response body.
79
+
80
+ Examples:
81
+ ```py
82
+ client.v1.audio_projects.get(id="cuid-example")
83
+ ```
84
+ """
85
+ return self._base_client.request(
86
+ method="GET",
87
+ path=f"/v1/audio-projects/{id}",
88
+ auth_names=["bearerAuth"],
89
+ cast_to=models.V1AudioProjectsGetResponse,
90
+ request_options=request_options or default_request_options(),
91
+ )
92
+
93
+
94
+ class AsyncAudioProjectsClient:
95
+ def __init__(self, *, base_client: AsyncBaseClient):
96
+ self._base_client = base_client
97
+
98
+ async def delete(
99
+ self, *, id: str, request_options: typing.Optional[RequestOptions] = None
100
+ ) -> None:
101
+ """
102
+ Delete audio
103
+
104
+ Permanently delete the rendered audio file(s). This action is not reversible, please be sure before deleting.
105
+
106
+ DELETE /v1/audio-projects/{id}
107
+
108
+ Args:
109
+ id: Unique ID of the audio project. This value is returned by all of the POST APIs that create an audio.
110
+ request_options: Additional options to customize the HTTP request
111
+
112
+ Returns:
113
+ 204
114
+
115
+ Raises:
116
+ ApiError: A custom exception class that provides additional context
117
+ for API errors, including the HTTP status code and response body.
118
+
119
+ Examples:
120
+ ```py
121
+ await client.v1.audio_projects.delete(id="cuid-example")
122
+ ```
123
+ """
124
+ await self._base_client.request(
125
+ method="DELETE",
126
+ path=f"/v1/audio-projects/{id}",
127
+ auth_names=["bearerAuth"],
128
+ cast_to=type(None),
129
+ request_options=request_options or default_request_options(),
130
+ )
131
+
132
+ async def get(
133
+ self, *, id: str, request_options: typing.Optional[RequestOptions] = None
134
+ ) -> models.V1AudioProjectsGetResponse:
135
+ """
136
+ Get audio details
137
+
138
+ Get the details of a audio project. The `downloads` field will be empty unless the audio was successfully rendered.
139
+
140
+ The audio can be one of the following status
141
+ - `draft` - not currently used
142
+ - `queued` - the job is queued and waiting for a GPU
143
+ - `rendering` - the generation is in progress
144
+ - `complete` - the audio is successful created
145
+ - `error` - an error occurred during rendering
146
+ - `canceled` - audio render is canceled by the user
147
+
148
+
149
+ GET /v1/audio-projects/{id}
150
+
151
+ Args:
152
+ id: Unique ID of the audio project. This value is returned by all of the POST APIs that create an audio.
153
+ request_options: Additional options to customize the HTTP request
154
+
155
+ Returns:
156
+ Success
157
+
158
+ Raises:
159
+ ApiError: A custom exception class that provides additional context
160
+ for API errors, including the HTTP status code and response body.
161
+
162
+ Examples:
163
+ ```py
164
+ await client.v1.audio_projects.get(id="cuid-example")
165
+ ```
166
+ """
167
+ return await self._base_client.request(
168
+ method="GET",
169
+ path=f"/v1/audio-projects/{id}",
170
+ auth_names=["bearerAuth"],
171
+ cast_to=models.V1AudioProjectsGetResponse,
172
+ request_options=request_options or default_request_options(),
173
+ )
@@ -1,7 +1,9 @@
1
- # v1_auto_subtitle_generator
1
+ # v1.auto_subtitle_generator
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Auto Subtitle Generator Generate Workflow <a name="generate"></a>
@@ -63,7 +65,6 @@ res = await client.v1.auto_subtitle_generator.generate(
63
65
  ```
64
66
 
65
67
  <!-- CUSTOM DOCS END -->
66
-
67
68
  ### Auto Subtitle Generator <a name="create"></a>
68
69
 
69
70
  Automatically generate subtitles for your video in multiple languages.
@@ -125,3 +126,4 @@ res = await client.v1.auto_subtitle_generator.create(
125
126
  ##### Example
126
127
  `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
127
128
 
129
+
@@ -42,7 +42,15 @@ from magic_hour.resources.v1.ai_talking_photo import (
42
42
  AiTalkingPhotoClient,
43
43
  AsyncAiTalkingPhotoClient,
44
44
  )
45
+ from magic_hour.resources.v1.ai_voice_generator import (
46
+ AiVoiceGeneratorClient,
47
+ AsyncAiVoiceGeneratorClient,
48
+ )
45
49
  from magic_hour.resources.v1.animation import AnimationClient, AsyncAnimationClient
50
+ from magic_hour.resources.v1.audio_projects import (
51
+ AsyncAudioProjectsClient,
52
+ AudioProjectsClient,
53
+ )
46
54
  from magic_hour.resources.v1.auto_subtitle_generator import (
47
55
  AsyncAutoSubtitleGeneratorClient,
48
56
  AutoSubtitleGeneratorClient,
@@ -125,6 +133,8 @@ class V1Client:
125
133
  self.photo_colorizer = PhotoColorizerClient(base_client=self._base_client)
126
134
  self.text_to_video = TextToVideoClient(base_client=self._base_client)
127
135
  self.video_to_video = VideoToVideoClient(base_client=self._base_client)
136
+ self.audio_projects = AudioProjectsClient(base_client=self._base_client)
137
+ self.ai_voice_generator = AiVoiceGeneratorClient(base_client=self._base_client)
128
138
 
129
139
 
130
140
  class AsyncV1Client:
@@ -171,3 +181,7 @@ class AsyncV1Client:
171
181
  self.photo_colorizer = AsyncPhotoColorizerClient(base_client=self._base_client)
172
182
  self.text_to_video = AsyncTextToVideoClient(base_client=self._base_client)
173
183
  self.video_to_video = AsyncVideoToVideoClient(base_client=self._base_client)
184
+ self.audio_projects = AsyncAudioProjectsClient(base_client=self._base_client)
185
+ self.ai_voice_generator = AsyncAiVoiceGeneratorClient(
186
+ base_client=self._base_client
187
+ )
@@ -1,7 +1,9 @@
1
- # v1_face_detection
1
+ # v1.face_detection
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Face Detection Generate Workflow <a name="generate"></a>
@@ -55,7 +57,6 @@ res = await client.v1.face_detection.generate(
55
57
  ```
56
58
 
57
59
  <!-- CUSTOM DOCS END -->
58
-
59
60
  ### Get face detection details <a name="get"></a>
60
61
 
61
62
  Get the details of a face detection task.
@@ -152,3 +153,4 @@ res = await client.v1.face_detection.create(
152
153
  ##### Example
153
154
  `{"credits_charged": 123, "id": "uuid-example"}`
154
155
 
156
+
@@ -1,7 +1,9 @@
1
- # v1_face_swap
1
+ # v1.face_swap
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Face Swap Generate Workflow <a name="generate"></a>
@@ -85,7 +87,6 @@ res = await client.v1.face_swap.generate(
85
87
  ```
86
88
 
87
89
  <!-- CUSTOM DOCS END -->
88
-
89
90
  ### Face Swap video <a name="create"></a>
90
91
 
91
92
  Create a Face Swap 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.
@@ -177,3 +178,5 @@ res = await client.v1.face_swap.create(
177
178
 
178
179
  ##### Example
179
180
  `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
181
+
182
+
@@ -1,7 +1,9 @@
1
- # v1_face_swap_photo
1
+ # v1.face_swap_photo
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Face Swap Photo Generate Workflow <a name="generate"></a>
@@ -77,7 +79,6 @@ res = await client.v1.face_swap_photo.generate(
77
79
  ```
78
80
 
79
81
  <!-- CUSTOM DOCS END -->
80
-
81
82
  ### Face Swap Photo <a name="create"></a>
82
83
 
83
84
  Create a face swap photo. Each photo costs 5 credits. The height/width of the output image depends on your subscription. Please refer to our [pricing](https://magichour.ai/pricing) page for more details
@@ -151,3 +152,4 @@ res = await client.v1.face_swap_photo.create(
151
152
  ##### Example
152
153
  `{"credits_charged": 5, "frame_cost": 5, "id": "cuid-example"}`
153
154
 
155
+
@@ -1,4 +1,6 @@
1
- # v1_files
1
+ # v1.files
2
+
3
+
2
4
 
3
5
  <!-- CUSTOM DOCS START -->
4
6
 
@@ -35,6 +37,7 @@ file_path = await client.v1.files.upload_file("/path/to/your/image.jpg")
35
37
 
36
38
  <!-- CUSTOM DOCS END -->
37
39
 
40
+
38
41
  ## Submodules
39
42
  - [upload_urls](upload_urls/README.md) - upload_urls
40
43
 
@@ -1,11 +1,7 @@
1
- # v1_files_upload_urls
1
+ # v1.files.upload_urls
2
2
 
3
3
  ## Module Functions
4
4
 
5
- <!-- CUSTOM DOCS START -->
6
-
7
- <!-- CUSTOM DOCS END -->
8
-
9
5
  ### Generate asset upload urls <a name="create"></a>
10
6
 
11
7
  Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the [Input Files Guide](/integration/input-files) for more details.
@@ -77,3 +73,4 @@ res = await client.v1.files.upload_urls.create(
77
73
  ##### Example
78
74
  `{"items": [{"expires_at": "2024-07-25T16:56:21.932Z", "file_path": "api-assets/id/video.mp4", "upload_url": "https://videos.magichour.ai/api-assets/id/video.mp4?auth-value=1234567890"}, {"expires_at": "2024-07-25T16:56:21.932Z", "file_path": "api-assets/id/audio.mp3", "upload_url": "https://videos.magichour.ai/api-assets/id/audio.mp3?auth-value=1234567890"}]}`
79
75
 
76
+
@@ -1,7 +1,9 @@
1
- # v1_image_background_remover
1
+ # v1.image_background_remover
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Image Background Remover Generate Workflow <a name="generate"></a>
@@ -63,7 +65,6 @@ res = await client.v1.image_background_remover.generate(
63
65
  ```
64
66
 
65
67
  <!-- CUSTOM DOCS END -->
66
-
67
68
  ### Image Background Remover <a name="create"></a>
68
69
 
69
70
  Remove background from image. Each image costs 5 credits.
@@ -121,3 +122,4 @@ res = await client.v1.image_background_remover.create(
121
122
  ##### Example
122
123
  `{"credits_charged": 5, "frame_cost": 5, "id": "cuid-example"}`
123
124
 
125
+
@@ -1,7 +1,9 @@
1
- # v1_image_projects
1
+ # v1.image_projects
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Check results <a name="check-result"></a>
@@ -49,7 +51,6 @@ res = await client.v1.image_projects.check_result(
49
51
  ```
50
52
 
51
53
  <!-- CUSTOM DOCS END -->
52
-
53
54
  ### Delete image <a name="delete"></a>
54
55
 
55
56
  Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.
@@ -135,3 +136,4 @@ res = await client.v1.image_projects.get(id="cuid-example")
135
136
  ##### Example
136
137
  `{"created_at": "1970-01-01T00:00:00", "credits_charged": 5, "downloads": [{"expires_at": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.png"}], "enabled": True, "error": {"code": "no_source_face", "message": "Please use an image with a detectable face"}, "id": "cuid-example", "image_count": 1, "name": "Example Name", "status": "complete", "total_frame_cost": 5, "type_": "AI_IMAGE"}`
137
138
 
139
+
@@ -1,7 +1,9 @@
1
- # v1_image_to_video
1
+ # v1.image_to_video
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Image To Video Generate Workflow <a name="generate"></a>
@@ -61,7 +63,6 @@ res = await client.v1.image_to_video.generate(
61
63
  ```
62
64
 
63
65
  <!-- CUSTOM DOCS END -->
64
-
65
66
  ### Image-to-Video <a name="create"></a>
66
67
 
67
68
  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.
@@ -127,3 +128,4 @@ res = await client.v1.image_to_video.create(
127
128
  ##### Example
128
129
  `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
129
130
 
131
+
@@ -1,7 +1,9 @@
1
- # v1_lip_sync
1
+ # v1.lip_sync
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Lip Sync Generate Workflow <a name="generate"></a>
@@ -71,7 +73,6 @@ res = await client.v1.lip_sync.generate(
71
73
  ```
72
74
 
73
75
  <!-- CUSTOM DOCS END -->
74
-
75
76
  ### Lip Sync <a name="create"></a>
76
77
 
77
78
  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.
@@ -147,3 +148,4 @@ res = await client.v1.lip_sync.create(
147
148
  ##### Example
148
149
  `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
149
150
 
151
+
@@ -1,7 +1,9 @@
1
- # v1_photo_colorizer
1
+ # v1.photo_colorizer
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Photo Colorizer Generate Workflow <a name="generate"></a>
@@ -55,7 +57,6 @@ res = await client.v1.photo_colorizer.generate(
55
57
  ```
56
58
 
57
59
  <!-- CUSTOM DOCS END -->
58
-
59
60
  ### Photo Colorizer <a name="create"></a>
60
61
 
61
62
  Colorize image. Each image costs 5 credits.
@@ -104,3 +105,4 @@ res = await client.v1.photo_colorizer.create(
104
105
  ##### Example
105
106
  `{"credits_charged": 5, "frame_cost": 5, "id": "cuid-example"}`
106
107
 
108
+
@@ -1,7 +1,9 @@
1
- # v1_text_to_video
1
+ # v1.text_to_video
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Text To Video Generate Workflow <a name="generate"></a>
@@ -63,7 +65,6 @@ res = await client.v1.text_to_video.generate(
63
65
  ```
64
66
 
65
67
  <!-- CUSTOM DOCS END -->
66
-
67
68
  ### Text-to-Video <a name="create"></a>
68
69
 
69
70
  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.
@@ -127,3 +128,4 @@ res = await client.v1.text_to_video.create(
127
128
  ##### Example
128
129
  `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
129
130
 
131
+
@@ -1,7 +1,9 @@
1
- # v1_video_projects
1
+ # v1.video_projects
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Check results <a name="check-result"></a>
@@ -49,7 +51,6 @@ res = await client.v1.video_projects.check_result(
49
51
  ```
50
52
 
51
53
  <!-- CUSTOM DOCS END -->
52
-
53
54
  ### Delete video <a name="delete"></a>
54
55
 
55
56
  Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
@@ -135,3 +136,4 @@ res = await client.v1.video_projects.get(id="cuid-example")
135
136
  ##### Example
136
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}`
137
138
 
139
+
@@ -1,7 +1,9 @@
1
- # v1_video_to_video
1
+ # v1.video_to_video
2
2
 
3
3
  ## Module Functions
4
4
 
5
+
6
+
5
7
  <!-- CUSTOM DOCS START -->
6
8
 
7
9
  ### Video To Video Generate Workflow <a name="generate"></a>
@@ -77,7 +79,6 @@ res = await client.v1.video_to_video.generate(
77
79
  ```
78
80
 
79
81
  <!-- CUSTOM DOCS END -->
80
-
81
82
  ### Video-to-Video <a name="create"></a>
82
83
 
83
84
  Create a Video 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.
@@ -97,12 +98,12 @@ Get more information about this mode at our [product page](https://magichour.ai/
97
98
  | `└─ youtube_url` | ✗ | — | Using a youtube video as the input source. This field is required if `video_source` is `youtube` | `"http://www.example.com"` |
98
99
  | `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
100
  | `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
- | `style` | ✓ | ✗ | | `{"art_style": "3D Render", "model": "default", "prompt": "string", "prompt_type": "default", "version": "default"}` |
101
+ | `style` | ✓ | ✗ | | `{"art_style": "3D Render", "model": "default", "prompt_type": "default", "version": "default"}` |
101
102
  | `└─ art_style` | ✓ | — | | `"3D Render"` |
102
- | `└─ model` | | — | * `Dreamshaper` - a good all-around model that works for both animations as well as realism. * `Absolute Reality` - better at realism, but you'll often get similar results with Dreamshaper as well. * `Flat 2D Anime` - best for a flat illustration style that's common in most anime. * `default` - use the default recommended model for the selected art style. | `"default"` |
103
- | `└─ prompt` | | — | The prompt used for the video. Prompt is required if `prompt_type` is `custom` or `append_default`. If `prompt_type` is `default`, then the `prompt` value passed will be ignored. | `"string"` |
104
- | `└─ prompt_type` | | — | * `default` - Use the default recommended prompt for the art style. * `custom` - Only use the prompt passed in the API. Note: for v1, lora prompt will still be auto added to apply the art style properly. * `append_default` - Add the default recommended prompt to the end of the prompt passed in the API. | `"default"` |
105
- | `└─ version` | | — | * `v1` - more detail, closer prompt adherence, and frame-by-frame previews. * `v2` - faster, more consistent, and less noisy. * `default` - use the default version for the selected art style. | `"default"` |
103
+ | `└─ model` | | — | * `Dreamshaper` - a good all-around model that works for both animations as well as realism. * `Absolute Reality` - better at realism, but you'll often get similar results with Dreamshaper as well. * `Flat 2D Anime` - best for a flat illustration style that's common in most anime. * `default` - use the default recommended model for the selected art style. | `"default"` |
104
+ | `└─ prompt` | | — | The prompt used for the video. Prompt is required if `prompt_type` is `custom` or `append_default`. If `prompt_type` is `default`, then the `prompt` value passed will be ignored. | `"string"` |
105
+ | `└─ prompt_type` | | — | * `default` - Use the default recommended prompt for the art style. * `custom` - Only use the prompt passed in the API. Note: for v1, lora prompt will still be auto added to apply the art style properly. * `append_default` - Add the default recommended prompt to the end of the prompt passed in the API. | `"default"` |
106
+ | `└─ version` | | — | * `v1` - more detail, closer prompt adherence, and frame-by-frame previews. * `v2` - faster, more consistent, and less noisy. * `default` - use the default version for the selected art style. | `"default"` |
106
107
  | `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"` |
107
108
  | `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` |
108
109
  | `name` | ✗ | ✗ | The name of video. This value is mainly used for your own identification of the video. | `"Video To Video video"` |
@@ -122,7 +123,6 @@ res = client.v1.video_to_video.create(
122
123
  style={
123
124
  "art_style": "3D Render",
124
125
  "model": "default",
125
- "prompt": "string",
126
126
  "prompt_type": "default",
127
127
  "version": "default",
128
128
  },
@@ -146,7 +146,6 @@ res = await client.v1.video_to_video.create(
146
146
  style={
147
147
  "art_style": "3D Render",
148
148
  "model": "default",
149
- "prompt": "string",
150
149
  "prompt_type": "default",
151
150
  "version": "default",
152
151
  },
@@ -164,3 +163,4 @@ res = await client.v1.video_to_video.create(
164
163
  ##### Example
165
164
  `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
166
165
 
166
+
@@ -206,7 +206,6 @@ class VideoToVideoClient:
206
206
  style={
207
207
  "art_style": "3D Render",
208
208
  "model": "default",
209
- "prompt": "string",
210
209
  "prompt_type": "default",
211
210
  "version": "default",
212
211
  },
@@ -425,7 +424,6 @@ class AsyncVideoToVideoClient:
425
424
  style={
426
425
  "art_style": "3D Render",
427
426
  "model": "default",
428
- "prompt": "string",
429
427
  "prompt_type": "default",
430
428
  "version": "default",
431
429
  },
@@ -11,7 +11,13 @@ from .v1_ai_meme_generator_create_response import V1AiMemeGeneratorCreateRespons
11
11
  from .v1_ai_photo_editor_create_response import V1AiPhotoEditorCreateResponse
12
12
  from .v1_ai_qr_code_generator_create_response import V1AiQrCodeGeneratorCreateResponse
13
13
  from .v1_ai_talking_photo_create_response import V1AiTalkingPhotoCreateResponse
14
+ from .v1_ai_voice_generator_create_response import V1AiVoiceGeneratorCreateResponse
14
15
  from .v1_animation_create_response import V1AnimationCreateResponse
16
+ from .v1_audio_projects_get_response import V1AudioProjectsGetResponse
17
+ from .v1_audio_projects_get_response_downloads_item import (
18
+ V1AudioProjectsGetResponseDownloadsItem,
19
+ )
20
+ from .v1_audio_projects_get_response_error import V1AudioProjectsGetResponseError
15
21
  from .v1_auto_subtitle_generator_create_response import (
16
22
  V1AutoSubtitleGeneratorCreateResponse,
17
23
  )
@@ -59,7 +65,11 @@ __all__ = [
59
65
  "V1AiPhotoEditorCreateResponse",
60
66
  "V1AiQrCodeGeneratorCreateResponse",
61
67
  "V1AiTalkingPhotoCreateResponse",
68
+ "V1AiVoiceGeneratorCreateResponse",
62
69
  "V1AnimationCreateResponse",
70
+ "V1AudioProjectsGetResponse",
71
+ "V1AudioProjectsGetResponseDownloadsItem",
72
+ "V1AudioProjectsGetResponseError",
63
73
  "V1AutoSubtitleGeneratorCreateResponse",
64
74
  "V1FaceDetectionCreateResponse",
65
75
  "V1FaceDetectionGetResponse",
@@ -0,0 +1,27 @@
1
+ import pydantic
2
+
3
+
4
+ class V1AiVoiceGeneratorCreateResponse(pydantic.BaseModel):
5
+ """
6
+ Success
7
+ """
8
+
9
+ model_config = pydantic.ConfigDict(
10
+ arbitrary_types_allowed=True,
11
+ populate_by_name=True,
12
+ )
13
+
14
+ credits_charged: int = pydantic.Field(
15
+ alias="credits_charged",
16
+ )
17
+ """
18
+ The amount of credits deducted from your account to generate the audio. We charge credits right when the request is made.
19
+
20
+ If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.
21
+ """
22
+ id: str = pydantic.Field(
23
+ alias="id",
24
+ )
25
+ """
26
+ Unique ID of the audio. This value can be used in the [get audio project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch additional details such as status
27
+ """