magic_hour 0.10.0__py3-none-any.whl → 0.12.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.

Files changed (102) hide show
  1. magic_hour/environment.py +1 -1
  2. magic_hour/resources/v1/ai_clothes_changer/client.py +8 -8
  3. magic_hour/resources/v1/ai_headshot_generator/client.py +12 -12
  4. magic_hour/resources/v1/ai_image_generator/client.py +10 -10
  5. magic_hour/resources/v1/ai_image_upscaler/client.py +12 -12
  6. magic_hour/resources/v1/ai_photo_editor/client.py +12 -12
  7. magic_hour/resources/v1/ai_qr_code_generator/client.py +10 -10
  8. magic_hour/resources/v1/ai_talking_photo/README.md +43 -0
  9. magic_hour/resources/v1/ai_talking_photo/__init__.py +4 -0
  10. magic_hour/resources/v1/ai_talking_photo/client.py +147 -0
  11. magic_hour/resources/v1/animation/client.py +10 -10
  12. magic_hour/resources/v1/client.py +6 -0
  13. magic_hour/resources/v1/face_swap/client.py +8 -8
  14. magic_hour/resources/v1/face_swap_photo/client.py +8 -8
  15. magic_hour/resources/v1/files/upload_urls/README.md +4 -4
  16. magic_hour/resources/v1/files/upload_urls/client.py +14 -12
  17. magic_hour/resources/v1/image_background_remover/client.py +8 -8
  18. magic_hour/resources/v1/image_projects/client.py +4 -4
  19. magic_hour/resources/v1/image_to_video/client.py +12 -12
  20. magic_hour/resources/v1/lip_sync/client.py +8 -8
  21. magic_hour/resources/v1/text_to_video/client.py +10 -10
  22. magic_hour/resources/v1/video_projects/client.py +4 -4
  23. magic_hour/resources/v1/video_to_video/client.py +12 -12
  24. magic_hour/types/models/__init__.py +53 -51
  25. magic_hour/types/models/{post_v1_ai_clothes_changer_response.py → v1_ai_clothes_changer_create_response.py} +1 -1
  26. magic_hour/types/models/v1_ai_headshot_generator_create_response.py +25 -0
  27. magic_hour/types/models/{post_v1_ai_photo_editor_response.py → v1_ai_image_generator_create_response.py} +1 -1
  28. magic_hour/types/models/{post_v1_ai_image_generator_response.py → v1_ai_image_upscaler_create_response.py} +1 -1
  29. magic_hour/types/models/{post_v1_face_swap_photo_response.py → v1_ai_photo_editor_create_response.py} +1 -1
  30. magic_hour/types/models/{post_v1_ai_headshot_generator_response.py → v1_ai_qr_code_generator_create_response.py} +1 -1
  31. magic_hour/types/models/v1_ai_talking_photo_create_response.py +25 -0
  32. magic_hour/types/models/{post_v1_text_to_video_response.py → v1_animation_create_response.py} +1 -1
  33. magic_hour/types/models/{post_v1_face_swap_response.py → v1_face_swap_create_response.py} +1 -1
  34. magic_hour/types/models/{post_v1_ai_image_upscaler_response.py → v1_face_swap_photo_create_response.py} +1 -1
  35. magic_hour/types/models/v1_files_upload_urls_create_response.py +21 -0
  36. magic_hour/types/models/{post_v1_files_upload_urls_response_items_item.py → v1_files_upload_urls_create_response_items_item.py} +2 -2
  37. magic_hour/types/models/v1_image_background_remover_create_response.py +25 -0
  38. magic_hour/types/models/{get_v1_image_projects_id_response.py → v1_image_projects_get_response.py} +7 -7
  39. magic_hour/types/models/{get_v1_image_projects_id_response_downloads_item.py → v1_image_projects_get_response_downloads_item.py} +1 -1
  40. magic_hour/types/models/{get_v1_video_projects_id_response_error.py → v1_image_projects_get_response_error.py} +2 -2
  41. magic_hour/types/models/{post_v1_lip_sync_response.py → v1_image_to_video_create_response.py} +1 -1
  42. magic_hour/types/models/{post_v1_animation_response.py → v1_lip_sync_create_response.py} +1 -1
  43. magic_hour/types/models/{post_v1_image_to_video_response.py → v1_text_to_video_create_response.py} +1 -1
  44. magic_hour/types/models/{get_v1_video_projects_id_response.py → v1_video_projects_get_response.py} +10 -11
  45. magic_hour/types/models/{get_v1_video_projects_id_response_download.py → v1_video_projects_get_response_download.py} +1 -1
  46. magic_hour/types/models/{get_v1_video_projects_id_response_downloads_item.py → v1_video_projects_get_response_downloads_item.py} +1 -1
  47. magic_hour/types/models/{get_v1_image_projects_id_response_error.py → v1_video_projects_get_response_error.py} +2 -2
  48. magic_hour/types/models/v1_video_to_video_create_response.py +25 -0
  49. magic_hour/types/params/__init__.py +200 -182
  50. magic_hour/types/params/v1_ai_clothes_changer_create_body.py +40 -0
  51. magic_hour/types/params/{post_v1_ai_clothes_changer_body_assets.py → v1_ai_clothes_changer_create_body_assets.py} +3 -3
  52. magic_hour/types/params/v1_ai_headshot_generator_create_body.py +49 -0
  53. magic_hour/types/params/{post_v1_ai_headshot_generator_body_assets.py → v1_ai_headshot_generator_create_body_assets.py} +3 -3
  54. magic_hour/types/params/{post_v1_ai_headshot_generator_body_style.py → v1_ai_headshot_generator_create_body_style.py} +4 -4
  55. magic_hour/types/params/{post_v1_ai_image_generator_body.py → v1_ai_image_generator_create_body.py} +9 -9
  56. magic_hour/types/params/{post_v1_ai_image_generator_body_style.py → v1_ai_image_generator_create_body_style.py} +4 -4
  57. magic_hour/types/params/v1_ai_image_upscaler_create_body.py +57 -0
  58. magic_hour/types/params/{post_v1_ai_image_upscaler_body_assets.py → v1_ai_image_upscaler_create_body_assets.py} +3 -3
  59. magic_hour/types/params/{post_v1_ai_image_upscaler_body_style.py → v1_ai_image_upscaler_create_body_style.py} +4 -4
  60. magic_hour/types/params/{post_v1_ai_photo_editor_body.py → v1_ai_photo_editor_create_body.py} +14 -14
  61. magic_hour/types/params/{post_v1_ai_photo_editor_body_assets.py → v1_ai_photo_editor_create_body_assets.py} +3 -3
  62. magic_hour/types/params/{post_v1_ai_photo_editor_body_style.py → v1_ai_photo_editor_create_body_style.py} +4 -4
  63. magic_hour/types/params/{post_v1_ai_qr_code_generator_body.py → v1_ai_qr_code_generator_create_body.py} +9 -9
  64. magic_hour/types/params/{post_v1_ai_qr_code_generator_body_style.py → v1_ai_qr_code_generator_create_body_style.py} +4 -4
  65. magic_hour/types/params/v1_ai_talking_photo_create_body.py +56 -0
  66. magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py +36 -0
  67. magic_hour/types/params/{post_v1_animation_body.py → v1_animation_create_body.py} +14 -14
  68. magic_hour/types/params/{post_v1_animation_body_assets.py → v1_animation_create_body_assets.py} +3 -3
  69. magic_hour/types/params/{post_v1_animation_body_style.py → v1_animation_create_body_style.py} +3 -3
  70. magic_hour/types/params/{post_v1_face_swap_body.py → v1_face_swap_create_body.py} +9 -9
  71. magic_hour/types/params/{post_v1_face_swap_body_assets.py → v1_face_swap_create_body_assets.py} +3 -3
  72. magic_hour/types/params/v1_face_swap_photo_create_body.py +40 -0
  73. magic_hour/types/params/{post_v1_face_swap_photo_body_assets.py → v1_face_swap_photo_create_body_assets.py} +3 -3
  74. magic_hour/types/params/v1_files_upload_urls_create_body.py +33 -0
  75. magic_hour/types/params/{post_v1_files_upload_urls_body_items_item.py → v1_files_upload_urls_create_body_items_item.py} +6 -6
  76. magic_hour/types/params/v1_image_background_remover_create_body.py +40 -0
  77. magic_hour/types/params/{post_v1_image_background_remover_body_assets.py → v1_image_background_remover_create_body_assets.py} +3 -3
  78. magic_hour/types/params/{post_v1_image_to_video_body.py → v1_image_to_video_create_body.py} +14 -14
  79. magic_hour/types/params/{post_v1_image_to_video_body_assets.py → v1_image_to_video_create_body_assets.py} +3 -3
  80. magic_hour/types/params/{post_v1_image_to_video_body_style.py → v1_image_to_video_create_body_style.py} +4 -4
  81. magic_hour/types/params/{post_v1_lip_sync_body.py → v1_lip_sync_create_body.py} +9 -9
  82. magic_hour/types/params/{post_v1_lip_sync_body_assets.py → v1_lip_sync_create_body_assets.py} +3 -3
  83. magic_hour/types/params/{post_v1_text_to_video_body.py → v1_text_to_video_create_body.py} +9 -9
  84. magic_hour/types/params/{post_v1_text_to_video_body_style.py → v1_text_to_video_create_body_style.py} +4 -4
  85. magic_hour/types/params/{post_v1_video_to_video_body.py → v1_video_to_video_create_body.py} +14 -14
  86. magic_hour/types/params/{post_v1_video_to_video_body_assets.py → v1_video_to_video_create_body_assets.py} +3 -3
  87. magic_hour/types/params/{post_v1_video_to_video_body_style.py → v1_video_to_video_create_body_style.py} +14 -4
  88. {magic_hour-0.10.0.dist-info → magic_hour-0.12.0.dist-info}/METADATA +5 -1
  89. magic_hour-0.12.0.dist-info/RECORD +139 -0
  90. magic_hour/types/models/post_v1_ai_qr_code_generator_response.py +0 -25
  91. magic_hour/types/models/post_v1_files_upload_urls_response.py +0 -21
  92. magic_hour/types/models/post_v1_image_background_remover_response.py +0 -25
  93. magic_hour/types/models/post_v1_video_to_video_response.py +0 -25
  94. magic_hour/types/params/post_v1_ai_clothes_changer_body.py +0 -40
  95. magic_hour/types/params/post_v1_ai_headshot_generator_body.py +0 -49
  96. magic_hour/types/params/post_v1_ai_image_upscaler_body.py +0 -57
  97. magic_hour/types/params/post_v1_face_swap_photo_body.py +0 -40
  98. magic_hour/types/params/post_v1_files_upload_urls_body.py +0 -31
  99. magic_hour/types/params/post_v1_image_background_remover_body.py +0 -40
  100. magic_hour-0.10.0.dist-info/RECORD +0 -133
  101. {magic_hour-0.10.0.dist-info → magic_hour-0.12.0.dist-info}/LICENSE +0 -0
  102. {magic_hour-0.10.0.dist-info → magic_hour-0.12.0.dist-info}/WHEEL +0 -0
