magic_hour 0.25.0__py3-none-any.whl → 0.26.1__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/ai_gif_generator/README.md +2 -2
- magic_hour/resources/v1/ai_gif_generator/client.py +2 -2
- magic_hour/resources/v1/image_to_video/README.md +2 -3
- magic_hour/resources/v1/image_to_video/client.py +33 -8
- magic_hour/resources/v1/text_to_video/README.md +1 -0
- magic_hour/resources/v1/text_to_video/client.py +22 -0
- magic_hour/types/params/v1_image_to_video_create_body.py +18 -3
- magic_hour/types/params/v1_image_to_video_create_body_style.py +10 -3
- magic_hour/types/params/v1_text_to_video_create_body.py +15 -0
- magic_hour/types/params/v1_text_to_video_create_body_style.py +5 -2
- {magic_hour-0.25.0.dist-info → magic_hour-0.26.1.dist-info}/METADATA +1 -1
- {magic_hour-0.25.0.dist-info → magic_hour-0.26.1.dist-info}/RECORD +15 -15
- {magic_hour-0.25.0.dist-info → magic_hour-0.26.1.dist-info}/LICENSE +0 -0
- {magic_hour-0.25.0.dist-info → magic_hour-0.26.1.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.26.1"
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def _get_base_url(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
### AI GIFs <a name="create"></a>
|
|
3
3
|
|
|
4
|
-
Create an AI GIF. Each GIF costs
|
|
4
|
+
Create an AI GIF. Each GIF costs 50 credits.
|
|
5
5
|
|
|
6
6
|
**API Endpoint**: `POST /v1/ai-gif-generator`
|
|
7
7
|
|
|
@@ -44,4 +44,4 @@ res = await client.v1.ai_gif_generator.create(
|
|
|
44
44
|
[V1AiGifGeneratorCreateResponse](/magic_hour/types/models/v1_ai_gif_generator_create_response.py)
|
|
45
45
|
|
|
46
46
|
##### Example
|
|
47
|
-
`{"credits_charged":
|
|
47
|
+
`{"credits_charged": 50, "frame_cost": 50, "id": "clx7uu86w0a5qp55yxz315r6r"}`
|
|
@@ -27,7 +27,7 @@ class AiGifGeneratorClient:
|
|
|
27
27
|
"""
|
|
28
28
|
AI GIFs
|
|
29
29
|
|
|
30
|
-
Create an AI GIF. Each GIF costs
|
|
30
|
+
Create an AI GIF. Each GIF costs 50 credits.
|
|
31
31
|
|
|
32
32
|
POST /v1/ai-gif-generator
|
|
33
33
|
|
|
@@ -80,7 +80,7 @@ class AsyncAiGifGeneratorClient:
|
|
|
80
80
|
"""
|
|
81
81
|
AI GIFs
|
|
82
82
|
|
|
83
|
-
Create an AI GIF. Each GIF costs
|
|
83
|
+
Create an AI GIF. Each GIF costs 50 credits.
|
|
84
84
|
|
|
85
85
|
POST /v1/ai-gif-generator
|
|
86
86
|
|
|
@@ -14,9 +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"` |
|
|
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"}` |
|
|
20
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` |
|
|
21
22
|
|
|
22
23
|
#### Synchronous Client
|
|
@@ -29,7 +30,6 @@ client = Client(token=getenv("API_TOKEN"))
|
|
|
29
30
|
res = client.v1.image_to_video.create(
|
|
30
31
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
31
32
|
end_seconds=5.0,
|
|
32
|
-
style={"prompt": "a dog running"},
|
|
33
33
|
height=960,
|
|
34
34
|
name="Image To Video video",
|
|
35
35
|
width=512,
|
|
@@ -47,7 +47,6 @@ client = AsyncClient(token=getenv("API_TOKEN"))
|
|
|
47
47
|
res = await client.v1.image_to_video.create(
|
|
48
48
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
49
49
|
end_seconds=5.0,
|
|
50
|
-
style={"prompt": "a dog running"},
|
|
51
50
|
height=960,
|
|
52
51
|
name="Image To Video video",
|
|
53
52
|
width=512,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import typing
|
|
2
|
+
import typing_extensions
|
|
2
3
|
|
|
3
4
|
from magic_hour.core import (
|
|
4
5
|
AsyncBaseClient,
|
|
@@ -20,13 +21,19 @@ class ImageToVideoClient:
|
|
|
20
21
|
*,
|
|
21
22
|
assets: params.V1ImageToVideoCreateBodyAssets,
|
|
22
23
|
end_seconds: float,
|
|
23
|
-
style: params.V1ImageToVideoCreateBodyStyle,
|
|
24
24
|
height: typing.Union[
|
|
25
25
|
typing.Optional[int], type_utils.NotGiven
|
|
26
26
|
] = type_utils.NOT_GIVEN,
|
|
27
27
|
name: typing.Union[
|
|
28
28
|
typing.Optional[str], type_utils.NotGiven
|
|
29
29
|
] = type_utils.NOT_GIVEN,
|
|
30
|
+
resolution: typing.Union[
|
|
31
|
+
typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
|
|
32
|
+
type_utils.NotGiven,
|
|
33
|
+
] = type_utils.NOT_GIVEN,
|
|
34
|
+
style: typing.Union[
|
|
35
|
+
typing.Optional[params.V1ImageToVideoCreateBodyStyle], type_utils.NotGiven
|
|
36
|
+
] = type_utils.NOT_GIVEN,
|
|
30
37
|
width: typing.Union[
|
|
31
38
|
typing.Optional[int], type_utils.NotGiven
|
|
32
39
|
] = type_utils.NOT_GIVEN,
|
|
@@ -47,12 +54,18 @@ class ImageToVideoClient:
|
|
|
47
54
|
|
|
48
55
|
It is retained solely for backward compatibility and will be deprecated in the future.
|
|
49
56
|
name: The name of video
|
|
57
|
+
resolution: Controls the output video resolution. Defaults to `720p` if not specified.
|
|
58
|
+
|
|
59
|
+
**Options:**
|
|
60
|
+
- `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
61
|
+
- `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
62
|
+
- `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
63
|
+
style: Attributed used to dictate the style of the output
|
|
50
64
|
width: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
|
|
51
65
|
|
|
52
66
|
It is retained solely for backward compatibility and will be deprecated in the future.
|
|
53
67
|
assets: Provide the assets for image-to-video.
|
|
54
68
|
end_seconds: The total duration of the output video in seconds.
|
|
55
|
-
style: Attributed used to dictate the style of the output
|
|
56
69
|
request_options: Additional options to customize the HTTP request
|
|
57
70
|
|
|
58
71
|
Returns:
|
|
@@ -67,7 +80,6 @@ class ImageToVideoClient:
|
|
|
67
80
|
client.v1.image_to_video.create(
|
|
68
81
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
69
82
|
end_seconds=5.0,
|
|
70
|
-
style={"prompt": "a dog running"},
|
|
71
83
|
height=960,
|
|
72
84
|
name="Image To Video video",
|
|
73
85
|
width=512,
|
|
@@ -78,10 +90,11 @@ class ImageToVideoClient:
|
|
|
78
90
|
item={
|
|
79
91
|
"height": height,
|
|
80
92
|
"name": name,
|
|
93
|
+
"resolution": resolution,
|
|
94
|
+
"style": style,
|
|
81
95
|
"width": width,
|
|
82
96
|
"assets": assets,
|
|
83
97
|
"end_seconds": end_seconds,
|
|
84
|
-
"style": style,
|
|
85
98
|
},
|
|
86
99
|
dump_with=params._SerializerV1ImageToVideoCreateBody,
|
|
87
100
|
)
|
|
@@ -104,13 +117,19 @@ class AsyncImageToVideoClient:
|
|
|
104
117
|
*,
|
|
105
118
|
assets: params.V1ImageToVideoCreateBodyAssets,
|
|
106
119
|
end_seconds: float,
|
|
107
|
-
style: params.V1ImageToVideoCreateBodyStyle,
|
|
108
120
|
height: typing.Union[
|
|
109
121
|
typing.Optional[int], type_utils.NotGiven
|
|
110
122
|
] = type_utils.NOT_GIVEN,
|
|
111
123
|
name: typing.Union[
|
|
112
124
|
typing.Optional[str], type_utils.NotGiven
|
|
113
125
|
] = type_utils.NOT_GIVEN,
|
|
126
|
+
resolution: typing.Union[
|
|
127
|
+
typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
|
|
128
|
+
type_utils.NotGiven,
|
|
129
|
+
] = type_utils.NOT_GIVEN,
|
|
130
|
+
style: typing.Union[
|
|
131
|
+
typing.Optional[params.V1ImageToVideoCreateBodyStyle], type_utils.NotGiven
|
|
132
|
+
] = type_utils.NOT_GIVEN,
|
|
114
133
|
width: typing.Union[
|
|
115
134
|
typing.Optional[int], type_utils.NotGiven
|
|
116
135
|
] = type_utils.NOT_GIVEN,
|
|
@@ -131,12 +150,18 @@ class AsyncImageToVideoClient:
|
|
|
131
150
|
|
|
132
151
|
It is retained solely for backward compatibility and will be deprecated in the future.
|
|
133
152
|
name: The name of video
|
|
153
|
+
resolution: Controls the output video resolution. Defaults to `720p` if not specified.
|
|
154
|
+
|
|
155
|
+
**Options:**
|
|
156
|
+
- `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
157
|
+
- `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
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
|
|
134
160
|
width: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
|
|
135
161
|
|
|
136
162
|
It is retained solely for backward compatibility and will be deprecated in the future.
|
|
137
163
|
assets: Provide the assets for image-to-video.
|
|
138
164
|
end_seconds: The total duration of the output video in seconds.
|
|
139
|
-
style: Attributed used to dictate the style of the output
|
|
140
165
|
request_options: Additional options to customize the HTTP request
|
|
141
166
|
|
|
142
167
|
Returns:
|
|
@@ -151,7 +176,6 @@ class AsyncImageToVideoClient:
|
|
|
151
176
|
await client.v1.image_to_video.create(
|
|
152
177
|
assets={"image_file_path": "api-assets/id/1234.png"},
|
|
153
178
|
end_seconds=5.0,
|
|
154
|
-
style={"prompt": "a dog running"},
|
|
155
179
|
height=960,
|
|
156
180
|
name="Image To Video video",
|
|
157
181
|
width=512,
|
|
@@ -162,10 +186,11 @@ class AsyncImageToVideoClient:
|
|
|
162
186
|
item={
|
|
163
187
|
"height": height,
|
|
164
188
|
"name": name,
|
|
189
|
+
"resolution": resolution,
|
|
190
|
+
"style": style,
|
|
165
191
|
"width": width,
|
|
166
192
|
"assets": assets,
|
|
167
193
|
"end_seconds": end_seconds,
|
|
168
|
-
"style": style,
|
|
169
194
|
},
|
|
170
195
|
dump_with=params._SerializerV1ImageToVideoCreateBody,
|
|
171
196
|
)
|
|
@@ -16,6 +16,7 @@ Get more information about this mode at our [product page](/products/text-to-vid
|
|
|
16
16
|
| `orientation` | ✓ | Determines the orientation of the output video | `"landscape"` |
|
|
17
17
|
| `style` | ✓ | | `{"prompt": "a dog running"}` |
|
|
18
18
|
| `name` | ✗ | The name of video | `"Text To Video video"` |
|
|
19
|
+
| `resolution` | ✗ | Controls the output video resolution. Defaults to `720p` if not specified. **Options:** - `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds. - `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds. - `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier. | `"1080p"` |
|
|
19
20
|
|
|
20
21
|
#### Synchronous Client
|
|
21
22
|
|
|
@@ -25,6 +25,10 @@ class TextToVideoClient:
|
|
|
25
25
|
name: typing.Union[
|
|
26
26
|
typing.Optional[str], type_utils.NotGiven
|
|
27
27
|
] = type_utils.NOT_GIVEN,
|
|
28
|
+
resolution: typing.Union[
|
|
29
|
+
typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
|
|
30
|
+
type_utils.NotGiven,
|
|
31
|
+
] = type_utils.NOT_GIVEN,
|
|
28
32
|
request_options: typing.Optional[RequestOptions] = None,
|
|
29
33
|
) -> models.V1TextToVideoCreateResponse:
|
|
30
34
|
"""
|
|
@@ -39,6 +43,12 @@ class TextToVideoClient:
|
|
|
39
43
|
|
|
40
44
|
Args:
|
|
41
45
|
name: The name of video
|
|
46
|
+
resolution: Controls the output video resolution. Defaults to `720p` if not specified.
|
|
47
|
+
|
|
48
|
+
**Options:**
|
|
49
|
+
- `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
50
|
+
- `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
51
|
+
- `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
42
52
|
end_seconds: The total duration of the output video in seconds.
|
|
43
53
|
orientation: Determines the orientation of the output video
|
|
44
54
|
style: V1TextToVideoCreateBodyStyle
|
|
@@ -64,6 +74,7 @@ class TextToVideoClient:
|
|
|
64
74
|
_json = to_encodable(
|
|
65
75
|
item={
|
|
66
76
|
"name": name,
|
|
77
|
+
"resolution": resolution,
|
|
67
78
|
"end_seconds": end_seconds,
|
|
68
79
|
"orientation": orientation,
|
|
69
80
|
"style": style,
|
|
@@ -93,6 +104,10 @@ class AsyncTextToVideoClient:
|
|
|
93
104
|
name: typing.Union[
|
|
94
105
|
typing.Optional[str], type_utils.NotGiven
|
|
95
106
|
] = type_utils.NOT_GIVEN,
|
|
107
|
+
resolution: typing.Union[
|
|
108
|
+
typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
|
|
109
|
+
type_utils.NotGiven,
|
|
110
|
+
] = type_utils.NOT_GIVEN,
|
|
96
111
|
request_options: typing.Optional[RequestOptions] = None,
|
|
97
112
|
) -> models.V1TextToVideoCreateResponse:
|
|
98
113
|
"""
|
|
@@ -107,6 +122,12 @@ class AsyncTextToVideoClient:
|
|
|
107
122
|
|
|
108
123
|
Args:
|
|
109
124
|
name: The name of video
|
|
125
|
+
resolution: Controls the output video resolution. Defaults to `720p` if not specified.
|
|
126
|
+
|
|
127
|
+
**Options:**
|
|
128
|
+
- `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
129
|
+
- `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
130
|
+
- `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
110
131
|
end_seconds: The total duration of the output video in seconds.
|
|
111
132
|
orientation: Determines the orientation of the output video
|
|
112
133
|
style: V1TextToVideoCreateBodyStyle
|
|
@@ -132,6 +153,7 @@ class AsyncTextToVideoClient:
|
|
|
132
153
|
_json = to_encodable(
|
|
133
154
|
item={
|
|
134
155
|
"name": name,
|
|
156
|
+
"resolution": resolution,
|
|
135
157
|
"end_seconds": end_seconds,
|
|
136
158
|
"orientation": orientation,
|
|
137
159
|
"style": style,
|
|
@@ -39,7 +39,19 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
|
|
|
39
39
|
The name of video
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
resolution: typing_extensions.NotRequired[
|
|
43
|
+
typing_extensions.Literal["1080p", "480p", "720p"]
|
|
44
|
+
]
|
|
45
|
+
"""
|
|
46
|
+
Controls the output video resolution. Defaults to `720p` if not specified.
|
|
47
|
+
|
|
48
|
+
**Options:**
|
|
49
|
+
- `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
50
|
+
- `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
51
|
+
- `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
style: typing_extensions.NotRequired[V1ImageToVideoCreateBodyStyle]
|
|
43
55
|
"""
|
|
44
56
|
Attributed used to dictate the style of the output
|
|
45
57
|
"""
|
|
@@ -70,7 +82,10 @@ class _SerializerV1ImageToVideoCreateBody(pydantic.BaseModel):
|
|
|
70
82
|
)
|
|
71
83
|
height: typing.Optional[int] = pydantic.Field(alias="height", default=None)
|
|
72
84
|
name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
|
|
73
|
-
|
|
74
|
-
alias="
|
|
85
|
+
resolution: typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]] = (
|
|
86
|
+
pydantic.Field(alias="resolution", default=None)
|
|
87
|
+
)
|
|
88
|
+
style: typing.Optional[_SerializerV1ImageToVideoCreateBodyStyle] = pydantic.Field(
|
|
89
|
+
alias="style", default=None
|
|
75
90
|
)
|
|
76
91
|
width: typing.Optional[int] = pydantic.Field(alias="width", default=None)
|
|
@@ -10,7 +10,11 @@ class V1ImageToVideoCreateBodyStyle(typing_extensions.TypedDict):
|
|
|
10
10
|
|
|
11
11
|
high_quality: typing_extensions.NotRequired[bool]
|
|
12
12
|
"""
|
|
13
|
-
Deprecated: Please use `
|
|
13
|
+
Deprecated: Please use `resolution` instead. For backward compatibility,
|
|
14
|
+
* `false` maps to 720p resolution
|
|
15
|
+
* `true` maps to 1080p resolution
|
|
16
|
+
|
|
17
|
+
This field will be removed in a future version. Use the `resolution` field to directly specify the resolution.
|
|
14
18
|
"""
|
|
15
19
|
|
|
16
20
|
prompt: typing_extensions.NotRequired[str]
|
|
@@ -22,8 +26,11 @@ class V1ImageToVideoCreateBodyStyle(typing_extensions.TypedDict):
|
|
|
22
26
|
typing_extensions.Literal["quick", "studio"]
|
|
23
27
|
]
|
|
24
28
|
"""
|
|
25
|
-
|
|
26
|
-
*
|
|
29
|
+
DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
30
|
+
* `quick` maps to 720p resolution
|
|
31
|
+
* `studio` maps to 1080p resolution
|
|
32
|
+
|
|
33
|
+
This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
27
34
|
"""
|
|
28
35
|
|
|
29
36
|
|
|
@@ -30,6 +30,18 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict):
|
|
|
30
30
|
Determines the orientation of the output video
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
|
+
resolution: typing_extensions.NotRequired[
|
|
34
|
+
typing_extensions.Literal["1080p", "480p", "720p"]
|
|
35
|
+
]
|
|
36
|
+
"""
|
|
37
|
+
Controls the output video resolution. Defaults to `720p` if not specified.
|
|
38
|
+
|
|
39
|
+
**Options:**
|
|
40
|
+
- `480p` - Supports only 5 or 10 second videos. Output: 24fps. Cost: 120 credits per 5 seconds.
|
|
41
|
+
- `720p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 300 credits per 5 seconds.
|
|
42
|
+
- `1080p` - Supports videos between 5-60 seconds. Output: 30fps. Cost: 600 credits per 5 seconds. **Requires** `pro` or `business` tier.
|
|
43
|
+
"""
|
|
44
|
+
|
|
33
45
|
style: typing_extensions.Required[V1TextToVideoCreateBodyStyle]
|
|
34
46
|
|
|
35
47
|
|
|
@@ -52,6 +64,9 @@ class _SerializerV1TextToVideoCreateBody(pydantic.BaseModel):
|
|
|
52
64
|
alias="orientation",
|
|
53
65
|
)
|
|
54
66
|
)
|
|
67
|
+
resolution: typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]] = (
|
|
68
|
+
pydantic.Field(alias="resolution", default=None)
|
|
69
|
+
)
|
|
55
70
|
style: _SerializerV1TextToVideoCreateBodyStyle = pydantic.Field(
|
|
56
71
|
alias="style",
|
|
57
72
|
)
|
|
@@ -17,8 +17,11 @@ class V1TextToVideoCreateBodyStyle(typing_extensions.TypedDict):
|
|
|
17
17
|
typing_extensions.Literal["quick", "studio"]
|
|
18
18
|
]
|
|
19
19
|
"""
|
|
20
|
-
|
|
21
|
-
*
|
|
20
|
+
DEPRECATED: Please use `resolution` field instead. For backward compatibility:
|
|
21
|
+
* `quick` maps to 720p resolution
|
|
22
|
+
* `studio` maps to 1080p resolution
|
|
23
|
+
|
|
24
|
+
This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution.
|
|
22
25
|
"""
|
|
23
26
|
|
|
24
27
|
|
|
@@ -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=nO3oMEAusqtKDl5_d61c--RCy2Tf5P5qxCpl-RfhK3I,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
|
|
@@ -18,9 +18,9 @@ magic_hour/resources/v1/ai_clothes_changer/client.py,sha256=VRvAM-45M-1SYkZCKD1L
|
|
|
18
18
|
magic_hour/resources/v1/ai_face_editor/README.md,sha256=ohLKJ-E9ARV31juiDmCcD66l5mN9Y7sfRongT5WoK58,2697
|
|
19
19
|
magic_hour/resources/v1/ai_face_editor/__init__.py,sha256=RY8GBMQcqsDFbFcUuK-4LPvablq-U9XmSSlQk4HLKmM,126
|
|
20
20
|
magic_hour/resources/v1/ai_face_editor/client.py,sha256=N5toTWe-Ag2iAhwk-CbWQxGnK6fZ2uHAFEKx15SPl-I,5315
|
|
21
|
-
magic_hour/resources/v1/ai_gif_generator/README.md,sha256=
|
|
21
|
+
magic_hour/resources/v1/ai_gif_generator/README.md,sha256=HXT6TFc3H5pRTNhT6lgUi40ltfXlJVRRZBiig3wOf2w,1100
|
|
22
22
|
magic_hour/resources/v1/ai_gif_generator/__init__.py,sha256=SG_WmxUnpQWlfNQoHfdXPEGQEPC0WZPgom8ATaR9jiY,134
|
|
23
|
-
magic_hour/resources/v1/ai_gif_generator/client.py,sha256=
|
|
23
|
+
magic_hour/resources/v1/ai_gif_generator/client.py,sha256=k4wc4jE5LmjQlmpKdzE_IJDLhf44YcKW2Tl1Pjx4plY,3491
|
|
24
24
|
magic_hour/resources/v1/ai_headshot_generator/README.md,sha256=XtDTNS7IuT-4dB5yTojkoa4xCfKQhptg93yFhQxz3Ls,1373
|
|
25
25
|
magic_hour/resources/v1/ai_headshot_generator/__init__.py,sha256=4WZ3jfrL2yPhQaPalMJrUEykwUoF3KBtop2VJEij-0s,154
|
|
26
26
|
magic_hour/resources/v1/ai_headshot_generator/client.py,sha256=epFzgwy9AcDRXqLBSE8cJhNNYPFJubev4n8A_k8V10g,4161
|
|
@@ -66,18 +66,18 @@ magic_hour/resources/v1/image_background_remover/client.py,sha256=A6T1Kq3Lh4dsCV
|
|
|
66
66
|
magic_hour/resources/v1/image_projects/README.md,sha256=iarr0Cu2a_ls4A6_NtjeDxNVhIsP5ZuFHMNidUh2oiE,2524
|
|
67
67
|
magic_hour/resources/v1/image_projects/__init__.py,sha256=oBlV4e5IVYe8SclhoEy2VOYB53kKP2DORXwcztAwU3E,130
|
|
68
68
|
magic_hour/resources/v1/image_projects/client.py,sha256=FbqvgvoLFcAjBtqgGtQZMNT8jG5f2bJH7Poxod446sw,5527
|
|
69
|
-
magic_hour/resources/v1/image_to_video/README.md,sha256=
|
|
69
|
+
magic_hour/resources/v1/image_to_video/README.md,sha256=ZRBTdv5WnpQzejVdDoga4YM5lYy5gIvdD_-hfePSZGo,2726
|
|
70
70
|
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=
|
|
71
|
+
magic_hour/resources/v1/image_to_video/client.py,sha256=dQ6RxISgqRTKAeL3UlfaToRm34OhmnY5tM5VRCbJFcY,8180
|
|
72
72
|
magic_hour/resources/v1/lip_sync/README.md,sha256=vJaOR5E2m3TFSgiF6oQr4DpgX8i9L5Fk5r_HjXK2qmM,3674
|
|
73
73
|
magic_hour/resources/v1/lip_sync/__init__.py,sha256=MlKUAoHNSKcuNzVyqNfLnLtD_PsqEn3l1TtVpPC1JqQ,106
|
|
74
74
|
magic_hour/resources/v1/lip_sync/client.py,sha256=LnIzY3bTqSwB0h-44d9Escv7iQAiYsGOSzL4GKn3iMs,9475
|
|
75
75
|
magic_hour/resources/v1/photo_colorizer/README.md,sha256=vQU6emuGwMncXPrt5zucCDlvn7l0SJG-SZ1ze2UYjIM,1192
|
|
76
76
|
magic_hour/resources/v1/photo_colorizer/__init__.py,sha256=7rDjkeUzWG5GXw_4RD1XH7Ygy-_0_OUFX99IgE_RVbE,134
|
|
77
77
|
magic_hour/resources/v1/photo_colorizer/client.py,sha256=hsGfDYN4wjzxk4kM193IJhxgAp8XaMaPJ2biB4Y-yns,3591
|
|
78
|
-
magic_hour/resources/v1/text_to_video/README.md,sha256=
|
|
78
|
+
magic_hour/resources/v1/text_to_video/README.md,sha256=BH1IjiTV9YDzTtl3_A9qMnftKXi6JvMsxTgsURYjX9s,2133
|
|
79
79
|
magic_hour/resources/v1/text_to_video/__init__.py,sha256=F18iHSi9tuYSdgpatznBzb7lbSySNpK-82w96-Om_k4,122
|
|
80
|
-
magic_hour/resources/v1/text_to_video/client.py,sha256=
|
|
80
|
+
magic_hour/resources/v1/text_to_video/client.py,sha256=oy33GFX0UcnIbKR2p0NxxpJ0vnkIhe3j_niI7LKkkXY,6426
|
|
81
81
|
magic_hour/resources/v1/video_projects/README.md,sha256=EAOknjKAszIh8FuYP_0EV8zBm9ToC7_sMokEeVf-kfM,2696
|
|
82
82
|
magic_hour/resources/v1/video_projects/__init__.py,sha256=1aj_tE-GAf8BuQ76RQvjGVn8Y39CjdAJDlcsCPucX0w,130
|
|
83
83
|
magic_hour/resources/v1/video_projects/client.py,sha256=JvhYhf3phYkdVj8VpWxvxF8qWBRU-WaZYi-8lhVgpSQ,5511
|
|
@@ -154,19 +154,19 @@ magic_hour/types/params/v1_files_upload_urls_create_body.py,sha256=X6-ZcUqVVTM3w
|
|
|
154
154
|
magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py,sha256=I26O2Jx5_uhsCOrQCL_-wPeenu0rzhNwCDy0AEI6YuQ,962
|
|
155
155
|
magic_hour/types/params/v1_image_background_remover_create_body.py,sha256=l3sb8UTXjie3gMd4ZJhHik-N1o3zaVzsZ7xDaS_uTG4,1063
|
|
156
156
|
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=
|
|
157
|
+
magic_hour/types/params/v1_image_to_video_create_body.py,sha256=HJdgEqafWBWKU0D5rhQudCXveVEEWTgys1BXiYn6rv4,3020
|
|
158
158
|
magic_hour/types/params/v1_image_to_video_create_body_assets.py,sha256=J39Jv5Bv9bjMaskHzMfbO5VE6QWh-saN3eWOUPRtuRk,830
|
|
159
|
-
magic_hour/types/params/v1_image_to_video_create_body_style.py,sha256=
|
|
159
|
+
magic_hour/types/params/v1_image_to_video_create_body_style.py,sha256=fBrqT9sLY7ljMpNjUUaD03fRPSt4FzQTvgOp0auL0wI,1669
|
|
160
160
|
magic_hour/types/params/v1_lip_sync_create_body.py,sha256=PkmNdjIq7RfS_qMBsbiFEEf7Wl841pggPhCgmY6y8VI,3358
|
|
161
161
|
magic_hour/types/params/v1_lip_sync_create_body_assets.py,sha256=UypixyrVpyyv2nysMgXFj1iyvALCE0D4WRy1D3XEWuI,1883
|
|
162
162
|
magic_hour/types/params/v1_photo_colorizer_create_body.py,sha256=z6ARPEh1m3UL137ljaDo0-E2VLcIqo3GeBamYb-oPEA,990
|
|
163
163
|
magic_hour/types/params/v1_photo_colorizer_create_body_assets.py,sha256=fMC-R5V3gcd-S0LjxNViwtKiLvsxCwEFES31BLWYFp4,859
|
|
164
|
-
magic_hour/types/params/v1_text_to_video_create_body.py,sha256=
|
|
165
|
-
magic_hour/types/params/v1_text_to_video_create_body_style.py,sha256=
|
|
164
|
+
magic_hour/types/params/v1_text_to_video_create_body.py,sha256=2b4LioUNjSxfuxmtBR40YQNUJ_vPB7Wys1Co_xNKxHw,2159
|
|
165
|
+
magic_hour/types/params/v1_text_to_video_create_body_style.py,sha256=cEZO917hipE4PbIy2vRdmUO2tSRqJcW9vge9z30-aB0,1173
|
|
166
166
|
magic_hour/types/params/v1_video_to_video_create_body.py,sha256=Pgok6GUVHrpW6H3rwdVFA3O5YJvjgviCZkmmHddOSWo,3802
|
|
167
167
|
magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=_-6iA5d8ndka6iJWyWvlJwzRkQcmurJE6hkg-fDwBmQ,1531
|
|
168
168
|
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.
|
|
169
|
+
magic_hour-0.26.1.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
|
|
170
|
+
magic_hour-0.26.1.dist-info/METADATA,sha256=oOT0PSwFugnyrxYH52XVfeiNHrufygHqpnsloDs-39Q,5643
|
|
171
|
+
magic_hour-0.26.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
172
|
+
magic_hour-0.26.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|