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
@@ -0,0 +1,147 @@
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 AiTalkingPhotoClient:
15
+ def __init__(self, *, base_client: SyncBaseClient):
16
+ self._base_client = base_client
17
+
18
+ def create(
19
+ self,
20
+ *,
21
+ assets: params.V1AiTalkingPhotoCreateBodyAssets,
22
+ end_seconds: float,
23
+ start_seconds: float,
24
+ name: typing.Union[
25
+ typing.Optional[str], type_utils.NotGiven
26
+ ] = type_utils.NOT_GIVEN,
27
+ request_options: typing.Optional[RequestOptions] = None,
28
+ ) -> models.V1AiTalkingPhotoCreateResponse:
29
+ """
30
+ AI Talking Photo
31
+
32
+ Create a talking photo from an image and audio or text input.
33
+
34
+ POST /v1/ai-talking-photo
35
+
36
+ Args:
37
+ name: The name of image
38
+ assets: Provide the assets for creating a talking photo
39
+ end_seconds: The end time of the input video in seconds
40
+ start_seconds: The start time of the input video in seconds
41
+ request_options: Additional options to customize the HTTP request
42
+
43
+ Returns:
44
+ Success
45
+
46
+ Raises:
47
+ ApiError: A custom exception class that provides additional context
48
+ for API errors, including the HTTP status code and response body.
49
+
50
+ Examples:
51
+ ```py
52
+ client.v1.ai_talking_photo.create(
53
+ assets={
54
+ "audio_file_path": "api-assets/id/1234.mp3",
55
+ "image_file_path": "api-assets/id/1234.png",
56
+ },
57
+ end_seconds=15.0,
58
+ start_seconds=0.0,
59
+ name="Talking Photo image",
60
+ )
61
+ ```
62
+ """
63
+ _json = to_encodable(
64
+ item={
65
+ "name": name,
66
+ "assets": assets,
67
+ "end_seconds": end_seconds,
68
+ "start_seconds": start_seconds,
69
+ },
70
+ dump_with=params._SerializerV1AiTalkingPhotoCreateBody,
71
+ )
72
+ return self._base_client.request(
73
+ method="POST",
74
+ path="/v1/ai-talking-photo",
75
+ auth_names=["bearerAuth"],
76
+ json=_json,
77
+ cast_to=models.V1AiTalkingPhotoCreateResponse,
78
+ request_options=request_options or default_request_options(),
79
+ )
80
+
81
+
82
+ class AsyncAiTalkingPhotoClient:
83
+ def __init__(self, *, base_client: AsyncBaseClient):
84
+ self._base_client = base_client
85
+
86
+ async def create(
87
+ self,
88
+ *,
89
+ assets: params.V1AiTalkingPhotoCreateBodyAssets,
90
+ end_seconds: float,
91
+ start_seconds: float,
92
+ name: typing.Union[
93
+ typing.Optional[str], type_utils.NotGiven
94
+ ] = type_utils.NOT_GIVEN,
95
+ request_options: typing.Optional[RequestOptions] = None,
96
+ ) -> models.V1AiTalkingPhotoCreateResponse:
97
+ """
98
+ AI Talking Photo
99
+
100
+ Create a talking photo from an image and audio or text input.
101
+
102
+ POST /v1/ai-talking-photo
103
+
104
+ Args:
105
+ name: The name of image
106
+ assets: Provide the assets for creating a talking photo
107
+ end_seconds: The end time of the input video in seconds
108
+ start_seconds: The start time of the input video in seconds
109
+ request_options: Additional options to customize the HTTP request
110
+
111
+ Returns:
112
+ Success
113
+
114
+ Raises:
115
+ ApiError: A custom exception class that provides additional context
116
+ for API errors, including the HTTP status code and response body.
117
+
118
+ Examples:
119
+ ```py
120
+ await client.v1.ai_talking_photo.create(
121
+ assets={
122
+ "audio_file_path": "api-assets/id/1234.mp3",
123
+ "image_file_path": "api-assets/id/1234.png",
124
+ },
125
+ end_seconds=15.0,
126
+ start_seconds=0.0,
127
+ name="Talking Photo image",
128
+ )
129
+ ```
130
+ """
131
+ _json = to_encodable(
132
+ item={
133
+ "name": name,
134
+ "assets": assets,
135
+ "end_seconds": end_seconds,
136
+ "start_seconds": start_seconds,
137
+ },
138
+ dump_with=params._SerializerV1AiTalkingPhotoCreateBody,
139
+ )
140
+ return await self._base_client.request(
141
+ method="POST",
142
+ path="/v1/ai-talking-photo",
143
+ auth_names=["bearerAuth"],
144
+ json=_json,
145
+ cast_to=models.V1AiTalkingPhotoCreateResponse,
146
+ request_options=request_options or default_request_options(),
147
+ )
@@ -18,17 +18,17 @@ class AnimationClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1AnimationBodyAssets,
21
+ assets: params.V1AnimationCreateBodyAssets,
22
22
  end_seconds: float,
