magic_hour 0.40.0__py3-none-any.whl → 0.44.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.
Files changed (73) hide show
  1. magic_hour/README.md +2 -3
  2. magic_hour/environment.py +1 -1
  3. magic_hour/helpers/download.py +2 -0
  4. magic_hour/resources/v1/README.md +2 -3
  5. magic_hour/resources/v1/ai_clothes_changer/README.md +13 -14
  6. magic_hour/resources/v1/ai_face_editor/README.md +26 -27
  7. magic_hour/resources/v1/ai_gif_generator/README.md +12 -13
  8. magic_hour/resources/v1/ai_gif_generator/client.py +2 -2
  9. magic_hour/resources/v1/ai_headshot_generator/README.md +13 -14
  10. magic_hour/resources/v1/ai_headshot_generator/client.py +2 -2
  11. magic_hour/resources/v1/ai_image_editor/README.md +24 -17
  12. magic_hour/resources/v1/ai_image_editor/client.py +40 -10
  13. magic_hour/resources/v1/ai_image_generator/README.md +26 -18
  14. magic_hour/resources/v1/ai_image_generator/client.py +14 -6
  15. magic_hour/resources/v1/ai_image_upscaler/README.md +14 -15
  16. magic_hour/resources/v1/ai_meme_generator/README.md +12 -13
  17. magic_hour/resources/v1/ai_photo_editor/README.md +22 -23
  18. magic_hour/resources/v1/ai_qr_code_generator/README.md +13 -14
  19. magic_hour/resources/v1/ai_qr_code_generator/client.py +4 -4
  20. magic_hour/resources/v1/ai_talking_photo/README.md +16 -17
  21. magic_hour/resources/v1/ai_voice_cloner/README.md +62 -0
  22. magic_hour/resources/v1/ai_voice_cloner/__init__.py +4 -0
  23. magic_hour/resources/v1/ai_voice_cloner/client.py +272 -0
  24. magic_hour/resources/v1/ai_voice_generator/README.md +66 -10
  25. magic_hour/resources/v1/ai_voice_generator/client.py +122 -0
  26. magic_hour/resources/v1/animation/README.md +24 -25
  27. magic_hour/resources/v1/audio_projects/README.md +58 -13
  28. magic_hour/resources/v1/audio_projects/__init__.py +10 -2
  29. magic_hour/resources/v1/audio_projects/client.py +137 -0
  30. magic_hour/resources/v1/audio_projects/client_test.py +520 -0
  31. magic_hour/resources/v1/auto_subtitle_generator/README.md +15 -16
  32. magic_hour/resources/v1/client.py +6 -0
  33. magic_hour/resources/v1/face_detection/README.md +21 -20
  34. magic_hour/resources/v1/face_swap/README.md +23 -25
  35. magic_hour/resources/v1/face_swap/client.py +2 -2
  36. magic_hour/resources/v1/face_swap_photo/README.md +13 -14
  37. magic_hour/resources/v1/files/README.md +1 -5
  38. magic_hour/resources/v1/files/upload_urls/README.md +11 -10
  39. magic_hour/resources/v1/files/upload_urls/client.py +6 -4
  40. magic_hour/resources/v1/image_background_remover/README.md +11 -12
  41. magic_hour/resources/v1/image_projects/README.md +12 -16
  42. magic_hour/resources/v1/image_to_video/README.md +19 -21
  43. magic_hour/resources/v1/lip_sync/README.md +27 -21
  44. magic_hour/resources/v1/lip_sync/client.py +15 -0
  45. magic_hour/resources/v1/photo_colorizer/README.md +10 -11
  46. magic_hour/resources/v1/text_to_video/README.md +15 -17
  47. magic_hour/resources/v1/video_projects/README.md +12 -16
  48. magic_hour/resources/v1/video_to_video/README.md +24 -26
  49. magic_hour/types/models/__init__.py +2 -0
  50. magic_hour/types/models/v1_ai_voice_cloner_create_response.py +27 -0
  51. magic_hour/types/models/v1_audio_projects_get_response.py +1 -1
  52. magic_hour/types/models/v1_video_projects_get_response.py +1 -1
  53. magic_hour/types/params/__init__.py +26 -0
  54. magic_hour/types/params/v1_ai_image_editor_create_body_assets.py +18 -4
  55. magic_hour/types/params/v1_ai_image_editor_create_body_style.py +13 -0
  56. magic_hour/types/params/v1_ai_image_editor_generate_body_assets.py +12 -1
  57. magic_hour/types/params/v1_ai_image_generator_create_body_style.py +16 -0
  58. magic_hour/types/params/v1_ai_talking_photo_create_body_style.py +6 -4
  59. magic_hour/types/params/v1_ai_voice_cloner_create_body.py +49 -0
  60. magic_hour/types/params/v1_ai_voice_cloner_create_body_assets.py +33 -0
  61. magic_hour/types/params/v1_ai_voice_cloner_create_body_style.py +28 -0
  62. magic_hour/types/params/v1_ai_voice_cloner_generate_body_assets.py +28 -0
  63. magic_hour/types/params/v1_ai_voice_generator_create_body_style.py +382 -2
  64. magic_hour/types/params/v1_face_swap_create_body_style.py +1 -1
  65. magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py +1 -1
  66. magic_hour/types/params/v1_lip_sync_create_body.py +12 -0
  67. magic_hour/types/params/v1_lip_sync_create_body_style.py +37 -0
  68. magic_hour/types/params/v1_video_to_video_create_body.py +1 -1
  69. magic_hour/types/params/v1_video_to_video_create_body_style.py +32 -4
  70. {magic_hour-0.40.0.dist-info → magic_hour-0.44.0.dist-info}/METADATA +77 -62
  71. {magic_hour-0.40.0.dist-info → magic_hour-0.44.0.dist-info}/RECORD +73 -63
  72. {magic_hour-0.40.0.dist-info → magic_hour-0.44.0.dist-info}/LICENSE +0 -0
  73. {magic_hour-0.40.0.dist-info → magic_hour-0.44.0.dist-info}/WHEEL +0 -0
