magic_hour 0.33.1__py3-none-any.whl → 0.35.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 (103) hide show
  1. magic_hour/environment.py +1 -1
  2. magic_hour/resources/v1/ai_clothes_changer/README.md +5 -5
  3. magic_hour/resources/v1/ai_clothes_changer/client.py +4 -4
  4. magic_hour/resources/v1/ai_face_editor/README.md +2 -2
  5. magic_hour/resources/v1/ai_face_editor/client.py +2 -2
  6. magic_hour/resources/v1/ai_gif_generator/README.md +2 -2
  7. magic_hour/resources/v1/ai_gif_generator/client.py +2 -2
  8. magic_hour/resources/v1/ai_headshot_generator/README.md +3 -3
  9. magic_hour/resources/v1/ai_headshot_generator/client.py +2 -2
  10. magic_hour/resources/v1/ai_image_editor/README.md +2 -2
  11. magic_hour/resources/v1/ai_image_editor/client.py +2 -2
  12. magic_hour/resources/v1/ai_image_generator/README.md +5 -5
  13. magic_hour/resources/v1/ai_image_generator/client.py +8 -8
  14. magic_hour/resources/v1/ai_image_upscaler/README.md +3 -3
  15. magic_hour/resources/v1/ai_image_upscaler/client.py +8 -4
  16. magic_hour/resources/v1/ai_meme_generator/README.md +1 -1
  17. magic_hour/resources/v1/ai_photo_editor/README.md +2 -2
  18. magic_hour/resources/v1/ai_photo_editor/client.py +2 -2
  19. magic_hour/resources/v1/ai_qr_code_generator/README.md +2 -2
  20. magic_hour/resources/v1/ai_qr_code_generator/client.py +2 -2
  21. magic_hour/resources/v1/ai_talking_photo/README.md +2 -2
  22. magic_hour/resources/v1/ai_talking_photo/client.py +2 -2
  23. magic_hour/resources/v1/animation/README.md +8 -8
  24. magic_hour/resources/v1/animation/client.py +8 -8
  25. magic_hour/resources/v1/auto_subtitle_generator/README.md +4 -4
  26. magic_hour/resources/v1/auto_subtitle_generator/client.py +6 -6
  27. magic_hour/resources/v1/face_detection/README.md +10 -6
  28. magic_hour/resources/v1/face_detection/client.py +12 -4
  29. magic_hour/resources/v1/face_swap/README.md +6 -10
  30. magic_hour/resources/v1/face_swap/client.py +26 -34
  31. magic_hour/resources/v1/face_swap_photo/README.md +2 -2
  32. magic_hour/resources/v1/face_swap_photo/client.py +2 -2
  33. magic_hour/resources/v1/files/upload_urls/README.md +7 -6
  34. magic_hour/resources/v1/files/upload_urls/client.py +14 -12
  35. magic_hour/resources/v1/image_background_remover/README.md +2 -2
  36. magic_hour/resources/v1/image_background_remover/client.py +2 -2
  37. magic_hour/resources/v1/image_projects/README.md +8 -8
  38. magic_hour/resources/v1/image_projects/client.py +10 -10
  39. magic_hour/resources/v1/image_to_video/README.md +7 -5
  40. magic_hour/resources/v1/image_to_video/client.py +34 -12
  41. magic_hour/resources/v1/lip_sync/README.md +6 -10
  42. magic_hour/resources/v1/lip_sync/client.py +26 -34
  43. magic_hour/resources/v1/photo_colorizer/README.md +2 -2
  44. magic_hour/resources/v1/photo_colorizer/client.py +2 -2
  45. magic_hour/resources/v1/text_to_video/README.md +6 -4
  46. magic_hour/resources/v1/text_to_video/client.py +18 -4
  47. magic_hour/resources/v1/video_projects/README.md +7 -7
  48. magic_hour/resources/v1/video_projects/client.py +8 -8
  49. magic_hour/resources/v1/video_to_video/README.md +11 -15
  50. magic_hour/resources/v1/video_to_video/client.py +30 -38
  51. magic_hour/types/models/v1_face_detection_create_response.py +1 -1
  52. magic_hour/types/models/v1_face_detection_get_response.py +1 -1
  53. magic_hour/types/models/v1_files_upload_urls_create_response.py +3 -0
  54. magic_hour/types/models/v1_video_projects_get_response.py +2 -2
  55. magic_hour/types/params/v1_ai_clothes_changer_create_body.py +1 -1
  56. magic_hour/types/params/v1_ai_clothes_changer_create_body_assets.py +15 -2
  57. magic_hour/types/params/v1_ai_face_editor_create_body.py +1 -1
  58. magic_hour/types/params/v1_ai_face_editor_create_body_assets.py +6 -1
  59. magic_hour/types/params/v1_ai_face_editor_create_body_style.py +44 -47
  60. magic_hour/types/params/v1_ai_gif_generator_create_body.py +1 -1
  61. magic_hour/types/params/v1_ai_headshot_generator_create_body.py +1 -1
  62. magic_hour/types/params/v1_ai_headshot_generator_create_body_assets.py +6 -1
  63. magic_hour/types/params/v1_ai_headshot_generator_create_body_style.py +1 -1
  64. magic_hour/types/params/v1_ai_image_editor_create_body.py +1 -1
  65. magic_hour/types/params/v1_ai_image_editor_create_body_assets.py +6 -1
  66. magic_hour/types/params/v1_ai_image_generator_create_body.py +8 -2
  67. magic_hour/types/params/v1_ai_image_generator_create_body_style.py +2 -2
  68. magic_hour/types/params/v1_ai_image_upscaler_create_body.py +4 -2
  69. magic_hour/types/params/v1_ai_image_upscaler_create_body_assets.py +6 -1
  70. magic_hour/types/params/v1_ai_photo_editor_create_body.py +1 -1
  71. magic_hour/types/params/v1_ai_photo_editor_create_body_assets.py +6 -1
  72. magic_hour/types/params/v1_ai_qr_code_generator_create_body.py +1 -1
  73. magic_hour/types/params/v1_ai_talking_photo_create_body.py +1 -1
  74. magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py +12 -2
  75. magic_hour/types/params/v1_animation_create_body.py +2 -2
  76. magic_hour/types/params/v1_animation_create_body_assets.py +12 -2
  77. magic_hour/types/params/v1_animation_create_body_style.py +10 -7
  78. magic_hour/types/params/v1_auto_subtitle_generator_create_body.py +3 -3
  79. magic_hour/types/params/v1_auto_subtitle_generator_create_body_assets.py +6 -1
  80. magic_hour/types/params/v1_face_detection_create_body_assets.py +6 -1
  81. magic_hour/types/params/v1_face_swap_create_body.py +15 -17
  82. magic_hour/types/params/v1_face_swap_create_body_assets.py +12 -2
  83. magic_hour/types/params/v1_face_swap_create_body_assets_face_mappings_item.py +6 -1
  84. magic_hour/types/params/v1_face_swap_photo_create_body.py +1 -1
  85. magic_hour/types/params/v1_face_swap_photo_create_body_assets.py +12 -2
  86. magic_hour/types/params/v1_face_swap_photo_create_body_assets_face_mappings_item.py +6 -1
  87. magic_hour/types/params/v1_files_upload_urls_create_body.py +3 -0
  88. magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +2 -2
  89. magic_hour/types/params/v1_image_background_remover_create_body.py +1 -1
  90. magic_hour/types/params/v1_image_background_remover_create_body_assets.py +12 -2
  91. magic_hour/types/params/v1_image_to_video_create_body.py +18 -8
  92. magic_hour/types/params/v1_image_to_video_create_body_assets.py +6 -1
  93. magic_hour/types/params/v1_lip_sync_create_body.py +15 -17
  94. magic_hour/types/params/v1_lip_sync_create_body_assets.py +12 -2
  95. magic_hour/types/params/v1_photo_colorizer_create_body.py +1 -1
  96. magic_hour/types/params/v1_photo_colorizer_create_body_assets.py +6 -1
  97. magic_hour/types/params/v1_text_to_video_create_body.py +8 -2
  98. magic_hour/types/params/v1_video_to_video_create_body.py +15 -17
  99. magic_hour/types/params/v1_video_to_video_create_body_assets.py +6 -1
  100. {magic_hour-0.33.1.dist-info → magic_hour-0.35.0.dist-info}/METADATA +1 -1
  101. {magic_hour-0.33.1.dist-info → magic_hour-0.35.0.dist-info}/RECORD +103 -103
  102. {magic_hour-0.33.1.dist-info → magic_hour-0.35.0.dist-info}/LICENSE +0 -0
  103. {magic_hour-0.33.1.dist-info → magic_hour-0.35.0.dist-info}/WHEEL +0 -0