23
23
  fps: float,
24
24
  height: int,
25
- style: params.PostV1AnimationBodyStyle,
25
+ style: params.V1AnimationCreateBodyStyle,
26
26
  width: int,
27
27
  name: typing.Union[
28
28
  typing.Optional[str], type_utils.NotGiven
29
29
  ] = type_utils.NOT_GIVEN,
30
30
  request_options: typing.Optional[RequestOptions] = None,
31
- ) -> models.PostV1AnimationResponse:
31
+ ) -> models.V1AnimationCreateResponse:
32
32
  """
33
33
  Animation
34
34
 
@@ -82,14 +82,14 @@ class AnimationClient:
82
82
  "style": style,
83
83
  "width": width,
84
84
  },
85
- dump_with=params._SerializerPostV1AnimationBody,
85
+ dump_with=params._SerializerV1AnimationCreateBody,
86
86
  )
87
87
  return self._base_client.request(
88
88
  method="POST",
89
89
  path="/v1/animation",
90
90
  auth_names=["bearerAuth"],
91
91
  json=_json,
92
- cast_to=models.PostV1AnimationResponse,
92
+ cast_to=models.V1AnimationCreateResponse,
93
93
  request_options=request_options or default_request_options(),
94
94
  )
95
95
 
@@ -101,17 +101,17 @@ class AsyncAnimationClient:
101
101
  async def create(
102
102
  self,
103
103
  *,
104
- assets: params.PostV1AnimationBodyAssets,
104
+ assets: params.V1AnimationCreateBodyAssets,
105
105
  end_seconds: float,
106
106
  fps: float,
107
107
  height: int,
108
- style: params.PostV1AnimationBodyStyle,
108
+ style: params.V1AnimationCreateBodyStyle,
109
109
  width: int,
110
110
  name: typing.Union[
111
111
  typing.Optional[str], type_utils.NotGiven
112
112
  ] = type_utils.NOT_GIVEN,
113
113
  request_options: typing.Optional[RequestOptions] = None,
114
- ) -> models.PostV1AnimationResponse:
114
+ ) -> models.V1AnimationCreateResponse:
115
115
  """
116
116
  Animation
117
117
 
@@ -165,13 +165,13 @@ class AsyncAnimationClient:
165
165
  "style": style,
166
166
  "width": width,
167
167
  },
168
- dump_with=params._SerializerPostV1AnimationBody,
168
+ dump_with=params._SerializerV1AnimationCreateBody,
169
169
  )
170
170
  return await self._base_client.request(
171
171
  method="POST",
172
172
  path="/v1/animation",
173
173
  auth_names=["bearerAuth"],
174
174
  json=_json,
175
- cast_to=models.PostV1AnimationResponse,
175
+ cast_to=models.V1AnimationCreateResponse,
176
176
  request_options=request_options or default_request_options(),
177
177
  )
@@ -23,6 +23,10 @@ from magic_hour.resources.v1.ai_qr_code_generator import (
23
23
  AiQrCodeGeneratorClient,
24
24
  AsyncAiQrCodeGeneratorClient,
25
25
  )
26
+ from magic_hour.resources.v1.ai_talking_photo import (
27
+ AiTalkingPhotoClient,
28
+ AsyncAiTalkingPhotoClient,
29
+ )
26
30
  from magic_hour.resources.v1.animation import AnimationClient, AsyncAnimationClient
27
31
  from magic_hour.resources.v1.face_swap import AsyncFaceSwapClient, FaceSwapClient