magic_hour/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Base Client
2
2
 
3
-
4
-
5
3
  ## Submodules
4
+
6
5
  - [ai_clothes_changer](resources/v1/ai_clothes_changer/README.md) - ai_clothes_changer
7
6
  - [ai_face_editor](resources/v1/ai_face_editor/README.md) - ai_face_editor
8
7
  - [ai_gif_generator](resources/v1/ai_gif_generator/README.md) - ai_gif_generator
@@ -14,6 +13,7 @@
14
13
  - [ai_photo_editor](resources/v1/ai_photo_editor/README.md) - ai_photo_editor
15
14
  - [ai_qr_code_generator](resources/v1/ai_qr_code_generator/README.md) - ai_qr_code_generator
16
15
  - [ai_talking_photo](resources/v1/ai_talking_photo/README.md) - ai_talking_photo
16
+ - [ai_voice_cloner](resources/v1/ai_voice_cloner/README.md) - ai_voice_cloner
17
17
  - [ai_voice_generator](resources/v1/ai_voice_generator/README.md) - ai_voice_generator
18
18
  - [animation](resources/v1/animation/README.md) - animation
19
19
  - [audio_projects](resources/v1/audio_projects/README.md) - audio_projects
@@ -32,4 +32,3 @@
32
32
  - [video_projects](resources/v1/video_projects/README.md) - video_projects
33
33
  - [video_to_video](resources/v1/video_to_video/README.md) - video_to_video
34
34
  - [v1](resources/v1/README.md) - v1
35
-
magic_hour/environment.py CHANGED
@@ -6,7 +6,7 @@ class Environment(enum.Enum):
6
6
  """Pre-defined base URLs for the API"""
7
7
 
8
8
  ENVIRONMENT = "https://api.magichour.ai"
9
- MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.40.0"
9
+ MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.43.1"
10
10
 
11
11
 