magic_hour/environment.py CHANGED
@@ -5,4 +5,4 @@ class Environment(enum.Enum):
5
5
  """Pre-defined base URLs for the API"""
6
6
 
7
7
  ENVIRONMENT = "https://api.magichour.ai"
8
- MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.10.0"
8
+ MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.12.0"
@@ -18,12 +18,12 @@ class AiClothesChangerClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1AiClothesChangerBodyAssets,
21
+ assets: params.V1AiClothesChangerCreateBodyAssets,
22
22
  name: typing.Union[
23
23
  typing.Optional[str], type_utils.NotGiven
24
24
  ] = type_utils.NOT_GIVEN,
25
25
  request_options: typing.Optional[RequestOptions] = None,
26
- ) -> models.PostV1AiClothesChangerResponse:
26
+ ) -> models.V1AiClothesChangerCreateResponse:
27
27
  """
28
28
  AI Clothes Changer
29
29
 
@@ -57,14 +57,14 @@ class AiClothesChangerClient:
57
57
  """
58
58
  _json = to_encodable(
59
59
  item={"name": name, "assets": assets},
60
- dump_with=params._SerializerPostV1AiClothesChangerBody,
60
+ dump_with=params._SerializerV1AiClothesChangerCreateBody,
61
61
  )
62
62
  return self._base_client.request(
63
63
  method="POST",
64
64
  path="/v1/ai-clothes-changer",
65
65
  auth_names=["bearerAuth"],
66
66
  json=_json,
67
- cast_to=models.PostV1AiClothesChangerResponse,
67
+ cast_to=models.V1AiClothesChangerCreateResponse,
68
68
  request_options=request_options or default_request_options(),
69
69
  )