28
32
  from magic_hour.resources.v1.face_swap_photo import (
@@ -72,6 +76,7 @@ class V1Client:
72
76
  self.ai_qr_code_generator = AiQrCodeGeneratorClient(
73
77
  base_client=self._base_client
74
78
  )
79
+ self.ai_talking_photo = AiTalkingPhotoClient(base_client=self._base_client)
75
80
  self.animation = AnimationClient(base_client=self._base_client)
76
81
  self.face_swap = FaceSwapClient(base_client=self._base_client)
77
82
  self.face_swap_photo = FaceSwapPhotoClient(base_client=self._base_client)
@@ -106,6 +111,7 @@ class AsyncV1Client:
106
111
  self.ai_qr_code_generator = AsyncAiQrCodeGeneratorClient(
107
112
  base_client=self._base_client
108
113
  )
114
+ self.ai_talking_photo = AsyncAiTalkingPhotoClient(base_client=self._base_client)
109
115
  self.animation = AsyncAnimationClient(base_client=self._base_client)
110
116
  self.face_swap = AsyncFaceSwapClient(base_client=self._base_client)
111
117
  self.face_swap_photo = AsyncFaceSwapPhotoClient(base_client=self._base_client)
@@ -18,7 +18,7 @@ class FaceSwapClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1FaceSwapBodyAssets,
21
+ assets: params.V1FaceSwapCreateBodyAssets,
22
22
  end_seconds: float,
23
23
  height: int,
24
24
  start_seconds: float,
@@ -27,7 +27,7 @@ class FaceSwapClient:
27
27
  typing.Optional[str], type_utils.NotGiven
28
28
  ] = type_utils.NOT_GIVEN,
29
29
  request_options: typing.Optional[RequestOptions] = None,
30
- ) -> models.PostV1FaceSwapResponse:
30
+ ) -> models.V1FaceSwapCreateResponse:
31
31
  """
32
32
  Face Swap video
33
33
 
@@ -75,14 +75,14 @@ class FaceSwapClient:
75
75
  "start_seconds": start_seconds,
76
76
  "width": width,
77
77
  },
78
- dump_with=params._SerializerPostV1FaceSwapBody,
78
+ dump_with=params._SerializerV1FaceSwapCreateBody,
79
79
  )
80
80
  return self._base_client.request(
81
81
  method="POST",
82
82
  path="/v1/face-swap",
83
83
  auth_names=["bearerAuth"],
84
84
  json=_json,
85
- cast_to=models.PostV1FaceSwapResponse,
85
+ cast_to=models.V1FaceSwapCreateResponse,
86
86
  request_options=request_options or default_request_options(),
87
87
  )
88
88
 
@@ -94,7 +94,7 @@ class AsyncFaceSwapClient:
94
94
  async def create(
95
95
  self,
96
96
  *,
97
- assets: params.PostV1FaceSwapBodyAssets,
97
+ assets: params.V1FaceSwapCreateBodyAssets,
98
98
  end_seconds: float,
99
99
  height: int,
100
100
  start_seconds: float,
@@ -103,7 +103,7 @@ class AsyncFaceSwapClient:
103
103
  typing.Optional[str], type_utils.NotGiven
104
104
  ] = type_utils.NOT_GIVEN,
105
105
  request_options: typing.Optional[RequestOptions] = None,
106
- ) -> models.PostV1FaceSwapResponse:
106
+ ) -> models.V1FaceSwapCreateResponse:
107
107
  """
108
108
  Face Swap video
109
109
 
@@ -151,13 +151,13 @@ class AsyncFaceSwapClient:
151
151
  "start_seconds": start_seconds,
152
152
  "width": width,
153
153
  },
154
- dump_with=params._SerializerPostV1FaceSwapBody,
154
+ dump_with=params._SerializerV1FaceSwapCreateBody,
155
155
  )
156
156
  return await self._base_client.request(
157
157
  method="POST",
158
158
  path="/v1/face-swap",
159
159
  auth_names=["bearerAuth"],
160
160
  json=_json,
161
- cast_to=models.PostV1FaceSwapResponse,
161
+ cast_to=models.V1FaceSwapCreateResponse,
162
162
  request_options=request_options or default_request_options(),
163
163
  )
