magic_hour 0.26.0__py3-none-any.whl → 0.27.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.
- magic_hour/environment.py +1 -1
- magic_hour/resources/v1/auto_subtitle_generator/README.md +58 -0
- magic_hour/resources/v1/auto_subtitle_generator/__init__.py +4 -0
- magic_hour/resources/v1/auto_subtitle_generator/client.py +169 -0
- magic_hour/resources/v1/client.py +10 -0
- magic_hour/resources/v1/image_to_video/README.md +1 -3
- magic_hour/resources/v1/image_to_video/client.py +10 -8
- magic_hour/types/models/__init__.py +4 -0
- magic_hour/types/models/v1_auto_subtitle_generator_create_response.py +35 -0
- magic_hour/types/params/__init__.py +24 -0
- magic_hour/types/params/v1_auto_subtitle_generator_create_body.py +78 -0
- magic_hour/types/params/v1_auto_subtitle_generator_create_body_assets.py +28 -0
- magic_hour/types/params/v1_auto_subtitle_generator_create_body_style.py +56 -0
- magic_hour/types/params/v1_auto_subtitle_generator_create_body_style_custom_config.py +86 -0
- magic_hour/types/params/v1_image_to_video_create_body.py +3 -3
- {magic_hour-0.26.0.dist-info → magic_hour-0.27.0.dist-info}/METADATA +5 -1
- {magic_hour-0.26.0.dist-info → magic_hour-0.27.0.dist-info}/RECORD +19 -11
- {magic_hour-0.26.0.dist-info → magic_hour-0.27.0.dist-info}/LICENSE +0 -0
- {magic_hour-0.26.0.dist-info → magic_hour-0.27.0.dist-info}/WHEEL +0 -0
magic_hour/environment.py
CHANGED
|
@@ -6,7 +6,7 @@ class Environment(enum.Enum):
|
|
|
6
6
|
"""Pre-defined base URLs for the API"""
|
|
7
7
|
|
|
8
8
|
ENVIRONMENT = "https://api.magichour.ai"
|
|
9
|
-
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.
|
|
9
|
+
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.27.0"
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def _get_base_url(
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
### Auto Subtitle Generator <a name="create"></a>
|
|
3
|
+
|
|
4
|
+
Automatically generate subtitles for your video in multiple languages.
|
|
5
|
+
|
|
6
|
+
**API Endpoint**: `POST /v1/auto-subtitle-generator`
|
|
7
|
+
|
|
8
|
+
#### Parameters
|
|
9
|
+
|
|
10
|
+
| Parameter | Required | Description | Example |
|
|
11
|
+
|-----------|:--------:|-------------|--------|
|
|
12
|
+
| `assets` | ✓ | Provide the assets for auto subtitle generator | `{"video_file_path": "api-assets/id/1234.mp4"}` |
|
|
13
|
+
| `end_seconds` | ✓ | The end time of the input video in seconds | `15.0` |
|
|
14
|
+
| `start_seconds` | ✓ | The start time of the input video in seconds | `0.0` |
|
|
15
|
+
| `style` | ✓ | Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided. * If only `.style.template` is provided, default values for the template will be used. * If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`. * If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used. To use custom config only, the following `custom_config` params are required: * `.style.custom_config.font` * `.style.custom_config.text_color` * `.style.custom_config.vertical_position` * `.style.custom_config.horizontal_position` | `{}` |
|
|
16
|
+
| `name` | ✗ | The name of video | `"Auto Subtitle video"` |
|
|
17
|
+
|
|
18
|
+
#### Synchronous Client
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
from magic_hour import Client
|
|
22
|
+
from os import getenv
|
|
23
|
+
|
|
24
|
+
client = Client(token=getenv("API_TOKEN"))
|
|
25
|
+
res = client.v1.auto_subtitle_generator.create(
|
|
26
|
+
assets={"video_file_path": "api-assets/id/1234.mp4"},
|
|
27
|
+
end_seconds=15.0,
|
|
28
|
+
start_seconds=0.0,
|
|
29
|
+
style={},
|
|
30
|
+
name="Auto Subtitle video",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### Asynchronous Client
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from magic_hour import AsyncClient
|
|
39
|
+
from os import getenv
|
|
40
|
+
|
|
41
|
+
client = AsyncClient(token=getenv("API_TOKEN"))
|
|
42
|
+
res = await client.v1.auto_subtitle_generator.create(
|
|
43
|
+
assets={"video_file_path": "api-assets/id/1234.mp4"},
|
|
44
|
+
end_seconds=15.0,
|
|
45
|
+
start_seconds=0.0,
|
|
46
|
+
style={},
|
|
47
|
+
name="Auto Subtitle video",
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Response
|
|
53
|
+
|
|
54
|
+
##### Type
|
|
55
|
+
[V1AutoSubtitleGeneratorCreateResponse](/magic_hour/types/models/v1_auto_subtitle_generator_create_response.py)
|
|
56
|
+
|
|
57
|
+
##### Example
|
|
58
|
+
`{"credits_charged": 450, "estimated_frame_cost": 450, "id": "clx7uu86w0a5qp55yxz315r6r"}`
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
|
|
3
|
+
from magic_hour.core import (
|
|
4
|
+
AsyncBaseClient,
|
|
5
|
+
RequestOptions,
|
|
6
|
+
SyncBaseClient,
|
|
7
|
+
default_request_options,
|
|
8
|
+
to_encodable,
|
|
9
|
+
type_utils,
|
|
10
|
+
)
|
|
11
|
+
from magic_hour.types import models, params
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AutoSubtitleGeneratorClient:
|
|
15
|
+
def __init__(self, *, base_client: SyncBaseClient):
|
|
16
|
+
self._base_client = base_client
|
|
17
|
+
|
|
18
|
+
def create(
|
|
19
|
+
self,
|
|
20
|
+
*,
|
|
21
|
+
assets: params.V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
22
|
+
end_seconds: float,
|
|
23
|
+
start_seconds: float,
|
|
24
|
+
style: params.V1AutoSubtitleGeneratorCreateBodyStyle,
|
|
25
|
+
name: typing.Union[
|
|
26
|
+
typing.Optional[str], type_utils.NotGiven
|
|
27
|
+
] = type_utils.NOT_GIVEN,
|
|
28
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
29
|
+
) -> models.V1AutoSubtitleGeneratorCreateResponse:
|
|
30
|
+
"""
|
|
31
|
+
Auto Subtitle Generator
|
|
32
|
+
|
|
33
|
+
Automatically generate subtitles for your video in multiple languages.
|
|
34
|
+
|
|
35
|
+
POST /v1/auto-subtitle-generator
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
name: The name of video
|
|
39
|
+
assets: Provide the assets for auto subtitle generator
|
|
40
|
+
end_seconds: The end time of the input video in seconds
|
|
41
|
+
start_seconds: The start time of the input video in seconds
|
|
42
|
+
style: Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
43
|
+
* If only `.style.template` is provided, default values for the template will be used.
|
|
44
|
+
* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
45
|
+
* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
46
|
+
|
|
47
|
+
To use custom config only, the following `custom_config` params are required:
|
|
48
|
+
* `.style.custom_config.font`
|
|
49
|
+
* `.style.custom_config.text_color`
|
|
50
|
+
* `.style.custom_config.vertical_position`
|
|
51
|
+
* `.style.custom_config.horizontal_position`
|
|
52
|
+
|
|
53
|
+
request_options: Additional options to customize the HTTP request
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
Success
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
ApiError: A custom exception class that provides additional context
|
|
60
|
+
for API errors, including the HTTP status code and response body.
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
```py
|
|
64
|
+
client.v1.auto_subtitle_generator.create(
|
|
65
|
+
assets={"video_file_path": "api-assets/id/1234.mp4"},
|
|
66
|
+
end_seconds=15.0,
|
|
67
|
+
start_seconds=0.0,
|
|
68
|
+
style={},
|
|
69
|
+
name="Auto Subtitle video",
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
"""
|
|
73
|
+
_json = to_encodable(
|
|
74
|
+
item={
|
|
75
|
+
"name": name,
|
|
76
|
+
"assets": assets,
|
|
77
|
+
"end_seconds": end_seconds,
|
|
78
|
+
"start_seconds": start_seconds,
|
|
79
|
+
"style": style,
|
|
80
|
+
},
|
|
81
|
+
dump_with=params._SerializerV1AutoSubtitleGeneratorCreateBody,
|
|
82
|
+
)
|
|
83
|
+
return self._base_client.request(
|
|
84
|
+
method="POST",
|
|
85
|
+
path="/v1/auto-subtitle-generator",
|
|
86
|
+
auth_names=["bearerAuth"],
|
|
87
|
+
json=_json,
|
|
88
|
+
cast_to=models.V1AutoSubtitleGeneratorCreateResponse,
|
|
89
|
+
request_options=request_options or default_request_options(),
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class AsyncAutoSubtitleGeneratorClient:
|
|
94
|
+
def __init__(self, *, base_client: AsyncBaseClient):
|
|
95
|
+
self._base_client = base_client
|
|
96
|
+
|
|
97
|
+
async def create(
|
|
98
|
+
self,
|
|
99
|
+
*,
|
|
100
|
+
assets: params.V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
101
|
+
end_seconds: float,
|
|
102
|
+
start_seconds: float,
|
|
103
|
+
style: params.V1AutoSubtitleGeneratorCreateBodyStyle,
|
|
104
|
+
name: typing.Union[
|
|
105
|
+
typing.Optional[str], type_utils.NotGiven
|
|
106
|
+
] = type_utils.NOT_GIVEN,
|
|
107
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
108
|
+
) -> models.V1AutoSubtitleGeneratorCreateResponse:
|
|
109
|
+
"""
|
|
110
|
+
Auto Subtitle Generator
|
|
111
|
+
|
|
112
|
+
Automatically generate subtitles for your video in multiple languages.
|
|
113
|
+
|
|
114
|
+
POST /v1/auto-subtitle-generator
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
name: The name of video
|
|
118
|
+
assets: Provide the assets for auto subtitle generator
|
|
119
|
+
end_seconds: The end time of the input video in seconds
|
|
120
|
+
start_seconds: The start time of the input video in seconds
|
|
121
|
+
style: Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
122
|
+
* If only `.style.template` is provided, default values for the template will be used.
|
|
123
|
+
* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
124
|
+
* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
125
|
+
|
|
126
|
+
To use custom config only, the following `custom_config` params are required:
|
|
127
|
+
* `.style.custom_config.font`
|
|
128
|
+
* `.style.custom_config.text_color`
|
|
129
|
+
* `.style.custom_config.vertical_position`
|
|
130
|
+
* `.style.custom_config.horizontal_position`
|
|
131
|
+
|
|
132
|
+
request_options: Additional options to customize the HTTP request
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
Success
|
|
136
|
+
|
|
137
|
+
Raises:
|
|
138
|
+
ApiError: A custom exception class that provides additional context
|
|
139
|
+
for API errors, including the HTTP status code and response body.
|
|
140
|
+
|
|
141
|
+
Examples:
|
|
142
|
+
```py
|
|
143
|
+
await client.v1.auto_subtitle_generator.create(
|
|
144
|
+
assets={"video_file_path": "api-assets/id/1234.mp4"},
|
|
145
|
+
end_seconds=15.0,
|
|
146
|
+
start_seconds=0.0,
|
|
147
|
+
style={},
|
|
148
|
+
name="Auto Subtitle video",
|
|
149
|
+
)
|
|
150
|
+
```
|
|
151
|
+
"""
|
|
152
|
+
_json = to_encodable(
|
|
153
|
+
item={
|
|
154
|
+
"name": name,
|
|
155
|
+
"assets": assets,
|
|
156
|
+
"end_seconds": end_seconds,
|
|
157
|
+
"start_seconds": start_seconds,
|
|
158
|
+
"style": style,
|
|
159
|
+
},
|
|
160
|
+
dump_with=params._SerializerV1AutoSubtitleGeneratorCreateBody,
|
|
161
|
+
)
|
|
162
|
+
return await self._base_client.request(
|
|
163
|
+
method="POST",
|
|
164
|
+
path="/v1/auto-subtitle-generator",
|
|
165
|
+
auth_names=["bearerAuth"],
|
|
166
|
+
json=_json,
|
|
167
|
+
cast_to=models.V1AutoSubtitleGeneratorCreateResponse,
|
|
168
|
+
request_options=request_options or default_request_options(),
|
|
169
|
+
)
|
|
@@ -44,6 +44,10 @@ from magic_hour.resources.v1.ai_talking_photo import (
|
|
|
44
44
|
AsyncAiTalkingPhotoClient,
|
|
45
45
|
)
|
|
46
46
|
from magic_hour.resources.v1.animation import AnimationClient, AsyncAnimationClient
|
|
47
|
+
from magic_hour.resources.v1.auto_subtitle_generator import (
|
|
48
|
+
AsyncAutoSubtitleGeneratorClient,
|
|
49
|
+
AutoSubtitleGeneratorClient,
|
|
50
|
+
)
|
|
47
51
|
from magic_hour.resources.v1.face_swap import AsyncFaceSwapClient, FaceSwapClient
|
|
48
52
|
from magic_hour.resources.v1.face_swap_photo import (
|
|
49
53
|
AsyncFaceSwapPhotoClient,
|
|
@@ -102,6 +106,9 @@ class V1Client:
|
|
|
102
106
|
)
|
|
103
107
|
self.ai_talking_photo = AiTalkingPhotoClient(base_client=self._base_client)
|
|
104
108
|
self.animation = AnimationClient(base_client=self._base_client)
|
|
109
|
+
self.auto_subtitle_generator = AutoSubtitleGeneratorClient(
|
|
110
|
+
base_client=self._base_client
|
|
111
|
+
)
|
|
105
112
|
self.face_swap = FaceSwapClient(base_client=self._base_client)
|
|
106
113
|
self.face_swap_photo = FaceSwapPhotoClient(base_client=self._base_client)
|
|
107
114
|
self.files = FilesClient(base_client=self._base_client)
|
|
@@ -144,6 +151,9 @@ class AsyncV1Client:
|
|
|
144
151
|
)
|
|
145
152
|
self.ai_talking_photo = AsyncAiTalkingPhotoClient(base_client=self._base_client)
|
|
146
153
|
self.animation = AsyncAnimationClient(base_client=self._base_client)
|
|
154
|
+
self.auto_subtitle_generator = AsyncAutoSubtitleGeneratorClient(
|
|
155
|
+
base_client=self._base_client
|
|
156
|
+
)
|
|
147
157
|
self.face_swap = AsyncFaceSwapClient(base_client=self._base_client)
|
|
148
158
|
self.face_swap_photo = AsyncFaceSwapPhotoClient(base_client=self._base_client)
|
|
149
159
|
self.files = AsyncFilesClient(base_client=self._base_client)
|
|
@@ -14,10 +14,10 @@ Get more information about this mode at our [product page](/products/image-to-vi
|
|
|
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
|
-
| `style` | ✓ | Attributed used to dictate the style of the output | `{"prompt": "a dog running"}` |
|
|
18
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. | `960` |
|
|
19
18
|
| `name` | ✗ | The name of video | `"Image To Video video"` |
|
|
20
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"` |
|
|
20
|
+
| `style` | ✗ | Attributed used to dictate the style of the output | `{"prompt": "a dog running"}` |
|
|
21
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. | `512` |
|
|
22
22
|
|
|
23
23
|
#### Synchronous Client
|
|
@@ -30,7 +30,6 @@ client = Client(token=getenv("API_TOKEN"))
|
|
|
30
30
|
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
|
-
style={"prompt": "a dog running"},
|
|
34
33
|
height=960,
|
|
35
34
|
name="Image To Video video",
|
|
36
35
|
width=512,
|
|
@@ -48,7 +47,6 @@ client = AsyncClient(token=getenv("API_TOKEN"))
|
|
|
48
47
|
res = await client.v1.image_to_video.create(
|
|
49
48
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
50
49
|
end_seconds=5.0,
|
|
51
|
-
style={"prompt": "a dog running"},
|
|
52
50
|
height=960,
|
|
53
51
|
name="Image To Video video",
|
|
54
52
|
width=512,
|
|
@@ -21,7 +21,6 @@ class ImageToVideoClient:
|
|
|
21
21
|
*,
|
|
22
22
|
assets: params.V1ImageToVideoCreateBodyAssets,
|
|
23
23
|
end_seconds: float,
|
|
24
|
-
style: params.V1ImageToVideoCreateBodyStyle,
|
|
25
24
|
height: typing.Union[
|
|
26
25
|
typing.Optional[int], type_utils.NotGiven
|
|
27
26
|
] = type_utils.NOT_GIVEN,
|
|
@@ -32,6 +31,9 @@ class ImageToVideoClient:
|
|
|
32
31
|
typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
|
|
33
32
|
type_utils.NotGiven,
|
|
34
33
|
] = type_utils.NOT_GIVEN,
|
|
34
|
+
style: typing.Union[
|
|
35
|
+
typing.Optional[params.V1ImageToVideoCreateBodyStyle], type_utils.NotGiven
|
|
36
|
+
] = type_utils.NOT_GIVEN,
|
|
35
37
|
width: typing.Union[
|
|
36
38
|
typing.Optional[int], type_utils.NotGiven
|
|
37
39
|
] = type_utils.NOT_GIVEN,
|
|
@@ -58,12 +60,12 @@ class ImageToVideoClient:
|
|
|
58
60
|
- `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
59
61
|
- `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
60
62
|
- `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
63
|
+
style: Attributed used to dictate the style of the output
|
|
61
64
|
width: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
|
|
62
65
|
|
|
63
66
|
It is retained solely for backward compatibility and will be deprecated in the future.
|
|
64
67
|
assets: Provide the assets for image-to-video.
|
|
65
68
|
end_seconds: The total duration of the output video in seconds.
|
|
66
|
-
style: Attributed used to dictate the style of the output
|
|
67
69
|
request_options: Additional options to customize the HTTP request
|
|
68
70
|
|
|
69
71
|
Returns:
|
|
@@ -78,7 +80,6 @@ class ImageToVideoClient:
|
|
|
78
80
|
client.v1.image_to_video.create(
|
|
79
81
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
80
82
|
end_seconds=5.0,
|
|
81
|
-
style={"prompt": "a dog running"},
|
|
82
83
|
height=960,
|
|
83
84
|
name="Image To Video video",
|
|
84
85
|
width=512,
|
|
@@ -90,10 +91,10 @@ class ImageToVideoClient:
|
|
|
90
91
|
"height": height,
|
|
91
92
|
"name": name,
|
|
92
93
|
"resolution": resolution,
|
|
94
|
+
"style": style,
|
|
93
95
|
"width": width,
|
|
94
96
|
"assets": assets,
|
|
95
97
|
"end_seconds": end_seconds,
|
|
96
|
-
"style": style,
|
|
97
98
|
},
|
|
98
99
|
dump_with=params._SerializerV1ImageToVideoCreateBody,
|
|
99
100
|
)
|
|
@@ -116,7 +117,6 @@ class AsyncImageToVideoClient:
|
|
|
116
117
|
*,
|
|
117
118
|
assets: params.V1ImageToVideoCreateBodyAssets,
|
|
118
119
|
end_seconds: float,
|
|
119
|
-
style: params.V1ImageToVideoCreateBodyStyle,
|
|
120
120
|
height: typing.Union[
|
|
121
121
|
typing.Optional[int], type_utils.NotGiven
|
|
122
122
|
] = type_utils.NOT_GIVEN,
|
|
@@ -127,6 +127,9 @@ class AsyncImageToVideoClient:
|
|
|
127
127
|
typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
|
|
128
128
|
type_utils.NotGiven,
|
|
129
129
|
] = type_utils.NOT_GIVEN,
|
|
130
|
+
style: typing.Union[
|
|
131
|
+
typing.Optional[params.V1ImageToVideoCreateBodyStyle], type_utils.NotGiven
|
|
132
|
+
] = type_utils.NOT_GIVEN,
|
|
130
133
|
width: typing.Union[
|
|
131
134
|
typing.Optional[int], type_utils.NotGiven
|
|
132
135
|
] = type_utils.NOT_GIVEN,
|
|
@@ -153,12 +156,12 @@ class AsyncImageToVideoClient:
|
|
|
153
156
|
- `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
154
157
|
- `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
155
158
|
- `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
159
|
+
style: Attributed used to dictate the style of the output
|
|
156
160
|
width: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
|
|
157
161
|
|
|
158
162
|
It is retained solely for backward compatibility and will be deprecated in the future.
|
|
159
163
|
assets: Provide the assets for image-to-video.
|
|
160
164
|
end_seconds: The total duration of the output video in seconds.
|
|
161
|
-
style: Attributed used to dictate the style of the output
|
|
162
165
|
request_options: Additional options to customize the HTTP request
|
|
163
166
|
|
|
164
167
|
Returns:
|
|
@@ -173,7 +176,6 @@ class AsyncImageToVideoClient:
|
|
|
173
176
|
await client.v1.image_to_video.create(
|
|
174
177
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
175
178
|
end_seconds=5.0,
|
|
176
|
-
style={"prompt": "a dog running"},
|
|
177
179
|
height=960,
|
|
178
180
|
name="Image To Video video",
|
|
179
181
|
width=512,
|
|
@@ -185,10 +187,10 @@ class AsyncImageToVideoClient:
|
|
|
185
187
|
"height": height,
|
|
186
188
|
"name": name,
|
|
187
189
|
"resolution": resolution,
|
|
190
|
+
"style": style,
|
|
188
191
|
"width": width,
|
|
189
192
|
"assets": assets,
|
|
190
193
|
"end_seconds": end_seconds,
|
|
191
|
-
"style": style,
|
|
192
194
|
},
|
|
193
195
|
dump_with=params._SerializerV1ImageToVideoCreateBody,
|
|
194
196
|
)
|
|
@@ -12,6 +12,9 @@ from .v1_ai_photo_editor_create_response import V1AiPhotoEditorCreateResponse
|
|
|
12
12
|
from .v1_ai_qr_code_generator_create_response import V1AiQrCodeGeneratorCreateResponse
|
|
13
13
|
from .v1_ai_talking_photo_create_response import V1AiTalkingPhotoCreateResponse
|
|
14
14
|
from .v1_animation_create_response import V1AnimationCreateResponse
|
|
15
|
+
from .v1_auto_subtitle_generator_create_response import (
|
|
16
|
+
V1AutoSubtitleGeneratorCreateResponse,
|
|
17
|
+
)
|
|
15
18
|
from .v1_face_swap_create_response import V1FaceSwapCreateResponse
|
|
16
19
|
from .v1_face_swap_photo_create_response import V1FaceSwapPhotoCreateResponse
|
|
17
20
|
from .v1_files_upload_urls_create_response import V1FilesUploadUrlsCreateResponse
|
|
@@ -52,6 +55,7 @@ __all__ = [
|
|
|
52
55
|
"V1AiQrCodeGeneratorCreateResponse",
|
|
53
56
|
"V1AiTalkingPhotoCreateResponse",
|
|
54
57
|
"V1AnimationCreateResponse",
|
|
58
|
+
"V1AutoSubtitleGeneratorCreateResponse",
|
|
55
59
|
"V1FaceSwapCreateResponse",
|
|
56
60
|
"V1FaceSwapPhotoCreateResponse",
|
|
57
61
|
"V1FilesUploadUrlsCreateResponse",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class V1AutoSubtitleGeneratorCreateResponse(pydantic.BaseModel):
|
|
5
|
+
"""
|
|
6
|
+
Success
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
model_config = pydantic.ConfigDict(
|
|
10
|
+
arbitrary_types_allowed=True,
|
|
11
|
+
populate_by_name=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
22
|
+
estimated_frame_cost: int = pydantic.Field(
|
|
23
|
+
alias="estimated_frame_cost",
|
|
24
|
+
)
|
|
25
|
+
"""
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
29
|
+
"""
|
|
30
|
+
id: str = pydantic.Field(
|
|
31
|
+
alias="id",
|
|
32
|
+
)
|
|
33
|
+
"""
|
|
34
|
+
Unique ID of the video. This value can be used in the [get video project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch additional details such as status
|
|
35
|
+
"""
|
|
@@ -122,6 +122,22 @@ from .v1_animation_create_body_style import (
|
|
|
122
122
|
V1AnimationCreateBodyStyle,
|
|
123
123
|
_SerializerV1AnimationCreateBodyStyle,
|
|
124
124
|
)
|
|
125
|
+
from .v1_auto_subtitle_generator_create_body import (
|
|
126
|
+
V1AutoSubtitleGeneratorCreateBody,
|
|
127
|
+
_SerializerV1AutoSubtitleGeneratorCreateBody,
|
|
128
|
+
)
|
|
129
|
+
from .v1_auto_subtitle_generator_create_body_assets import (
|
|
130
|
+
V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
131
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyAssets,
|
|
132
|
+
)
|
|
133
|
+
from .v1_auto_subtitle_generator_create_body_style import (
|
|
134
|
+
V1AutoSubtitleGeneratorCreateBodyStyle,
|
|
135
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyle,
|
|
136
|
+
)
|
|
137
|
+
from .v1_auto_subtitle_generator_create_body_style_custom_config import (
|
|
138
|
+
V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
139
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
140
|
+
)
|
|
125
141
|
from .v1_face_swap_create_body import (
|
|
126
142
|
V1FaceSwapCreateBody,
|
|
127
143
|
_SerializerV1FaceSwapCreateBody,
|
|
@@ -233,6 +249,10 @@ __all__ = [
|
|
|
233
249
|
"V1AnimationCreateBody",
|
|
234
250
|
"V1AnimationCreateBodyAssets",
|
|
235
251
|
"V1AnimationCreateBodyStyle",
|
|
252
|
+
"V1AutoSubtitleGeneratorCreateBody",
|
|
253
|
+
"V1AutoSubtitleGeneratorCreateBodyAssets",
|
|
254
|
+
"V1AutoSubtitleGeneratorCreateBodyStyle",
|
|
255
|
+
"V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig",
|
|
236
256
|
"V1FaceSwapCreateBody",
|
|
237
257
|
"V1FaceSwapCreateBodyAssets",
|
|
238
258
|
"V1FaceSwapPhotoCreateBody",
|
|
@@ -284,6 +304,10 @@ __all__ = [
|
|
|
284
304
|
"_SerializerV1AnimationCreateBody",
|
|
285
305
|
"_SerializerV1AnimationCreateBodyAssets",
|
|
286
306
|
"_SerializerV1AnimationCreateBodyStyle",
|
|
307
|
+
"_SerializerV1AutoSubtitleGeneratorCreateBody",
|
|
308
|
+
"_SerializerV1AutoSubtitleGeneratorCreateBodyAssets",
|
|
309
|
+
"_SerializerV1AutoSubtitleGeneratorCreateBodyStyle",
|
|
310
|
+
"_SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig",
|
|
287
311
|
"_SerializerV1FaceSwapCreateBody",
|
|
288
312
|
"_SerializerV1FaceSwapCreateBodyAssets",
|
|
289
313
|
"_SerializerV1FaceSwapPhotoCreateBody",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_auto_subtitle_generator_create_body_assets import (
|
|
6
|
+
V1AutoSubtitleGeneratorCreateBodyAssets,
|
|
7
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyAssets,
|
|
8
|
+
)
|
|
9
|
+
from .v1_auto_subtitle_generator_create_body_style import (
|
|
10
|
+
V1AutoSubtitleGeneratorCreateBodyStyle,
|
|
11
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyle,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class V1AutoSubtitleGeneratorCreateBody(typing_extensions.TypedDict):
|
|
16
|
+
"""
|
|
17
|
+
V1AutoSubtitleGeneratorCreateBody
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
assets: typing_extensions.Required[V1AutoSubtitleGeneratorCreateBodyAssets]
|
|
21
|
+
"""
|
|
22
|
+
Provide the assets for auto subtitle generator
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
end_seconds: typing_extensions.Required[float]
|
|
26
|
+
"""
|
|
27
|
+
The end time of the input video in seconds
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
name: typing_extensions.NotRequired[str]
|
|
31
|
+
"""
|
|
32
|
+
The name of video
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
start_seconds: typing_extensions.Required[float]
|
|
36
|
+
"""
|
|
37
|
+
The start time of the input video in seconds
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
style: typing_extensions.Required[V1AutoSubtitleGeneratorCreateBodyStyle]
|
|
41
|
+
"""
|
|
42
|
+
Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
43
|
+
* If only `.style.template` is provided, default values for the template will be used.
|
|
44
|
+
* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
45
|
+
* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
46
|
+
|
|
47
|
+
To use custom config only, the following `custom_config` params are required:
|
|
48
|
+
* `.style.custom_config.font`
|
|
49
|
+
* `.style.custom_config.text_color`
|
|
50
|
+
* `.style.custom_config.vertical_position`
|
|
51
|
+
* `.style.custom_config.horizontal_position`
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class _SerializerV1AutoSubtitleGeneratorCreateBody(pydantic.BaseModel):
|
|
57
|
+
"""
|
|
58
|
+
Serializer for V1AutoSubtitleGeneratorCreateBody handling case conversions
|
|
59
|
+
and file omissions as dictated by the API
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
model_config = pydantic.ConfigDict(
|
|
63
|
+
populate_by_name=True,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
assets: _SerializerV1AutoSubtitleGeneratorCreateBodyAssets = pydantic.Field(
|
|
67
|
+
alias="assets",
|
|
68
|
+
)
|
|
69
|
+
end_seconds: float = pydantic.Field(
|
|
70
|
+
alias="end_seconds",
|
|
71
|
+
)
|
|
72
|
+
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
73
|
+
start_seconds: float = pydantic.Field(
|
|
74
|
+
alias="start_seconds",
|
|
75
|
+
)
|
|
76
|
+
style: _SerializerV1AutoSubtitleGeneratorCreateBodyStyle = pydantic.Field(
|
|
77
|
+
alias="style",
|
|
78
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing_extensions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class V1AutoSubtitleGeneratorCreateBodyAssets(typing_extensions.TypedDict):
|
|
6
|
+
"""
|
|
7
|
+
Provide the assets for auto subtitle generator
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
video_file_path: typing_extensions.Required[str]
|
|
11
|
+
"""
|
|
12
|
+
This is the video used to add subtitles. This value can be either the `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls), or the url of the file.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class _SerializerV1AutoSubtitleGeneratorCreateBodyAssets(pydantic.BaseModel):
|
|
17
|
+
"""
|
|
18
|
+
Serializer for V1AutoSubtitleGeneratorCreateBodyAssets handling case conversions
|
|
19
|
+
and file omissions as dictated by the API
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
model_config = pydantic.ConfigDict(
|
|
23
|
+
populate_by_name=True,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
video_file_path: str = pydantic.Field(
|
|
27
|
+
alias="video_file_path",
|
|
28
|
+
)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
from .v1_auto_subtitle_generator_create_body_style_custom_config import (
|
|
6
|
+
V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
7
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1AutoSubtitleGeneratorCreateBodyStyle(typing_extensions.TypedDict):
|
|
12
|
+
"""
|
|
13
|
+
Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided.
|
|
14
|
+
* If only `.style.template` is provided, default values for the template will be used.
|
|
15
|
+
* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.
|
|
16
|
+
* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.
|
|
17
|
+
|
|
18
|
+
To use custom config only, the following `custom_config` params are required:
|
|
19
|
+
* `.style.custom_config.font`
|
|
20
|
+
* `.style.custom_config.text_color`
|
|
21
|
+
* `.style.custom_config.vertical_position`
|
|
22
|
+
* `.style.custom_config.horizontal_position`
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
custom_config: typing_extensions.NotRequired[
|
|
27
|
+
V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig
|
|
28
|
+
]
|
|
29
|
+
"""
|
|
30
|
+
Custom subtitle configuration.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
template: typing_extensions.NotRequired[
|
|
34
|
+
typing_extensions.Literal["cinematic", "highlight", "karaoke", "minimalist"]
|
|
35
|
+
]
|
|
36
|
+
"""
|
|
37
|
+
Preset subtitle templates. Please visit https://magichour.ai/create/auto-subtitle-generator to see the style of the existing templates.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class _SerializerV1AutoSubtitleGeneratorCreateBodyStyle(pydantic.BaseModel):
|
|
42
|
+
"""
|
|
43
|
+
Serializer for V1AutoSubtitleGeneratorCreateBodyStyle handling case conversions
|
|
44
|
+
and file omissions as dictated by the API
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
model_config = pydantic.ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
custom_config: typing.Optional[
|
|
52
|
+
_SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig
|
|
53
|
+
] = pydantic.Field(alias="custom_config", default=None)
|
|
54
|
+
template: typing.Optional[
|
|
55
|
+
typing_extensions.Literal["cinematic", "highlight", "karaoke", "minimalist"]
|
|
56
|
+
] = pydantic.Field(alias="template", default=None)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import pydantic
|
|
2
|
+
import typing
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig(typing_extensions.TypedDict):
|
|
7
|
+
"""
|
|
8
|
+
Custom subtitle configuration.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
font: typing_extensions.NotRequired[str]
|
|
12
|
+
"""
|
|
13
|
+
Font name from Google Fonts. Not all fonts support all languages or character sets.
|
|
14
|
+
We recommend verifying language support and appearance directly on https://fonts.google.com before use.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
font_size: typing_extensions.NotRequired[float]
|
|
18
|
+
"""
|
|
19
|
+
Font size in pixels. If not provided, the font size is automatically calculated based on the video resolution.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
font_style: typing_extensions.NotRequired[str]
|
|
23
|
+
"""
|
|
24
|
+
Font style (e.g., normal, italic, bold)
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
highlighted_text_color: typing_extensions.NotRequired[str]
|
|
28
|
+
"""
|
|
29
|
+
Color used to highlight the current spoken text
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
horizontal_position: typing_extensions.NotRequired[str]
|
|
33
|
+
"""
|
|
34
|
+
Horizontal alignment of the text (e.g., left, center, right)
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
stroke_color: typing_extensions.NotRequired[str]
|
|
38
|
+
"""
|
|
39
|
+
Stroke (outline) color of the text
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
stroke_width: typing_extensions.NotRequired[float]
|
|
43
|
+
"""
|
|
44
|
+
Width of the text stroke in pixels. If `stroke_color` is provided, but `stroke_width` is not, the `stroke_width` will be calculated automatically based on the font size.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
text_color: typing_extensions.NotRequired[str]
|
|
48
|
+
"""
|
|
49
|
+
Primary text color in hex format
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
vertical_position: typing_extensions.NotRequired[str]
|
|
53
|
+
"""
|
|
54
|
+
Vertical alignment of the text (e.g., top, center, bottom)
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class _SerializerV1AutoSubtitleGeneratorCreateBodyStyleCustomConfig(pydantic.BaseModel):
|
|
59
|
+
"""
|
|
60
|
+
Serializer for V1AutoSubtitleGeneratorCreateBodyStyleCustomConfig handling case conversions
|
|
61
|
+
and file omissions as dictated by the API
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
model_config = pydantic.ConfigDict(
|
|
65
|
+
populate_by_name=True,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
font: typing.Optional[str] = pydantic.Field(alias="font", default=None)
|
|
69
|
+
font_size: typing.Optional[float] = pydantic.Field(alias="font_size", default=None)
|
|
70
|
+
font_style: typing.Optional[str] = pydantic.Field(alias="font_style", default=None)
|
|
71
|
+
highlighted_text_color: typing.Optional[str] = pydantic.Field(
|
|
72
|
+
alias="highlighted_text_color", default=None
|
|
73
|
+
)
|
|
74
|
+
horizontal_position: typing.Optional[str] = pydantic.Field(
|
|
75
|
+
alias="horizontal_position", default=None
|
|
76
|
+
)
|
|
77
|
+
stroke_color: typing.Optional[str] = pydantic.Field(
|
|
78
|
+
alias="stroke_color", default=None
|
|
79
|
+
)
|
|
80
|
+
stroke_width: typing.Optional[float] = pydantic.Field(
|
|
81
|
+
alias="stroke_width", default=None
|
|
82
|
+
)
|
|
83
|
+
text_color: typing.Optional[str] = pydantic.Field(alias="text_color", default=None)
|
|
84
|
+
vertical_position: typing.Optional[str] = pydantic.Field(
|
|
85
|
+
alias="vertical_position", default=None
|
|
86
|
+
)
|
|
@@ -51,7 +51,7 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
|
|
|
51
51
|
- `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
52
52
|
"""
|
|
53
53
|
|
|
54
|
-
style: typing_extensions.
|
|
54
|
+
style: typing_extensions.NotRequired[V1ImageToVideoCreateBodyStyle]
|
|
55
55
|
"""
|
|
56
56
|
Attributed used to dictate the style of the output
|
|
57
57
|
"""
|
|
@@ -85,7 +85,7 @@ class _SerializerV1ImageToVideoCreateBody(pydantic.BaseModel):
|
|
|
85
85
|
resolution: typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]] = (
|
|
86
86
|
pydantic.Field(alias="resolution", default=None)
|
|
87
87
|
)
|
|
88
|
-
style: _SerializerV1ImageToVideoCreateBodyStyle = pydantic.Field(
|
|
89
|
-
alias="style",
|
|
88
|
+
style: typing.Optional[_SerializerV1ImageToVideoCreateBodyStyle] = pydantic.Field(
|
|
89
|
+
alias="style", default=None
|
|
90
90
|
)
|
|
91
91
|
width: typing.Optional[int] = pydantic.Field(alias="width", default=None)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: magic_hour
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.27.0
|
|
4
4
|
Summary: Python SDK for Magic Hour API
|
|
5
5
|
Requires-Python: >=3.8,<4.0
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -107,6 +107,10 @@ client = AsyncClient(token="my api key")
|
|
|
107
107
|
|
|
108
108
|
* [create](magic_hour/resources/v1/animation/README.md#create) - Animation
|
|
109
109
|
|
|
110
|
+
### [v1.auto_subtitle_generator](magic_hour/resources/v1/auto_subtitle_generator/README.md)
|
|
111
|
+
|
|
112
|
+
* [create](magic_hour/resources/v1/auto_subtitle_generator/README.md#create) - Auto Subtitle Generator
|
|
113
|
+
|
|
110
114
|
### [v1.face_swap](magic_hour/resources/v1/face_swap/README.md)
|
|
111
115
|
|
|
112
116
|
* [create](magic_hour/resources/v1/face_swap/README.md#create) - Face Swap video
|
|
@@ -10,7 +10,7 @@ magic_hour/core/request.py,sha256=_ikn8iZ2fU9Ubqnt7M9hdEnXGV6AAFHJYmDKBtxEY4I,52
|
|
|
10
10
|
magic_hour/core/response.py,sha256=Sl7nPL2axmz7em_6d9TkFSnQQKUpalWaVWbPPWoXJgM,10180
|
|
11
11
|
magic_hour/core/type_utils.py,sha256=4bU9WXnMXJ6YTtuqOMiB8t6Xw0RlfVWJ-IDBONlqEtQ,461
|
|
12
12
|
magic_hour/core/utils.py,sha256=34SiC1vw2A0TkYHONgMA_d09soIIYiiBWRXCZGdwGIk,1669
|
|
13
|
-
magic_hour/environment.py,sha256=
|
|
13
|
+
magic_hour/environment.py,sha256=nDuJaqUs8aPAtnp7_Ybc_0rk7mKYOshyh2L1GIDolpY,535
|
|
14
14
|
magic_hour/resources/v1/__init__.py,sha256=Aj0sjVcoijjQyieNBxv2_uewPYC2vO2UG-ehoBgCz5E,86
|
|
15
15
|
magic_hour/resources/v1/ai_clothes_changer/README.md,sha256=x9cVTx9nHsyIutYjoUk1DeJg55cti6DAN_C-kBI_47Q,1564
|
|
16
16
|
magic_hour/resources/v1/ai_clothes_changer/__init__.py,sha256=6W_Y2HxG2sDOBiJyzngK3Q2S3xfQgpK-j8xFRmBAhbQ,142
|
|
@@ -48,7 +48,10 @@ magic_hour/resources/v1/ai_talking_photo/client.py,sha256=Y4p5HAlbCAe2NNqekdllSZ
|
|
|
48
48
|
magic_hour/resources/v1/animation/README.md,sha256=mCsyVlyEbffbtClSETSEMvdYksORQF_-_J5-VpoQvCI,2784
|
|
49
49
|
magic_hour/resources/v1/animation/__init__.py,sha256=M6KUe6TEZl_DAdyn1HFQ2kHYanZo6xy3mvUdCN264hQ,114
|
|
50
50
|
magic_hour/resources/v1/animation/client.py,sha256=YYjggl_hszTW-Sn9SFs3m7bz7PvtRTruhHSSnrkkD9c,6401
|
|
51
|
-
magic_hour/resources/v1/
|
|
51
|
+
magic_hour/resources/v1/auto_subtitle_generator/README.md,sha256=sg2GpGO_4dl_FAVzNf-DdisQMB5GyO971T1IFBZflHw,2238
|
|
52
|
+
magic_hour/resources/v1/auto_subtitle_generator/__init__.py,sha256=dnWFEiSdIl3AwFVprqWHSMzqpeHgZz9wPEMxm7c3Xnc,162
|
|
53
|
+
magic_hour/resources/v1/auto_subtitle_generator/client.py,sha256=6HvbAVsB9cJol6ul_3WNy-NebMSmZ28FJykBRytYRvE,6267
|
|
54
|
+
magic_hour/resources/v1/client.py,sha256=FCY0SI1tYEK8hs3JbSdQuMODC5n0uLoteFh4oLaZvqg,7286
|
|
52
55
|
magic_hour/resources/v1/face_swap/README.md,sha256=-bENF57lpZQu55C1psxKc45Ev1kMcD8GYWXGxa9hbzU,3334
|
|
53
56
|
magic_hour/resources/v1/face_swap/__init__.py,sha256=lyg5uAHyYHEUVAiAZtP3zwjGCEGqq8IWbQKexVdhr00,110
|
|
54
57
|
magic_hour/resources/v1/face_swap/client.py,sha256=-BpJae7J4PZPUG45BMA3HBB2XhrbHpgWqwwyaDFH88A,8519
|
|
@@ -66,9 +69,9 @@ magic_hour/resources/v1/image_background_remover/client.py,sha256=A6T1Kq3Lh4dsCV
|
|
|
66
69
|
magic_hour/resources/v1/image_projects/README.md,sha256=iarr0Cu2a_ls4A6_NtjeDxNVhIsP5ZuFHMNidUh2oiE,2524
|
|
67
70
|
magic_hour/resources/v1/image_projects/__init__.py,sha256=oBlV4e5IVYe8SclhoEy2VOYB53kKP2DORXwcztAwU3E,130
|
|
68
71
|
magic_hour/resources/v1/image_projects/client.py,sha256=FbqvgvoLFcAjBtqgGtQZMNT8jG5f2bJH7Poxod446sw,5527
|
|
69
|
-
magic_hour/resources/v1/image_to_video/README.md,sha256=
|
|
72
|
+
magic_hour/resources/v1/image_to_video/README.md,sha256=ZRBTdv5WnpQzejVdDoga4YM5lYy5gIvdD_-hfePSZGo,2726
|
|
70
73
|
magic_hour/resources/v1/image_to_video/__init__.py,sha256=tY_ABo6evwKQBRSq-M84lNX-pXqmxoozukmrO6NhCgA,126
|
|
71
|
-
magic_hour/resources/v1/image_to_video/client.py,sha256=
|
|
74
|
+
magic_hour/resources/v1/image_to_video/client.py,sha256=dQ6RxISgqRTKAeL3UlfaToRm34OhmnY5tM5VRCbJFcY,8180
|
|
72
75
|
magic_hour/resources/v1/lip_sync/README.md,sha256=vJaOR5E2m3TFSgiF6oQr4DpgX8i9L5Fk5r_HjXK2qmM,3674
|
|
73
76
|
magic_hour/resources/v1/lip_sync/__init__.py,sha256=MlKUAoHNSKcuNzVyqNfLnLtD_PsqEn3l1TtVpPC1JqQ,106
|
|
74
77
|
magic_hour/resources/v1/lip_sync/client.py,sha256=LnIzY3bTqSwB0h-44d9Escv7iQAiYsGOSzL4GKn3iMs,9475
|
|
@@ -84,7 +87,7 @@ magic_hour/resources/v1/video_projects/client.py,sha256=JvhYhf3phYkdVj8VpWxvxF8q
|
|
|
84
87
|
magic_hour/resources/v1/video_to_video/README.md,sha256=-b1nUKbUxXgtffS0yNPmvkYGL8ZVSAM4K3cVfT4-ghs,4081
|
|
85
88
|
magic_hour/resources/v1/video_to_video/__init__.py,sha256=1SHaRLlsrlBkdxxKBYgdbHrGATlRvqlXc22RpjjHaOA,126
|
|
86
89
|
magic_hour/resources/v1/video_to_video/client.py,sha256=WFmYL3ZBLyKLDBOOOc9tJigtwviI6JLjbH7yJSsiIyM,10404
|
|
87
|
-
magic_hour/types/models/__init__.py,sha256=
|
|
90
|
+
magic_hour/types/models/__init__.py,sha256=Kd0_aVtbVhB36cD7P9VnqvELSySOKqjHjLyXTsuEnLs,3686
|
|
88
91
|
magic_hour/types/models/v1_ai_clothes_changer_create_response.py,sha256=rQJqlDf7Ql46hR4eAepU6SnZS3fH-gewmSJ-OvEY5K0,1102
|
|
89
92
|
magic_hour/types/models/v1_ai_face_editor_create_response.py,sha256=pGpfZMCRhhDYCV-tj3hfmuXvQPhb44csnyrcwh9tfQM,1098
|
|
90
93
|
magic_hour/types/models/v1_ai_gif_generator_create_response.py,sha256=3T7PE17mdU9msZTfl2Gw-u1mTbjZiJm7gAxgIICloN4,1100
|
|
@@ -97,6 +100,7 @@ magic_hour/types/models/v1_ai_photo_editor_create_response.py,sha256=HHIFywFl57Z
|
|
|
97
100
|
magic_hour/types/models/v1_ai_qr_code_generator_create_response.py,sha256=dwTaT_H6h6yJ4tJti_W0bpLjglK_hiZk14NJnsD_1Gw,1103
|
|
98
101
|
magic_hour/types/models/v1_ai_talking_photo_create_response.py,sha256=4dnMUHVcVAVxywGPj_2wcH_BOCjS6qh_loyMszJVzBY,1348
|
|
99
102
|
magic_hour/types/models/v1_animation_create_response.py,sha256=EXgZ-7dGPSKgGDyG72r_273vxXYsOkKHbvmujmmCE-c,1343
|
|
103
|
+
magic_hour/types/models/v1_auto_subtitle_generator_create_response.py,sha256=HGwpgKkYBToPRhbGX7SfjP1HwaAQF-mMszxGNsP_Yhg,1355
|
|
100
104
|
magic_hour/types/models/v1_face_swap_create_response.py,sha256=hbVncqJZ4_57DX6k6ufG9ipIEqbMaT9jiCn59LOgPiw,1342
|
|
101
105
|
magic_hour/types/models/v1_face_swap_photo_create_response.py,sha256=6SQ4lbfHGsZRoDS1PVatqpZN6pOuFL0rqimObYrq7X4,1099
|
|
102
106
|
magic_hour/types/models/v1_files_upload_urls_create_response.py,sha256=ecdnxoo-ZBTa2kAusHq4nyz6RdugzyN7w4oazJt5ri0,460
|
|
@@ -114,7 +118,7 @@ magic_hour/types/models/v1_video_projects_get_response_download.py,sha256=nudDCN
|
|
|
114
118
|
magic_hour/types/models/v1_video_projects_get_response_downloads_item.py,sha256=DlUuLBSGa7jWoozxferkaOsGc4jASItcjjWbBXGu620,410
|
|
115
119
|
magic_hour/types/models/v1_video_projects_get_response_error.py,sha256=49QxnXAmYHcvSWuuhbQZeGlUfqVcO4YwZ414GczQnvA,568
|
|
116
120
|
magic_hour/types/models/v1_video_to_video_create_response.py,sha256=HCquU2Dciu6jCvhlpce8sGg1CypZngvtrvkwyCWOkSY,1346
|
|
117
|
-
magic_hour/types/params/__init__.py,sha256=
|
|
121
|
+
magic_hour/types/params/__init__.py,sha256=cwbeO89Vtr-Sl5e0g3H63AAynR4g8f_XwgY5oeg2CCk,12214
|
|
118
122
|
magic_hour/types/params/v1_ai_clothes_changer_create_body.py,sha256=X5koqrTxYLiKcRMqPF7r-VwQzy4r_7k81o1289zHJvo,1006
|
|
119
123
|
magic_hour/types/params/v1_ai_clothes_changer_create_body_assets.py,sha256=GGnXOExxXtnHT9wQpDCEkLHQlQB5MbAbYuU47iHGf70,1509
|
|
120
124
|
magic_hour/types/params/v1_ai_face_editor_create_body.py,sha256=sF7mJbqratllYwQ3slqUTctOndAYnH9BDMJu-49Db-4,1313
|
|
@@ -146,6 +150,10 @@ magic_hour/types/params/v1_ai_talking_photo_create_body_style.py,sha256=iXKnUrYr
|
|
|
146
150
|
magic_hour/types/params/v1_animation_create_body.py,sha256=QB0zxAhNDV8BEd6vuTAUoZaF2E0PNKwfzV7OrsdueGk,2221
|
|
147
151
|
magic_hour/types/params/v1_animation_create_body_assets.py,sha256=Iot5sbRKLlXCHZS1X5tGICSRKOneBcqaDijYm5_BaUA,1965
|
|
148
152
|
magic_hour/types/params/v1_animation_create_body_style.py,sha256=1ujex1BXQq70rp10Pxs8wkb6pkM7fP6fojTW5ATdXyo,8045
|
|
153
|
+
magic_hour/types/params/v1_auto_subtitle_generator_create_body.py,sha256=QdCJtdSvGJQXTlfi7AHuj388BLYZFyIzEJbOLWmztyA,2502
|
|
154
|
+
magic_hour/types/params/v1_auto_subtitle_generator_create_body_assets.py,sha256=-VQ9lC0jQRSwjIkWKvpxhcfrLivtlHKB251ueq0yXDA,878
|
|
155
|
+
magic_hour/types/params/v1_auto_subtitle_generator_create_body_style.py,sha256=IRF1I56TacS5DSWsCeccYfgy2nq5C9q0bivkih8YIsk,2129
|
|
156
|
+
magic_hour/types/params/v1_auto_subtitle_generator_create_body_style_custom_config.py,sha256=D5R-Ek62hDy0lUjBkLtyVlqwxA9pU7EO92AT4EuI8yI,2866
|
|
149
157
|
magic_hour/types/params/v1_face_swap_create_body.py,sha256=ZLxWHSs5NHHeBxBAE-8AEgUwEpEhpYQC4fW9dkmDXxQ,2923
|
|
150
158
|
magic_hour/types/params/v1_face_swap_create_body_assets.py,sha256=CYcleQ4o_YLxRjRiVRwB-L_Cr0WTjsb6417uwdT0fas,1888
|
|
151
159
|
magic_hour/types/params/v1_face_swap_photo_create_body.py,sha256=OYsrz7d7i7eg28bR_YS5ucl6k_bMhmNrOt2dF7MYdM4,979
|
|
@@ -154,7 +162,7 @@ magic_hour/types/params/v1_files_upload_urls_create_body.py,sha256=X6-ZcUqVVTM3w
|
|
|
154
162
|
magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py,sha256=I26O2Jx5_uhsCOrQCL_-wPeenu0rzhNwCDy0AEI6YuQ,962
|
|
155
163
|
magic_hour/types/params/v1_image_background_remover_create_body.py,sha256=l3sb8UTXjie3gMd4ZJhHik-N1o3zaVzsZ7xDaS_uTG4,1063
|
|
156
164
|
magic_hour/types/params/v1_image_background_remover_create_body_assets.py,sha256=aw9P_bdBTi8YMvgJxH8G0adwn1YswQzvtc0LgNAPQ8s,873
|
|
157
|
-
magic_hour/types/params/v1_image_to_video_create_body.py,sha256=
|
|
165
|
+
magic_hour/types/params/v1_image_to_video_create_body.py,sha256=HJdgEqafWBWKU0D5rhQudCXveVEEWTgys1BXiYn6rv4,3020
|
|
158
166
|
magic_hour/types/params/v1_image_to_video_create_body_assets.py,sha256=J39Jv5Bv9bjMaskHzMfbO5VE6QWh-saN3eWOUPRtuRk,830
|
|
159
167
|
magic_hour/types/params/v1_image_to_video_create_body_style.py,sha256=fBrqT9sLY7ljMpNjUUaD03fRPSt4FzQTvgOp0auL0wI,1669
|
|
160
168
|
magic_hour/types/params/v1_lip_sync_create_body.py,sha256=PkmNdjIq7RfS_qMBsbiFEEf7Wl841pggPhCgmY6y8VI,3358
|
|
@@ -166,7 +174,7 @@ magic_hour/types/params/v1_text_to_video_create_body_style.py,sha256=cEZO917hipE
|
|
|
166
174
|
magic_hour/types/params/v1_video_to_video_create_body.py,sha256=Pgok6GUVHrpW6H3rwdVFA3O5YJvjgviCZkmmHddOSWo,3802
|
|
167
175
|
magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=_-6iA5d8ndka6iJWyWvlJwzRkQcmurJE6hkg-fDwBmQ,1531
|
|
168
176
|
magic_hour/types/params/v1_video_to_video_create_body_style.py,sha256=RrDBhN2KQnCf9hGsnl3sAYvuFRsxth2JXfe5la0IYJg,5749
|
|
169
|
-
magic_hour-0.
|
|
170
|
-
magic_hour-0.
|
|
171
|
-
magic_hour-0.
|
|
172
|
-
magic_hour-0.
|
|
177
|
+
magic_hour-0.27.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
|
|
178
|
+
magic_hour-0.27.0.dist-info/METADATA,sha256=a2PceNMJLIxt33oYo1yohkDbm4qB5smvup6KVjmDuTY,5840
|
|
179
|
+
magic_hour-0.27.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
180
|
+
magic_hour-0.27.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|