70
70
 
@@ -76,12 +76,12 @@ class AsyncAiClothesChangerClient:
76
76
  async def create(
77
77
  self,
78
78
  *,
79
- assets: params.PostV1AiClothesChangerBodyAssets,
79
+ assets: params.V1AiClothesChangerCreateBodyAssets,
80
80
  name: typing.Union[
81
81
  typing.Optional[str], type_utils.NotGiven
82
82
  ] = type_utils.NOT_GIVEN,
83
83
  request_options: typing.Optional[RequestOptions] = None,
84
- ) -> models.PostV1AiClothesChangerResponse:
84
+ ) -> models.V1AiClothesChangerCreateResponse:
85
85
  """
86
86
  AI Clothes Changer
87
87
 
@@ -115,13 +115,13 @@ class AsyncAiClothesChangerClient:
115
115
  """
116
116
  _json = to_encodable(
117
117
  item={"name": name, "assets": assets},
118
- dump_with=params._SerializerPostV1AiClothesChangerBody,
118
+ dump_with=params._SerializerV1AiClothesChangerCreateBody,
119
119
  )
120
120
  return await self._base_client.request(
121
121
  method="POST",
122
122
  path="/v1/ai-clothes-changer",
123
123
  auth_names=["bearerAuth"],
124
124
  json=_json,
125
- cast_to=models.PostV1AiClothesChangerResponse,
125
+ cast_to=models.V1AiClothesChangerCreateResponse,
126
126
  request_options=request_options or default_request_options(),
127
127
  )