@@ -18,12 +18,12 @@ class FaceSwapPhotoClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1FaceSwapPhotoBodyAssets,
21
+ assets: params.V1FaceSwapPhotoCreateBodyAssets,
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.PostV1FaceSwapPhotoResponse:
26
+ ) -> models.V1FaceSwapPhotoCreateResponse:
27
27
  """
28
28
  Face Swap Photo
29
29
 
@@ -56,14 +56,14 @@ class FaceSwapPhotoClient:
56
56
  """
57
57
  _json = to_encodable(
58
58
  item={"name": name, "assets": assets},
59
- dump_with=params._SerializerPostV1FaceSwapPhotoBody,
59
+ dump_with=params._SerializerV1FaceSwapPhotoCreateBody,
60
60
  )
61
61
  return self._base_client.request(
62
62
  method="POST",
63
63
  path="/v1/face-swap-photo",
64
64
  auth_names=["bearerAuth"],
65
65
  json=_json,
66
- cast_to=models.PostV1FaceSwapPhotoResponse,
66
+ cast_to=models.V1FaceSwapPhotoCreateResponse,
67
67
  request_options=request_options or default_request_options(),
68
68
  )
69
69
 
@@ -75,12 +75,12 @@ class AsyncFaceSwapPhotoClient:
75
75
  async def create(
76
76
  self,
77
77
  *,
78
- assets: params.PostV1FaceSwapPhotoBodyAssets,
78
+ assets: params.V1FaceSwapPhotoCreateBodyAssets,
79
79
  name: typing.Union[
80
80
  typing.Optional[str], type_utils.NotGiven
81
81
  ] = type_utils.NOT_GIVEN,
82
82
  request_options: typing.Optional[RequestOptions] = None,
83
- ) -> models.PostV1FaceSwapPhotoResponse:
83
+ ) -> models.V1FaceSwapPhotoCreateResponse:
84
84
  """
85
85
  Face Swap Photo
86
86
 
@@ -113,13 +113,13 @@ class AsyncFaceSwapPhotoClient:
113
113
  """
114
114
  _json = to_encodable(
115
115
  item={"name": name, "assets": assets},
116
- dump_with=params._SerializerPostV1FaceSwapPhotoBody,
116
+ dump_with=params._SerializerV1FaceSwapPhotoCreateBody,
117
117
  )
118
118
  return await self._base_client.request(
119
119
  method="POST",
120
120
  path="/v1/face-swap-photo",
121
121
  auth_names=["bearerAuth"],
122
122
  json=_json,
123
- cast_to=models.PostV1FaceSwapPhotoResponse,
123
+ cast_to=models.V1FaceSwapPhotoCreateResponse,
124
124
  request_options=request_options or default_request_options(),
125
125
  )
@@ -34,8 +34,8 @@ from os import getenv
34
34
  client = Client(token=getenv("API_TOKEN"))
35
35
  res = client.v1.files.upload_urls.create(
36
36
  items=[
37
- {"extension": "mp4", "type_field": "video"},
38
- {"extension": "mp3", "type_field": "audio"},
37
+ {"extension": "mp4", "type_": "video"},
38
+ {"extension": "mp3", "type_": "audio"},
39
39
  ]
40
40
  )
41
41
  ```
@@ -49,8 +49,8 @@ from os import getenv
49
49
  client = AsyncClient(token=getenv("API_TOKEN"))
50
50
  res = await client.v1.files.upload_urls.create(
51
51
  items=[
52
- {"extension": "mp4", "type_field": "video"},
53
- {"extension": "mp3", "type_field": "audio"},
52
+ {"extension": "mp4", "type_": "video"},
53
+ {"extension": "mp3", "type_": "audio"},
54
54
  ]
55
55
  )
56
56
  ```