12
12
  def _get_base_url(
@@ -23,6 +23,7 @@ def download_files_sync(
23
23
  downloads: Union[
24
24
  List[models.V1ImageProjectsGetResponseDownloadsItem],
25
25
  List[models.V1VideoProjectsGetResponseDownloadsItem],
26
+ List[models.V1AudioProjectsGetResponseDownloadsItem],
26
27
  ],
27
28
  download_directory: Union[str, None] = None,
28
29
  ) -> List[str]:
@@ -51,6 +52,7 @@ async def download_files_async(
51
52
  downloads: Union[
52
53
  List[models.V1ImageProjectsGetResponseDownloadsItem],
53
54
  List[models.V1VideoProjectsGetResponseDownloadsItem],
55
+ List[models.V1AudioProjectsGetResponseDownloadsItem],
54
56
  ],
55
57
  download_directory: Union[str, None] = None,
56
58
  ) -> List[str]:
@@ -1,8 +1,7 @@
1
1
  # v1
2
2
 
3
-
4
-
5
3
  ## Submodules
4
+
6
5
  - [ai_clothes_changer](ai_clothes_changer/README.md) - ai_clothes_changer
7
6
  - [ai_face_editor](ai_face_editor/README.md) - ai_face_editor
8
7
  - [ai_gif_generator](ai_gif_generator/README.md) - ai_gif_generator
@@ -14,6 +13,7 @@
14
13
  - [ai_photo_editor](ai_photo_editor/README.md) - ai_photo_editor
15
14
  - [ai_qr_code_generator](ai_qr_code_generator/README.md) - ai_qr_code_generator
16
15
  - [ai_talking_photo](ai_talking_photo/README.md) - ai_talking_photo
16
+ - [ai_voice_cloner](ai_voice_cloner/README.md) - ai_voice_cloner
17
17
  - [ai_voice_generator](ai_voice_generator/README.md) - ai_voice_generator
18
18
  - [animation](animation/README.md) - animation
19
19
  - [audio_projects](audio_projects/README.md) - audio_projects
@@ -30,4 +30,3 @@
30
30
  - [text_to_video](text_to_video/README.md) - text_to_video
31
31
  - [video_projects](video_projects/README.md) - video_projects
32
32
  - [video_to_video](video_to_video/README.md) - video_to_video
33
-
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### AI Clothes Changer Generate Workflow <a name="generate"></a>
@@ -12,7 +10,7 @@ The workflow performs the following action
12
10
 
13
11
  1. upload local assets to Magic Hour storage. So you can pass in a local path instead of having to upload files yourself
14
12
  2. trigger a generation
15
- 3. poll for a completion status. This is configurable
13
+ 3. poll for a completion status. This is configurable
16
14
  4. if success, download the output to local directory
17
15
 
18
16
  > [!TIP]
@@ -68,6 +66,7 @@ res = await client.v1.ai_clothes_changer.generate(
68
66
  ```
69
67
 
70
68
  <!-- CUSTOM DOCS END -->
69
+
71
70
  ### AI Clothes Changer <a name="create"></a>
72
71
 
73
72
  Change outfits in photos in seconds with just a photo reference. Each photo costs 25 credits.
@@ -76,13 +75,13 @@ Change outfits in photos in seconds with just a photo reference. Each photo cost
76
75
 
77
76
  #### Parameters
78
77
 
79
- | Parameter | Required | Description | Example |
80
- |-----------|:--------:|-------------|--------|
81
- | `assets` | | Provide the assets for clothes changer | `{"garment_file_path": "api-assets/id/outfit.png", "garment_type": "upper_body", "person_file_path": "api-assets/id/model.png"}` |
82
- | `└─ garment_file_path` | | The image of the outfit. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/outfit.png"` |
83
- | `└─ garment_type` | | The type of the outfit. | `"upper_body"` |
84
- | `└─ person_file_path` | | The image with the person. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/model.png"` |
85
- | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Clothes Changer image"` |
78
+ | Parameter | Required | Description | Example |
79
+ | ---------------------- | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
80
+ | `assets` | | Provide the assets for clothes changer | `{"garment_file_path": "api-assets/id/outfit.png", "garment_type": "upper_body", "person_file_path": "api-assets/id/model.png"}` |
81
+ | `└─ garment_file_path` | | The image of the outfit. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/outfit.png"` |
82
+ | `└─ garment_type` | | The type of the outfit. | `"upper_body"` |
83
+ | `└─ person_file_path` | | The image with the person. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/model.png"` |
84
+ | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Clothes Changer image"` |
86
85
 
87
86
  #### Synchronous Client
88
87
 
@@ -99,7 +98,6 @@ res = client.v1.ai_clothes_changer.create(
99
98
  },
100
99
  name="Clothes Changer image",
101
100
  )
102
-
103
101
  ```
104
102
 
105
103
  #### Asynchronous Client
@@ -117,15 +115,16 @@ res = await client.v1.ai_clothes_changer.create(
117
115
  },
118
116
  name="Clothes Changer image",
119
117
  )
120
-
121
118
  ```
122
119
 
123
120
  #### Response
124
121
 
125
122
  ##### Type
123
+
126
124
  [V1AiClothesChangerCreateResponse](/magic_hour/types/models/v1_ai_clothes_changer_create_response.py)
127
125
 
128
126
  ##### Example
129
- `{"credits_charged": 25, "frame_cost": 25, "id": "cuid-example"}`
130
-
131
127
 
128
+ ```python
129
+ {"credits_charged": 25, "frame_cost": 25, "id": "cuid-example"}
130
+ ```
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Ai Face Editor Generate Workflow <a name="generate"></a>
@@ -93,6 +91,7 @@ res = await client.v1.ai_face_editor.generate(
93
91
  ```
94
92
 
95
93
  <!-- CUSTOM DOCS END -->
94
+
96
95
  ### AI Face Editor <a name="create"></a>
97
96
 
98
97
  Edit facial features of an image using AI. Each edit costs 1 frame. The height/width of the output image depends on your subscription. Please refer to our [pricing](/pricing) page for more details
@@ -101,27 +100,27 @@ Edit facial features of an image using AI. Each edit costs 1 frame. The height/w
101
100
 
102
101
  #### Parameters
103
102
 
104
- | Parameter | Required | Description | Example |
105
- |-----------|:--------:|-------------|--------|
106
- | `assets` | | Provide the assets for face editor | `{"image_file_path": "api-assets/id/1234.png"}` |
107
- | `└─ image_file_path` | | This is the image whose face will be edited. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
108
- | `style` | | Face editing parameters | `{"enhance_face": False, "eye_gaze_horizontal": 0.0, "eye_gaze_vertical": 0.0, "eye_open_ratio": 0.0, "eyebrow_direction": 0.0, "head_pitch": 0.0, "head_roll": 0.0, "head_yaw": 0.0, "lip_open_ratio": 0.0, "mouth_grim": 0.0, "mouth_position_horizontal": 0.0, "mouth_position_vertical": 0.0, "mouth_pout": 0.0, "mouth_purse": 0.0, "mouth_smile": 0.0}` |
109
- | `└─ enhance_face` | | Enhance face features | `False` |
110
- | `└─ eye_gaze_horizontal` | | Horizontal eye gaze (-100 to 100), in increments of 5 | `0.0` |
111
- | `└─ eye_gaze_vertical` | | Vertical eye gaze (-100 to 100), in increments of 5 | `0.0` |
112
- | `└─ eye_open_ratio` | | Eye open ratio (-100 to 100), in increments of 5 | `0.0` |
113
- | `└─ eyebrow_direction` | | Eyebrow direction (-100 to 100), in increments of 5 | `0.0` |
114
- | `└─ head_pitch` | | Head pitch (-100 to 100), in increments of 5 | `0.0` |
115
- | `└─ head_roll` | | Head roll (-100 to 100), in increments of 5 | `0.0` |
116
- | `└─ head_yaw` | | Head yaw (-100 to 100), in increments of 5 | `0.0` |
117
- | `└─ lip_open_ratio` | | Lip open ratio (-100 to 100), in increments of 5 | `0.0` |
118
- | `└─ mouth_grim` | | Mouth grim (-100 to 100), in increments of 5 | `0.0` |
119
- | `└─ mouth_position_horizontal` | | Horizontal mouth position (-100 to 100), in increments of 5 | `0.0` |
120
- | `└─ mouth_position_vertical` | | Vertical mouth position (-100 to 100), in increments of 5 | `0.0` |
121
- | `└─ mouth_pout` | | Mouth pout (-100 to 100), in increments of 5 | `0.0` |
122
- | `└─ mouth_purse` | | Mouth purse (-100 to 100), in increments of 5 | `0.0` |
123
- | `└─ mouth_smile` | | Mouth smile (-100 to 100), in increments of 5 | `0.0` |
124
- | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Face Editor image"` |
103
+ | Parameter | Required | Description | Example |
104
+ | ------------------------------ | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
105
+ | `assets` | | Provide the assets for face editor | `{"image_file_path": "api-assets/id/1234.png"}` |
106
+ | `└─ image_file_path` | | This is the image whose face will be edited. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
107
+ | `style` | | Face editing parameters | `{"enhance_face": False, "eye_gaze_horizontal": 0.0, "eye_gaze_vertical": 0.0, "eye_open_ratio": 0.0, "eyebrow_direction": 0.0, "head_pitch": 0.0, "head_roll": 0.0, "head_yaw": 0.0, "lip_open_ratio": 0.0, "mouth_grim": 0.0, "mouth_position_horizontal": 0.0, "mouth_position_vertical": 0.0, "mouth_pout": 0.0, "mouth_purse": 0.0, "mouth_smile": 0.0}` |
108
+ | `└─ enhance_face` | | Enhance face features | `False` |
109
+ | `└─ eye_gaze_horizontal` | | Horizontal eye gaze (-100 to 100), in increments of 5 | `0.0` |
110
+ | `└─ eye_gaze_vertical` | | Vertical eye gaze (-100 to 100), in increments of 5 | `0.0` |
111
+ | `└─ eye_open_ratio` | | Eye open ratio (-100 to 100), in increments of 5 | `0.0` |
112
+ | `└─ eyebrow_direction` | | Eyebrow direction (-100 to 100), in increments of 5 | `0.0` |
113
+ | `└─ head_pitch` | | Head pitch (-100 to 100), in increments of 5 | `0.0` |
114
+ | `└─ head_roll` | | Head roll (-100 to 100), in increments of 5 | `0.0` |
115
+ | `└─ head_yaw` | | Head yaw (-100 to 100), in increments of 5 | `0.0` |
116
+ | `└─ lip_open_ratio` | | Lip open ratio (-100 to 100), in increments of 5 | `0.0` |
117
+ | `└─ mouth_grim` | | Mouth grim (-100 to 100), in increments of 5 | `0.0` |
118
+ | `└─ mouth_position_horizontal` | | Horizontal mouth position (-100 to 100), in increments of 5 | `0.0` |
119
+ | `└─ mouth_position_vertical` | | Vertical mouth position (-100 to 100), in increments of 5 | `0.0` |
120
+ | `└─ mouth_pout` | | Mouth pout (-100 to 100), in increments of 5 | `0.0` |
121
+ | `└─ mouth_purse` | | Mouth purse (-100 to 100), in increments of 5 | `0.0` |
122
+ | `└─ mouth_smile` | | Mouth smile (-100 to 100), in increments of 5 | `0.0` |
123
+ | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Face Editor image"` |
125
124
 
126
125
  #### Synchronous Client
127
126
 
@@ -151,7 +150,6 @@ res = client.v1.ai_face_editor.create(
151
150
  },
152
151
  name="Face Editor image",
153
152
  )
154
-
155
153
  ```
156
154
 
157
155
  #### Asynchronous Client
@@ -182,15 +180,16 @@ res = await client.v1.ai_face_editor.create(
182
180
  },
183
181
  name="Face Editor image",
184
182
  )
185
-
186
183
  ```
187
184
 
188
185
  #### Response
189
186
 
190
187
  ##### Type
188
+
191
189
  [V1AiFaceEditorCreateResponse](/magic_hour/types/models/v1_ai_face_editor_create_response.py)
192
190
 
193
191
  ##### Example
194
- `{"credits_charged": 1, "frame_cost": 1, "id": "cuid-example"}`
195
-
196
192
 
193
+ ```python
194
+ {"credits_charged": 1, "frame_cost": 1, "id": "cuid-example"}
195
+ ```
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Ai Gif Generator Generate Workflow <a name="generate"></a>
@@ -61,7 +59,8 @@ res = await client.v1.ai_gif_generator.generate(
61
59
  ```
62
60
 
63
61
  <!-- CUSTOM DOCS END -->
64
- ### AI GIFs <a name="create"></a>
62
+
63
+ ### AI GIF Generator <a name="create"></a>
65
64
 
66
65
  Create an AI GIF. Each GIF costs 50 credits.
67
66
 
@@ -69,12 +68,12 @@ Create an AI GIF. Each GIF costs 50 credits.
69
68
 
70
69
  #### Parameters
71
70
 
72
- | Parameter | Required | Description | Example |
73
- |-----------|:--------:|-------------|--------|
74
- | `style` | | | `{"prompt": "Cute dancing cat, pixel art"}` |
75
- | `└─ prompt` | | The prompt used for the GIF. | `"Cute dancing cat, pixel art"` |
76
- | `name` | | The name of gif. This value is mainly used for your own identification of the gif. | `"Ai Gif gif"` |
77
- | `output_format` | | The output file format for the generated animation. | `"gif"` |
71
+ | Parameter | Required | Description | Example |
72
+ | --------------- | :------: | ---------------------------------------------------------------------------------- | ------------------------------------------- |
73
+ | `style` | | | `{"prompt": "Cute dancing cat, pixel art"}` |
74
+ | `└─ prompt` | | The prompt used for the GIF. | `"Cute dancing cat, pixel art"` |
75
+ | `name` | | The name of gif. This value is mainly used for your own identification of the gif. | `"Ai Gif gif"` |
76
+ | `output_format` | | The output file format for the generated animation. | `"gif"` |
78
77
 
79
78
  #### Synchronous Client
80
79
 
@@ -88,7 +87,6 @@ res = client.v1.ai_gif_generator.create(
88
87
  name="Ai Gif gif",
89
88
  output_format="gif",
90
89
  )
91
-
92
90
  ```
93
91
 
94
92
  #### Asynchronous Client
@@ -103,15 +101,16 @@ res = await client.v1.ai_gif_generator.create(
103
101
  name="Ai Gif gif",
104
102
  output_format="gif",
105
103
  )
106
-
107
104
  ```
108
105
 
109
106
  #### Response
110
107
 
111
108
  ##### Type
109
+
112
110
  [V1AiGifGeneratorCreateResponse](/magic_hour/types/models/v1_ai_gif_generator_create_response.py)
113
111
 
114
112
  ##### Example
115
- `{"credits_charged": 50, "frame_cost": 50, "id": "cuid-example"}`
116
-
117
113
 
114
+ ```python
115
+ {"credits_charged": 50, "frame_cost": 50, "id": "cuid-example"}
116
+ ```
@@ -100,7 +100,7 @@ class AiGifGeneratorClient:
100
100
  request_options: typing.Optional[RequestOptions] = None,
101
101
  ) -> models.V1AiGifGeneratorCreateResponse:
102
102
  """
103
- AI GIFs
103
+ AI GIF Generator
104
104
 
105
105
  Create an AI GIF. Each GIF costs 50 credits.
106
106
 
@@ -215,7 +215,7 @@ class AsyncAiGifGeneratorClient:
215
215
  request_options: typing.Optional[RequestOptions] = None,
216
216
  ) -> models.V1AiGifGeneratorCreateResponse:
217
217
  """
218
- AI GIFs
218
+ AI GIF Generator
219
219
 
220
220
  Create an AI GIF. Each GIF costs 50 credits.
221
221
 
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Ai Headshot Generator Generate Workflow <a name="generate"></a>
@@ -57,7 +55,8 @@ res = await client.v1.ai_headshot_generator.generate(
57
55
  ```
58
56
 
59
57
  <!-- CUSTOM DOCS END -->
60
- ### AI Headshots <a name="create"></a>
58
+
59
+ ### AI Headshot Generator <a name="create"></a>
61
60
 
62
61
  Create an AI headshot. Each headshot costs 50 credits.
63
62
 
@@ -65,13 +64,13 @@ Create an AI headshot. Each headshot costs 50 credits.
65
64
 
66
65
  #### Parameters
67
66
 
68
- | Parameter | Required | Description | Example |
69
- |-----------|:--------:|-------------|--------|
70
- | `assets` | | Provide the assets for headshot photo | `{"image_file_path": "api-assets/id/1234.png"}` |
71
- | `└─ image_file_path` | | The image used to generate the headshot. This image must contain one detectable face. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
72
- | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Ai Headshot image"` |
73
- | `style` | | | `{}` |
74
- | `└─ prompt` | | Prompt used to guide the style of your headshot. We recommend omitting the prompt unless you want to customize your headshot. You can visit [AI headshot generator](https://magichour.ai/create/ai-headshot-generator) to view an example of a good prompt used for our 'Professional' style. | `"string"` |
67
+ | Parameter | Required | Description | Example |
68
+ | -------------------- | :------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
69
+ | `assets` | | Provide the assets for headshot photo | `{"image_file_path": "api-assets/id/1234.png"}` |
70
+ | `└─ image_file_path` | | The image used to generate the headshot. This image must contain one detectable face. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
71
+ | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Ai Headshot image"` |
72
+ | `style` | | | `{}` |
73
+ | `└─ prompt` | | Prompt used to guide the style of your headshot. We recommend omitting the prompt unless you want to customize your headshot. You can visit [AI headshot generator](https://magichour.ai/create/ai-headshot-generator) to view an example of a good prompt used for our 'Professional' style. | `"string"` |
75
74
 
76
75
  #### Synchronous Client
77
76
 
@@ -83,7 +82,6 @@ client = Client(token=getenv("API_TOKEN"))
83
82
  res = client.v1.ai_headshot_generator.create(
84
83
  assets={"image_file_path": "api-assets/id/1234.png"}, name="Ai Headshot image"
85
84
  )
86
-
87
85
  ```
88
86
 
89
87
  #### Asynchronous Client
@@ -96,15 +94,16 @@ client = AsyncClient(token=getenv("API_TOKEN"))
96
94
  res = await client.v1.ai_headshot_generator.create(
97
95
  assets={"image_file_path": "api-assets/id/1234.png"}, name="Ai Headshot image"
98
96
  )
99
-
100
97
  ```
101
98
 
102
99
  #### Response
103
100
 
104
101
  ##### Type
102
+
105
103
  [V1AiHeadshotGeneratorCreateResponse](/magic_hour/types/models/v1_ai_headshot_generator_create_response.py)
106
104
 
107
105
  ##### Example
108
- `{"credits_charged": 50, "frame_cost": 50, "id": "cuid-example"}`
109
-
110
106
 
107
+ ```python
108
+ {"credits_charged": 50, "frame_cost": 50, "id": "cuid-example"}
109
+ ```
@@ -103,7 +103,7 @@ class AiHeadshotGeneratorClient:
103
103
  request_options: typing.Optional[RequestOptions] = None,
104
104
  ) -> models.V1AiHeadshotGeneratorCreateResponse:
105
105
  """
106
- AI Headshots
106
+ AI Headshot Generator
107
107
 
108
108
  Create an AI headshot. Each headshot costs 50 credits.
109
109
 
@@ -227,7 +227,7 @@ class AsyncAiHeadshotGeneratorClient:
227
227
  request_options: typing.Optional[RequestOptions] = None,
228
228
  ) -> models.V1AiHeadshotGeneratorCreateResponse:
229
229
  """
230
- AI Headshots
230
+ AI Headshot Generator
231
231
 
232
232
  Create an AI headshot. Each headshot costs 50 credits.
233
233
 
@@ -2,8 +2,6 @@
2
2
 
3
3
  ## Module Functions
4
4
 
5
-
6
-
7
5
  <!-- CUSTOM DOCS START -->
8
6
 
9
7
  ### Ai Image Editor Generate Workflow <a name="generate"></a>
@@ -61,6 +59,7 @@ res = await client.v1.ai_image_editor.generate(
61
59
  ```
62
60
 
63
61
  <!-- CUSTOM DOCS END -->
62
+
64
63
  ### AI Image Editor <a name="create"></a>
65
64
 
66
65
  Edit images with AI. Each edit costs 50 credits.
@@ -69,13 +68,15 @@ Edit images with AI. Each edit costs 50 credits.
69
68
 
70
69
  #### Parameters
71
70
 
72
- | Parameter | Required | Description | Example |
73
- |-----------|:--------:|-------------|--------|
74
- | `assets` | | Provide the assets for image edit | `{"image_file_path": "api-assets/id/1234.png"}` |
75
- | `└─ image_file_path` | | The image used in the edit. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
76
- | `style` | | | `{"prompt": "Give me sunglasses"}` |
77
- | `└─ prompt` | | The prompt used to edit the image. | `"Give me sunglasses"` |
78
- | `name` | | The name of image. This value is mainly used for your own identification of the image. | `"Ai Image Editor image"` |
71
+ | Parameter | Required | Description | Example |
72
+ | --------------------- | :------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
73
+ | `assets` | | Provide the assets for image edit | `{"image_file_path": "api-assets/id/1234.png", "image_file_paths": ["api-assets/id/1234.png", "api-assets/id/1235.png"]}` |
74
+ | `└─ image_file_path` | ✗ | Deprecated: Please use `image_file_paths` instead as edits with multiple images are now supported. The image used in the edit. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `"api-assets/id/1234.png"` |
75
+ | `└─ image_file_paths` | ✗ | The image(s) used in the edit, maximum of 10 images. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). Please refer to the [Input File documentation](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) to learn more. | `["api-assets/id/1234.png", "api-assets/id/1235.png"]` |
76
+ | `style` | | | `{"model": "Nano Banana", "prompt": "Give me sunglasses"}` |
77
+ | `└─ model` | | The AI model to use for image editing. * `Nano Banana` - Precise, realistic edits with consistent results * `Seedream` - Creative, imaginative images with artistic freedom * `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. | `"Nano Banana"` |
78
+ | `└─ prompt` | ✓ | The prompt used to edit the image. | `"Give me sunglasses"` |
79
+ | `name` | ✗ | The name of image. This value is mainly used for your own identification of the image. | `"Ai Image Editor image"` |
79
80
 
80
81
  #### Synchronous Client
81
82
 
@@ -85,11 +86,13 @@ from os import getenv
85
86
 
86
87
  client = Client(token=getenv("API_TOKEN"))
87
88
  res = client.v1.ai_image_editor.create(
88
- assets={"image_file_path": "api-assets/id/1234.png"},
89
- style={"prompt": "Give me sunglasses"},
89
+ assets={
90
+ "image_file_path": "api-assets/id/1234.png",
91
+ "image_file_paths": ["api-assets/id/1234.png", "api-assets/id/1235.png"],
92
+ },
93
+ style={"model": "Nano Banana", "prompt": "Give me sunglasses"},
90
94
  name="Ai Image Editor image",
91
95
  )
92
-
93
96
  ```
94
97
 
95
98
  #### Asynchronous Client
@@ -100,19 +103,23 @@ from os import getenv
100
103
 
101
104
  client = AsyncClient(token=getenv("API_TOKEN"))
102
105
  res = await client.v1.ai_image_editor.create(
103
- assets={"image_file_path": "api-assets/id/1234.png"},
104
- style={"prompt": "Give me sunglasses"},
106
+ assets={
107
+ "image_file_path": "api-assets/id/1234.png",
108
+ "image_file_paths": ["api-assets/id/1234.png", "api-assets/id/1235.png"],
109
+ },
110
+ style={"model": "Nano Banana", "prompt": "Give me sunglasses"},
105
111
  name="Ai Image Editor image",
106
112
  )
107
-
108
113
  ```
109
114
 
110
115
  #### Response
111
116
 
112
117
  ##### Type
118
+
113
119
  [V1AiImageEditorCreateResponse](/magic_hour/types/models/v1_ai_image_editor_create_response.py)
114
120
 
115
121
  ##### Example
116
- `{"credits_charged": 50, "frame_cost": 50, "id": "cuid-example"}`
117
-
118
122
 
123
+ ```python
124
+ {"credits_charged": 50, "frame_cost": 50, "id": "cuid-example"}
125
+ ```