magic_hour 0.20.0__py3-none-any.whl → 0.22.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.
- magic_hour/client.py +3 -14
- magic_hour/core/base_client.py +32 -30
- magic_hour/environment.py +13 -1
- magic_hour/resources/v1/ai_clothes_changer/README.md +2 -3
- magic_hour/resources/v1/ai_clothes_changer/client.py +2 -2
- magic_hour/resources/v1/ai_face_editor/README.md +1 -2
- magic_hour/resources/v1/ai_gif_generator/README.md +2 -3
- magic_hour/resources/v1/ai_gif_generator/client.py +2 -2
- magic_hour/resources/v1/ai_headshot_generator/README.md +2 -3
- magic_hour/resources/v1/ai_headshot_generator/client.py +2 -2
- magic_hour/resources/v1/ai_image_generator/README.md +2 -3
- magic_hour/resources/v1/ai_image_generator/client.py +2 -2
- magic_hour/resources/v1/ai_image_upscaler/README.md +2 -3
- magic_hour/resources/v1/ai_image_upscaler/client.py +2 -2
- magic_hour/resources/v1/ai_meme_generator/README.md +2 -3
- magic_hour/resources/v1/ai_meme_generator/client.py +2 -2
- magic_hour/resources/v1/ai_photo_editor/README.md +6 -3
- magic_hour/resources/v1/ai_photo_editor/client.py +6 -2
- magic_hour/resources/v1/ai_qr_code_generator/README.md +2 -3
- magic_hour/resources/v1/ai_qr_code_generator/client.py +2 -2
- magic_hour/resources/v1/ai_talking_photo/README.md +1 -2
- magic_hour/resources/v1/animation/README.md +1 -2
- magic_hour/resources/v1/face_swap/README.md +1 -2
- magic_hour/resources/v1/face_swap_photo/README.md +2 -3
- magic_hour/resources/v1/face_swap_photo/client.py +2 -2
- magic_hour/resources/v1/files/upload_urls/README.md +1 -2
- magic_hour/resources/v1/image_background_remover/README.md +2 -3
- magic_hour/resources/v1/image_background_remover/client.py +2 -2
- magic_hour/resources/v1/image_projects/README.md +2 -4
- magic_hour/resources/v1/image_to_video/README.md +1 -2
- magic_hour/resources/v1/lip_sync/README.md +1 -2
- magic_hour/resources/v1/photo_colorizer/README.md +2 -3
- magic_hour/resources/v1/photo_colorizer/client.py +2 -2
- magic_hour/resources/v1/text_to_video/README.md +1 -2
- magic_hour/resources/v1/video_projects/README.md +2 -4
- magic_hour/resources/v1/video_to_video/README.md +1 -2
- magic_hour/types/models/v1_ai_clothes_changer_create_response.py +9 -1
- magic_hour/types/models/v1_ai_face_editor_create_response.py +9 -1
- magic_hour/types/models/v1_ai_gif_generator_create_response.py +9 -1
- magic_hour/types/models/v1_ai_headshot_generator_create_response.py +9 -1
- magic_hour/types/models/v1_ai_image_generator_create_response.py +9 -1
- magic_hour/types/models/v1_ai_image_upscaler_create_response.py +9 -1
- magic_hour/types/models/v1_ai_meme_generator_create_response.py +9 -1
- magic_hour/types/models/v1_ai_photo_editor_create_response.py +9 -1
- magic_hour/types/models/v1_ai_qr_code_generator_create_response.py +9 -1
- magic_hour/types/models/v1_ai_talking_photo_create_response.py +11 -1
- magic_hour/types/models/v1_animation_create_response.py +11 -1
- magic_hour/types/models/v1_face_swap_create_response.py +12 -2
- magic_hour/types/models/v1_face_swap_photo_create_response.py +9 -1
- magic_hour/types/models/v1_image_background_remover_create_response.py +9 -1
- magic_hour/types/models/v1_image_projects_get_response.py +9 -1
- magic_hour/types/models/v1_image_to_video_create_response.py +11 -1
- magic_hour/types/models/v1_lip_sync_create_response.py +11 -1
- magic_hour/types/models/v1_photo_colorizer_create_response.py +9 -1
- magic_hour/types/models/v1_text_to_video_create_response.py +11 -1
- magic_hour/types/models/v1_video_projects_get_response.py +10 -0
- magic_hour/types/models/v1_video_to_video_create_response.py +11 -1
- magic_hour/types/params/v1_ai_photo_editor_create_body_style.py +16 -0
- magic_hour/types/params/v1_video_to_video_create_body_style.py +2 -0
- {magic_hour-0.20.0.dist-info → magic_hour-0.22.0.dist-info}/METADATA +1 -1
- {magic_hour-0.20.0.dist-info → magic_hour-0.22.0.dist-info}/RECORD +63 -63
- {magic_hour-0.20.0.dist-info → magic_hour-0.22.0.dist-info}/LICENSE +0 -0
- {magic_hour-0.20.0.dist-info → magic_hour-0.22.0.dist-info}/WHEEL +0 -0
|
@@ -27,7 +27,7 @@ class ImageBackgroundRemoverClient:
|
|
|
27
27
|
"""
|
|
28
28
|
Image Background Remover
|
|
29
29
|
|
|
30
|
-
Remove background from image. Each image costs 5
|
|
30
|
+
Remove background from image. Each image costs 5 credits.
|
|
31
31
|
|
|
32
32
|
POST /v1/image-background-remover
|
|
33
33
|
|
|
@@ -81,7 +81,7 @@ class AsyncImageBackgroundRemoverClient:
|
|
|
81
81
|
"""
|
|
82
82
|
Image Background Remover
|
|
83
83
|
|
|
84
|
-
Remove background from image. Each image costs 5
|
|
84
|
+
Remove background from image. Each image costs 5 credits.
|
|
85
85
|
|
|
86
86
|
POST /v1/image-background-remover
|
|
87
87
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
###
|
|
3
|
-
Delete image
|
|
2
|
+
### Delete image <a name="delete"></a>
|
|
4
3
|
|
|
5
4
|
Permanently delete the rendered image. This action is not reversible, please be sure before deleting.
|
|
6
5
|
|
|
@@ -26,8 +25,7 @@ client = AsyncClient(token=getenv("API_TOKEN"))
|
|
|
26
25
|
res = await client.v1.image_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
|
|
27
26
|
```
|
|
28
27
|
|
|
29
|
-
###
|
|
30
|
-
Get image details
|
|
28
|
+
### Get image details <a name="get"></a>
|
|
31
29
|
|
|
32
30
|
Get the details of a image project. The `downloads` field will be empty unless the image was successfully rendered.
|
|
33
31
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
###
|
|
3
|
-
Image-to-Video
|
|
2
|
+
### Image-to-Video <a name="create"></a>
|
|
4
3
|
|
|
5
4
|
Create a Image To Video video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
###
|
|
3
|
-
Lip Sync
|
|
2
|
+
### Lip Sync <a name="create"></a>
|
|
4
3
|
|
|
5
4
|
Create a Lip Sync video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
|
|
6
5
|
|
|
@@ -27,7 +27,7 @@ class PhotoColorizerClient:
|
|
|
27
27
|
"""
|
|
28
28
|
Photo Colorizer
|
|
29
29
|
|
|
30
|
-
Colorize image. Each image costs 5
|
|
30
|
+
Colorize image. Each image costs 5 credits.
|
|
31
31
|
|
|
32
32
|
POST /v1/photo-colorizer
|
|
33
33
|
|
|
@@ -81,7 +81,7 @@ class AsyncPhotoColorizerClient:
|
|
|
81
81
|
"""
|
|
82
82
|
Photo Colorizer
|
|
83
83
|
|
|
84
|
-
Colorize image. Each image costs 5
|
|
84
|
+
Colorize image. Each image costs 5 credits.
|
|
85
85
|
|
|
86
86
|
POST /v1/photo-colorizer
|
|
87
87
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
###
|
|
3
|
-
Text-to-Video
|
|
2
|
+
### Text-to-Video <a name="create"></a>
|
|
4
3
|
|
|
5
4
|
Create a Text To Video video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
###
|
|
3
|
-
Delete video
|
|
2
|
+
### Delete video <a name="delete"></a>
|
|
4
3
|
|
|
5
4
|
Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
|
|
6
5
|
|
|
@@ -26,8 +25,7 @@ client = AsyncClient(token=getenv("API_TOKEN"))
|
|
|
26
25
|
res = await client.v1.video_projects.delete(id="cm6pvghix03bvyz0zwash6noj")
|
|
27
26
|
```
|
|
28
27
|
|
|
29
|
-
###
|
|
30
|
-
Get video details
|
|
28
|
+
### Get video details <a name="get"></a>
|
|
31
29
|
|
|
32
30
|
Get the details of a video project. The `downloads` field will be empty unless the video was successfully rendered.
|
|
33
31
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
###
|
|
3
|
-
Video-to-Video
|
|
2
|
+
### Video-to-Video <a name="create"></a>
|
|
4
3
|
|
|
5
4
|
Create a Video To Video video. The estimated frame cost is calculated using 30 FPS. This amount is deducted from your account balance when a video is queued. Once the video is complete, the cost will be updated based on the actual number of frames rendered.
|
|
6
5
|
|
|
@@ -11,11 +11,19 @@ class V1AiClothesChangerCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1AiFaceEditorCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1AiGifGeneratorCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1AiHeadshotGeneratorCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1AiImageGeneratorCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1AiImageUpscalerCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1AiMemeGeneratorCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1AiPhotoEditorCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1AiQrCodeGeneratorCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,21 @@ class V1AiTalkingPhotoCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
estimated_frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="estimated_frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
19
29
|
"""
|
|
20
30
|
id: str = pydantic.Field(
|
|
21
31
|
alias="id",
|
|
@@ -11,11 +11,21 @@ class V1AnimationCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
estimated_frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="estimated_frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
19
29
|
"""
|
|
20
30
|
id: str = pydantic.Field(
|
|
21
31
|
alias="id",
|
|
@@ -11,15 +11,25 @@ class V1FaceSwapCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
estimated_frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="estimated_frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
19
29
|
"""
|
|
20
30
|
id: str = pydantic.Field(
|
|
21
31
|
alias="id",
|
|
22
32
|
)
|
|
23
33
|
"""
|
|
24
|
-
Unique ID of the
|
|
34
|
+
Unique ID of the video. This value can be used in the [get video project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch additional details such as status
|
|
25
35
|
"""
|
|
@@ -11,11 +11,19 @@ class V1FaceSwapPhotoCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1ImageBackgroundRemoverCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -21,6 +21,14 @@ class V1ImageProjectsGetResponse(pydantic.BaseModel):
|
|
|
21
21
|
created_at: str = pydantic.Field(
|
|
22
22
|
alias="created_at",
|
|
23
23
|
)
|
|
24
|
+
credits_charged: int = pydantic.Field(
|
|
25
|
+
alias="credits_charged",
|
|
26
|
+
)
|
|
27
|
+
"""
|
|
28
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
29
|
+
|
|
30
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
31
|
+
"""
|
|
24
32
|
downloads: typing.List[V1ImageProjectsGetResponseDownloadsItem] = pydantic.Field(
|
|
25
33
|
alias="downloads",
|
|
26
34
|
)
|
|
@@ -66,7 +74,7 @@ class V1ImageProjectsGetResponse(pydantic.BaseModel):
|
|
|
66
74
|
alias="total_frame_cost",
|
|
67
75
|
)
|
|
68
76
|
"""
|
|
69
|
-
|
|
77
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
70
78
|
"""
|
|
71
79
|
type_: str = pydantic.Field(
|
|
72
80
|
alias="type",
|
|
@@ -11,11 +11,21 @@ class V1ImageToVideoCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
estimated_frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="estimated_frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
19
29
|
"""
|
|
20
30
|
id: str = pydantic.Field(
|
|
21
31
|
alias="id",
|
|
@@ -11,11 +11,21 @@ class V1LipSyncCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
estimated_frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="estimated_frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
19
29
|
"""
|
|
20
30
|
id: str = pydantic.Field(
|
|
21
31
|
alias="id",
|
|
@@ -11,11 +11,19 @@ class V1PhotoColorizerCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
|
|
19
|
+
|
|
20
|
+
If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.
|
|
19
27
|
"""
|
|
20
28
|
id: str = pydantic.Field(
|
|
21
29
|
alias="id",
|
|
@@ -11,11 +11,21 @@ class V1TextToVideoCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
estimated_frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="estimated_frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
19
29
|
"""
|
|
20
30
|
id: str = pydantic.Field(
|
|
21
31
|
alias="id",
|
|
@@ -22,6 +22,14 @@ class V1VideoProjectsGetResponse(pydantic.BaseModel):
|
|
|
22
22
|
created_at: str = pydantic.Field(
|
|
23
23
|
alias="created_at",
|
|
24
24
|
)
|
|
25
|
+
credits_charged: int = pydantic.Field(
|
|
26
|
+
alias="credits_charged",
|
|
27
|
+
)
|
|
28
|
+
"""
|
|
29
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
30
|
+
|
|
31
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
32
|
+
"""
|
|
25
33
|
download: typing.Optional[V1VideoProjectsGetResponseDownload] = pydantic.Field(
|
|
26
34
|
alias="download",
|
|
27
35
|
)
|
|
@@ -91,6 +99,8 @@ class V1VideoProjectsGetResponse(pydantic.BaseModel):
|
|
|
91
99
|
alias="total_frame_cost",
|
|
92
100
|
)
|
|
93
101
|
"""
|
|
102
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
103
|
+
|
|
94
104
|
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
95
105
|
"""
|
|
96
106
|
type_: str = pydantic.Field(
|
|
@@ -11,11 +11,21 @@ class V1VideoToVideoCreateResponse(pydantic.BaseModel):
|
|
|
11
11
|
populate_by_name=True,
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
+
credits_charged: int = pydantic.Field(
|
|
15
|
+
alias="credits_charged",
|
|
16
|
+
)
|
|
17
|
+
"""
|
|
18
|
+
The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
|
|
19
|
+
|
|
20
|
+
If video generation fails, credits will be refunded, and this field will be updated to include the refund.
|
|
21
|
+
"""
|
|
14
22
|
estimated_frame_cost: int = pydantic.Field(
|
|
15
23
|
alias="estimated_frame_cost",
|
|
16
24
|
)
|
|
17
25
|
"""
|
|
18
|
-
|
|
26
|
+
Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
|
|
27
|
+
|
|
28
|
+
The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
|
|
19
29
|
"""
|
|
20
30
|
id: str = pydantic.Field(
|
|
21
31
|
alias="id",
|
|
@@ -38,6 +38,16 @@ class V1AiPhotoEditorCreateBodyStyle(typing_extensions.TypedDict):
|
|
|
38
38
|
Number of iterations used to generate the output. Higher values improve quality and increase the strength of the prompt but increase processing time.
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
|
+
upscale_factor: typing_extensions.NotRequired[int]
|
|
42
|
+
"""
|
|
43
|
+
The multiplier applied to an image's original dimensions during the upscaling process. For example, a scale of 2 doubles the width and height (e.g., from 512x512 to 1024x1024).
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
upscale_fidelity: typing_extensions.NotRequired[float]
|
|
47
|
+
"""
|
|
48
|
+
Upscale fidelity refers to the level of quality desired in the generated image. Fidelity value of 1 means more details.
|
|
49
|
+
"""
|
|
50
|
+
|
|
41
51
|
|
|
42
52
|
class _SerializerV1AiPhotoEditorCreateBodyStyle(pydantic.BaseModel):
|
|
43
53
|
"""
|
|
@@ -65,3 +75,9 @@ class _SerializerV1AiPhotoEditorCreateBodyStyle(pydantic.BaseModel):
|
|
|
65
75
|
alias="prompt_strength",
|
|
66
76
|
)
|
|
67
77
|
steps: typing.Optional[int] = pydantic.Field(alias="steps", default=None)
|
|
78
|
+
upscale_factor: typing.Optional[int] = pydantic.Field(
|
|
79
|
+
alias="upscale_factor", default=None
|
|
80
|
+
)
|
|
81
|
+
upscale_fidelity: typing.Optional[float] = pydantic.Field(
|
|
82
|
+
alias="upscale_fidelity", default=None
|
|
83
|
+
)
|