@@ -17,9 +17,9 @@ class UploadUrlsClient:
17
17
  def create(
18
18
  self,
19
19
  *,
20
- items: typing.List[params.PostV1FilesUploadUrlsBodyItemsItem],
20
+ items: typing.List[params.V1FilesUploadUrlsCreateBodyItemsItem],
21
21
  request_options: typing.Optional[RequestOptions] = None,
22
- ) -> models.PostV1FilesUploadUrlsResponse:
22
+ ) -> models.V1FilesUploadUrlsCreateResponse:
23
23
  """
24
24
  Generate asset upload urls
25
25
 
@@ -47,7 +47,7 @@ class UploadUrlsClient:
47
47
  POST /v1/files/upload-urls
48
48
 
49
49
  Args:
50
- items: typing.List[PostV1FilesUploadUrlsBodyItemsItem]
50
+ items: typing.List[V1FilesUploadUrlsCreateBodyItemsItem]
51
51
  request_options: Additional options to customize the HTTP request
52
52
 
53
53
  Returns:
@@ -59,18 +59,19 @@ class UploadUrlsClient:
59
59
 
60
60
  Examples:
61
61
  ```py
62
- client.v1.files.upload_urls.create(items=[{"extension": "mp4", "type_field": "video"}, {"extension": "mp3", "type_field": "audio"}])
62
+ client.v1.files.upload_urls.create(items=[{"extension": "mp4", "type_": "video"}, {"extension": "mp3", "type_": "audio"}])
63
63
  ```
64
64
  """
65
65
  _json = to_encodable(
66
- item={"items": items}, dump_with=params._SerializerPostV1FilesUploadUrlsBody
66
+ item={"items": items},
67
+ dump_with=params._SerializerV1FilesUploadUrlsCreateBody,
67
68
  )
68
69
  return self._base_client.request(
69
70
  method="POST",
70
71
  path="/v1/files/upload-urls",
71
72
  auth_names=["bearerAuth"],
72
73
  json=_json,
73
- cast_to=models.PostV1FilesUploadUrlsResponse,
74
+ cast_to=models.V1FilesUploadUrlsCreateResponse,
74
75
  request_options=request_options or default_request_options(),
75
76
  )
76
77
 
@@ -82,9 +83,9 @@ class AsyncUploadUrlsClient:
82
83
  async def create(
83
84
  self,
84
85
  *,
85
- items: typing.List[params.PostV1FilesUploadUrlsBodyItemsItem],
86
+ items: typing.List[params.V1FilesUploadUrlsCreateBodyItemsItem],
86
87
  request_options: typing.Optional[RequestOptions] = None,
87
- ) -> models.PostV1FilesUploadUrlsResponse:
88
+ ) -> models.V1FilesUploadUrlsCreateResponse:
88
89
  """
89
90
  Generate asset upload urls
90
91
 
@@ -112,7 +113,7 @@ class AsyncUploadUrlsClient:
112
113
  POST /v1/files/upload-urls
113
114
 
114
115
  Args:
115
- items: typing.List[PostV1FilesUploadUrlsBodyItemsItem]
116
+ items: typing.List[V1FilesUploadUrlsCreateBodyItemsItem]
116
117
  request_options: Additional options to customize the HTTP request
117
118
 
118
119
  Returns:
@@ -124,17 +125,18 @@ class AsyncUploadUrlsClient:
124
125
 
125
126
  Examples:
126
127
  ```py
127
- await client.v1.files.upload_urls.create(items=[{"extension": "mp4", "type_field": "video"}, {"extension": "mp3", "type_field": "audio"}])
128
+ await client.v1.files.upload_urls.create(items=[{"extension": "mp4", "type_": "video"}, {"extension": "mp3", "type_": "audio"}])
128
129
  ```
129
130
  """
130
131
  _json = to_encodable(
131
- item={"items": items}, dump_with=params._SerializerPostV1FilesUploadUrlsBody
132
+ item={"items": items},
133
+ dump_with=params._SerializerV1FilesUploadUrlsCreateBody,
132
134
  )
133
135
  return await self._base_client.request(
134
136
  method="POST",
135
137
  path="/v1/files/upload-urls",
136
138
  auth_names=["bearerAuth"],
137
139
  json=_json,
138
- cast_to=models.PostV1FilesUploadUrlsResponse,
140
+ cast_to=models.V1FilesUploadUrlsCreateResponse,
139
141
  request_options=request_options or default_request_options(),
140
142
  )