@@ -18,16 +18,16 @@ class AiHeadshotGeneratorClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1AiHeadshotGeneratorBodyAssets,
21
+ assets: params.V1AiHeadshotGeneratorCreateBodyAssets,
22
22
  name: typing.Union[
23
23
  typing.Optional[str], type_utils.NotGiven
24
24
  ] = type_utils.NOT_GIVEN,
25
25
  style: typing.Union[
26
- typing.Optional[params.PostV1AiHeadshotGeneratorBodyStyle],
26
+ typing.Optional[params.V1AiHeadshotGeneratorCreateBodyStyle],
27
27
  type_utils.NotGiven,
28
28
  ] = type_utils.NOT_GIVEN,
29
29
  request_options: typing.Optional[RequestOptions] = None,
30
- ) -> models.PostV1AiHeadshotGeneratorResponse:
30
+ ) -> models.V1AiHeadshotGeneratorCreateResponse:
31
31
  """
32
32
  AI Headshots
33
33
 
@@ -37,7 +37,7 @@ class AiHeadshotGeneratorClient:
37
37
 
38
38
  Args:
39
39
  name: The name of image
40
- style: PostV1AiHeadshotGeneratorBodyStyle
40
+ style: V1AiHeadshotGeneratorCreateBodyStyle
41
41
  assets: Provide the assets for headshot photo
42
42
  request_options: Additional options to customize the HTTP request
43
43
 
@@ -58,14 +58,14 @@ class AiHeadshotGeneratorClient:
58
58
  """
59
59
  _json = to_encodable(
60
60
  item={"name": name, "style": style, "assets": assets},
61
- dump_with=params._SerializerPostV1AiHeadshotGeneratorBody,
61
+ dump_with=params._SerializerV1AiHeadshotGeneratorCreateBody,
62
62
  )
63
63
  return self._base_client.request(
64
64
  method="POST",
65
65
  path="/v1/ai-headshot-generator",
66
66
  auth_names=["bearerAuth"],
67
67
  json=_json,
68
- cast_to=models.PostV1AiHeadshotGeneratorResponse,
68
+ cast_to=models.V1AiHeadshotGeneratorCreateResponse,
69
69
  request_options=request_options or default_request_options(),
70
70
  )
71
71
 
@@ -77,16 +77,16 @@ class AsyncAiHeadshotGeneratorClient:
77
77
  async def create(
78
78
  self,
79
79
  *,
80
- assets: params.PostV1AiHeadshotGeneratorBodyAssets,
80
+ assets: params.V1AiHeadshotGeneratorCreateBodyAssets,
81
81
  name: typing.Union[
82
82
  typing.Optional[str], type_utils.NotGiven
83
83
  ] = type_utils.NOT_GIVEN,
84
84
  style: typing.Union[
85
- typing.Optional[params.PostV1AiHeadshotGeneratorBodyStyle],
85
+ typing.Optional[params.V1AiHeadshotGeneratorCreateBodyStyle],
86
86
  type_utils.NotGiven,
87
87
  ] = type_utils.NOT_GIVEN,
88
88
  request_options: typing.Optional[RequestOptions] = None,
89
- ) -> models.PostV1AiHeadshotGeneratorResponse:
89
+ ) -> models.V1AiHeadshotGeneratorCreateResponse:
90
90
  """
91
91
  AI Headshots
92
92
 
@@ -96,7 +96,7 @@ class AsyncAiHeadshotGeneratorClient:
96
96
 
97
97
  Args:
98
98
  name: The name of image
99
- style: PostV1AiHeadshotGeneratorBodyStyle
99
+ style: V1AiHeadshotGeneratorCreateBodyStyle
100
100
  assets: Provide the assets for headshot photo
101
101
  request_options: Additional options to customize the HTTP request
102
102
 
@@ -117,13 +117,13 @@ class AsyncAiHeadshotGeneratorClient:
117
117
  """
118
118
  _json = to_encodable(
119
119
  item={"name": name, "style": style, "assets": assets},
120
- dump_with=params._SerializerPostV1AiHeadshotGeneratorBody,
120
+ dump_with=params._SerializerV1AiHeadshotGeneratorCreateBody,
121
121
  )
