magic_hour 0.26.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 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.26.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(
@@ -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
  )
@@ -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.Required[V1ImageToVideoCreateBodyStyle]
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.26.0
3
+ Version: 0.26.1
4
4
  Summary: Python SDK for Magic Hour API
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -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=iUXFWVfIU3gnOIkkJQagOCJ347Qr44cfouvEeZ0lijM,535
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
@@ -66,9 +66,9 @@ 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=Mcz1ZP644pFqqbIuv5ePxBN0r2hQzkeciwj4CwK9uh0,2804
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=4lYYWUaOgJY4mzf_G4u70vSG0KXLhHIyiv3N51LUMoA,8080
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
@@ -154,7 +154,7 @@ 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=dP28yIun8pxnEkMzZqW7U9bJ5kTCzTAH-zw2yv0oBsI,2987
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
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
@@ -166,7 +166,7 @@ magic_hour/types/params/v1_text_to_video_create_body_style.py,sha256=cEZO917hipE
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.26.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
170
- magic_hour-0.26.0.dist-info/METADATA,sha256=j3LV15eO14CfAVH_kZNBBBQo8UbR-3L_GdpxUmmuxOM,5643
171
- magic_hour-0.26.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
172
- magic_hour-0.26.0.dist-info/RECORD,,
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,,