@@ -18,12 +18,12 @@ class ImageBackgroundRemoverClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1ImageBackgroundRemoverBodyAssets,
21
+ assets: params.V1ImageBackgroundRemoverCreateBodyAssets,
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.PostV1ImageBackgroundRemoverResponse:
26
+ ) -> models.V1ImageBackgroundRemoverCreateResponse:
27
27
  """
28
28
  Image Background Remover
29
29
 
@@ -53,14 +53,14 @@ class ImageBackgroundRemoverClient:
53
53
  """
54
54
  _json = to_encodable(
55
55
  item={"name": name, "assets": assets},
56
- dump_with=params._SerializerPostV1ImageBackgroundRemoverBody,
56
+ dump_with=params._SerializerV1ImageBackgroundRemoverCreateBody,
57
57
  )
58
58
  return self._base_client.request(
59
59
  method="POST",
60
60
  path="/v1/image-background-remover",
61
61
  auth_names=["bearerAuth"],
62
62
  json=_json,
63
- cast_to=models.PostV1ImageBackgroundRemoverResponse,
63
+ cast_to=models.V1ImageBackgroundRemoverCreateResponse,
64
64
  request_options=request_options or default_request_options(),
65
65
  )
66
66
 
@@ -72,12 +72,12 @@ class AsyncImageBackgroundRemoverClient:
72
72
  async def create(
73
73
  self,
74
74
  *,
75
- assets: params.PostV1ImageBackgroundRemoverBodyAssets,
75
+ assets: params.V1ImageBackgroundRemoverCreateBodyAssets,
76
76
  name: typing.Union[
77
77
  typing.Optional[str], type_utils.NotGiven
78
78
  ] = type_utils.NOT_GIVEN,
79
79
  request_options: typing.Optional[RequestOptions] = None,
80
- ) -> models.PostV1ImageBackgroundRemoverResponse:
80
+ ) -> models.V1ImageBackgroundRemoverCreateResponse:
81
81
  """
82
82
  Image Background Remover
83
83
 
@@ -107,13 +107,13 @@ class AsyncImageBackgroundRemoverClient:
107
107
  """
108
108
  _json = to_encodable(
109
109
  item={"name": name, "assets": assets},
110
- dump_with=params._SerializerPostV1ImageBackgroundRemoverBody,
110
+ dump_with=params._SerializerV1ImageBackgroundRemoverCreateBody,
111
111
  )
112
112
  return await self._base_client.request(
113
113
  method="POST",
114
114
  path="/v1/image-background-remover",
115
115
  auth_names=["bearerAuth"],
116
116
  json=_json,
117
- cast_to=models.PostV1ImageBackgroundRemoverResponse,
117
+ cast_to=models.V1ImageBackgroundRemoverCreateResponse,
118
118
  request_options=request_options or default_request_options(),
119
119
  )
@@ -49,7 +49,7 @@ class ImageProjectsClient:
49
49
 
50
50
  def get(
51
51
  self, *, id: str, request_options: typing.Optional[RequestOptions] = None
52
- ) -> models.GetV1ImageProjectsIdResponse:
52
+ ) -> models.V1ImageProjectsGetResponse:
53
53
  """
54
54
  Get image details
55
55
 
@@ -86,7 +86,7 @@ class ImageProjectsClient:
86
86
  method="GET",
87
87
  path=f"/v1/image-projects/{id}",
88
88
  auth_names=["bearerAuth"],
89
- cast_to=models.GetV1ImageProjectsIdResponse,
89
+ cast_to=models.V1ImageProjectsGetResponse,
90
90
  request_options=request_options or default_request_options(),
91
91
  )
92
92
 
@@ -131,7 +131,7 @@ class AsyncImageProjectsClient:
131
131
 
132
132
  async def get(
133
133
  self, *, id: str, request_options: typing.Optional[RequestOptions] = None
134
- ) -> models.GetV1ImageProjectsIdResponse:
134
+ ) -> models.V1ImageProjectsGetResponse:
135
135
  """
136
136
  Get image details
137
137
 
@@ -168,6 +168,6 @@ class AsyncImageProjectsClient:
168
168
  method="GET",
169
169
  path=f"/v1/image-projects/{id}",
170
170
  auth_names=["bearerAuth"],
171
- cast_to=models.GetV1ImageProjectsIdResponse,
171
+ cast_to=models.V1ImageProjectsGetResponse,
172
172
  request_options=request_options or default_request_options(),