122
122
  return await self._base_client.request(
123
123
  method="POST",
124
124
  path="/v1/ai-headshot-generator",
125
125
  auth_names=["bearerAuth"],
126
126
  json=_json,
127
- cast_to=models.PostV1AiHeadshotGeneratorResponse,
127
+ cast_to=models.V1AiHeadshotGeneratorCreateResponse,
128
128
  request_options=request_options or default_request_options(),
129
129
  )
@@ -21,12 +21,12 @@ class AiImageGeneratorClient:
21
21
  *,
22
22
  image_count: int,
23
23
  orientation: typing_extensions.Literal["landscape", "portrait", "square"],
24
- style: params.PostV1AiImageGeneratorBodyStyle,
24
+ style: params.V1AiImageGeneratorCreateBodyStyle,
25
25
  name: typing.Union[
26
26
  typing.Optional[str], type_utils.NotGiven
27
27
  ] = type_utils.NOT_GIVEN,
28
28
  request_options: typing.Optional[RequestOptions] = None,
29
- ) -> models.PostV1AiImageGeneratorResponse:
29
+ ) -> models.V1AiImageGeneratorCreateResponse:
30
30
  """
31
31
  AI Images
32
32
 
@@ -38,7 +38,7 @@ class AiImageGeneratorClient:
38
38
  name: The name of image
39
39
  image_count: number to images to generate
40
40
  orientation: typing_extensions.Literal["landscape", "portrait", "square"]
41
- style: PostV1AiImageGeneratorBodyStyle
41
+ style: V1AiImageGeneratorCreateBodyStyle
42
42
  request_options: Additional options to customize the HTTP request
43
43
 
44
44
  Returns:
@@ -65,14 +65,14 @@ class AiImageGeneratorClient:
65
65
  "orientation": orientation,
66
66
  "style": style,
67
67
  },
68
- dump_with=params._SerializerPostV1AiImageGeneratorBody,
68
+ dump_with=params._SerializerV1AiImageGeneratorCreateBody,
69
69
  )
70
70
  return self._base_client.request(
71
71
  method="POST",
72
72
  path="/v1/ai-image-generator",
73
73
  auth_names=["bearerAuth"],
74
74
  json=_json,
75
- cast_to=models.PostV1AiImageGeneratorResponse,
75
+ cast_to=models.V1AiImageGeneratorCreateResponse,
76
76
  request_options=request_options or default_request_options(),
77
77
  )
78
78
 
@@ -86,12 +86,12 @@ class AsyncAiImageGeneratorClient:
86
86
  *,
87
87
  image_count: int,
88
88
  orientation: typing_extensions.Literal["landscape", "portrait", "square"],
89
- style: params.PostV1AiImageGeneratorBodyStyle,
89
+ style: params.V1AiImageGeneratorCreateBodyStyle,
90
90
  name: typing.Union[
91
91
  typing.Optional[str], type_utils.NotGiven
92
92
  ] = type_utils.NOT_GIVEN,
93
93
  request_options: typing.Optional[RequestOptions] = None,
94
- ) -> models.PostV1AiImageGeneratorResponse:
94
+ ) -> models.V1AiImageGeneratorCreateResponse:
95
95
  """
96
96
  AI Images
97
97
 
@@ -103,7 +103,7 @@ class AsyncAiImageGeneratorClient:
103
103
  name: The name of image
104
104
  image_count: number to images to generate
105
105
  orientation: typing_extensions.Literal["landscape", "portrait", "square"]
106
- style: PostV1AiImageGeneratorBodyStyle
106
+ style: V1AiImageGeneratorCreateBodyStyle
107
107
  request_options: Additional options to customize the HTTP request
108
108
 
109
109
  Returns:
@@ -130,13 +130,13 @@ class AsyncAiImageGeneratorClient:
130
130
  "orientation": orientation,
131
131
  "style": style,
132
132
  },
133
- dump_with=params._SerializerPostV1AiImageGeneratorBody,
133
+ dump_with=params._SerializerV1AiImageGeneratorCreateBody,
134
134
  )
135
135
  return await self._base_client.request(
136
136
  method="POST",
137
137
  path="/v1/ai-image-generator",
138
138
  auth_names=["bearerAuth"],
139
139
  json=_json,
140
- cast_to=models.PostV1AiImageGeneratorResponse,
140
+ cast_to=models.V1AiImageGeneratorCreateResponse,
141
141
  request_options=request_options or default_request_options(),
142
142
  )
@@ -18,14 +18,14 @@ class AiImageUpscalerClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1AiImageUpscalerBodyAssets,
21
+ assets: params.V1AiImageUpscalerCreateBodyAssets,
22
22
  scale_factor: float,
23
- style: params.PostV1AiImageUpscalerBodyStyle,
23
+ style: params.V1AiImageUpscalerCreateBodyStyle,
24
24
  name: typing.Union[
25
25
  typing.Optional[str], type_utils.NotGiven
26
26
  ] = type_utils.NOT_GIVEN,
