diff --git a/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageEditorCreateImage.g.cs b/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageEditorCreateImage.g.cs
index 77355a6..9eb11fe 100644
--- a/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageEditorCreateImage.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageEditorCreateImage.g.cs
@@ -108,7 +108,7 @@ public partial interface IImageProjectsClient
/// - Max additional input images: 9
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Max additional input images: 9
/// - `seedream-v4` - from 40 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
diff --git a/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageGeneratorCreateImage.g.cs b/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageGeneratorCreateImage.g.cs
index 772264c..3c02bc0 100644
--- a/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageGeneratorCreateImage.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageGeneratorCreateImage.g.cs
@@ -105,7 +105,7 @@ public partial interface IImageProjectsClient
/// - Image count allowed: 1, 2, 3, 4
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
diff --git a/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.ImageToVideoCreateVideo.g.cs b/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.ImageToVideoCreateVideo.g.cs
index a868b6e..f02598d 100644
--- a/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.ImageToVideoCreateVideo.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.ImageToVideoCreateVideo.g.cs
@@ -149,7 +149,7 @@ public partial interface IVideoProjectsClient
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
diff --git a/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.TextToVideoCreateVideo.g.cs b/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.TextToVideoCreateVideo.g.cs
index 8f66c83..f6e1a6d 100644
--- a/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.TextToVideoCreateVideo.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.TextToVideoCreateVideo.g.cs
@@ -169,7 +169,7 @@ public partial interface IVideoProjectsClient
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
diff --git a/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageEditorCreateImage.g.cs b/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageEditorCreateImage.g.cs
index 44ad847..57fabb5 100644
--- a/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageEditorCreateImage.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageEditorCreateImage.g.cs
@@ -705,7 +705,7 @@ partial void ProcessAiImageEditorCreateImageResponseContent(
/// - Max additional input images: 9
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Max additional input images: 9
/// - `seedream-v4` - from 40 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
diff --git a/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageGeneratorCreateImage.g.cs b/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageGeneratorCreateImage.g.cs
index 7b50f97..77862ad 100644
--- a/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageGeneratorCreateImage.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageGeneratorCreateImage.g.cs
@@ -702,7 +702,7 @@ partial void ProcessAiImageGeneratorCreateImageResponseContent(
/// - Image count allowed: 1, 2, 3, 4
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageEditorCreateImageRequest.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageEditorCreateImageRequest.g.cs
index 76fd767..eb7fc10 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageEditorCreateImageRequest.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageEditorCreateImageRequest.g.cs
@@ -40,7 +40,7 @@ public sealed partial class AiImageEditorCreateImageRequest
/// - Max additional input images: 9
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Max additional input images: 9
/// - `seedream-v4` - from 40 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
@@ -149,7 +149,7 @@ public sealed partial class AiImageEditorCreateImageRequest
/// - Max additional input images: 9
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Max additional input images: 9
/// - `seedream-v4` - from 40 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageEditorCreateImageRequestModel.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageEditorCreateImageRequestModel.g.cs
index bd540c7..1312c69 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageEditorCreateImageRequestModel.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageEditorCreateImageRequestModel.g.cs
@@ -17,7 +17,7 @@ namespace MagicHour
/// - Max additional input images: 9
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Max additional input images: 9
/// - `seedream-v4` - from 40 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequest.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequest.g.cs
index f8a7cf1..e477155 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequest.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequest.g.cs
@@ -48,7 +48,7 @@ public sealed partial class AiImageGeneratorCreateImageRequest
/// - Image count allowed: 1, 2, 3, 4
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
@@ -151,7 +151,7 @@ public sealed partial class AiImageGeneratorCreateImageRequest
/// - Image count allowed: 1, 2, 3, 4
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequestModel.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequestModel.g.cs
index c9625d9..ebcf713 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequestModel.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequestModel.g.cs
@@ -25,7 +25,7 @@ namespace MagicHour
/// - Image count allowed: 1, 2, 3, 4
/// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
- /// - Available for tiers: free, creator, pro, business
+ /// - Available for tiers: creator, pro, business
/// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.ImageProjectsGetDetailsResponse.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.ImageProjectsGetDetailsResponse.g.cs
index e2a26ec..1a73236 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.ImageProjectsGetDetailsResponse.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.ImageProjectsGetDetailsResponse.g.cs
@@ -45,7 +45,7 @@ public sealed partial class ImageProjectsGetDetailsResponse
public required int ImageCount { get; set; }
///
- /// The type of the image project. Possible values are FACE_EDITOR, AI_IMAGE_EDITOR, AI_SELFIE, AI_HEADSHOT, AI_IMAGE, AI_MEME, CLOTHES_CHANGER, BACKGROUND_REMOVER, FACE_SWAP, IMAGE_UPSCALER, AI_GIF, QR_CODE, PHOTO_EDITOR, PHOTO_COLORIZER, HEAD_SWAP, BODY_SWAP, STORYBOARD
+ /// The type of the image project. Possible values are FACE_EDITOR, AI_IMAGE_EDITOR, AI_SELFIE, AI_HEADSHOT, AI_IMAGE, AI_MEME, CLOTHES_CHANGER, BACKGROUND_REMOVER, FACE_SWAP, IMAGE_UPSCALER, AI_GIF, QR_CODE, PHOTO_EDITOR, PHOTO_COLORIZER, HEAD_SWAP, BODY_SWAP, STORYBOARD, IMAGE_EXPANDER
/// Example: AI_IMAGE
///
/// AI_IMAGE
@@ -114,7 +114,7 @@ public sealed partial class ImageProjectsGetDetailsResponse
/// Example: 1
///
///
- /// The type of the image project. Possible values are FACE_EDITOR, AI_IMAGE_EDITOR, AI_SELFIE, AI_HEADSHOT, AI_IMAGE, AI_MEME, CLOTHES_CHANGER, BACKGROUND_REMOVER, FACE_SWAP, IMAGE_UPSCALER, AI_GIF, QR_CODE, PHOTO_EDITOR, PHOTO_COLORIZER, HEAD_SWAP, BODY_SWAP, STORYBOARD
+ /// The type of the image project. Possible values are FACE_EDITOR, AI_IMAGE_EDITOR, AI_SELFIE, AI_HEADSHOT, AI_IMAGE, AI_MEME, CLOTHES_CHANGER, BACKGROUND_REMOVER, FACE_SWAP, IMAGE_UPSCALER, AI_GIF, QR_CODE, PHOTO_EDITOR, PHOTO_COLORIZER, HEAD_SWAP, BODY_SWAP, STORYBOARD, IMAGE_EXPANDER
/// Example: AI_IMAGE
///
///
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequest.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequest.g.cs
index 59ad978..93202d6 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequest.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequest.g.cs
@@ -38,7 +38,7 @@ public sealed partial class ImageToVideoCreateVideoRequest
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
@@ -138,7 +138,7 @@ public sealed partial class ImageToVideoCreateVideoRequest
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequestModel.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequestModel.g.cs
index 36cde13..5d7c335 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequestModel.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequestModel.g.cs
@@ -6,7 +6,7 @@ namespace MagicHour
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequest.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequest.g.cs
index 6beb310..19b4e06 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequest.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequest.g.cs
@@ -74,7 +74,7 @@ public sealed partial class TextToVideoCreateVideoRequest
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
@@ -174,7 +174,7 @@ public sealed partial class TextToVideoCreateVideoRequest
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequestModel.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequestModel.g.cs
index befd0dc..ab6c464 100644
--- a/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequestModel.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequestModel.g.cs
@@ -6,7 +6,7 @@ namespace MagicHour
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
diff --git a/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.ImageToVideoCreateVideo.g.cs b/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.ImageToVideoCreateVideo.g.cs
index 5e50645..ae4fe21 100644
--- a/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.ImageToVideoCreateVideo.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.ImageToVideoCreateVideo.g.cs
@@ -746,7 +746,7 @@ partial void ProcessImageToVideoCreateVideoResponseContent(
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
diff --git a/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.TextToVideoCreateVideo.g.cs b/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.TextToVideoCreateVideo.g.cs
index 7ecf6f7..dc3796d 100644
--- a/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.TextToVideoCreateVideo.g.cs
+++ b/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.TextToVideoCreateVideo.g.cs
@@ -766,7 +766,7 @@ partial void ProcessTextToVideoCreateVideoResponseContent(
///
/// The AI model to use for video generation.
/// * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
- /// * `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame
+ /// * `ltx-2.3`: Fast iteration with lip-sync & end frame
/// * `wan-2.2`: Fast, strong visuals with effects
/// * `kling-2.5`: Motion, action, and camera control
/// * `kling-3.0`: Cinematic, multi-scene storytelling
diff --git a/src/libs/MagicHour/openapi.yaml b/src/libs/MagicHour/openapi.yaml
index c451448..3df4fde 100644
--- a/src/libs/MagicHour/openapi.yaml
+++ b/src/libs/MagicHour/openapi.yaml
@@ -5,7 +5,9 @@
"post": {
"description": "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.\n\nThe response array will match the order of items in the request body.\n\n**Valid file extensions per asset type**:\n- video: mp4, m4v, mov, webm\n- audio: mp3, wav, aac, flac, webm, m4a\n- image: png, jpg, jpeg, heic, heif, webp, avif, jp2, tiff, bmp\n- gif: gif, webp, webm\n\n> Note: `gif` is only supported for face swap API `video_file_path` field.\n\nOnce you receive an upload URL, send a `PUT` request to upload the file directly.\n\nExample:\n\n```\ncurl -X PUT --data '@/path/to/file/video.mp4' \\\n https://videos.magichour.ai/api-assets/id/video.mp4?\n```\n",
"summary": "Generate asset upload urls",
- "tags": ["Files"],
+ "tags": [
+ "Files"
+ ],
"parameters": [],
"operationId": "videoAssets.generatePresignedUrl",
"requestBody": {
@@ -23,7 +25,11 @@
"properties": {
"type": {
"type": "string",
- "enum": ["video", "audio", "image"],
+ "enum": [
+ "video",
+ "audio",
+ "image"
+ ],
"description": "The type of asset to upload. Possible types are video, audio, image",
"example": "video"
},
@@ -34,17 +40,28 @@
"example": "mp4"
}
},
- "required": ["type", "extension"]
+ "required": [
+ "type",
+ "extension"
+ ]
},
"minItems": 1,
"description": "The list of assets to upload. The response array will match the order of items in the request body.",
"example": [
- { "type": "video", "extension": "mp4" },
- { "type": "audio", "extension": "mp3" }
+ {
+ "type": "video",
+ "extension": "mp4"
+ },
+ {
+ "type": "audio",
+ "extension": "mp3"
+ }
]
}
},
- "required": ["items"]
+ "required": [
+ "items"
+ ]
}
}
}
@@ -80,7 +97,11 @@
"example": "video/id/1234.mp4"
}
},
- "required": ["upload_url", "expires_at", "file_path"]
+ "required": [
+ "upload_url",
+ "expires_at",
+ "file_path"
+ ]
},
"description": "The list of upload URLs and file paths for the assets. The response array will match the order of items in the request body. Refer to the [Input Files Guide](/integration/input-files) for more details.",
"example": [
@@ -97,7 +118,9 @@
]
}
},
- "required": ["items"],
+ "required": [
+ "items"
+ ],
"description": "Success"
}
}
@@ -109,10 +132,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -123,10 +154,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -137,10 +179,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -151,10 +201,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -171,14 +232,20 @@
"example": "'mp4' is an invalid audio extension. Possible extensions are 'mp3, wav, aac, flac, webm, m4a'"
}
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -215,13 +282,18 @@
"get": {
"description": "Get the details of a face detection task. \n\nUse this API to get the list of faces detected in the image or video to use in the [face swap photo](https://docs.magichour.ai/api-reference/image-projects/face-swap-photo) or [face swap video](https://docs.magichour.ai/api-reference/video-projects/face-swap-video) API calls for multi-face swaps.",
"summary": "Get face detection details",
- "tags": ["Files"],
+ "tags": [
+ "Files"
+ ],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
- "schema": { "type": "string", "example": "uuid-example" },
+ "schema": {
+ "type": "string",
+ "example": "uuid-example"
+ },
"description": "The id of the task. This value is returned by the [face detection API](https://docs.magichour.ai/api-reference/files/face-detection#response-id)."
}
],
@@ -246,7 +318,12 @@
},
"status": {
"type": "string",
- "enum": ["queued", "rendering", "complete", "error"],
+ "enum": [
+ "queued",
+ "rendering",
+ "complete",
+ "error"
+ ],
"description": "The status of the detection.",
"example": "complete"
},
@@ -266,7 +343,10 @@
"example": "https://videos.magichour.ai/api-assets/id/0-0.png"
}
},
- "required": ["path", "url"]
+ "required": [
+ "path",
+ "url"
+ ]
},
"description": "The faces detected in the image or video. The list is populated as faces are detected.",
"example": [
@@ -277,7 +357,12 @@
]
}
},
- "required": ["id", "credits_charged", "status", "faces"]
+ "required": [
+ "id",
+ "credits_charged",
+ "status",
+ "faces"
+ ]
}
}
}
@@ -288,10 +373,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -302,10 +395,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -316,10 +420,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -330,10 +442,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -350,14 +473,20 @@
"example": "Unable to get face detection details"
}
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -394,7 +523,9 @@
"post": {
"description": "Detect faces in an image or video. \n \nUse this API to get the list of faces detected in the image or video to use in the [face swap photo](https://docs.magichour.ai/api-reference/image-projects/face-swap-photo) or [face swap video](https://docs.magichour.ai/api-reference/video-projects/face-swap-video) API calls for multi-face swaps.\n\nNote: Face detection is free to use for the near future. Pricing may change in the future.",
"summary": "Face Detection",
- "tags": ["Files"],
+ "tags": [
+ "Files"
+ ],
"parameters": [],
"operationId": "faceDetection.detectFaces",
"requestBody": {
@@ -423,11 +554,15 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["target_file_path"],
+ "required": [
+ "target_file_path"
+ ],
"description": "Provide the assets for face detection"
}
},
- "required": ["assets"]
+ "required": [
+ "assets"
+ ]
}
}
}
@@ -450,7 +585,10 @@
"description": "The credits charged for the task."
}
},
- "required": ["id", "credits_charged"]
+ "required": [
+ "id",
+ "credits_charged"
+ ]
}
}
}
@@ -461,10 +599,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -475,10 +621,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -489,10 +646,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -503,10 +668,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -518,16 +694,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to trigger face detection" }
+ "message": {
+ "type": "string",
+ "example": "Unable to trigger face detection"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -564,13 +749,18 @@
"get": {
"description": "Check the progress of a video project. The `downloads` field is populated after a successful render.\n \n**Statuses**\n- `queued` — waiting to start\n- `rendering` — in progress\n- `complete` — ready; see `downloads`\n- `error` — a failure occurred (see `error`)\n- `canceled` — user canceled\n- `draft` — not used",
"summary": "Get video details",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
- "schema": { "type": "string", "example": "cuid-example" },
+ "schema": {
+ "type": "string",
+ "example": "cuid-example"
+ },
"description": "Unique ID of the video project. This value is returned by all of the POST APIs that create a video."
}
],
@@ -596,7 +786,14 @@
},
"status": {
"type": "string",
- "enum": ["draft", "queued", "rendering", "complete", "error", "canceled"],
+ "enum": [
+ "draft",
+ "queued",
+ "rendering",
+ "complete",
+ "error",
+ "canceled"
+ ],
"description": "The status of the video.",
"example": "complete"
},
@@ -605,7 +802,10 @@
"description": "The type of the video project. Possible values are ANIMATION, AUTO_SUBTITLE, VIDEO_TO_VIDEO, FACE_SWAP, TEXT_TO_VIDEO, IMAGE_TO_VIDEO, LIP_SYNC, TALKING_PHOTO, VIDEO_UPSCALER, EXTEND, AUDIO_TO_VIDEO, VIDEO_EXPANDER, UGC_AD",
"example": "FACE_SWAP"
},
- "created_at": { "type": "string", "format": "date-time" },
+ "created_at": {
+ "type": "string",
+ "format": "date-time"
+ },
"width": {
"type": "integer",
"description": "The width of the final output video. A value of -1 indicates the width can be ignored.",
@@ -658,7 +858,10 @@
"description": "An error code to indicate why a failure happened."
}
},
- "required": ["message", "code"],
+ "required": [
+ "message",
+ "code"
+ ],
"nullable": true,
"description": "In the case of an error, this object will contain the error encountered during video render",
"example": null
@@ -679,7 +882,10 @@
"example": "2024-10-19T05:16:19.027Z"
}
},
- "required": ["url", "expires_at"],
+ "required": [
+ "url",
+ "expires_at"
+ ],
"description": "The download url and expiration date of the image project"
}
}
@@ -713,10 +919,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -727,10 +941,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -741,10 +966,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -755,16 +988,31 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -799,29 +1047,44 @@
"delete": {
"description": "Permanently delete the rendered video. This action is not reversible, please be sure before deleting.",
"summary": "Delete video",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
- "schema": { "type": "string", "example": "cuid-example" },
+ "schema": {
+ "type": "string",
+ "example": "cuid-example"
+ },
"description": "Unique ID of the video project. This value is returned by all of the POST APIs that create a video."
}
],
"operationId": "videoProjects.delete",
"responses": {
- "204": { "description": "204" },
+ "204": {
+ "description": "204"
+ },
"400": {
"description": "Invalid Request",
"content": {
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -832,10 +1095,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -846,10 +1120,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -860,10 +1142,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -874,8 +1167,14 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "When a request fails validations",
"example": {
"message": "video is a template and cannot be deleted. Please reach out to our support team."
@@ -885,7 +1184,11 @@
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -922,7 +1225,9 @@
"post": {
"description": "Create a talking photo from an image and audio or text input.",
"summary": "AI Talking Photo",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [],
"operationId": "aiTalkingPhoto.createTalkingPhoto",
"requestBody": {
@@ -969,7 +1274,10 @@
"example": "api-assets/id/1234.mp3"
}
},
- "required": ["image_file_path", "audio_file_path"],
+ "required": [
+ "image_file_path",
+ "audio_file_path"
+ ],
"description": "Provide the assets for creating a talking photo"
},
"style": {
@@ -1002,7 +1310,11 @@
"example": 1024
}
},
- "required": ["start_seconds", "end_seconds", "assets"],
+ "required": [
+ "start_seconds",
+ "end_seconds",
+ "assets"
+ ],
"description": "Provide the assets for creating a talking photo"
}
}
@@ -1027,7 +1339,11 @@
"example": 450
}
},
- "required": ["id", "estimated_frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "estimated_frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -1039,10 +1355,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -1053,10 +1377,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -1067,10 +1402,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -1081,10 +1424,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -1096,16 +1450,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create talking photo" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create talking photo"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -1142,7 +1505,9 @@
"post": {
"description": "Create a Animation video. The estimated frame cost is calculated based on the `fps` and `end_seconds` input.",
"summary": "Animation",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [],
"operationId": "animation.createVideo",
"requestBody": {
@@ -1306,7 +1671,11 @@
},
"prompt_type": {
"type": "string",
- "enum": ["custom", "use_lyrics", "ai_choose"],
+ "enum": [
+ "custom",
+ "use_lyrics",
+ "ai_choose"
+ ],
"example": "custom",
"description": "\n* `custom` - Use your own prompt for the video.\n* `use_lyrics` - Use the lyrics of the audio to create the prompt. If this option is selected, then `assets.audio_source` must be `file` or `youtube`.\n* `ai_choose` - Let AI write the prompt. If this option is selected, then `assets.audio_source` must be `file` or `youtube`."
},
@@ -1323,7 +1692,12 @@
"example": 5
}
},
- "required": ["art_style", "camera_effect", "prompt_type", "transition_speed"],
+ "required": [
+ "art_style",
+ "camera_effect",
+ "prompt_type",
+ "transition_speed"
+ ],
"description": "Defines the style of the output video"
},
"assets": {
@@ -1331,7 +1705,11 @@
"properties": {
"audio_source": {
"type": "string",
- "enum": ["none", "file", "youtube"],
+ "enum": [
+ "none",
+ "file",
+ "youtube"
+ ],
"description": "Optionally add an audio source if you'd like to incorporate audio into your video",
"example": "file"
},
@@ -1354,11 +1732,20 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["audio_source"],
+ "required": [
+ "audio_source"
+ ],
"description": "Provide the assets for animation."
}
},
- "required": ["fps", "end_seconds", "height", "width", "style", "assets"]
+ "required": [
+ "fps",
+ "end_seconds",
+ "height",
+ "width",
+ "style",
+ "assets"
+ ]
}
}
}
@@ -1382,7 +1769,11 @@
"example": 450
}
},
- "required": ["id", "estimated_frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "estimated_frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -1394,10 +1785,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -1408,10 +1807,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -1422,10 +1832,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -1436,10 +1854,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -1451,16 +1880,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create video" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create video"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -1497,7 +1935,9 @@
"post": {
"description": "Automatically generate subtitles for your video in multiple languages.",
"summary": "Auto Subtitle Generator",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [],
"operationId": "autoSubtitleGenerator.createVideo",
"requestBody": {
@@ -1538,7 +1978,9 @@
"example": "api-assets/id/1234.mp4"
}
},
- "required": ["video_file_path"],
+ "required": [
+ "video_file_path"
+ ],
"description": "Provide the assets for auto subtitle generator"
},
"style": {
@@ -1546,7 +1988,12 @@
"properties": {
"template": {
"type": "string",
- "enum": ["karaoke", "cinematic", "minimalist", "highlight"],
+ "enum": [
+ "karaoke",
+ "cinematic",
+ "minimalist",
+ "highlight"
+ ],
"description": "Preset subtitle templates. Please visit https://magichour.ai/create/auto-subtitle-generator to see the style of the existing templates."
},
"custom_config": {
@@ -1604,7 +2051,12 @@
"description": "Style of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided. \n* If only `.style.template` is provided, default values for the template will be used.\n* If both are provided, the fields in `.style.custom_config` will be used to overwrite the fields in `.style.template`.\n* If only `.style.custom_config` is provided, then all fields in `.style.custom_config` will be used.\n\nTo use custom config only, the following `custom_config` params are required:\n* `.style.custom_config.font`\n* `.style.custom_config.text_color`\n* `.style.custom_config.vertical_position`\n* `.style.custom_config.horizontal_position`\n"
}
},
- "required": ["start_seconds", "end_seconds", "assets", "style"]
+ "required": [
+ "start_seconds",
+ "end_seconds",
+ "assets",
+ "style"
+ ]
}
}
}
@@ -1628,7 +2080,11 @@
"example": 450
}
},
- "required": ["id", "estimated_frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "estimated_frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -1640,10 +2096,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -1654,10 +2118,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -1668,10 +2143,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -1682,10 +2165,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -1697,16 +2191,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create video" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create video"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -1743,7 +2246,9 @@
"post": {
"description": "**What this API does**\n\nCreate the same Face Swap you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.\n \n**Good for**\n- Automation and batch processing \n- Adding face swap into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`. \n2) Send a request to create a face swap job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes \n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/face-swap).",
"summary": "Face Swap Video",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [],
"operationId": "faceSwap.createVideo",
"requestBody": {
@@ -1779,13 +2284,19 @@
"properties": {
"version": {
"type": "string",
- "enum": ["v1", "v2", "default"],
+ "enum": [
+ "v1",
+ "v2",
+ "default"
+ ],
"example": "default",
"description": "* `v1` - May preserve skin detail and texture better, but weaker identity preservation.\n* `v2` - Faster, sharper, better handling of hair and glasses. stronger identity preservation.\n* `default` - Use the version we recommend, which will change over time. This is recommended unless you need a specific earlier version. This is the default behavior."
}
},
"description": "Style of the face swap video.",
- "example": { "version": "default" }
+ "example": {
+ "version": "default"
+ }
},
"assets": {
"type": "object",
@@ -1793,7 +2304,10 @@
"face_swap_mode": {
"default": "all-faces",
"type": "string",
- "enum": ["all-faces", "individual-faces"],
+ "enum": [
+ "all-faces",
+ "individual-faces"
+ ],
"description": "Choose how to swap faces:\n**all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)\n+- **individual-faces** — specify exact mappings using `face_mappings`",
"example": "all-faces"
},
@@ -1818,7 +2332,10 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["original_face", "new_face"]
+ "required": [
+ "original_face",
+ "new_face"
+ ]
},
"maxItems": 5,
"description": "This is the array of face mappings used for multiple face swap. The value is required if `face_swap_mode` is `individual-faces`.",
@@ -1831,7 +2348,10 @@
},
"video_source": {
"type": "string",
- "enum": ["file", "youtube"],
+ "enum": [
+ "file",
+ "youtube"
+ ],
"description": "Choose your video source.",
"example": "file"
},
@@ -1846,11 +2366,17 @@
"description": "YouTube URL (required if `video_source` is `youtube`)."
}
},
- "required": ["video_source"],
+ "required": [
+ "video_source"
+ ],
"description": "Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used"
}
},
- "required": ["start_seconds", "end_seconds", "assets"]
+ "required": [
+ "start_seconds",
+ "end_seconds",
+ "assets"
+ ]
}
}
}
@@ -1874,7 +2400,11 @@
"example": 450
}
},
- "required": ["id", "estimated_frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "estimated_frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -1886,10 +2416,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -1900,10 +2438,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -1914,10 +2463,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -1928,10 +2485,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -1943,16 +2511,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create video" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create video"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -1989,7 +2566,9 @@
"post": {
"description": "**What this API does**\n\nCreate the same Image To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.\n \n**Good for**\n- Automation and batch processing \n- Adding image to video into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`. \n2) Send a request to create a image to video job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes \n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/image-to-video).",
"summary": "Image-to-Video",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [],
"operationId": "imageToVideo.createVideo",
"requestBody": {
@@ -2033,12 +2612,17 @@
"kling-2.5-audio",
"veo3.1-audio"
],
- "description": "The AI model to use for video generation.\n\n* `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.\n* `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame\n* `wan-2.2`: Fast, strong visuals with effects\n* `kling-2.5`: Motion, action, and camera control\n* `kling-3.0`: Cinematic, multi-scene storytelling\n* `veo3.1-lite`: Fast, affordable, high-quality\n* `veo3.1`: Realistic visuals and prompt adherence\n* `seedance`: Fast iteration and start/end frames\n* `seedance-2.0`: State-of-the-art quality and consistency\n* `sora-2`: Story-first concepts and creativity\n\nIf you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.",
+ "description": "The AI model to use for video generation.\n\n* `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.\n* `ltx-2.3`: Fast iteration with lip-sync & end frame\n* `wan-2.2`: Fast, strong visuals with effects\n* `kling-2.5`: Motion, action, and camera control\n* `kling-3.0`: Cinematic, multi-scene storytelling\n* `veo3.1-lite`: Fast, affordable, high-quality\n* `veo3.1`: Realistic visuals and prompt adherence\n* `seedance`: Fast iteration and start/end frames\n* `seedance-2.0`: State-of-the-art quality and consistency\n* `sora-2`: Story-first concepts and creativity\n\nIf you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.",
"example": "kling-3.0"
},
"resolution": {
"type": "string",
- "enum": ["480p", "720p", "1080p", "4k"],
+ "enum": [
+ "480p",
+ "720p",
+ "1080p",
+ "4k"
+ ],
"example": "720p",
"description": "Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers.\n\n* **`ltx-2.3`**: Supports 480p, 720p, 1080p.\n* **`wan-2.2`**: Supports 480p, 720p, 1080p.\n* **`kling-2.5`**: Supports 720p, 1080p.\n* **`kling-3.0`**: Supports 720p, 1080p, 4k.\n* **`veo3.1-lite`**: Supports 720p, 1080p.\n* **`veo3.1`**: Supports 720p, 1080p.\n* **`seedance`**: Supports 480p, 720p, 1080p.\n* **`seedance-2.0`**: Supports 480p, 720p.\n* **`sora-2`**: Supports 720p.\n"
},
@@ -2074,11 +2658,16 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["image_file_path"],
+ "required": [
+ "image_file_path"
+ ],
"description": "Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`."
}
},
- "required": ["end_seconds", "assets"]
+ "required": [
+ "end_seconds",
+ "assets"
+ ]
}
}
}
@@ -2102,7 +2691,11 @@
"example": 450
}
},
- "required": ["id", "estimated_frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "estimated_frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -2114,10 +2707,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -2128,10 +2729,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -2142,10 +2754,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -2156,10 +2776,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -2171,16 +2802,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create video" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create video"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -2217,7 +2857,9 @@
"post": {
"description": "**What this API does**\n\nCreate the same Lip Sync you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.\n \n**Good for**\n- Automation and batch processing \n- Adding lip sync into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`. \n2) Send a request to create a lip sync job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes \n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/lip-sync).",
"summary": "Lip Sync",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [],
"operationId": "lipSync.createVideo",
"requestBody": {
@@ -2265,7 +2907,10 @@
},
"video_source": {
"type": "string",
- "enum": ["file", "youtube"],
+ "enum": [
+ "file",
+ "youtube"
+ ],
"description": "Choose your video source.",
"example": "file"
},
@@ -2280,7 +2925,10 @@
"description": "YouTube URL (required if `video_source` is `youtube`)."
}
},
- "required": ["audio_file_path", "video_source"],
+ "required": [
+ "audio_file_path",
+ "video_source"
+ ],
"description": "Provide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used"
},
"style": {
@@ -2289,7 +2937,11 @@
"generation_mode": {
"default": "lite",
"type": "string",
- "enum": ["lite", "standard", "pro"],
+ "enum": [
+ "lite",
+ "standard",
+ "pro"
+ ],
"description": "A specific version of our lip sync system, optimized for different needs.\n* `lite` - Fast and affordable lip sync - best for simple videos. Costs 1 credit per frame of video.\n* `standard` - Natural, accurate lip sync - best for most creators. Costs 1 credit per frame of video.\n* `pro` - Premium fidelity with enhanced detail - best for professionals. Costs 2 credits per frame of video.\n\nNote: `standard` and `pro` are only available for users on Creator, Pro, and Business tiers.\n ",
"example": "lite"
}
@@ -2297,7 +2949,11 @@
"description": "Attributes used to dictate the style of the output"
}
},
- "required": ["start_seconds", "end_seconds", "assets"]
+ "required": [
+ "start_seconds",
+ "end_seconds",
+ "assets"
+ ]
}
}
}
@@ -2321,7 +2977,11 @@
"example": 450
}
},
- "required": ["id", "estimated_frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "estimated_frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -2333,11 +2993,19 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
- }
+ "example": {
+ "message": "Missing request body"
+ }
+ }
}
}
},
@@ -2347,10 +3015,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -2361,10 +3040,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -2375,10 +3062,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -2390,16 +3088,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create video" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create video"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -2436,7 +3143,9 @@
"post": {
"description": "**What this API does**\n\nCreate the same Video To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.\n \n**Good for**\n- Automation and batch processing \n- Adding video to video into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`. \n2) Send a request to create a video to video job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes \n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/video-to-video).",
"summary": "Video-to-Video",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [],
"operationId": "videoToVideo.createVideo",
"requestBody": {
@@ -2470,7 +3179,10 @@
"fps_resolution": {
"default": "HALF",
"type": "string",
- "enum": ["FULL", "HALF"],
+ "enum": [
+ "FULL",
+ "HALF"
+ ],
"description": "Determines whether the resulting video will have the same frame per second as the original video, or half.\n* `FULL` - the result video will have the same FPS as the input video\n* `HALF` - the result video will have half the FPS as the input video",
"example": "HALF"
},
@@ -2560,14 +3272,22 @@
"version": {
"default": "default",
"type": "string",
- "enum": ["v1", "v2", "default"],
+ "enum": [
+ "v1",
+ "v2",
+ "default"
+ ],
"example": "default",
"description": "* `v1` - more detail, closer prompt adherence, and frame-by-frame previews.\n* `v2` - faster, more consistent, and less noisy.\n* `default` - use the default version for the selected art style."
},
"prompt_type": {
"default": "default",
"type": "string",
- "enum": ["default", "custom", "append_default"],
+ "enum": [
+ "default",
+ "custom",
+ "append_default"
+ ],
"example": "default",
"description": "* `default` - Use the default recommended prompt for the art style.\n* `custom` - Only use the prompt passed in the API. Note: for v1, lora prompt will still be auto added to apply the art style properly.\n* `append_default` - Add the default recommended prompt to the end of the prompt passed in the API."
},
@@ -2593,14 +3313,19 @@
"description": "* `Dreamshaper` - a good all-around model that works for both animations as well as realism.\n* `Absolute Reality` - better at realism, but you'll often get similar results with Dreamshaper as well.\n* `Flat 2D Anime` - best for a flat illustration style that's common in most anime.\n* `default` - use the default recommended model for the selected art style."
}
},
- "required": ["art_style"]
+ "required": [
+ "art_style"
+ ]
},
"assets": {
"type": "object",
"properties": {
"video_source": {
"type": "string",
- "enum": ["file", "youtube"],
+ "enum": [
+ "file",
+ "youtube"
+ ],
"description": "Choose your video source.",
"example": "file"
},
@@ -2615,11 +3340,18 @@
"description": "YouTube URL (required if `video_source` is `youtube`)."
}
},
- "required": ["video_source"],
+ "required": [
+ "video_source"
+ ],
"description": "Provide the assets for video-to-video. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used"
}
},
- "required": ["start_seconds", "end_seconds", "style", "assets"]
+ "required": [
+ "start_seconds",
+ "end_seconds",
+ "style",
+ "assets"
+ ]
}
}
}
@@ -2643,7 +3375,11 @@
"example": 450
}
},
- "required": ["id", "estimated_frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "estimated_frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -2655,10 +3391,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -2669,10 +3413,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -2683,10 +3438,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -2697,10 +3460,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -2712,16 +3486,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create video" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create video"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -2758,7 +3541,9 @@
"post": {
"description": "**What this API does**\n\nCreate the same Text To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.\n \n**Good for**\n- Automation and batch processing \n- Adding text to video into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`. \n2) Send a request to create a text to video job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes \n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/text-to-video).",
"summary": "Text-to-Video",
- "tags": ["Video Projects"],
+ "tags": [
+ "Video Projects"
+ ],
"parameters": [],
"operationId": "textToVideo.createVideo",
"requestBody": {
@@ -2785,13 +3570,22 @@
},
"aspect_ratio": {
"type": "string",
- "enum": ["16:9", "9:16", "1:1"],
+ "enum": [
+ "16:9",
+ "9:16",
+ "1:1"
+ ],
"description": "Determines the aspect ratio of the output video.\n\n* **`ltx-2.3`**: Supports 9:16, 16:9, 1:1.\n* **`wan-2.2`**: Supports 9:16, 16:9, 1:1.\n* **`kling-2.5`**: Supports 9:16, 16:9, 1:1.\n* **`kling-3.0`**: Supports 9:16, 16:9, 1:1.\n* **`veo3.1-lite`**: Supports 9:16, 16:9.\n* **`veo3.1`**: Supports 9:16, 16:9.\n* **`seedance`**: Supports 9:16, 16:9, 1:1.\n* **`seedance-2.0`**: Supports 9:16, 16:9, 1:1.\n* **`sora-2`**: Supports 9:16, 16:9.\n",
"example": "16:9"
},
"resolution": {
"type": "string",
- "enum": ["480p", "720p", "1080p", "4k"],
+ "enum": [
+ "480p",
+ "720p",
+ "1080p",
+ "4k"
+ ],
"example": "720p",
"description": "Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers.\n\n* **`ltx-2.3`**: Supports 480p, 720p, 1080p.\n* **`wan-2.2`**: Supports 480p, 720p, 1080p.\n* **`kling-2.5`**: Supports 720p, 1080p.\n* **`kling-3.0`**: Supports 720p, 1080p, 4k.\n* **`veo3.1-lite`**: Supports 720p, 1080p.\n* **`veo3.1`**: Supports 720p, 1080p.\n* **`seedance`**: Supports 480p, 720p, 1080p.\n* **`seedance-2.0`**: Supports 480p, 720p.\n* **`sora-2`**: Supports 720p.\n"
},
@@ -2814,7 +3608,7 @@
"kling-2.5-audio",
"veo3.1-audio"
],
- "description": "The AI model to use for video generation.\n\n* `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.\n* `ltx-2.3`: Fast iteration with audio, lip-sync, and end frame\n* `wan-2.2`: Fast, strong visuals with effects\n* `kling-2.5`: Motion, action, and camera control\n* `kling-3.0`: Cinematic, multi-scene storytelling\n* `veo3.1-lite`: Fast, affordable, high-quality\n* `veo3.1`: Realistic visuals and prompt adherence\n* `seedance`: Fast iteration and start/end frames\n* `seedance-2.0`: State-of-the-art quality and consistency\n* `sora-2`: Story-first concepts and creativity\n\nIf you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.",
+ "description": "The AI model to use for video generation.\n\n* `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.\n* `ltx-2.3`: Fast iteration with lip-sync & end frame\n* `wan-2.2`: Fast, strong visuals with effects\n* `kling-2.5`: Motion, action, and camera control\n* `kling-3.0`: Cinematic, multi-scene storytelling\n* `veo3.1-lite`: Fast, affordable, high-quality\n* `veo3.1`: Realistic visuals and prompt adherence\n* `seedance`: Fast iteration and start/end frames\n* `seedance-2.0`: State-of-the-art quality and consistency\n* `sora-2`: Story-first concepts and creativity\n\nIf you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`.",
"example": "kling-3.0"
},
"audio": {
@@ -2833,10 +3627,15 @@
"description": "The prompt used for the video."
}
},
- "required": ["prompt"]
+ "required": [
+ "prompt"
+ ]
}
},
- "required": ["end_seconds", "style"]
+ "required": [
+ "end_seconds",
+ "style"
+ ]
}
}
}
@@ -2860,7 +3659,11 @@
"example": 450
}
},
- "required": ["id", "estimated_frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "estimated_frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -2872,10 +3675,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -2886,10 +3697,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -2900,10 +3722,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -2914,10 +3744,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -2929,16 +3770,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create video" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create video"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -2975,13 +3825,18 @@
"get": {
"description": "Check the progress of a image project. The `downloads` field is populated after a successful render.\n \n**Statuses**\n- `queued` — waiting to start\n- `rendering` — in progress\n- `complete` — ready; see `downloads`\n- `error` — a failure occurred (see `error`)\n- `canceled` — user canceled\n- `draft` — not used",
"summary": "Get image details",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
- "schema": { "type": "string", "example": "cuid-example" },
+ "schema": {
+ "type": "string",
+ "example": "cuid-example"
+ },
"description": "Unique ID of the image project. This value is returned by all of the POST APIs that create an image."
}
],
@@ -3007,7 +3862,14 @@
},
"status": {
"type": "string",
- "enum": ["draft", "queued", "rendering", "complete", "error", "canceled"],
+ "enum": [
+ "draft",
+ "queued",
+ "rendering",
+ "complete",
+ "error",
+ "canceled"
+ ],
"description": "The status of the image.",
"example": "complete"
},
@@ -3018,10 +3880,13 @@
},
"type": {
"type": "string",
- "description": "The type of the image project. Possible values are FACE_EDITOR, AI_IMAGE_EDITOR, AI_SELFIE, AI_HEADSHOT, AI_IMAGE, AI_MEME, CLOTHES_CHANGER, BACKGROUND_REMOVER, FACE_SWAP, IMAGE_UPSCALER, AI_GIF, QR_CODE, PHOTO_EDITOR, PHOTO_COLORIZER, HEAD_SWAP, BODY_SWAP, STORYBOARD",
+ "description": "The type of the image project. Possible values are FACE_EDITOR, AI_IMAGE_EDITOR, AI_SELFIE, AI_HEADSHOT, AI_IMAGE, AI_MEME, CLOTHES_CHANGER, BACKGROUND_REMOVER, FACE_SWAP, IMAGE_UPSCALER, AI_GIF, QR_CODE, PHOTO_EDITOR, PHOTO_COLORIZER, HEAD_SWAP, BODY_SWAP, STORYBOARD, IMAGE_EXPANDER",
"example": "AI_IMAGE"
},
- "created_at": { "type": "string", "format": "date-time" },
+ "created_at": {
+ "type": "string",
+ "format": "date-time"
+ },
"enabled": {
"type": "boolean",
"description": "Whether this resource is active. If false, it is deleted."
@@ -3047,7 +3912,10 @@
"example": "2024-10-19T05:16:19.027Z"
}
},
- "required": ["url", "expires_at"],
+ "required": [
+ "url",
+ "expires_at"
+ ],
"description": "The download url and expiration date of the image project"
}
},
@@ -3065,7 +3933,10 @@
"description": "An error code to indicate why a failure happened."
}
},
- "required": ["message", "code"],
+ "required": [
+ "message",
+ "code"
+ ],
"nullable": true,
"description": "In the case of an error, this object will contain the error encountered during video render",
"example": null
@@ -3095,10 +3966,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -3109,10 +3988,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -3123,10 +4013,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -3137,16 +4035,31 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -3181,29 +4094,44 @@
"delete": {
"description": "Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.",
"summary": "Delete image",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
- "schema": { "type": "string", "example": "cuid-example" },
+ "schema": {
+ "type": "string",
+ "example": "cuid-example"
+ },
"description": "Unique ID of the image project. This value is returned by all of the POST APIs that create an image."
}
],
"operationId": "imageProjects.delete",
"responses": {
- "204": { "description": "204" },
+ "204": {
+ "description": "204"
+ },
"400": {
"description": "Invalid Request",
"content": {
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -3214,10 +4142,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -3228,10 +4167,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -3242,16 +4189,31 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -3288,7 +4250,9 @@
"post": {
"description": "Change outfits in photos in seconds with just a photo reference. Each photo costs 25 credits.",
"summary": "AI Clothes Changer",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiClothesChanger.createImage",
"requestBody": {
@@ -3322,16 +4286,26 @@
},
"garment_type": {
"type": "string",
- "enum": ["entire_outfit", "upper_body", "lower_body", "dresses"],
+ "enum": [
+ "entire_outfit",
+ "upper_body",
+ "lower_body",
+ "dresses"
+ ],
"description": "Type of garment to swap. If not provided, swaps the entire outfit. \n* `upper_body` - for shirts/jackets \n* `lower_body` - for pants/skirts \n* `dresses` - for entire outfit (deprecated, use `entire_outfit` instead) \n* `entire_outfit` - for entire outfit",
"example": "entire_outfit"
}
},
- "required": ["person_file_path", "garment_file_path"],
+ "required": [
+ "person_file_path",
+ "garment_file_path"
+ ],
"description": "Provide the assets for clothes changer"
}
},
- "required": ["assets"]
+ "required": [
+ "assets"
+ ]
}
}
}
@@ -3355,7 +4329,11 @@
"example": 25
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -3367,10 +4345,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -3381,24 +4367,43 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
- "description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
- }
- }
- }
- },
- "402": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
+ "description": "The request is not properly authenticated",
+ "example": {
+ "message": "Unauthorized"
+ }
+ }
+ }
+ }
+ },
+ "402": {
"description": "Payment Required",
"content": {
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -3409,10 +4414,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -3424,16 +4440,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -3470,7 +4495,9 @@
"post": {
"description": "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](https://magichour.ai/pricing) page for more details",
"summary": "AI Face Editor",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiFaceEditor.editImage",
"requestBody": {
@@ -3497,7 +4524,9 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["image_file_path"],
+ "required": [
+ "image_file_path"
+ ],
"description": "Provide the assets for face editor"
},
"style": {
@@ -3639,7 +4668,10 @@
"description": "Face editing parameters"
}
},
- "required": ["assets", "style"]
+ "required": [
+ "assets",
+ "style"
+ ]
}
}
}
@@ -3663,7 +4695,11 @@
"example": 1
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -3675,10 +4711,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -3689,10 +4733,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -3703,10 +4758,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -3717,10 +4780,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -3732,16 +4806,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -3778,7 +4861,9 @@
"post": {
"description": "Create an AI GIF. Each GIF costs 50 credits.",
"summary": "AI GIF Generator",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiGifGenerator.createImage",
"requestBody": {
@@ -3806,17 +4891,25 @@
"example": "Cute dancing cat, pixel art"
}
},
- "required": ["prompt"]
+ "required": [
+ "prompt"
+ ]
},
"output_format": {
"default": "gif",
"type": "string",
- "enum": ["gif", "mp4", "webm"],
+ "enum": [
+ "gif",
+ "mp4",
+ "webm"
+ ],
"description": "The output file format for the generated animation.",
"example": "gif"
}
},
- "required": ["style"]
+ "required": [
+ "style"
+ ]
}
}
}
@@ -3840,7 +4933,11 @@
"example": 50
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -3852,10 +4949,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -3866,10 +4971,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -3880,10 +4996,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -3894,10 +5018,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -3909,16 +5044,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create GIF" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create GIF"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -3955,7 +5099,9 @@
"post": {
"description": "Edit images with AI.",
"summary": "AI Image Editor",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiImageEditor.createImage",
"requestBody": {
@@ -3974,7 +5120,12 @@
},
"image_count": {
"type": "number",
- "enum": [1, 4, 9, 16],
+ "enum": [
+ 1,
+ 4,
+ 9,
+ 16
+ ],
"description": "Number of images to generate. Maximum varies by model. Defaults to 1 if not specified.",
"example": 1,
"default": 1
@@ -3991,18 +5142,33 @@
"seedream-v4.5",
"gpt-image-2"
],
- "description": "The AI model to use for image editing. Each model has different capabilities and costs.\n\n**Models:**\n- `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.\n- `qwen-edit` - from 10 credits/image\n - Supported resolutions: 640px, 1k, 2k\n - Available for tiers: free, creator, pro, business\n - Max additional input images: 2\n- `nano-banana` - from 50 credits/image\n - Supported resolutions: 640px, 1k\n - Available for tiers: free, creator, pro, business\n - Max additional input images: 9\n- `nano-banana-2` - from 100 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: free, creator, pro, business\n - Max additional input images: 9\n- `seedream-v4` - from 40 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: free, creator, pro, business\n - Max additional input images: 9\n- `nano-banana-pro` - from 150 credits/image\n - Supported resolutions: 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Max additional input images: 9\n- `seedream-v4.5` - from 50 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Max additional input images: 9\n- `gpt-image-2` - from 50 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Max additional input images: 9\n",
+ "description": "The AI model to use for image editing. Each model has different capabilities and costs.\n\n**Models:**\n- `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.\n- `qwen-edit` - from 10 credits/image\n - Supported resolutions: 640px, 1k, 2k\n - Available for tiers: free, creator, pro, business\n - Max additional input images: 2\n- `nano-banana` - from 50 credits/image\n - Supported resolutions: 640px, 1k\n - Available for tiers: free, creator, pro, business\n - Max additional input images: 9\n- `nano-banana-2` - from 100 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Max additional input images: 9\n- `seedream-v4` - from 40 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: free, creator, pro, business\n - Max additional input images: 9\n- `nano-banana-pro` - from 150 credits/image\n - Supported resolutions: 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Max additional input images: 9\n- `seedream-v4.5` - from 50 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Max additional input images: 9\n- `gpt-image-2` - from 50 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Max additional input images: 9\n",
"example": "default"
},
"aspect_ratio": {
"type": "string",
- "enum": ["auto", "16:9", "9:16", "4:3", "3:2", "1:1", "4:5", "2:3"],
+ "enum": [
+ "auto",
+ "16:9",
+ "9:16",
+ "4:3",
+ "3:2",
+ "1:1",
+ "4:5",
+ "2:3"
+ ],
"description": "The aspect ratio of the output image(s). If not specified, defaults to `auto`.",
"example": "1:1"
},
"resolution": {
"type": "string",
- "enum": ["auto", "640px", "1k", "2k", "4k"],
+ "enum": [
+ "auto",
+ "640px",
+ "1k",
+ "2k",
+ "4k"
+ ],
"description": "Maximum resolution (longest edge) for the output image.\n\n**Options:**\n- `640px` — up to 640px\n- `1k` — up to 1024px\n- `2k` — up to 2048px\n- `4k` — up to 4096px\n- `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports\n\n**Per-model support:**\n- `qwen-edit` - 640px, 1k, 2k\n- `nano-banana` - 640px, 1k\n- `nano-banana-2` - 640px, 1k, 2k, 4k\n- `seedream-v4` - 640px, 1k, 2k, 4k\n- `nano-banana-pro` - 1k, 2k, 4k\n- `seedream-v4.5` - 640px, 1k, 2k, 4k\n- `gpt-image-2` - 640px, 1k, 2k, 4k\n\nNote: Resolution availability depends on the model and your subscription tier.",
"example": "1k"
},
@@ -4017,23 +5183,34 @@
"example": "Give me sunglasses"
}
},
- "required": ["prompt"]
+ "required": [
+ "prompt"
+ ]
},
"assets": {
"type": "object",
"properties": {
"image_file_paths": {
"type": "array",
- "items": { "type": "string", "minLength": 1 },
+ "items": {
+ "type": "string",
+ "minLength": 1
+ },
"maxItems": 10,
"description": "The image(s) used in the edit, maximum of 10 images. This value is either\n- a direct URL to the video file\n- `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).\n\nSee the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.\n",
- "example": ["api-assets/id/1234.png", "api-assets/id/1235.png"]
+ "example": [
+ "api-assets/id/1234.png",
+ "api-assets/id/1235.png"
+ ]
}
},
"description": "Provide the assets for image edit"
}
},
- "required": ["style", "assets"]
+ "required": [
+ "style",
+ "assets"
+ ]
}
}
}
@@ -4057,7 +5234,11 @@
"example": 50
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -4069,10 +5250,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -4083,10 +5272,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -4097,10 +5297,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -4111,10 +5319,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -4126,16 +5345,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to edit image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to edit image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -4172,7 +5400,9 @@
"post": {
"description": "Create an AI headshot. Each headshot costs 50 credits.",
"summary": "AI Headshot Generator",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiHeadshotGenerator.createImage",
"requestBody": {
@@ -4208,11 +5438,15 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["image_file_path"],
+ "required": [
+ "image_file_path"
+ ],
"description": "Provide the assets for headshot photo"
}
},
- "required": ["assets"]
+ "required": [
+ "assets"
+ ]
}
}
}
@@ -4236,7 +5470,11 @@
"example": 50
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -4248,10 +5486,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -4262,10 +5508,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -4276,10 +5533,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -4290,10 +5555,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -4305,16 +5581,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -4351,7 +5636,9 @@
"post": {
"description": "Create an AI image with advanced model selection and quality controls.",
"summary": "AI Image Generator",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiImageGenerator.createImage",
"requestBody": {
@@ -4388,19 +5675,29 @@
"gpt-image-2",
"seedream"
],
- "description": "The AI model to use for image generation. Each model has different capabilities and costs.\n\n**Models:**\n- `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.\n- `flux-schnell` - from 5 credits/image\n - Supported resolutions: 640px, 1k, 2k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n- `z-image-turbo` - from 5 credits/image\n - Supported resolutions: 640px, 1k, 2k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n- `seedream-v4` - from 40 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n- `nano-banana` - from 50 credits/image\n - Supported resolutions: 640px, 1k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n- `nano-banana-2` - from 100 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 4, 9, 16\n- `nano-banana-pro` - from 150 credits/image\n - Supported resolutions: 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Image count allowed: 1, 4, 9, 16\n- `gpt-image-2` - from 50 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n\n**Deprecated Enum Values:**\n- `seedream` - Use `seedream-v4` instead.\n",
+ "description": "The AI model to use for image generation. Each model has different capabilities and costs.\n\n**Models:**\n- `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.\n- `flux-schnell` - from 5 credits/image\n - Supported resolutions: 640px, 1k, 2k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n- `z-image-turbo` - from 5 credits/image\n - Supported resolutions: 640px, 1k, 2k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n- `seedream-v4` - from 40 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n- `nano-banana` - from 50 credits/image\n - Supported resolutions: 640px, 1k\n - Available for tiers: free, creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n- `nano-banana-2` - from 100 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Image count allowed: 1, 4, 9, 16\n- `nano-banana-pro` - from 150 credits/image\n - Supported resolutions: 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Image count allowed: 1, 4, 9, 16\n- `gpt-image-2` - from 50 credits/image\n - Supported resolutions: 640px, 1k, 2k, 4k\n - Available for tiers: creator, pro, business\n - Image count allowed: 1, 2, 3, 4\n\n**Deprecated Enum Values:**\n- `seedream` - Use `seedream-v4` instead.\n",
"example": "default"
},
"aspect_ratio": {
"type": "string",
- "enum": ["1:1", "16:9", "9:16"],
+ "enum": [
+ "1:1",
+ "16:9",
+ "9:16"
+ ],
"description": "The aspect ratio of the output image(s). If not specified, defaults to `1:1` (square).",
"example": "1:1"
},
"resolution": {
"default": "auto",
"type": "string",
- "enum": ["auto", "640px", "1k", "2k", "4k"],
+ "enum": [
+ "auto",
+ "640px",
+ "1k",
+ "2k",
+ "4k"
+ ],
"description": "Maximum resolution (longest edge) for the output image.\n\n**Options:**\n- `640px` — up to 640px\n- `1k` — up to 1024px\n- `2k` — up to 2048px\n- `4k` — up to 4096px\n- `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports\n\n**Per-model support:**\n- `flux-schnell` - 640px, 1k, 2k\n- `z-image-turbo` - 640px, 1k, 2k\n- `seedream-v4` - 640px, 1k, 2k, 4k\n- `nano-banana` - 640px, 1k\n- `nano-banana-2` - 640px, 1k, 2k, 4k\n- `nano-banana-pro` - 1k, 2k, 4k\n- `gpt-image-2` - 640px, 1k, 2k, 4k\n\nNote: Resolution availability depends on the model and your subscription tier.",
"example": "auto"
},
@@ -4457,11 +5754,16 @@
"example": "ai-anime-generator"
}
},
- "required": ["prompt"],
+ "required": [
+ "prompt"
+ ],
"description": "The art style to use for image generation."
}
},
- "required": ["image_count", "style"]
+ "required": [
+ "image_count",
+ "style"
+ ]
}
}
}
@@ -4485,7 +5787,11 @@
"example": 5
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -4497,10 +5803,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -4511,10 +5825,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -4525,10 +5850,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -4539,10 +5872,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -4554,16 +5898,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -4600,7 +5953,9 @@
"post": {
"description": "Upscale your image using AI. Each 2x upscale costs 50 credits, and 4x upscale costs 200 credits.",
"summary": "AI Image Upscaler",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiImageUpscaler.createImage",
"requestBody": {
@@ -4627,14 +5982,20 @@
"properties": {
"enhancement": {
"type": "string",
- "enum": ["Resemblance", "Balanced", "Creative"]
+ "enum": [
+ "Resemblance",
+ "Balanced",
+ "Creative"
+ ]
},
"prompt": {
"type": "string",
"description": "A prompt to guide the final image. This value is ignored if `enhancement` is not Creative"
}
},
- "required": ["enhancement"]
+ "required": [
+ "enhancement"
+ ]
},
"assets": {
"type": "object",
@@ -4646,11 +6007,17 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["image_file_path"],
+ "required": [
+ "image_file_path"
+ ],
"description": "Provide the assets for upscaling"
}
},
- "required": ["scale_factor", "style", "assets"]
+ "required": [
+ "scale_factor",
+ "style",
+ "assets"
+ ]
}
}
}
@@ -4674,7 +6041,11 @@
"example": 50
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -4686,10 +6057,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -4700,10 +6079,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -4714,10 +6104,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -4728,10 +6126,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -4743,16 +6152,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -4789,7 +6207,9 @@
"post": {
"description": "Create an AI generated meme. Each meme costs 10 credits.",
"summary": "AI Meme Generator",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiMemeGenerator.createImage",
"requestBody": {
@@ -4842,10 +6262,15 @@
"example": false
}
},
- "required": ["topic", "template"]
+ "required": [
+ "topic",
+ "template"
+ ]
}
},
- "required": ["style"]
+ "required": [
+ "style"
+ ]
}
}
}
@@ -4869,7 +6294,11 @@
"example": 10
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -4881,10 +6310,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -4895,10 +6332,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -4909,10 +6357,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -4923,10 +6379,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -4938,16 +6405,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create meme" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create meme"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -4984,7 +6460,9 @@
"post": {
"description": "Create an AI QR code. Each QR code costs 0 credits.",
"summary": "AI QR Code Generator",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "aiQrCodeGenerator.createImage",
"requestBody": {
@@ -5015,10 +6493,15 @@
"example": "Watercolor"
}
},
- "required": ["art_style"]
+ "required": [
+ "art_style"
+ ]
}
},
- "required": ["content", "style"]
+ "required": [
+ "content",
+ "style"
+ ]
}
}
}
@@ -5042,7 +6525,11 @@
"example": 0
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -5054,10 +6541,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -5068,10 +6563,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -5082,10 +6588,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -5096,10 +6610,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -5111,16 +6636,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -5157,7 +6691,9 @@
"post": {
"description": "Swap a person into a scene image using Nano Banana 2. Credits depend on `resolution` (from 100 credits at 640px upward).",
"summary": "Body Swap",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "bodySwap.createImage",
"requestBody": {
@@ -5176,7 +6712,12 @@
},
"resolution": {
"type": "string",
- "enum": ["640px", "1k", "2k", "4k"],
+ "enum": [
+ "640px",
+ "1k",
+ "2k",
+ "4k"
+ ],
"description": "Output resolution. Determines credits charged for the run.",
"example": "1k"
},
@@ -5196,11 +6737,17 @@
"example": "api-assets/id/5678.png"
}
},
- "required": ["person_file_path", "scene_file_path"],
+ "required": [
+ "person_file_path",
+ "scene_file_path"
+ ],
"description": "Person image and scene image for body swap"
}
},
- "required": ["resolution", "assets"]
+ "required": [
+ "resolution",
+ "assets"
+ ]
}
}
}
@@ -5224,7 +6771,11 @@
"example": 100
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -5236,10 +6787,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -5250,10 +6809,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -5264,10 +6834,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -5278,10 +6856,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -5293,16 +6882,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -5339,7 +6937,9 @@
"post": {
"description": "Create a face swap photo. Each photo costs 10 credits. The height/width of the output image depends on your subscription. Please refer to our [pricing](https://magichour.ai/pricing) page for more details",
"summary": "Face Swap Photo",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "faceSwapPhoto.createImage",
"requestBody": {
@@ -5362,7 +6962,10 @@
"face_swap_mode": {
"default": "all-faces",
"type": "string",
- "enum": ["all-faces", "individual-faces"],
+ "enum": [
+ "all-faces",
+ "individual-faces"
+ ],
"description": "Choose how to swap faces:\n**all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)\n+- **individual-faces** — specify exact mappings using `face_mappings`",
"example": "all-faces"
},
@@ -5388,7 +6991,10 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["original_face", "new_face"]
+ "required": [
+ "original_face",
+ "new_face"
+ ]
},
"maxItems": 5,
"description": "This is the array of face mappings used for multiple face swap. The value is required if `face_swap_mode` is `individual-faces`.",
@@ -5406,11 +7012,15 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["target_file_path"],
+ "required": [
+ "target_file_path"
+ ],
"description": "Provide the assets for face swap photo"
}
},
- "required": ["assets"]
+ "required": [
+ "assets"
+ ]
}
}
}
@@ -5434,7 +7044,11 @@
"example": 10
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -5446,10 +7060,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -5460,10 +7082,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -5474,10 +7107,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -5488,10 +7129,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -5503,16 +7155,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -5549,7 +7210,9 @@
"post": {
"description": "Swap a head onto a body image. Each image costs 10 credits. Output resolution depends on your subscription; you may set `max_resolution` lower than your plan maximum if desired.",
"summary": "Head Swap",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "headSwap.createImage",
"requestBody": {
@@ -5587,11 +7250,16 @@
"example": "api-assets/id/5678.png"
}
},
- "required": ["body_file_path", "head_file_path"],
+ "required": [
+ "body_file_path",
+ "head_file_path"
+ ],
"description": "Provide the body and head images for head swap"
}
},
- "required": ["assets"]
+ "required": [
+ "assets"
+ ]
}
}
}
@@ -5615,7 +7283,11 @@
"example": 10
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -5627,10 +7299,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -5641,10 +7321,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -5655,10 +7346,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -5669,10 +7368,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -5684,16 +7394,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -5730,7 +7449,9 @@
"post": {
"description": "Remove background from image. Each image costs 5 credits.",
"summary": "Image Background Remover",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "imageBackgroundRemover.createImage",
"requestBody": {
@@ -5761,11 +7482,15 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["image_file_path"],
+ "required": [
+ "image_file_path"
+ ],
"description": "Provide the assets for background removal"
}
},
- "required": ["assets"]
+ "required": [
+ "assets"
+ ]
}
}
}
@@ -5789,7 +7514,11 @@
"example": 5
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -5801,10 +7530,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -5815,10 +7552,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -5829,10 +7577,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -5843,10 +7599,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -5858,16 +7625,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -5904,7 +7680,9 @@
"post": {
"description": "Colorize image. Each image costs 10 credits.",
"summary": "Photo Colorizer",
- "tags": ["Image Projects"],
+ "tags": [
+ "Image Projects"
+ ],
"parameters": [],
"operationId": "photoColorizer.createImage",
"requestBody": {
@@ -5931,11 +7709,15 @@
"example": "api-assets/id/1234.png"
}
},
- "required": ["image_file_path"],
+ "required": [
+ "image_file_path"
+ ],
"description": "Provide the assets for photo colorization"
}
},
- "required": ["assets"]
+ "required": [
+ "assets"
+ ]
}
}
}
@@ -5959,7 +7741,11 @@
"example": 10
}
},
- "required": ["id", "frame_cost", "credits_charged"],
+ "required": [
+ "id",
+ "frame_cost",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -5971,10 +7757,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -5985,10 +7779,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -5999,10 +7804,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -6013,10 +7826,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -6028,16 +7852,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to create image" }
+ "message": {
+ "type": "string",
+ "example": "Unable to create image"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -6074,13 +7907,18 @@
"get": {
"description": "Check the progress of a audio project. The `downloads` field is populated after a successful render.\n \n**Statuses**\n- `queued` — waiting to start\n- `rendering` — in progress\n- `complete` — ready; see `downloads`\n- `error` — a failure occurred (see `error`)\n- `canceled` — user canceled\n- `draft` — not used",
"summary": "Get audio details",
- "tags": ["Audio Projects"],
+ "tags": [
+ "Audio Projects"
+ ],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
- "schema": { "type": "string", "example": "cuid-example" },
+ "schema": {
+ "type": "string",
+ "example": "cuid-example"
+ },
"description": "Unique ID of the audio project. This value is returned by all of the POST APIs that create an audio."
}
],
@@ -6106,7 +7944,14 @@
},
"status": {
"type": "string",
- "enum": ["draft", "queued", "rendering", "complete", "error", "canceled"],
+ "enum": [
+ "draft",
+ "queued",
+ "rendering",
+ "complete",
+ "error",
+ "canceled"
+ ],
"description": "The status of the audio.",
"example": "complete"
},
@@ -6115,7 +7960,10 @@
"description": "The type of the audio project. Possible values are VOICE_GENERATOR, VOICE_CHANGER, VOICE_CLONER, VIDEO_TO_AUDIO",
"example": "VOICE_GENERATOR"
},
- "created_at": { "type": "string", "format": "date-time" },
+ "created_at": {
+ "type": "string",
+ "format": "date-time"
+ },
"enabled": {
"type": "boolean",
"description": "Whether this resource is active. If false, it is deleted."
@@ -6141,7 +7989,10 @@
"example": "2024-10-19T05:16:19.027Z"
}
},
- "required": ["url", "expires_at"],
+ "required": [
+ "url",
+ "expires_at"
+ ],
"description": "The download url and expiration date of the audio project"
}
},
@@ -6159,7 +8010,10 @@
"description": "An error code to indicate why a failure happened."
}
},
- "required": ["message", "code"],
+ "required": [
+ "message",
+ "code"
+ ],
"nullable": true,
"description": "In the case of an error, this object will contain the error encountered during video render",
"example": null
@@ -6187,10 +8041,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -6201,10 +8063,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -6215,10 +8088,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -6229,16 +8110,31 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -6273,29 +8169,44 @@
"delete": {
"description": "Permanently delete the rendered audio file(s). This action is not reversible, please be sure before deleting.",
"summary": "Delete audio",
- "tags": ["Audio Projects"],
+ "tags": [
+ "Audio Projects"
+ ],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
- "schema": { "type": "string", "example": "cuid-example" },
+ "schema": {
+ "type": "string",
+ "example": "cuid-example"
+ },
"description": "Unique ID of the audio project. This value is returned by all of the POST APIs that create an audio."
}
],
"operationId": "audioProjects.delete",
"responses": {
- "204": { "description": "204" },
+ "204": {
+ "description": "204"
+ },
"400": {
"description": "Invalid Request",
"content": {
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -6306,10 +8217,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -6320,10 +8242,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -6334,16 +8264,31 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -6380,7 +8325,9 @@
"post": {
"description": "Generate speech from text. Each character costs 0.05 credits. The cost is rounded up to the nearest whole number.",
"summary": "AI Voice Generator",
- "tags": ["Audio Projects"],
+ "tags": [
+ "Audio Projects"
+ ],
"parameters": [],
"operationId": "aiVoiceGenerator.createAudio",
"requestBody": {
@@ -6613,12 +8560,20 @@
"example": "Elon Musk"
}
},
- "required": ["prompt", "voice_name"],
+ "required": [
+ "prompt",
+ "voice_name"
+ ],
"description": "The content used to generate speech.",
- "example": { "prompt": "Hello, how are you?", "voice_name": "Elon Musk" }
+ "example": {
+ "prompt": "Hello, how are you?",
+ "voice_name": "Elon Musk"
+ }
}
},
- "required": ["style"]
+ "required": [
+ "style"
+ ]
}
}
}
@@ -6642,7 +8597,10 @@
"example": 1
}
},
- "required": ["id", "credits_charged"],
+ "required": [
+ "id",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -6654,10 +8612,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -6668,10 +8634,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -6682,10 +8659,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -6696,10 +8681,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -6711,16 +8707,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to generate speech" }
+ "message": {
+ "type": "string",
+ "example": "Unable to generate speech"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -6757,7 +8762,9 @@
"post": {
"description": "Clone a voice from an audio sample and generate speech. \n* Each character costs 0.05 credits. \n* The cost is rounded up to the nearest whole number",
"summary": "AI Voice Cloner",
- "tags": ["Audio Projects"],
+ "tags": [
+ "Audio Projects"
+ ],
"parameters": [],
"operationId": "aiVoiceCloner.createAudio",
"requestBody": {
@@ -6784,7 +8791,9 @@
"example": "api-assets/id/1234.mp3"
}
},
- "required": ["audio_file_path"],
+ "required": [
+ "audio_file_path"
+ ],
"description": "Provide the assets for voice cloning."
},
"style": {
@@ -6798,10 +8807,15 @@
"example": "Hello, this is my cloned voice."
}
},
- "required": ["prompt"]
+ "required": [
+ "prompt"
+ ]
}
},
- "required": ["assets", "style"]
+ "required": [
+ "assets",
+ "style"
+ ]
}
}
}
@@ -6825,7 +8839,10 @@
"example": 1
}
},
- "required": ["id", "credits_charged"],
+ "required": [
+ "id",
+ "credits_charged"
+ ],
"description": "Success"
}
}
@@ -6837,10 +8854,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is invalid",
- "example": { "message": "Missing request body" }
+ "example": {
+ "message": "Missing request body"
+ }
}
}
}
@@ -6851,10 +8876,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Unauthorized"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Unauthorized"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request is not properly authenticated",
- "example": { "message": "Unauthorized" }
+ "example": {
+ "message": "Unauthorized"
+ }
}
}
}
@@ -6865,10 +8901,18 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string" } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "The request requires payment",
- "example": { "message": "Payment required" }
+ "example": {
+ "message": "Payment required"
+ }
}
}
}
@@ -6879,10 +8923,21 @@
"application/json": {
"schema": {
"type": "object",
- "properties": { "message": { "type": "string", "enum": ["Not Found"] } },
- "required": ["message"],
+ "properties": {
+ "message": {
+ "type": "string",
+ "enum": [
+ "Not Found"
+ ]
+ }
+ },
+ "required": [
+ "message"
+ ],
"description": "Requested resource is not found",
- "example": { "message": "Not Found" }
+ "example": {
+ "message": "Not Found"
+ }
}
}
}
@@ -6894,16 +8949,25 @@
"schema": {
"type": "object",
"properties": {
- "message": { "type": "string", "example": "Unable to clone voice" }
+ "message": {
+ "type": "string",
+ "example": "Unable to clone voice"
+ }
},
- "required": ["message"],
+ "required": [
+ "message"
+ ],
"description": "Unprocessable Entity"
}
}
}
}
},
- "security": [{ "bearerAuth": [] }],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
"x-codeSamples": [
{
"lang": "python",
@@ -6953,10 +9017,26 @@
}
},
"tags": [
- { "name": "Files", "description": "API related to uploading assets used for video generation" },
- { "name": "Image Projects", "description": "API related to image projects" },
- { "name": "Video Projects", "description": "API related to video projects" },
- { "name": "Audio Projects", "description": "API related to audio projects" }
+ {
+ "name": "Files",
+ "description": "API related to uploading assets used for video generation"
+ },
+ {
+ "name": "Image Projects",
+ "description": "API related to image projects"
+ },
+ {
+ "name": "Video Projects",
+ "description": "API related to video projects"
+ },
+ {
+ "name": "Audio Projects",
+ "description": "API related to audio projects"
+ }
],
- "servers": [{ "url": "https://api.magichour.ai" }]
-}
+ "servers": [
+ {
+ "url": "https://api.magichour.ai"
+ }
+ ]
+}
\ No newline at end of file