@@ -1,7 +1,9 @@
1
1
 
2
2
  ### Get face detection details <a name="get"></a>
3
3
 
4
- Get the details of a face detection task.
4
+ Get the details of a face detection task.
5
+
6
+ Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
5
7
 
6
8
  **API Endpoint**: `GET /v1/face-detection/{id}`
7
9
 
@@ -9,7 +11,7 @@ Get the details of a face detection task.
9
11
 
10
12
  | Parameter | Required | Description | Example |
11
13
  |-----------|:--------:|-------------|--------|
12
- | `id` | ✓ | The id of the task | `"string"` |
14
+ | `id` | ✓ | The id of the task. This value is returned by the [face detection API](/api-reference/files/face-detection#response-id). | `"uuid-example"` |
13
15
 
14
16
  #### Synchronous Client
15
17
 
@@ -18,7 +20,7 @@ from magic_hour import Client
18
20
  from os import getenv
19
21
 
20
22
  client = Client(token=getenv("API_TOKEN"))
21
- res = client.v1.face_detection.get(id="string")
23
+ res = client.v1.face_detection.get(id="uuid-example")
22
24
 
23
25
  ```
24
26
 
@@ -29,7 +31,7 @@ from magic_hour import AsyncClient
29
31
  from os import getenv
30
32
 
31
33
  client = AsyncClient(token=getenv("API_TOKEN"))
32
- res = await client.v1.face_detection.get(id="string")
34
+ res = await client.v1.face_detection.get(id="uuid-example")
33
35
 
34
36
  ```
35
37
 
@@ -39,11 +41,13 @@ res = await client.v1.face_detection.get(id="string")
39
41
  [V1FaceDetectionGetResponse](/magic_hour/types/models/v1_face_detection_get_response.py)
40
42
 
41
43
  ##### Example
42
- `{"credits_charged": 123, "faces": [{"path": "api-assets/id/0-0.png", "url": "https://videos.magichour.ai/api-assets/id/0-0.png"}], "id": "string", "status": "complete"}`
44
+ `{"credits_charged": 0, "faces": [{"path": "api-assets/id/0-0.png", "url": "https://videos.magichour.ai/api-assets/id/0-0.png"}], "id": "uuid-example", "status": "complete"}`
43
45
 
44
46
  ### Face Detection <a name="create"></a>
45
47
 
46
48
  Detect faces in an image or video.
49
+
50
+ Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
47
51
 
48
52
  Note: Face detection is free to use for the near future. Pricing may change in the future.
49
53
 
@@ -88,4 +92,4 @@ res = await client.v1.face_detection.create(
88
92
  [V1FaceDetectionCreateResponse](/magic_hour/types/models/v1_face_detection_create_response.py)
89
93
 
90
94
  ##### Example
91
- `{"credits_charged": 123, "id": "string"}`
95
+ `{"credits_charged": 123, "id": "uuid-example"}`
@@ -23,10 +23,12 @@ class FaceDetectionClient:
23
23
 
24
24
  Get the details of a face detection task.
25
25
 
26
+ Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
27
+
26
28
  GET /v1/face-detection/{id}
27
29
 
28
30
  Args:
29
- id: The id of the task
31
+ id: The id of the task. This value is returned by the [face detection API](/api-reference/files/face-detection#response-id).
30
32
  request_options: Additional options to customize the HTTP request
31
33
 
32
34
  Returns:
@@ -38,7 +40,7 @@ class FaceDetectionClient:
38
40
 
39
41
  Examples:
40
42
  ```py
41
- client.v1.face_detection.get(id="string")
43
+ client.v1.face_detection.get(id="uuid-example")
42
44
  ```
43
45
  """
44
46
  return self._base_client.request(
@@ -63,6 +65,8 @@ class FaceDetectionClient:
63
65
 
64
66
  Detect faces in an image or video.
65
67
 
68
+ Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
69
+
66
70
  Note: Face detection is free to use for the near future. Pricing may change in the future.
67
71
 
68
72
  POST /v1/face-detection
@@ -114,10 +118,12 @@ class AsyncFaceDetectionClient:
114
118
 
115
119
  Get the details of a face detection task.
116
120
 
121
+ Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
122
+
117
123
  GET /v1/face-detection/{id}
118
124
 
119
125
  Args:
120
- id: The id of the task
126
+ id: The id of the task. This value is returned by the [face detection API](/api-reference/files/face-detection#response-id).
121
127
  request_options: Additional options to customize the HTTP request
122
128
 
123
129
  Returns:
@@ -129,7 +135,7 @@ class AsyncFaceDetectionClient:
129
135
 
130
136
  Examples:
131
137
  ```py
132
- await client.v1.face_detection.get(id="string")
138
+ await client.v1.face_detection.get(id="uuid-example")
133
139
  ```
134
140
  """
135
141
  return await self._base_client.request(
@@ -154,6 +160,8 @@ class AsyncFaceDetectionClient:
154
160
 
155
161
  Detect faces in an image or video.
156
162
 
163
+ Use this API to get the list of faces detected in the image or video to use in the [face swap photo](/api-reference/face-swap-photo/face-swap-photo) or [face swap video](/api-reference/face-swap/face-swap-video) API calls for multi-face swaps.
164
+
157
165
  Note: Face detection is free to use for the near future. Pricing may change in the future.
158
166
 
159
167
  POST /v1/face-detection
@@ -13,11 +13,11 @@ Get more information about this mode at our [product page](https://magichour.ai/
13
13
  | Parameter | Required | Description | Example |
14
14
  |-----------|:--------:|-------------|--------|
15
15
  | `assets` | ✓ | Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used | `{"face_mappings": [{"new_face": "api-assets/id/1234.png", "original_face": "api-assets/id/0-0.png"}], "face_swap_mode": "all-faces", "image_file_path": "image/id/1234.png", "video_file_path": "api-assets/id/1234.mp4", "video_source": "file"}` |
16
- | `end_seconds` | ✓ | The end time of the input video in seconds | `15.0` |
17
- | `start_seconds` | ✓ | The start time of the input video in seconds | `0.0` |
18
- | `height` | ✗ | Used to determine the dimensions of the output video. * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio. * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio. Note: if the video's original resolution is less than the maximum, the video will not be resized. See our [pricing page](https://magichour.ai/pricing) for more details. | `960` |
19
- | `name` | ✗ | The name of video | `"Face Swap video"` |
20
- | `width` | ✗ | Used to determine the dimensions of the output video. * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio. * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio. Note: if the video's original resolution is less than the maximum, the video will not be resized. See our [pricing page](https://magichour.ai/pricing) for more details. | `512` |
16
+ | `end_seconds` | ✓ | The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds. | `15.0` |
17
+ | `start_seconds` | ✓ | The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0. | `0.0` |
18
+ | `height` | ✗ | `height` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
19
+ | `name` | ✗ | The name of video. This value is mainly used for your own identification of the video. | `"Face Swap video"` |
20
+ | `width` | ✗ | `width` is deprecated and no longer influences the output video's resolution. Output resolution is determined by the **minimum** of: - The resolution of the input video - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
21
21
 
22
22
  #### Synchronous Client
23
23
 
@@ -41,9 +41,7 @@ res = client.v1.face_swap.create(
41
41
  },
42
42
  end_seconds=15.0,
43
43
  start_seconds=0.0,
44
- height=960,
45
44
  name="Face Swap video",
46
- width=512,
47
45
  )
48
46
 
49
47
  ```
@@ -70,9 +68,7 @@ res = await client.v1.face_swap.create(
70
68
  },
71
69
  end_seconds=15.0,
72
70
  start_seconds=0.0,
73
- height=960,
74
71
  name="Face Swap video",
75
- width=512,
76
72
  )
77
73
 
78
74
  ```
@@ -83,4 +79,4 @@ res = await client.v1.face_swap.create(
83
79
  [V1FaceSwapCreateResponse](/magic_hour/types/models/v1_face_swap_create_response.py)
84
80
 
85
81
  ##### Example
86
- `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "clx7uu86w0a5qp55yxz315r6r"}`
82
+ `{"credits_charged": 450, "estimated_frame_cost": 450, "id": "cuid-example"}`
@@ -43,26 +43,24 @@ class FaceSwapClient:
43
43
  POST /v1/face-swap
44
44
 
45
45
  Args:
46
- height: Used to determine the dimensions of the output video.
46
+ height: `height` is deprecated and no longer influences the output video's resolution.
47
47
 
48
- * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
49
- * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
48
+ Output resolution is determined by the **minimum** of:
49
+ - The resolution of the input video
50
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
50
51
 
51
- Note: if the video's original resolution is less than the maximum, the video will not be resized.
52
+ This field is retained only for backward compatibility and will be removed in a future release.
53
+ name: The name of video. This value is mainly used for your own identification of the video.
54
+ width: `width` is deprecated and no longer influences the output video's resolution.
52
55
 
53
- See our [pricing page](https://magichour.ai/pricing) for more details.
54
- name: The name of video
55
- width: Used to determine the dimensions of the output video.
56
+ Output resolution is determined by the **minimum** of:
57
+ - The resolution of the input video
58
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
56
59
 
57
- * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
58
- * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
59
-
60
- Note: if the video's original resolution is less than the maximum, the video will not be resized.
61
-
62
- See our [pricing page](https://magichour.ai/pricing) for more details.
60
+ This field is retained only for backward compatibility and will be removed in a future release.
63
61
  assets: Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
64
- end_seconds: The end time of the input video in seconds
65
- start_seconds: The start time of the input video in seconds
62
+ end_seconds: The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.
63
+ start_seconds: The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
66
64
  request_options: Additional options to customize the HTTP request
67
65
 
68
66
  Returns:
@@ -89,9 +87,7 @@ class FaceSwapClient:
89
87
  },
90
88
  end_seconds=15.0,
91
89
  start_seconds=0.0,
92
- height=960,
93
90
  name="Face Swap video",
94
- width=512,
95
91
  )
96
92
  ```
97
93
  """
@@ -148,26 +144,24 @@ class AsyncFaceSwapClient:
148
144
  POST /v1/face-swap
149
145
 
150
146
  Args:
151
- height: Used to determine the dimensions of the output video.
152
-
153
- * If height is provided, width will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
154
- * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
155
-
156
- Note: if the video's original resolution is less than the maximum, the video will not be resized.
147
+ height: `height` is deprecated and no longer influences the output video's resolution.
157
148
 
158
- See our [pricing page](https://magichour.ai/pricing) for more details.
159
- name: The name of video
160
- width: Used to determine the dimensions of the output video.
149
+ Output resolution is determined by the **minimum** of:
150
+ - The resolution of the input video
151
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
161
152
 
162
- * If width is provided, height will also be required. The larger value between width and height will be used to determine the maximum output resolution while maintaining the original aspect ratio.
163
- * If both height and width are omitted, the video will be resized according to your subscription's maximum resolution, while preserving aspect ratio.
153
+ This field is retained only for backward compatibility and will be removed in a future release.
154
+ name: The name of video. This value is mainly used for your own identification of the video.
155
+ width: `width` is deprecated and no longer influences the output video's resolution.
164
156
 
165
- Note: if the video's original resolution is less than the maximum, the video will not be resized.
157
+ Output resolution is determined by the **minimum** of:
158
+ - The resolution of the input video
159
+ - The maximum resolution allowed by your subscription tier. See our [pricing page](https://magichour.ai/pricing) for more details.
166
160
 
167
- See our [pricing page](https://magichour.ai/pricing) for more details.
161
+ This field is retained only for backward compatibility and will be removed in a future release.
168
162
  assets: Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
169
- end_seconds: The end time of the input video in seconds
170
- start_seconds: The start time of the input video in seconds
163
+ end_seconds: The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.
164
+ start_seconds: The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.
171
165
  request_options: Additional options to customize the HTTP request
172
166
 
173
167
  Returns:
@@ -194,9 +188,7 @@ class AsyncFaceSwapClient:
194
188
  },
195
189
  end_seconds=15.0,
196
190
  start_seconds=0.0,
197
- height=960,
198
191
  name="Face Swap video",
199
- width=512,
200
192
  )
201
193
  ```
202
194
  """
@@ -10,7 +10,7 @@ Create a face swap photo. Each photo costs 5 credits. The height/width of the ou
10
10
  | Parameter | Required | Description | Example |
11
11
  |-----------|:--------:|-------------|--------|
12
12
  | `assets` | ✓ | Provide the assets for face swap photo | `{"face_mappings": [{"new_face": "api-assets/id/1234.png", "original_face": "api-assets/id/0-0.png"}], "face_swap_mode": "all-faces", "source_file_path": "api-assets/id/1234.png", "target_file_path": "api-assets/id/1234.png"}` |
13
- | `name` | ✗ | The name of image | `"Face Swap image"` |
13
+ | `name` | ✗ | The name of image. This value is mainly used for your own identification of the image. | `"Face Swap image"` |
14
14
 
15
15
  #### Synchronous Client
16
16
 
@@ -66,4 +66,4 @@ res = await client.v1.face_swap_photo.create(
66
66
  [V1FaceSwapPhotoCreateResponse](/magic_hour/types/models/v1_face_swap_photo_create_response.py)
67
67
 
68
68
  ##### Example
69
- `{"credits_charged": 5, "frame_cost": 5, "id": "clx7uu86w0a5qp55yxz315r6r"}`
69
+ `{"credits_charged": 5, "frame_cost": 5, "id": "cuid-example"}`
@@ -32,7 +32,7 @@ class FaceSwapPhotoClient:
32
32
  POST /v1/face-swap-photo
33
33
 
34
34
  Args:
35
- name: The name of image
35
+ name: The name of image. This value is mainly used for your own identification of the image.
36
36
  assets: Provide the assets for face swap photo
37
37
  request_options: Additional options to customize the HTTP request
38
38
 
@@ -96,7 +96,7 @@ class AsyncFaceSwapPhotoClient:
96
96
  POST /v1/face-swap-photo
97
97
 
98
98
  Args:
99
- name: The name of image
99
+ name: The name of image. This value is mainly used for your own identification of the image.
100
100
  assets: Provide the assets for face swap photo
101
101
  request_options: Additional options to customize the HTTP request
102
102
 
@@ -1,19 +1,20 @@
1
1
 
2
2
  ### Generate asset upload urls <a name="create"></a>
3
3
 
4
- Create a list of urls used to upload the assets needed to generate a video. Each video type has their own requirements on what assets are required. Please refer to the specific mode API for more details. The response array will be in the same order as the request body.
4
+ Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the [Input Files Guide](/integration/input-files) for more details.
5
5
 
6
- Below is the list of valid extensions for each asset type:
6
+ The response array will match the order of items in the request body.
7
7
 
8
+ **Valid file extensions per asset type**:
8
9
  - video: mp4, m4v, mov, webm
9
10
  - audio: mp3, mpeg, wav, aac, aiff, flac
10
11
  - image: png, jpg, jpeg, webp, avif, jp2, tiff, bmp
11
12
 
12
- Note: `.gif` is supported for face swap API `video_file_path` field.
13
+ > Note: `gif` is only supported for face swap API `video_file_path` field.
13
14
 
14
- After receiving the upload url, you can upload the file by sending a PUT request.
15
+ Once you receive an upload URL, send a `PUT` request to upload the file directly.
15
16
 
16
- For example using curl
17
+ Example:
17
18
 
18
19
  ```
19
20
  curl -X PUT --data '@/path/to/file/video.mp4' \
@@ -27,7 +28,7 @@ curl -X PUT --data '@/path/to/file/video.mp4' \
27
28
 
28
29
  | Parameter | Required | Description | Example |
29
30
  |-----------|:--------:|-------------|--------|
30
- | `items` | ✓ | | `[{"extension": "mp4", "type_": "video"}, {"extension": "mp3", "type_": "audio"}]` |
31
+ | `items` | ✓ | The list of assets to upload. The response array will match the order of items in the request body. | `[{"extension": "mp4", "type_": "video"}, {"extension": "mp3", "type_": "audio"}]` |
31
32
 
32
33
  #### Synchronous Client
33
34
 
@@ -23,19 +23,20 @@ class UploadUrlsClient:
23
23
  """
24
24
  Generate asset upload urls
25
25
 
26
- Create a list of urls used to upload the assets needed to generate a video. Each video type has their own requirements on what assets are required. Please refer to the specific mode API for more details. The response array will be in the same order as the request body.
26
+ Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the [Input Files Guide](/integration/input-files) for more details.
27
27
 
28
- Below is the list of valid extensions for each asset type:
28
+ The response array will match the order of items in the request body.
29
29
 
30
+ **Valid file extensions per asset type**:
30
31
  - video: mp4, m4v, mov, webm
31
32
  - audio: mp3, mpeg, wav, aac, aiff, flac
32
33
  - image: png, jpg, jpeg, webp, avif, jp2, tiff, bmp
33
34
 
34
- Note: `.gif` is supported for face swap API `video_file_path` field.
35
+ > Note: `gif` is only supported for face swap API `video_file_path` field.
35
36
 
36
- After receiving the upload url, you can upload the file by sending a PUT request.
37
+ Once you receive an upload URL, send a `PUT` request to upload the file directly.
37
38
 
38
- For example using curl
39
+ Example:
39
40
 
40
41
  ```
41
42
  curl -X PUT --data '@/path/to/file/video.mp4' \
@@ -46,7 +47,7 @@ class UploadUrlsClient:
46
47
  POST /v1/files/upload-urls
47
48
 
48
49
  Args:
49
- items: typing.List[V1FilesUploadUrlsCreateBodyItemsItem]
50
+ items: The list of assets to upload. The response array will match the order of items in the request body.
50
51
  request_options: Additional options to customize the HTTP request
51
52
 
52
53
  Returns:
@@ -88,19 +89,20 @@ class AsyncUploadUrlsClient:
88
89
  """
89
90
  Generate asset upload urls
90
91
 
91
- Create a list of urls used to upload the assets needed to generate a video. Each video type has their own requirements on what assets are required. Please refer to the specific mode API for more details. The response array will be in the same order as the request body.
92
+ Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the [Input Files Guide](/integration/input-files) for more details.
92
93
 
93
- Below is the list of valid extensions for each asset type:
94
+ The response array will match the order of items in the request body.
94
95
 
96
+ **Valid file extensions per asset type**:
95
97
  - video: mp4, m4v, mov, webm
96
98
  - audio: mp3, mpeg, wav, aac, aiff, flac
97
99
  - image: png, jpg, jpeg, webp, avif, jp2, tiff, bmp
98
100
 
99
- Note: `.gif` is supported for face swap API `video_file_path` field.
101
+ > Note: `gif` is only supported for face swap API `video_file_path` field.
100
102
 
101
- After receiving the upload url, you can upload the file by sending a PUT request.
103
+ Once you receive an upload URL, send a `PUT` request to upload the file directly.
102
104
 
103
- For example using curl
105
+ Example:
104
106
 
105
107
  ```
106
108
  curl -X PUT --data '@/path/to/file/video.mp4' \
@@ -111,7 +113,7 @@ class AsyncUploadUrlsClient:
111
113
  POST /v1/files/upload-urls
112
114
 
113
115
  Args:
114
- items: typing.List[V1FilesUploadUrlsCreateBodyItemsItem]
116
+ items: The list of assets to upload. The response array will match the order of items in the request body.
115
117
  request_options: Additional options to customize the HTTP request
116
118
 
117
119
  Returns:
@@ -10,7 +10,7 @@ Remove background from image. Each image costs 5 credits.
10
10
  | Parameter | Required | Description | Example |
11
11
  |-----------|:--------:|-------------|--------|
12
12
  | `assets` | ✓ | Provide the assets for background removal | `{"background_image_file_path": "api-assets/id/1234.png", "image_file_path": "api-assets/id/1234.png"}` |
13
- | `name` | ✗ | The name of image | `"Background Remover image"` |
13
+ | `name` | ✗ | The name of image. This value is mainly used for your own identification of the image. | `"Background Remover image"` |
14
14
 
15
15
  #### Synchronous Client
16
16
 
@@ -52,4 +52,4 @@ res = await client.v1.image_background_remover.create(
52
52
  [V1ImageBackgroundRemoverCreateResponse](/magic_hour/types/models/v1_image_background_remover_create_response.py)
53
53
 
54
54
  ##### Example
55
- `{"credits_charged": 5, "frame_cost": 5, "id": "clx7uu86w0a5qp55yxz315r6r"}`
55
+ `{"credits_charged": 5, "frame_cost": 5, "id": "cuid-example"}`
@@ -32,7 +32,7 @@ class ImageBackgroundRemoverClient:
32
32
  POST /v1/image-background-remover
33
33
 
34
34
  Args:
35
- name: The name of image
35
+ name: The name of image. This value is mainly used for your own identification of the image.
36
36
  assets: Provide the assets for background removal
37
37
  request_options: Additional options to customize the HTTP request
38
38
 
@@ -89,7 +89,7 @@ class AsyncImageBackgroundRemoverClient:
89
89
  POST /v1/image-background-remover
90
90
 
91
91
  Args:
92
- name: The name of image
92
+ name: The name of image. This value is mainly used for your own identification of the image.
93
93
  assets: Provide the assets for background removal
94
94
  request_options: Additional options to customize the HTTP request
95
95
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  ### Delete image <a name="delete"></a>
3
3
 
4
- Permanently delete the rendered image. This action is not reversible, please be sure before deleting.
4
+ Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.
5
5
 
6
6
  **API Endpoint**: `DELETE /v1/image-projects/{id}`
7
7
 
@@ -9,7 +9,7 @@ Permanently delete the rendered image. This action is not reversible, please be
9
9
 
10
10
  | Parameter | Required | Description | Example |
11
11
  |-----------|:--------:|-------------|--------|
12
- | `id` | ✓ | The id of the image project | `"cm6pvghix03bvyz0zwash6noj"` |
12
+ | `id` | ✓ | Unique ID of the image project. This value is returned by all of the POST APIs that create an image. | `"cuid-example"` |
13
13
 
14
14
  #### Synchronous Client
15
15
 
@@ -18,7 +18,7 @@ from magic_hour import Client
18
18
  from os import getenv
19
19
 
20
20
  client = Client(token=getenv("API_TOKEN"))
21
- res = client.v1.image_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
21
+ res = client.v1.image_projects.delete(id="cuid-example")
22
22
 
23
23
  ```
24
24
 
@@ -29,7 +29,7 @@ from magic_hour import AsyncClient
29
29
  from os import getenv
30
30
 
31
31
  client = AsyncClient(token=getenv("API_TOKEN"))
32
- res = await client.v1.image_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
32
+ res = await client.v1.image_projects.delete(id="cuid-example")
33
33
 
34
34
  ```
35
35
 
@@ -52,7 +52,7 @@ The image can be one of the following status
52
52
 
53
53
  | Parameter | Required | Description | Example |
54
54
  |-----------|:--------:|-------------|--------|
55
- | `id` | ✓ | The id of the image project | `"cm6pvghix03bvyz0zwash6noj"` |
55
+ | `id` | ✓ | Unique ID of the image project. This value is returned by all of the POST APIs that create an image. | `"cuid-example"` |
56
56
 
57
57
  #### Synchronous Client
58
58
 
@@ -61,7 +61,7 @@ from magic_hour import Client
61
61
  from os import getenv
62
62
 
63
63
  client = Client(token=getenv("API_TOKEN"))
64
- res = client.v1.image_projects.get(id="cm6pvghix03bvyz0zwash6noj")
64
+ res = client.v1.image_projects.get(id="cuid-example")
65
65
 
66
66
  ```
67
67
 
@@ -72,7 +72,7 @@ from magic_hour import AsyncClient
72
72
  from os import getenv
73
73
 
74
74
  client = AsyncClient(token=getenv("API_TOKEN"))
75
- res = await client.v1.image_projects.get(id="cm6pvghix03bvyz0zwash6noj")
75
+ res = await client.v1.image_projects.get(id="cuid-example")
76
76
 
77
77
  ```
78
78
 
@@ -82,4 +82,4 @@ res = await client.v1.image_projects.get(id="cm6pvghix03bvyz0zwash6noj")
82
82
  [V1ImageProjectsGetResponse](/magic_hour/types/models/v1_image_projects_get_response.py)
83
83
 
84
84
  ##### Example
85
- `{"created_at": "1970-01-01T00:00:00", "credits_charged": 5, "downloads": [{"expires_at": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.png"}], "enabled": True, "error": {"code": "no_source_face", "message": "Please use an image with a detectable face"}, "id": "clx7uu86w0a5qp55yxz315r6r", "image_count": 1, "name": "Example Name", "status": "complete", "total_frame_cost": 5, "type_": "AI_IMAGE"}`
85
+ `{"created_at": "1970-01-01T00:00:00", "credits_charged": 5, "downloads": [{"expires_at": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.png"}], "enabled": True, "error": {"code": "no_source_face", "message": "Please use an image with a detectable face"}, "id": "cuid-example", "image_count": 1, "name": "Example Name", "status": "complete", "total_frame_cost": 5, "type_": "AI_IMAGE"}`
@@ -19,12 +19,12 @@ class ImageProjectsClient:
19
19
  """
20
20
  Delete image
21
21
 
22
- Permanently delete the rendered image. This action is not reversible, please be sure before deleting.
22
+ Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.
23
23
 
24
24
  DELETE /v1/image-projects/{id}
25
25
 
26
26
  Args:
27
- id: The id of the image project
27
+ id: Unique ID of the image project. This value is returned by all of the POST APIs that create an image.
28
28
  request_options: Additional options to customize the HTTP request
29
29
 
30
30
  Returns:
@@ -36,7 +36,7 @@ class ImageProjectsClient:
36
36
 
37
37
  Examples:
38
38
  ```py
39
- client.v1.image_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
39
+ client.v1.image_projects.delete(id="cuid-example")
40
40
  ```
41
41
  """
42
42
  self._base_client.request(
@@ -67,7 +67,7 @@ class ImageProjectsClient:
67
67
  GET /v1/image-projects/{id}
68
68
 
69
69
  Args:
70
- id: The id of the image project
70
+ id: Unique ID of the image project. This value is returned by all of the POST APIs that create an image.
71
71
  request_options: Additional options to customize the HTTP request
72
72
 
73
73
  Returns:
@@ -79,7 +79,7 @@ class ImageProjectsClient:
79
79
 
80
80
  Examples:
81
81
  ```py
82
- client.v1.image_projects.get(id="cm6pvghix03bvyz0zwash6noj")
82
+ client.v1.image_projects.get(id="cuid-example")
83
83
  ```
84
84
  """
85
85
  return self._base_client.request(
@@ -101,12 +101,12 @@ class AsyncImageProjectsClient:
101
101
  """
102
102
  Delete image
103
103
 
104
- Permanently delete the rendered image. This action is not reversible, please be sure before deleting.
104
+ Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.
105
105
 
106
106
  DELETE /v1/image-projects/{id}
107
107
 
108
108
  Args:
109
- id: The id of the image project
109
+ id: Unique ID of the image project. This value is returned by all of the POST APIs that create an image.
110
110
  request_options: Additional options to customize the HTTP request
111
111
 
112
112
  Returns:
@@ -118,7 +118,7 @@ class AsyncImageProjectsClient:
118
118
 
119
119
  Examples:
120
120
  ```py
121
- await client.v1.image_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
121
+ await client.v1.image_projects.delete(id="cuid-example")
122
122
  ```
123
123
  """
124
124
  await self._base_client.request(
@@ -149,7 +149,7 @@ class AsyncImageProjectsClient:
149
149
  GET /v1/image-projects/{id}
150
150
 
151
151
  Args:
152
- id: The id of the image project
152
+ id: Unique ID of the image project. This value is returned by all of the POST APIs that create an image.
153
153
  request_options: Additional options to customize the HTTP request
154
154
 
155
155
  Returns:
@@ -161,7 +161,7 @@ class AsyncImageProjectsClient:
161
161
 
162
162
  Examples:
163
163
  ```py
164
- await client.v1.image_projects.get(id="cm6pvghix03bvyz0zwash6noj")
164
+ await client.v1.image_projects.get(id="cuid-example")
165
165
  ```
166
166
  """
167
167
  return await self._base_client.request(