27
27
  request_options: typing.Optional[RequestOptions] = None,
28
- ) -> models.PostV1AiImageUpscalerResponse:
28
+ ) -> models.V1AiImageUpscalerCreateResponse:
29
29
  """
30
30
  AI Image Upscaler
31
31
 
@@ -37,7 +37,7 @@ class AiImageUpscalerClient:
37
37
  name: The name of image
38
38
  assets: Provide the assets for upscaling
39
39
  scale_factor: How much to scale the image. Must be either 2 or 4
40
- style: PostV1AiImageUpscalerBodyStyle
40
+ style: V1AiImageUpscalerCreateBodyStyle
41
41
  request_options: Additional options to customize the HTTP request
42
42
 
43
43
  Returns:
@@ -64,14 +64,14 @@ class AiImageUpscalerClient:
64
64
  "scale_factor": scale_factor,
65
65
  "style": style,
66
66
  },
67
- dump_with=params._SerializerPostV1AiImageUpscalerBody,
67
+ dump_with=params._SerializerV1AiImageUpscalerCreateBody,
68
68
  )
69
69
  return self._base_client.request(
70
70
  method="POST",
71
71
  path="/v1/ai-image-upscaler",
72
72
  auth_names=["bearerAuth"],
73
73
  json=_json,
74
- cast_to=models.PostV1AiImageUpscalerResponse,
74
+ cast_to=models.V1AiImageUpscalerCreateResponse,
75
75
  request_options=request_options or default_request_options(),
76
76
  )
77
77
 
@@ -83,14 +83,14 @@ class AsyncAiImageUpscalerClient:
83
83
  async def create(
84
84
  self,
85
85
  *,
86
- assets: params.PostV1AiImageUpscalerBodyAssets,
86
+ assets: params.V1AiImageUpscalerCreateBodyAssets,
87
87
  scale_factor: float,
88
- style: params.PostV1AiImageUpscalerBodyStyle,
88
+ style: params.V1AiImageUpscalerCreateBodyStyle,
89
89
  name: typing.Union[
90
90
  typing.Optional[str], type_utils.NotGiven
91
91
  ] = type_utils.NOT_GIVEN,
92
92
  request_options: typing.Optional[RequestOptions] = None,
93
- ) -> models.PostV1AiImageUpscalerResponse:
93
+ ) -> models.V1AiImageUpscalerCreateResponse:
94
94
  """
95
95
  AI Image Upscaler
96
96
 
@@ -102,7 +102,7 @@ class AsyncAiImageUpscalerClient:
102
102
  name: The name of image
103
103
  assets: Provide the assets for upscaling
104
104
  scale_factor: How much to scale the image. Must be either 2 or 4
105
- style: PostV1AiImageUpscalerBodyStyle
105
+ style: V1AiImageUpscalerCreateBodyStyle
106
106
  request_options: Additional options to customize the HTTP request
107
107
 
108
108
  Returns:
@@ -129,13 +129,13 @@ class AsyncAiImageUpscalerClient:
129
129
  "scale_factor": scale_factor,
130
130
  "style": style,
131
131
  },
132
- dump_with=params._SerializerPostV1AiImageUpscalerBody,
132
+ dump_with=params._SerializerV1AiImageUpscalerCreateBody,
133
133
  )
134
134
  return await self._base_client.request(
135
135
  method="POST",
136
136
  path="/v1/ai-image-upscaler",
137
137
  auth_names=["bearerAuth"],
138
138
  json=_json,
139
- cast_to=models.PostV1AiImageUpscalerResponse,
139
+ cast_to=models.V1AiImageUpscalerCreateResponse,
140
140
  request_options=request_options or default_request_options(),
141
141
  )
@@ -18,9 +18,9 @@ class AiPhotoEditorClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1AiPhotoEditorBodyAssets,
21
+ assets: params.V1AiPhotoEditorCreateBodyAssets,
22
22
  resolution: int,
23
- style: params.PostV1AiPhotoEditorBodyStyle,
23
+ style: params.V1AiPhotoEditorCreateBodyStyle,
24
24
  name: typing.Union[
25
25
  typing.Optional[str], type_utils.NotGiven
26
26
  ] = type_utils.NOT_GIVEN,
@@ -28,7 +28,7 @@ class AiPhotoEditorClient:
28
28
  typing.Optional[int], type_utils.NotGiven
29
29
  ] = type_utils.NOT_GIVEN,
30
30
  request_options: typing.Optional[RequestOptions] = None,
