magic_hour 0.38.0__py3-none-any.whl → 0.38.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.

@@ -32,7 +32,9 @@ from os import getenv
32
32
 
33
33
  client = Client(token=getenv("API_TOKEN"))
34
34
  res = client.v1.ai_gif_generator.generate(
35
- style={"prompt": "Cute dancing cat, pixel art"}, name="Ai Gif gif"
35
+ style={"prompt": "Cute dancing cat, pixel art"},
36
+ name="Ai Gif gif",
37
+ output_format="gif",
36
38
  wait_for_completion=True,
37
39
  download_outputs=True,
38
40
  download_directory="outputs"
@@ -47,7 +49,9 @@ from os import getenv
47
49
 
48
50
  client = AsyncClient(token=getenv("API_TOKEN"))
49
51
  res = await client.v1.ai_gif_generator.generate(
50
- style={"prompt": "Cute dancing cat, pixel art"}, name="Ai Gif gif"
52
+ style={"prompt": "Cute dancing cat, pixel art"},
53
+ name="Ai Gif gif",
54
+ output_format="gif",
51
55
  wait_for_completion=True,
52
56
  download_outputs=True,
53
57
  download_directory="outputs"
@@ -69,6 +73,7 @@ Create an AI GIF. Each GIF costs 50 credits.
69
73
  | `style` | ✓ | | `{"prompt": "Cute dancing cat, pixel art"}` |
70
74
  | `└─ prompt` | ✓ | The prompt used for the GIF. | `"Cute dancing cat, pixel art"` |
71
75
  | `name` | ✗ | The name of gif. This value is mainly used for your own identification of the gif. | `"Ai Gif gif"` |
76
+ | `output_format` | ✗ | The output file format for the generated animation. | `"gif"` |
72
77
 
73
78
  #### Synchronous Client
74
79
 
@@ -78,7 +83,9 @@ from os import getenv
78
83
 
79
84
  client = Client(token=getenv("API_TOKEN"))
80
85
  res = client.v1.ai_gif_generator.create(
81
- style={"prompt": "Cute dancing cat, pixel art"}, name="Ai Gif gif"
86
+ style={"prompt": "Cute dancing cat, pixel art"},
87
+ name="Ai Gif gif",
88
+ output_format="gif",
82
89
  )
83
90
 
84
91
  ```
@@ -91,7 +98,9 @@ from os import getenv
91
98
 
92
99
  client = AsyncClient(token=getenv("API_TOKEN"))
93
100
  res = await client.v1.ai_gif_generator.create(
94
- style={"prompt": "Cute dancing cat, pixel art"}, name="Ai Gif gif"
101
+ style={"prompt": "Cute dancing cat, pixel art"},
102
+ name="Ai Gif gif",
103
+ output_format="gif",
95
104
  )
96
105
 
97
106
  ```
@@ -103,4 +112,3 @@ res = await client.v1.ai_gif_generator.create(
103
112
 
104
113
  ##### Example
105
114
  `{"credits_charged": 50, "frame_cost": 50, "id": "cuid-example"}`
106
-
@@ -31,6 +31,10 @@ class AiGifGeneratorClient:
31
31
  name: typing.Union[
32
32
  typing.Optional[str], type_utils.NotGiven
33
33
  ] = type_utils.NOT_GIVEN,
34
+ output_format: typing.Union[
35
+ typing.Optional[typing_extensions.Literal["gif", "mp4", "webm"]],
36
+ type_utils.NotGiven,
37
+ ] = type_utils.NOT_GIVEN,
34
38
  wait_for_completion: bool = True,
35
39
  download_outputs: bool = True,
36
40
  download_directory: typing.Optional[str] = None,
@@ -65,7 +69,10 @@ class AiGifGeneratorClient:
65
69
  """
66
70
 
67
71
  create_response = self.create(
68
- style=style, name=name, request_options=request_options
72
+ style=style,
73
+ name=name,
74
+ output_format=output_format,
75
+ request_options=request_options,
69
76
  )
70
77
  logger.info(f"AI GIF Generator response: {create_response}")
71
78
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: magic_hour
3
- Version: 0.38.0
3
+ Version: 0.38.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
@@ -13,9 +13,9 @@ magic_hour/resources/v1/ai_clothes_changer/client.py,sha256=CdSE1ZiygLFusVpgCCFo
13
13
  magic_hour/resources/v1/ai_face_editor/README.md,sha256=aKnRhtuI9XZPN6UMI5kHn-gkFvzN4uZ1Z0KYcqnnLfM,7271
14
14
  magic_hour/resources/v1/ai_face_editor/__init__.py,sha256=RY8GBMQcqsDFbFcUuK-4LPvablq-U9XmSSlQk4HLKmM,126
15
15
  magic_hour/resources/v1/ai_face_editor/client.py,sha256=qo8Lj7s0a9vanOMzWb5lw0FyrrcstQ-kUvfBkiBipGY,12313
16
- magic_hour/resources/v1/ai_gif_generator/README.md,sha256=DLJAKNRfYfYhBJCITT5Qin68GLWHaFy6rB6XWTB_JVo,2951
16
+ magic_hour/resources/v1/ai_gif_generator/README.md,sha256=a5Iw-fqd-gJKUsO3JpU2QbPYFlCopYRsszLTNj9hpGA,3160
17
17
  magic_hour/resources/v1/ai_gif_generator/__init__.py,sha256=SG_WmxUnpQWlfNQoHfdXPEGQEPC0WZPgom8ATaR9jiY,134
18
- magic_hour/resources/v1/ai_gif_generator/client.py,sha256=0jxcwQhgcrQVPNMQDk3nJvYMI8gCZbG7INXpzbtc8XQ,8908
18
+ magic_hour/resources/v1/ai_gif_generator/client.py,sha256=IqRoCAkVzPge6lx5UEZc_XrVUts4yKXItU9W-SA02GM,9156
19
19
  magic_hour/resources/v1/ai_headshot_generator/README.md,sha256=1ysCdQ9Z_ijmr3O2o7gjJdDh3S35HfEEzRmrNRm29qM,3859
20
20
  magic_hour/resources/v1/ai_headshot_generator/__init__.py,sha256=4WZ3jfrL2yPhQaPalMJrUEykwUoF3KBtop2VJEij-0s,154
21
21
  magic_hour/resources/v1/ai_headshot_generator/client.py,sha256=Ts_aLrp6M825opYZsJ66g1Ma4XOzvKwNdVFmUC4KSkQ,9979
@@ -203,7 +203,7 @@ magic_hour/types/params/v1_video_to_video_create_body.py,sha256=BV52jJcXnOsKaw-M
203
203
  magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=XwdoqT1x5ElcWb6qUfmtabNsyaatEsOygB4gJ154y-M,1660
204
204
  magic_hour/types/params/v1_video_to_video_create_body_style.py,sha256=RrDBhN2KQnCf9hGsnl3sAYvuFRsxth2JXfe5la0IYJg,5749
205
205
  magic_hour/types/params/v1_video_to_video_generate_body_assets.py,sha256=j06Y1RKZKwEXW9Zdfhr3Lntx7eDAKpH-k1N1XkKuqPM,915
206
- magic_hour-0.38.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
207
- magic_hour-0.38.0.dist-info/METADATA,sha256=f6WGHhB4bOVyYK-MUWn0fFEK-ky88JwIxw5W0zdM24Q,12559
208
- magic_hour-0.38.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
209
- magic_hour-0.38.0.dist-info/RECORD,,
206
+ magic_hour-0.38.1.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
207
+ magic_hour-0.38.1.dist-info/METADATA,sha256=fM8ZONhJDy_eFJ3HLx_h1hCtV7hTh2Ac_WLjd0evz3o,12559
208
+ magic_hour-0.38.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
209
+ magic_hour-0.38.1.dist-info/RECORD,,