173
173
  )
@@ -18,16 +18,16 @@ class ImageToVideoClient:
18
18
  def create(
19
19
  self,
20
20
  *,
21
- assets: params.PostV1ImageToVideoBodyAssets,
21
+ assets: params.V1ImageToVideoCreateBodyAssets,
22
22
  end_seconds: float,
23
23
  height: int,
24
- style: params.PostV1ImageToVideoBodyStyle,
24
+ style: params.V1ImageToVideoCreateBodyStyle,
25
25
  width: int,
26
26
  name: typing.Union[
27
27
  typing.Optional[str], type_utils.NotGiven
28
28
  ] = type_utils.NOT_GIVEN,
29
29
  request_options: typing.Optional[RequestOptions] = None,
30
- ) -> models.PostV1ImageToVideoResponse:
30
+ ) -> models.V1ImageToVideoCreateResponse:
31
31
  """
32
32
  Image-to-Video
33
33
 
@@ -43,7 +43,7 @@ class ImageToVideoClient:
43
43
  assets: Provide the assets for image-to-video.
44
44
  end_seconds: The total duration of the output video in seconds.
45
45
  height: The height of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
46
- style: PostV1ImageToVideoBodyStyle
46
+ style: V1ImageToVideoCreateBodyStyle
47
47
  width: The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
48
48
  request_options: Additional options to customize the HTTP request
49
49
 
@@ -75,14 +75,14 @@ class ImageToVideoClient:
75
75
  "style": style,
76
76
  "width": width,
77
77
  },
78
- dump_with=params._SerializerPostV1ImageToVideoBody,
78
+ dump_with=params._SerializerV1ImageToVideoCreateBody,
79
79
  )
80
80
  return self._base_client.request(
81
81
  method="POST",
82
82
  path="/v1/image-to-video",
83
83
  auth_names=["bearerAuth"],
84
84
  json=_json,
85
- cast_to=models.PostV1ImageToVideoResponse,
85
+ cast_to=models.V1ImageToVideoCreateResponse,
86
86
  request_options=request_options or default_request_options(),
87
87
  )
88
88
 
@@ -94,16 +94,16 @@ class AsyncImageToVideoClient:
94
94
  async def create(
95
95
  self,
96
96
  *,
97
- assets: params.PostV1ImageToVideoBodyAssets,
97
+ assets: params.V1ImageToVideoCreateBodyAssets,
98
98
  end_seconds: float,
99
99
  height: int,
100
- style: params.PostV1ImageToVideoBodyStyle,
100
+ style: params.V1ImageToVideoCreateBodyStyle,
101
101
  width: int,
102
102
  name: typing.Union[
103
103
  typing.Optional[str], type_utils.NotGiven
104
104
  ] = type_utils.NOT_GIVEN,
105
105
  request_options: typing.Optional[RequestOptions] = None,
106
- ) -> models.PostV1ImageToVideoResponse:
106
+ ) -> models.V1ImageToVideoCreateResponse:
107
107
  """
108
108
  Image-to-Video
109
109
 
@@ -119,7 +119,7 @@ class AsyncImageToVideoClient:
119
119
  assets: Provide the assets for image-to-video.
120
120
  end_seconds: The total duration of the output video in seconds.
121
121
  height: The height of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
122
- style: PostV1ImageToVideoBodyStyle
122
+ style: V1ImageToVideoCreateBodyStyle
123
123
  width: The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
124
124
  request_options: Additional options to customize the HTTP request
125
125
 
@@ -151,13 +151,13 @@ class AsyncImageToVideoClient:
151
151
  "style": style,
152
152
  "width": width,
153
153
  },
154
- dump_with=params._SerializerPostV1ImageToVideoBody,
154
+ dump_with=params._SerializerV1ImageToVideoCreateBody,
155
155
  )
156
156
  return await self._base_client.request(
157
157
  method="POST",
158
158
  path="/v1/image-to-video",
159
159
  auth_names=["bearerAuth"],
160
160
  json=_json,
161
- cast_to=models.PostV1ImageToVideoResponse,
161
+ cast_to=models.V1ImageToVideoCreateResponse,
162
162
  request_options=request_options or default_request_options(),
163
163
  )