31
- ) -> models.PostV1AiPhotoEditorResponse:
31
+ ) -> models.V1AiPhotoEditorCreateResponse:
32
32
  """
33
33
  AI Photo Editor
34
34
 
@@ -43,7 +43,7 @@ class AiPhotoEditorClient:
43
43
  steps: Deprecated: Please use `.style.steps` instead. Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
44
44
  assets: Provide the assets for photo editor
45
45
  resolution: The resolution of the final output image. The allowed value is based on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
46
- style: PostV1AiPhotoEditorBodyStyle
46
+ style: V1AiPhotoEditorCreateBodyStyle
47
47
  request_options: Additional options to customize the HTTP request
48
48
 
49
49
  Returns:
@@ -76,14 +76,14 @@ class AiPhotoEditorClient:
76
76
  "resolution": resolution,
77
77
  "style": style,
78
78
  },
79
- dump_with=params._SerializerPostV1AiPhotoEditorBody,
79
+ dump_with=params._SerializerV1AiPhotoEditorCreateBody,
80
80
  )
81
81
  return self._base_client.request(
82
82
  method="POST",
83
83
  path="/v1/ai-photo-editor",
84
84
  auth_names=["bearerAuth"],
85
85
  json=_json,
86
- cast_to=models.PostV1AiPhotoEditorResponse,
86
+ cast_to=models.V1AiPhotoEditorCreateResponse,
87
87
  request_options=request_options or default_request_options(),
88
88
  )
89
89
 
@@ -95,9 +95,9 @@ class AsyncAiPhotoEditorClient:
95
95
  async def create(
96
96
  self,
97
97
  *,
98
- assets: params.PostV1AiPhotoEditorBodyAssets,
98
+ assets: params.V1AiPhotoEditorCreateBodyAssets,
99
99
  resolution: int,
100
- style: params.PostV1AiPhotoEditorBodyStyle,
100
+ style: params.V1AiPhotoEditorCreateBodyStyle,
101
101
  name: typing.Union[
102
102
  typing.Optional[str], type_utils.NotGiven
103
103
  ] = type_utils.NOT_GIVEN,
@@ -105,7 +105,7 @@ class AsyncAiPhotoEditorClient:
105
105
  typing.Optional[int], type_utils.NotGiven
106
106
  ] = type_utils.NOT_GIVEN,
107
107
  request_options: typing.Optional[RequestOptions] = None,
108
- ) -> models.PostV1AiPhotoEditorResponse:
108
+ ) -> models.V1AiPhotoEditorCreateResponse:
109
109
  """
110
110
  AI Photo Editor
111
111
 
@@ -120,7 +120,7 @@ class AsyncAiPhotoEditorClient:
120
120
  steps: Deprecated: Please use `.style.steps` instead. Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
121
121
  assets: Provide the assets for photo editor
122
122
  resolution: The resolution of the final output image. The allowed value is based on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
123
- style: PostV1AiPhotoEditorBodyStyle
123
+ style: V1AiPhotoEditorCreateBodyStyle
124
124
  request_options: Additional options to customize the HTTP request
125
125
 
126
126
  Returns:
@@ -153,13 +153,13 @@ class AsyncAiPhotoEditorClient:
153
153
  "resolution": resolution,
154
154
  "style": style,
155
155
  },
156
- dump_with=params._SerializerPostV1AiPhotoEditorBody,
156
+ dump_with=params._SerializerV1AiPhotoEditorCreateBody,
157
157
  )
158
158
  return await self._base_client.request(
159
159
  method="POST",
160
160
  path="/v1/ai-photo-editor",
161
161
  auth_names=["bearerAuth"],
162
162
  json=_json,
163
- cast_to=models.PostV1AiPhotoEditorResponse,
163
+ cast_to=models.V1AiPhotoEditorCreateResponse,
164
164
  request_options=request_options or default_request_options(),
165
165
  )
@@ -19,12 +19,12 @@ class AiQrCodeGeneratorClient:
19
19
  self,
20
20
  *,
21
21
  content: str,
22
- style: params.PostV1AiQrCodeGeneratorBodyStyle,
22
+ style: params.V1AiQrCodeGeneratorCreateBodyStyle,
23
23
  name: typing.Union[
24
24
  typing.Optional[str], type_utils.NotGiven
25
25
  ] = type_utils.NOT_GIVEN,
26
26
  request_options: typing.Optional[RequestOptions] = None,
27
- ) -> models.PostV1AiQrCodeGeneratorResponse:
27
+ ) -> models.V1AiQrCodeGeneratorCreateResponse:
28
28
  """
29
29
  AI QR Code
30
30
 
@@ -35,7 +35,7 @@ class AiQrCodeGeneratorClient:
35
35
  Args:
36
36
  name: The name of image
37
37
  content: The content of the QR code.
38
- style: PostV1AiQrCodeGeneratorBodyStyle
38
+ style: V1AiQrCodeGeneratorCreateBodyStyle
39
39
  request_options: Additional options to customize the HTTP request
40
40
 
41
41
  Returns:
@@ -56,14 +56,14 @@ class AiQrCodeGeneratorClient:
56
56
  """
57
57
  _json = to_encodable(
58
58
  item={"name": name, "content": content, "style": style},
59
- dump_with=params._SerializerPostV1AiQrCodeGeneratorBody,
59
+ dump_with=params._SerializerV1AiQrCodeGeneratorCreateBody,
60
60
  )
61
61
  return self._base_client.request(
62
62
  method="POST",
63
63
  path="/v1/ai-qr-code-generator",
64
64
  auth_names=["bearerAuth"],
65
65
  json=_json,
66
- cast_to=models.PostV1AiQrCodeGeneratorResponse,
66
+ cast_to=models.V1AiQrCodeGeneratorCreateResponse,
67
67
  request_options=request_options or default_request_options(),
68
68
  )
69
69
 
@@ -76,12 +76,12 @@ class AsyncAiQrCodeGeneratorClient:
76
76
  self,
77
77
  *,
78
78
  content: str,
79
- style: params.PostV1AiQrCodeGeneratorBodyStyle,
79
+ style: params.V1AiQrCodeGeneratorCreateBodyStyle,
80
80
  name: typing.Union[
81
81
  typing.Optional[str], type_utils.NotGiven
82
82
  ] = type_utils.NOT_GIVEN,
83
83
  request_options: typing.Optional[RequestOptions] = None,
84
- ) -> models.PostV1AiQrCodeGeneratorResponse:
84
+ ) -> models.V1AiQrCodeGeneratorCreateResponse:
85
85
  """
86
86
  AI QR Code
87
87
 
@@ -92,7 +92,7 @@ class AsyncAiQrCodeGeneratorClient:
92
92
  Args:
93
93
  name: The name of image
94
94
  content: The content of the QR code.
95
- style: PostV1AiQrCodeGeneratorBodyStyle
95
+ style: V1AiQrCodeGeneratorCreateBodyStyle
96
96
  request_options: Additional options to customize the HTTP request
97
97
 
98
98
  Returns:
@@ -113,13 +113,13 @@ class AsyncAiQrCodeGeneratorClient:
113
113
  """
114
114
  _json = to_encodable(
115
115
  item={"name": name, "content": content, "style": style},
116
- dump_with=params._SerializerPostV1AiQrCodeGeneratorBody,
116
+ dump_with=params._SerializerV1AiQrCodeGeneratorCreateBody,
117
117
  )
118
118
  return await self._base_client.request(
119
119
  method="POST",
120
120
  path="/v1/ai-qr-code-generator",
121
121
  auth_names=["bearerAuth"],
122
122
  json=_json,
123
- cast_to=models.PostV1AiQrCodeGeneratorResponse,
123
+ cast_to=models.V1AiQrCodeGeneratorCreateResponse,
124
124
  request_options=request_options or default_request_options(),
125
125
  )
@@ -0,0 +1,43 @@
1
+
2
+ ### create <a name="create"></a>
3
+ AI Talking Photo
4
+
5
+ Create a talking photo from an image and audio or text input.
6
+
7
+ **API Endpoint**: `POST /v1/ai-talking-photo`
8
+
9
+ #### Synchronous Client
10
+
11
+ ```python
12
+ from magic_hour import Client
13
+ from os import getenv
14
+
15
+ client = Client(token=getenv("API_TOKEN"))
16
+ res = client.v1.ai_talking_photo.create(
17
+ assets={
18
+ "audio_file_path": "api-assets/id/1234.mp3",
19
+ "image_file_path": "api-assets/id/1234.png",
20
+ },
21
+ end_seconds=15.0,
22
+ start_seconds=0.0,
23
+ name="Talking Photo image",
24
+ )
25
+ ```
26
+
27
+ #### Asynchronous Client
28
+
29
+ ```python
30
+ from magic_hour import AsyncClient
31
+ from os import getenv
32
+
33
+ client = AsyncClient(token=getenv("API_TOKEN"))
34
+ res = await client.v1.ai_talking_photo.create(
35
+ assets={
36
+ "audio_file_path": "api-assets/id/1234.mp3",
37
+ "image_file_path": "api-assets/id/1234.png",
38
+ },
39
+ end_seconds=15.0,
40
+ start_seconds=0.0,
41
+ name="Talking Photo image",
42
+ )
43
+ ```
@@ -0,0 +1,4 @@
1
+ from .client import AiTalkingPhotoClient, AsyncAiTalkingPhotoClient
2
+
3
+
4
+ __all__ = ["AiTalkingPhotoClient", "AsyncAiTalkingPhotoClient"]