diff --git a/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageGeneratorCreateImage.g.cs b/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageGeneratorCreateImage.g.cs index 8401c65..f748a83 100644 --- a/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageGeneratorCreateImage.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.AiImageGeneratorCreateImage.g.cs @@ -73,7 +73,7 @@ public partial interface IImageProjectsClient /// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
/// - Available for tiers: free, creator, pro, business
- /// - Image count allowed: 1, 2, 3, 4
+ /// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
/// - Available for tiers: creator, pro, business
diff --git a/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.BodySwapCreateImage.g.cs b/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.BodySwapCreateImage.g.cs new file mode 100644 index 0000000..b3e046d --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.IImageProjectsClient.BodySwapCreateImage.g.cs @@ -0,0 +1,46 @@ +#nullable enable + +namespace MagicHour +{ + public partial interface IImageProjectsClient + { + /// + /// Body Swap
+ /// Swap a person into a scene image using Nano Banana 2. Credits depend on `resolution` (from 100 credits at 640px upward). + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task BodySwapCreateImageAsync( + + global::MagicHour.BodySwapCreateImageRequest request, + global::MagicHour.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Body Swap
+ /// Swap a person into a scene image using Nano Banana 2. Credits depend on `resolution` (from 100 credits at 640px upward). + ///
+ /// + /// Give your image a custom name for easy identification.
+ /// Default Value: Body Swap - dateTime
+ /// Example: My Body Swap image + /// + /// + /// Output resolution. Determines credits charged for the run.
+ /// Example: 1k + /// + /// + /// Person image and scene image for body swap + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task BodySwapCreateImageAsync( + global::MagicHour.BodySwapCreateImageRequestResolution resolution, + global::MagicHour.BodySwapCreateImageRequestAssets assets, + string? name = default, + global::MagicHour.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.ImageToVideoCreateVideo.g.cs b/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.ImageToVideoCreateVideo.g.cs index 64c9be3..77106c1 100644 --- a/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.ImageToVideoCreateVideo.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.ImageToVideoCreateVideo.g.cs @@ -135,7 +135,7 @@ public partial interface IVideoProjectsClient /// * **`ltx-2`**: Automatically included with no extra credits
/// * **`wan-2.2`**: Not supported
/// * **`seedance`**: Not supported
- /// * **`seedance-2.0`**: Not supported
+ /// * **`seedance-2.0`**: Automatically included with no extra credits
/// * **`kling-2.5`**: Automatically included with no extra credits
/// * **`kling-3.0`**: Toggle-able (can enable/disable)
/// * **`sora-2`**: Automatically included with no extra credits
diff --git a/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.TextToVideoCreateVideo.g.cs b/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.TextToVideoCreateVideo.g.cs index 3d2a2a4..6781028 100644 --- a/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.TextToVideoCreateVideo.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.IVideoProjectsClient.TextToVideoCreateVideo.g.cs @@ -147,7 +147,7 @@ public partial interface IVideoProjectsClient /// * **`ltx-2`**: Automatically included with no extra credits
/// * **`wan-2.2`**: Not supported
/// * **`seedance`**: Not supported
- /// * **`seedance-2.0`**: Not supported
+ /// * **`seedance-2.0`**: Automatically included with no extra credits
/// * **`kling-2.5`**: Automatically included with no extra credits
/// * **`kling-3.0`**: Toggle-able (can enable/disable)
/// * **`sora-2`**: Automatically included with no extra credits
diff --git a/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageGeneratorCreateImage.g.cs b/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageGeneratorCreateImage.g.cs index d79e783..0a67e43 100644 --- a/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageGeneratorCreateImage.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.AiImageGeneratorCreateImage.g.cs @@ -633,7 +633,7 @@ partial void ProcessAiImageGeneratorCreateImageResponseContent( /// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
/// - Available for tiers: free, creator, pro, business
- /// - Image count allowed: 1, 2, 3, 4
+ /// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
/// - Available for tiers: creator, pro, business
diff --git a/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.BodySwapCreateImage.g.cs b/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.BodySwapCreateImage.g.cs new file mode 100644 index 0000000..f8c2115 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.ImageProjectsClient.BodySwapCreateImage.g.cs @@ -0,0 +1,619 @@ + +#nullable enable + +namespace MagicHour +{ + public partial class ImageProjectsClient + { + + + private static readonly global::MagicHour.EndPointSecurityRequirement s_BodySwapCreateImageSecurityRequirement0 = + new global::MagicHour.EndPointSecurityRequirement + { + Authorizations = new global::MagicHour.EndPointAuthorizationRequirement[] + { new global::MagicHour.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::MagicHour.EndPointSecurityRequirement[] s_BodySwapCreateImageSecurityRequirements = + new global::MagicHour.EndPointSecurityRequirement[] + { s_BodySwapCreateImageSecurityRequirement0, + }; + partial void PrepareBodySwapCreateImageArguments( + global::System.Net.Http.HttpClient httpClient, + global::MagicHour.BodySwapCreateImageRequest request); + partial void PrepareBodySwapCreateImageRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::MagicHour.BodySwapCreateImageRequest request); + partial void ProcessBodySwapCreateImageResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessBodySwapCreateImageResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Body Swap
+ /// Swap a person into a scene image using Nano Banana 2. Credits depend on `resolution` (from 100 credits at 640px upward). + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task BodySwapCreateImageAsync( + + global::MagicHour.BodySwapCreateImageRequest request, + global::MagicHour.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareBodySwapCreateImageArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::MagicHour.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_BodySwapCreateImageSecurityRequirements, + operationName: "BodySwapCreateImageAsync"); + + using var __timeoutCancellationTokenSource = global::MagicHour.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::MagicHour.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::MagicHour.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + var __pathBuilder = new global::MagicHour.PathBuilder( + path: "/v1/body-swap", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::MagicHour.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::MagicHour.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareBodySwapCreateImageRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::MagicHour.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::MagicHour.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "BodySwapCreateImage", + methodName: "BodySwapCreateImageAsync", + pathTemplate: "\"/v1/body-swap\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::MagicHour.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::MagicHour.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "BodySwapCreateImage", + methodName: "BodySwapCreateImageAsync", + pathTemplate: "\"/v1/body-swap\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::MagicHour.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::MagicHour.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + await global::MagicHour.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::MagicHour.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "BodySwapCreateImage", + methodName: "BodySwapCreateImageAsync", + pathTemplate: "\"/v1/body-swap\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::MagicHour.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessBodySwapCreateImageResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::MagicHour.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::MagicHour.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "BodySwapCreateImage", + methodName: "BodySwapCreateImageAsync", + pathTemplate: "\"/v1/body-swap\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::MagicHour.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::MagicHour.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "BodySwapCreateImage", + methodName: "BodySwapCreateImageAsync", + pathTemplate: "\"/v1/body-swap\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Invalid Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + global::MagicHour.BodySwapCreateImageResponse2? __value_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_400 = global::MagicHour.BodySwapCreateImageResponse2.FromJson(__content_400, JsonSerializerContext); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_400 = global::MagicHour.BodySwapCreateImageResponse2.FromJson(__content_400, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + throw new global::MagicHour.ApiException( + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::MagicHour.BodySwapCreateImageResponse3? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::MagicHour.BodySwapCreateImageResponse3.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::MagicHour.BodySwapCreateImageResponse3.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + throw new global::MagicHour.ApiException( + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseObject = __value_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Payment Required + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::System.Exception? __exception_402 = null; + global::MagicHour.BodySwapCreateImageResponse4? __value_402 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_402 = global::MagicHour.BodySwapCreateImageResponse4.FromJson(__content_402, JsonSerializerContext); + } + else + { + __content_402 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_402 = global::MagicHour.BodySwapCreateImageResponse4.FromJson(__content_402, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_402 = __ex; + } + + throw new global::MagicHour.ApiException( + message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_402, + statusCode: __response.StatusCode) + { + ResponseBody = __content_402, + ResponseObject = __value_402, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::MagicHour.BodySwapCreateImageResponse5? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::MagicHour.BodySwapCreateImageResponse5.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::MagicHour.BodySwapCreateImageResponse5.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + throw new global::MagicHour.ApiException( + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unprocessable Entity + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::MagicHour.BodySwapCreateImageResponse6? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::MagicHour.BodySwapCreateImageResponse6.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::MagicHour.BodySwapCreateImageResponse6.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::MagicHour.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessBodySwapCreateImageResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::MagicHour.BodySwapCreateImageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::MagicHour.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::MagicHour.BodySwapCreateImageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::MagicHour.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Body Swap
+ /// Swap a person into a scene image using Nano Banana 2. Credits depend on `resolution` (from 100 credits at 640px upward). + ///
+ /// + /// Give your image a custom name for easy identification.
+ /// Default Value: Body Swap - dateTime
+ /// Example: My Body Swap image + /// + /// + /// Output resolution. Determines credits charged for the run.
+ /// Example: 1k + /// + /// + /// Person image and scene image for body swap + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task BodySwapCreateImageAsync( + global::MagicHour.BodySwapCreateImageRequestResolution resolution, + global::MagicHour.BodySwapCreateImageRequestAssets assets, + string? name = default, + global::MagicHour.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::MagicHour.BodySwapCreateImageRequest + { + Name = name, + Resolution = resolution, + Assets = assets, + }; + + return await BodySwapCreateImageAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageRequestResolution.g.cs b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageRequestResolution.g.cs new file mode 100644 index 0000000..c0a6170 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageRequestResolution.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace MagicHour.JsonConverters +{ + /// + public sealed class BodySwapCreateImageRequestResolutionJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::MagicHour.BodySwapCreateImageRequestResolution Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::MagicHour.BodySwapCreateImageRequestResolutionExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::MagicHour.BodySwapCreateImageRequestResolution)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::MagicHour.BodySwapCreateImageRequestResolution); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::MagicHour.BodySwapCreateImageRequestResolution value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::MagicHour.BodySwapCreateImageRequestResolutionExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageRequestResolutionNullable.g.cs b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageRequestResolutionNullable.g.cs new file mode 100644 index 0000000..026a9f0 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageRequestResolutionNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace MagicHour.JsonConverters +{ + /// + public sealed class BodySwapCreateImageRequestResolutionNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::MagicHour.BodySwapCreateImageRequestResolution? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::MagicHour.BodySwapCreateImageRequestResolutionExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::MagicHour.BodySwapCreateImageRequestResolution)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::MagicHour.BodySwapCreateImageRequestResolution?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::MagicHour.BodySwapCreateImageRequestResolution? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::MagicHour.BodySwapCreateImageRequestResolutionExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage.g.cs b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage.g.cs new file mode 100644 index 0000000..1198203 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace MagicHour.JsonConverters +{ + /// + public sealed class BodySwapCreateImageResponseMessageJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::MagicHour.BodySwapCreateImageResponseMessage Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::MagicHour.BodySwapCreateImageResponseMessageExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::MagicHour.BodySwapCreateImageResponseMessage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::MagicHour.BodySwapCreateImageResponseMessage); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::MagicHour.BodySwapCreateImageResponseMessage value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::MagicHour.BodySwapCreateImageResponseMessageExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2.g.cs b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2.g.cs new file mode 100644 index 0000000..17c0de0 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace MagicHour.JsonConverters +{ + /// + public sealed class BodySwapCreateImageResponseMessage2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::MagicHour.BodySwapCreateImageResponseMessage2 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::MagicHour.BodySwapCreateImageResponseMessage2Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::MagicHour.BodySwapCreateImageResponseMessage2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::MagicHour.BodySwapCreateImageResponseMessage2); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::MagicHour.BodySwapCreateImageResponseMessage2 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::MagicHour.BodySwapCreateImageResponseMessage2Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2Nullable.g.cs b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2Nullable.g.cs new file mode 100644 index 0000000..0327632 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace MagicHour.JsonConverters +{ + /// + public sealed class BodySwapCreateImageResponseMessage2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::MagicHour.BodySwapCreateImageResponseMessage2? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::MagicHour.BodySwapCreateImageResponseMessage2Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::MagicHour.BodySwapCreateImageResponseMessage2)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::MagicHour.BodySwapCreateImageResponseMessage2?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::MagicHour.BodySwapCreateImageResponseMessage2? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::MagicHour.BodySwapCreateImageResponseMessage2Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessageNullable.g.cs b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessageNullable.g.cs new file mode 100644 index 0000000..1339f26 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.JsonConverters.BodySwapCreateImageResponseMessageNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace MagicHour.JsonConverters +{ + /// + public sealed class BodySwapCreateImageResponseMessageNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::MagicHour.BodySwapCreateImageResponseMessage? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::MagicHour.BodySwapCreateImageResponseMessageExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::MagicHour.BodySwapCreateImageResponseMessage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::MagicHour.BodySwapCreateImageResponseMessage?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::MagicHour.BodySwapCreateImageResponseMessage? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::MagicHour.BodySwapCreateImageResponseMessageExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.JsonSerializerContext.g.cs b/src/libs/MagicHour/Generated/MagicHour.JsonSerializerContext.g.cs index 76671a2..b9c489b 100644 --- a/src/libs/MagicHour/Generated/MagicHour.JsonSerializerContext.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.JsonSerializerContext.g.cs @@ -149,6 +149,10 @@ namespace MagicHour typeof(global::MagicHour.JsonConverters.AiMemeGeneratorCreateImageRequestStyleTemplateNullableJsonConverter), + typeof(global::MagicHour.JsonConverters.BodySwapCreateImageRequestResolutionJsonConverter), + + typeof(global::MagicHour.JsonConverters.BodySwapCreateImageRequestResolutionNullableJsonConverter), + typeof(global::MagicHour.JsonConverters.FaceSwapPhotoCreateImageRequestAssetsFaceSwapModeJsonConverter), typeof(global::MagicHour.JsonConverters.FaceSwapPhotoCreateImageRequestAssetsFaceSwapModeNullableJsonConverter), @@ -361,6 +365,14 @@ namespace MagicHour typeof(global::MagicHour.JsonConverters.AiQrCodeGeneratorCreateImageResponseMessage2NullableJsonConverter), + typeof(global::MagicHour.JsonConverters.BodySwapCreateImageResponseMessageJsonConverter), + + typeof(global::MagicHour.JsonConverters.BodySwapCreateImageResponseMessageNullableJsonConverter), + + typeof(global::MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2JsonConverter), + + typeof(global::MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2NullableJsonConverter), + typeof(global::MagicHour.JsonConverters.FaceSwapPhotoCreateImageResponseMessageJsonConverter), typeof(global::MagicHour.JsonConverters.FaceSwapPhotoCreateImageResponseMessageNullableJsonConverter), @@ -525,6 +537,9 @@ namespace MagicHour [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.AiMemeGeneratorCreateImageRequestStyleTemplate), TypeInfoPropertyName = "AiMemeGeneratorCreateImageRequestStyleTemplate2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.AiQrCodeGeneratorCreateImageRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.AiQrCodeGeneratorCreateImageRequestStyle))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageRequest))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageRequestResolution), TypeInfoPropertyName = "BodySwapCreateImageRequestResolution2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageRequestAssets))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.FaceSwapPhotoCreateImageRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.FaceSwapPhotoCreateImageRequestAssets))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.FaceSwapPhotoCreateImageRequestAssetsFaceSwapMode), TypeInfoPropertyName = "FaceSwapPhotoCreateImageRequestAssetsFaceSwapMode2")] @@ -743,6 +758,14 @@ namespace MagicHour [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.AiQrCodeGeneratorCreateImageResponse5))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.AiQrCodeGeneratorCreateImageResponseMessage2), TypeInfoPropertyName = "AiQrCodeGeneratorCreateImageResponseMessage22")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.AiQrCodeGeneratorCreateImageResponse6))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageResponse2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageResponse3))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageResponseMessage), TypeInfoPropertyName = "BodySwapCreateImageResponseMessage2_3")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageResponse4))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageResponse5))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageResponseMessage2), TypeInfoPropertyName = "BodySwapCreateImageResponseMessage22")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.BodySwapCreateImageResponse6))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.FaceSwapPhotoCreateImageResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.FaceSwapPhotoCreateImageResponse2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::MagicHour.FaceSwapPhotoCreateImageResponse3))] diff --git a/src/libs/MagicHour/Generated/MagicHour.JsonSerializerContextTypes.g.cs b/src/libs/MagicHour/Generated/MagicHour.JsonSerializerContextTypes.g.cs index 3397801..cb79f62 100644 --- a/src/libs/MagicHour/Generated/MagicHour.JsonSerializerContextTypes.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.JsonSerializerContextTypes.g.cs @@ -400,1135 +400,1179 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageRequest? Type93 { get; set; } + public global::MagicHour.BodySwapCreateImageRequest? Type93 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageRequestAssets? Type94 { get; set; } + public global::MagicHour.BodySwapCreateImageRequestResolution? Type94 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageRequestAssetsFaceSwapMode? Type95 { get; set; } + public global::MagicHour.BodySwapCreateImageRequestAssets? Type95 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type96 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageRequest? Type96 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageRequestAssetsFaceMapping? Type97 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageRequestAssets? Type97 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageRequest? Type98 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageRequestAssetsFaceSwapMode? Type98 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageRequestAssets? Type99 { get; set; } + public global::System.Collections.Generic.IList? Type99 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageRequest? Type100 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageRequestAssetsFaceMapping? Type100 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageRequestAssets? Type101 { get; set; } + public global::MagicHour.HeadSwapCreateImageRequest? Type101 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageRequest? Type102 { get; set; } + public global::MagicHour.HeadSwapCreateImageRequestAssets? Type102 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageRequestAssets? Type103 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageRequest? Type103 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioRequest? Type104 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageRequestAssets? Type104 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioRequestStyle? Type105 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageRequest? Type105 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioRequestStyleVoiceName? Type106 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageRequestAssets? Type106 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioRequest? Type107 { get; set; } + public global::MagicHour.AiVoiceGeneratorCreateAudioRequest? Type107 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioRequestAssets? Type108 { get; set; } + public global::MagicHour.AiVoiceGeneratorCreateAudioRequestStyle? Type108 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioRequestStyle? Type109 { get; set; } + public global::MagicHour.AiVoiceGeneratorCreateAudioRequestStyleVoiceName? Type109 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse? Type110 { get; set; } + public global::MagicHour.AiVoiceClonerCreateAudioRequest? Type110 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type111 { get; set; } + public global::MagicHour.AiVoiceClonerCreateAudioRequestAssets? Type111 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponseItem? Type112 { get; set; } + public global::MagicHour.AiVoiceClonerCreateAudioRequestStyle? Type112 { get; set; } /// /// /// - public global::System.DateTime? Type113 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse? Type113 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse2? Type114 { get; set; } + public global::System.Collections.Generic.IList? Type114 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse3? Type115 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponseItem? Type115 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponseMessage? Type116 { get; set; } + public global::System.DateTime? Type116 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse4? Type117 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse2? Type117 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse5? Type118 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse3? Type118 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponseMessage2? Type119 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponseMessage? Type119 { get; set; } /// /// /// - public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse6? Type120 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse4? Type120 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponse? Type121 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse5? Type121 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponseStatus? Type122 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponseMessage2? Type122 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type123 { get; set; } + public global::MagicHour.VideoAssetsGeneratePresignedUrlResponse6? Type123 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponseFace? Type124 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponse? Type124 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponse2? Type125 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponseStatus? Type125 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponse3? Type126 { get; set; } + public global::System.Collections.Generic.IList? Type126 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponseMessage? Type127 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponseFace? Type127 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponse4? Type128 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponse2? Type128 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponse5? Type129 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponse3? Type129 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponseMessage2? Type130 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponseMessage? Type130 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionGetDetailsResponse6? Type131 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponse4? Type131 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionDetectFacesResponse? Type132 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponse5? Type132 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionDetectFacesResponse2? Type133 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponseMessage2? Type133 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionDetectFacesResponse3? Type134 { get; set; } + public global::MagicHour.FaceDetectionGetDetailsResponse6? Type134 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionDetectFacesResponseMessage? Type135 { get; set; } + public global::MagicHour.FaceDetectionDetectFacesResponse? Type135 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionDetectFacesResponse4? Type136 { get; set; } + public global::MagicHour.FaceDetectionDetectFacesResponse2? Type136 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionDetectFacesResponse5? Type137 { get; set; } + public global::MagicHour.FaceDetectionDetectFacesResponse3? Type137 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionDetectFacesResponseMessage2? Type138 { get; set; } + public global::MagicHour.FaceDetectionDetectFacesResponseMessage? Type138 { get; set; } /// /// /// - public global::MagicHour.FaceDetectionDetectFacesResponse6? Type139 { get; set; } + public global::MagicHour.FaceDetectionDetectFacesResponse4? Type139 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponse? Type140 { get; set; } + public global::MagicHour.FaceDetectionDetectFacesResponse5? Type140 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponseStatus? Type141 { get; set; } + public global::MagicHour.FaceDetectionDetectFacesResponseMessage2? Type141 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponseError? Type142 { get; set; } + public global::MagicHour.FaceDetectionDetectFacesResponse6? Type142 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type143 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponse? Type143 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponseDownload? Type144 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponseStatus? Type144 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponse2? Type145 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponseError? Type145 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponse3? Type146 { get; set; } + public global::System.Collections.Generic.IList? Type146 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponseMessage? Type147 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponseDownload? Type147 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponse4? Type148 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponse2? Type148 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponse5? Type149 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponse3? Type149 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsGetDetailsResponseMessage2? Type150 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponseMessage? Type150 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsDeleteResponse? Type151 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponse4? Type151 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsDeleteResponse2? Type152 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponse5? Type152 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsDeleteResponseMessage? Type153 { get; set; } + public global::MagicHour.VideoProjectsGetDetailsResponseMessage2? Type153 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsDeleteResponse3? Type154 { get; set; } + public global::MagicHour.VideoProjectsDeleteResponse? Type154 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsDeleteResponse4? Type155 { get; set; } + public global::MagicHour.VideoProjectsDeleteResponse2? Type155 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsDeleteResponseMessage2? Type156 { get; set; } + public global::MagicHour.VideoProjectsDeleteResponseMessage? Type156 { get; set; } /// /// /// - public global::MagicHour.VideoProjectsDeleteResponse5? Type157 { get; set; } + public global::MagicHour.VideoProjectsDeleteResponse3? Type157 { get; set; } /// /// /// - public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse? Type158 { get; set; } + public global::MagicHour.VideoProjectsDeleteResponse4? Type158 { get; set; } /// /// /// - public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse2? Type159 { get; set; } + public global::MagicHour.VideoProjectsDeleteResponseMessage2? Type159 { get; set; } /// /// /// - public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse3? Type160 { get; set; } + public global::MagicHour.VideoProjectsDeleteResponse5? Type160 { get; set; } /// /// /// - public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponseMessage? Type161 { get; set; } + public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse? Type161 { get; set; } /// /// /// - public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse4? Type162 { get; set; } + public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse2? Type162 { get; set; } /// /// /// - public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse5? Type163 { get; set; } + public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse3? Type163 { get; set; } /// /// /// - public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponseMessage2? Type164 { get; set; } + public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponseMessage? Type164 { get; set; } /// /// /// - public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse6? Type165 { get; set; } + public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse4? Type165 { get; set; } /// /// /// - public global::MagicHour.AnimationCreateVideoResponse? Type166 { get; set; } + public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse5? Type166 { get; set; } /// /// /// - public global::MagicHour.AnimationCreateVideoResponse2? Type167 { get; set; } + public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponseMessage2? Type167 { get; set; } /// /// /// - public global::MagicHour.AnimationCreateVideoResponse3? Type168 { get; set; } + public global::MagicHour.AiTalkingPhotoCreateTalkingPhotoResponse6? Type168 { get; set; } /// /// /// - public global::MagicHour.AnimationCreateVideoResponseMessage? Type169 { get; set; } + public global::MagicHour.AnimationCreateVideoResponse? Type169 { get; set; } /// /// /// - public global::MagicHour.AnimationCreateVideoResponse4? Type170 { get; set; } + public global::MagicHour.AnimationCreateVideoResponse2? Type170 { get; set; } /// /// /// - public global::MagicHour.AnimationCreateVideoResponse5? Type171 { get; set; } + public global::MagicHour.AnimationCreateVideoResponse3? Type171 { get; set; } /// /// /// - public global::MagicHour.AnimationCreateVideoResponseMessage2? Type172 { get; set; } + public global::MagicHour.AnimationCreateVideoResponseMessage? Type172 { get; set; } /// /// /// - public global::MagicHour.AnimationCreateVideoResponse6? Type173 { get; set; } + public global::MagicHour.AnimationCreateVideoResponse4? Type173 { get; set; } /// /// /// - public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse? Type174 { get; set; } + public global::MagicHour.AnimationCreateVideoResponse5? Type174 { get; set; } /// /// /// - public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse2? Type175 { get; set; } + public global::MagicHour.AnimationCreateVideoResponseMessage2? Type175 { get; set; } /// /// /// - public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse3? Type176 { get; set; } + public global::MagicHour.AnimationCreateVideoResponse6? Type176 { get; set; } /// /// /// - public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponseMessage? Type177 { get; set; } + public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse? Type177 { get; set; } /// /// /// - public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse4? Type178 { get; set; } + public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse2? Type178 { get; set; } /// /// /// - public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse5? Type179 { get; set; } + public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse3? Type179 { get; set; } /// /// /// - public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponseMessage2? Type180 { get; set; } + public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponseMessage? Type180 { get; set; } /// /// /// - public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse6? Type181 { get; set; } + public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse4? Type181 { get; set; } /// /// /// - public global::MagicHour.FaceSwapCreateVideoResponse? Type182 { get; set; } + public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse5? Type182 { get; set; } /// /// /// - public global::MagicHour.FaceSwapCreateVideoResponse2? Type183 { get; set; } + public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponseMessage2? Type183 { get; set; } /// /// /// - public global::MagicHour.FaceSwapCreateVideoResponse3? Type184 { get; set; } + public global::MagicHour.AutoSubtitleGeneratorCreateVideoResponse6? Type184 { get; set; } /// /// /// - public global::MagicHour.FaceSwapCreateVideoResponseMessage? Type185 { get; set; } + public global::MagicHour.FaceSwapCreateVideoResponse? Type185 { get; set; } /// /// /// - public global::MagicHour.FaceSwapCreateVideoResponse4? Type186 { get; set; } + public global::MagicHour.FaceSwapCreateVideoResponse2? Type186 { get; set; } /// /// /// - public global::MagicHour.FaceSwapCreateVideoResponse5? Type187 { get; set; } + public global::MagicHour.FaceSwapCreateVideoResponse3? Type187 { get; set; } /// /// /// - public global::MagicHour.FaceSwapCreateVideoResponseMessage2? Type188 { get; set; } + public global::MagicHour.FaceSwapCreateVideoResponseMessage? Type188 { get; set; } /// /// /// - public global::MagicHour.FaceSwapCreateVideoResponse6? Type189 { get; set; } + public global::MagicHour.FaceSwapCreateVideoResponse4? Type189 { get; set; } /// /// /// - public global::MagicHour.ImageToVideoCreateVideoResponse? Type190 { get; set; } + public global::MagicHour.FaceSwapCreateVideoResponse5? Type190 { get; set; } /// /// /// - public global::MagicHour.ImageToVideoCreateVideoResponse2? Type191 { get; set; } + public global::MagicHour.FaceSwapCreateVideoResponseMessage2? Type191 { get; set; } /// /// /// - public global::MagicHour.ImageToVideoCreateVideoResponse3? Type192 { get; set; } + public global::MagicHour.FaceSwapCreateVideoResponse6? Type192 { get; set; } /// /// /// - public global::MagicHour.ImageToVideoCreateVideoResponseMessage? Type193 { get; set; } + public global::MagicHour.ImageToVideoCreateVideoResponse? Type193 { get; set; } /// /// /// - public global::MagicHour.ImageToVideoCreateVideoResponse4? Type194 { get; set; } + public global::MagicHour.ImageToVideoCreateVideoResponse2? Type194 { get; set; } /// /// /// - public global::MagicHour.ImageToVideoCreateVideoResponse5? Type195 { get; set; } + public global::MagicHour.ImageToVideoCreateVideoResponse3? Type195 { get; set; } /// /// /// - public global::MagicHour.ImageToVideoCreateVideoResponseMessage2? Type196 { get; set; } + public global::MagicHour.ImageToVideoCreateVideoResponseMessage? Type196 { get; set; } /// /// /// - public global::MagicHour.ImageToVideoCreateVideoResponse6? Type197 { get; set; } + public global::MagicHour.ImageToVideoCreateVideoResponse4? Type197 { get; set; } /// /// /// - public global::MagicHour.LipSyncCreateVideoResponse? Type198 { get; set; } + public global::MagicHour.ImageToVideoCreateVideoResponse5? Type198 { get; set; } /// /// /// - public global::MagicHour.LipSyncCreateVideoResponse2? Type199 { get; set; } + public global::MagicHour.ImageToVideoCreateVideoResponseMessage2? Type199 { get; set; } /// /// /// - public global::MagicHour.LipSyncCreateVideoResponse3? Type200 { get; set; } + public global::MagicHour.ImageToVideoCreateVideoResponse6? Type200 { get; set; } /// /// /// - public global::MagicHour.LipSyncCreateVideoResponseMessage? Type201 { get; set; } + public global::MagicHour.LipSyncCreateVideoResponse? Type201 { get; set; } /// /// /// - public global::MagicHour.LipSyncCreateVideoResponse4? Type202 { get; set; } + public global::MagicHour.LipSyncCreateVideoResponse2? Type202 { get; set; } /// /// /// - public global::MagicHour.LipSyncCreateVideoResponse5? Type203 { get; set; } + public global::MagicHour.LipSyncCreateVideoResponse3? Type203 { get; set; } /// /// /// - public global::MagicHour.LipSyncCreateVideoResponseMessage2? Type204 { get; set; } + public global::MagicHour.LipSyncCreateVideoResponseMessage? Type204 { get; set; } /// /// /// - public global::MagicHour.LipSyncCreateVideoResponse6? Type205 { get; set; } + public global::MagicHour.LipSyncCreateVideoResponse4? Type205 { get; set; } /// /// /// - public global::MagicHour.VideoToVideoCreateVideoResponse? Type206 { get; set; } + public global::MagicHour.LipSyncCreateVideoResponse5? Type206 { get; set; } /// /// /// - public global::MagicHour.VideoToVideoCreateVideoResponse2? Type207 { get; set; } + public global::MagicHour.LipSyncCreateVideoResponseMessage2? Type207 { get; set; } /// /// /// - public global::MagicHour.VideoToVideoCreateVideoResponse3? Type208 { get; set; } + public global::MagicHour.LipSyncCreateVideoResponse6? Type208 { get; set; } /// /// /// - public global::MagicHour.VideoToVideoCreateVideoResponseMessage? Type209 { get; set; } + public global::MagicHour.VideoToVideoCreateVideoResponse? Type209 { get; set; } /// /// /// - public global::MagicHour.VideoToVideoCreateVideoResponse4? Type210 { get; set; } + public global::MagicHour.VideoToVideoCreateVideoResponse2? Type210 { get; set; } /// /// /// - public global::MagicHour.VideoToVideoCreateVideoResponse5? Type211 { get; set; } + public global::MagicHour.VideoToVideoCreateVideoResponse3? Type211 { get; set; } /// /// /// - public global::MagicHour.VideoToVideoCreateVideoResponseMessage2? Type212 { get; set; } + public global::MagicHour.VideoToVideoCreateVideoResponseMessage? Type212 { get; set; } /// /// /// - public global::MagicHour.VideoToVideoCreateVideoResponse6? Type213 { get; set; } + public global::MagicHour.VideoToVideoCreateVideoResponse4? Type213 { get; set; } /// /// /// - public global::MagicHour.TextToVideoCreateVideoResponse? Type214 { get; set; } + public global::MagicHour.VideoToVideoCreateVideoResponse5? Type214 { get; set; } /// /// /// - public global::MagicHour.TextToVideoCreateVideoResponse2? Type215 { get; set; } + public global::MagicHour.VideoToVideoCreateVideoResponseMessage2? Type215 { get; set; } /// /// /// - public global::MagicHour.TextToVideoCreateVideoResponse3? Type216 { get; set; } + public global::MagicHour.VideoToVideoCreateVideoResponse6? Type216 { get; set; } /// /// /// - public global::MagicHour.TextToVideoCreateVideoResponseMessage? Type217 { get; set; } + public global::MagicHour.TextToVideoCreateVideoResponse? Type217 { get; set; } /// /// /// - public global::MagicHour.TextToVideoCreateVideoResponse4? Type218 { get; set; } + public global::MagicHour.TextToVideoCreateVideoResponse2? Type218 { get; set; } /// /// /// - public global::MagicHour.TextToVideoCreateVideoResponse5? Type219 { get; set; } + public global::MagicHour.TextToVideoCreateVideoResponse3? Type219 { get; set; } /// /// /// - public global::MagicHour.TextToVideoCreateVideoResponseMessage2? Type220 { get; set; } + public global::MagicHour.TextToVideoCreateVideoResponseMessage? Type220 { get; set; } /// /// /// - public global::MagicHour.TextToVideoCreateVideoResponse6? Type221 { get; set; } + public global::MagicHour.TextToVideoCreateVideoResponse4? Type221 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponse? Type222 { get; set; } + public global::MagicHour.TextToVideoCreateVideoResponse5? Type222 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponseStatus? Type223 { get; set; } + public global::MagicHour.TextToVideoCreateVideoResponseMessage2? Type223 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type224 { get; set; } + public global::MagicHour.TextToVideoCreateVideoResponse6? Type224 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponseDownload? Type225 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponse? Type225 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponseError? Type226 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponseStatus? Type226 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponse2? Type227 { get; set; } + public global::System.Collections.Generic.IList? Type227 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponse3? Type228 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponseDownload? Type228 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponseMessage? Type229 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponseError? Type229 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponse4? Type230 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponse2? Type230 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponse5? Type231 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponse3? Type231 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsGetDetailsResponseMessage2? Type232 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponseMessage? Type232 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsDeleteResponse? Type233 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponse4? Type233 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsDeleteResponse2? Type234 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponse5? Type234 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsDeleteResponseMessage? Type235 { get; set; } + public global::MagicHour.ImageProjectsGetDetailsResponseMessage2? Type235 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsDeleteResponse3? Type236 { get; set; } + public global::MagicHour.ImageProjectsDeleteResponse? Type236 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsDeleteResponse4? Type237 { get; set; } + public global::MagicHour.ImageProjectsDeleteResponse2? Type237 { get; set; } /// /// /// - public global::MagicHour.ImageProjectsDeleteResponseMessage2? Type238 { get; set; } + public global::MagicHour.ImageProjectsDeleteResponseMessage? Type238 { get; set; } /// /// /// - public global::MagicHour.AiClothesChangerCreateImageResponse? Type239 { get; set; } + public global::MagicHour.ImageProjectsDeleteResponse3? Type239 { get; set; } /// /// /// - public global::MagicHour.AiClothesChangerCreateImageResponse2? Type240 { get; set; } + public global::MagicHour.ImageProjectsDeleteResponse4? Type240 { get; set; } /// /// /// - public global::MagicHour.AiClothesChangerCreateImageResponse3? Type241 { get; set; } + public global::MagicHour.ImageProjectsDeleteResponseMessage2? Type241 { get; set; } /// /// /// - public global::MagicHour.AiClothesChangerCreateImageResponseMessage? Type242 { get; set; } + public global::MagicHour.AiClothesChangerCreateImageResponse? Type242 { get; set; } /// /// /// - public global::MagicHour.AiClothesChangerCreateImageResponse4? Type243 { get; set; } + public global::MagicHour.AiClothesChangerCreateImageResponse2? Type243 { get; set; } /// /// /// - public global::MagicHour.AiClothesChangerCreateImageResponse5? Type244 { get; set; } + public global::MagicHour.AiClothesChangerCreateImageResponse3? Type244 { get; set; } /// /// /// - public global::MagicHour.AiClothesChangerCreateImageResponseMessage2? Type245 { get; set; } + public global::MagicHour.AiClothesChangerCreateImageResponseMessage? Type245 { get; set; } /// /// /// - public global::MagicHour.AiClothesChangerCreateImageResponse6? Type246 { get; set; } + public global::MagicHour.AiClothesChangerCreateImageResponse4? Type246 { get; set; } /// /// /// - public global::MagicHour.AiFaceEditorEditImageResponse? Type247 { get; set; } + public global::MagicHour.AiClothesChangerCreateImageResponse5? Type247 { get; set; } /// /// /// - public global::MagicHour.AiFaceEditorEditImageResponse2? Type248 { get; set; } + public global::MagicHour.AiClothesChangerCreateImageResponseMessage2? Type248 { get; set; } /// /// /// - public global::MagicHour.AiFaceEditorEditImageResponse3? Type249 { get; set; } + public global::MagicHour.AiClothesChangerCreateImageResponse6? Type249 { get; set; } /// /// /// - public global::MagicHour.AiFaceEditorEditImageResponseMessage? Type250 { get; set; } + public global::MagicHour.AiFaceEditorEditImageResponse? Type250 { get; set; } /// /// /// - public global::MagicHour.AiFaceEditorEditImageResponse4? Type251 { get; set; } + public global::MagicHour.AiFaceEditorEditImageResponse2? Type251 { get; set; } /// /// /// - public global::MagicHour.AiFaceEditorEditImageResponse5? Type252 { get; set; } + public global::MagicHour.AiFaceEditorEditImageResponse3? Type252 { get; set; } /// /// /// - public global::MagicHour.AiFaceEditorEditImageResponseMessage2? Type253 { get; set; } + public global::MagicHour.AiFaceEditorEditImageResponseMessage? Type253 { get; set; } /// /// /// - public global::MagicHour.AiFaceEditorEditImageResponse6? Type254 { get; set; } + public global::MagicHour.AiFaceEditorEditImageResponse4? Type254 { get; set; } /// /// /// - public global::MagicHour.AiGifGeneratorCreateImageResponse? Type255 { get; set; } + public global::MagicHour.AiFaceEditorEditImageResponse5? Type255 { get; set; } /// /// /// - public global::MagicHour.AiGifGeneratorCreateImageResponse2? Type256 { get; set; } + public global::MagicHour.AiFaceEditorEditImageResponseMessage2? Type256 { get; set; } /// /// /// - public global::MagicHour.AiGifGeneratorCreateImageResponse3? Type257 { get; set; } + public global::MagicHour.AiFaceEditorEditImageResponse6? Type257 { get; set; } /// /// /// - public global::MagicHour.AiGifGeneratorCreateImageResponseMessage? Type258 { get; set; } + public global::MagicHour.AiGifGeneratorCreateImageResponse? Type258 { get; set; } /// /// /// - public global::MagicHour.AiGifGeneratorCreateImageResponse4? Type259 { get; set; } + public global::MagicHour.AiGifGeneratorCreateImageResponse2? Type259 { get; set; } /// /// /// - public global::MagicHour.AiGifGeneratorCreateImageResponse5? Type260 { get; set; } + public global::MagicHour.AiGifGeneratorCreateImageResponse3? Type260 { get; set; } /// /// /// - public global::MagicHour.AiGifGeneratorCreateImageResponseMessage2? Type261 { get; set; } + public global::MagicHour.AiGifGeneratorCreateImageResponseMessage? Type261 { get; set; } /// /// /// - public global::MagicHour.AiGifGeneratorCreateImageResponse6? Type262 { get; set; } + public global::MagicHour.AiGifGeneratorCreateImageResponse4? Type262 { get; set; } /// /// /// - public global::MagicHour.AiImageEditorCreateImageResponse? Type263 { get; set; } + public global::MagicHour.AiGifGeneratorCreateImageResponse5? Type263 { get; set; } /// /// /// - public global::MagicHour.AiImageEditorCreateImageResponse2? Type264 { get; set; } + public global::MagicHour.AiGifGeneratorCreateImageResponseMessage2? Type264 { get; set; } /// /// /// - public global::MagicHour.AiImageEditorCreateImageResponse3? Type265 { get; set; } + public global::MagicHour.AiGifGeneratorCreateImageResponse6? Type265 { get; set; } /// /// /// - public global::MagicHour.AiImageEditorCreateImageResponseMessage? Type266 { get; set; } + public global::MagicHour.AiImageEditorCreateImageResponse? Type266 { get; set; } /// /// /// - public global::MagicHour.AiImageEditorCreateImageResponse4? Type267 { get; set; } + public global::MagicHour.AiImageEditorCreateImageResponse2? Type267 { get; set; } /// /// /// - public global::MagicHour.AiImageEditorCreateImageResponse5? Type268 { get; set; } + public global::MagicHour.AiImageEditorCreateImageResponse3? Type268 { get; set; } /// /// /// - public global::MagicHour.AiImageEditorCreateImageResponseMessage2? Type269 { get; set; } + public global::MagicHour.AiImageEditorCreateImageResponseMessage? Type269 { get; set; } /// /// /// - public global::MagicHour.AiImageEditorCreateImageResponse6? Type270 { get; set; } + public global::MagicHour.AiImageEditorCreateImageResponse4? Type270 { get; set; } /// /// /// - public global::MagicHour.AiHeadshotGeneratorCreateImageResponse? Type271 { get; set; } + public global::MagicHour.AiImageEditorCreateImageResponse5? Type271 { get; set; } /// /// /// - public global::MagicHour.AiHeadshotGeneratorCreateImageResponse2? Type272 { get; set; } + public global::MagicHour.AiImageEditorCreateImageResponseMessage2? Type272 { get; set; } /// /// /// - public global::MagicHour.AiHeadshotGeneratorCreateImageResponse3? Type273 { get; set; } + public global::MagicHour.AiImageEditorCreateImageResponse6? Type273 { get; set; } /// /// /// - public global::MagicHour.AiHeadshotGeneratorCreateImageResponseMessage? Type274 { get; set; } + public global::MagicHour.AiHeadshotGeneratorCreateImageResponse? Type274 { get; set; } /// /// /// - public global::MagicHour.AiHeadshotGeneratorCreateImageResponse4? Type275 { get; set; } + public global::MagicHour.AiHeadshotGeneratorCreateImageResponse2? Type275 { get; set; } /// /// /// - public global::MagicHour.AiHeadshotGeneratorCreateImageResponse5? Type276 { get; set; } + public global::MagicHour.AiHeadshotGeneratorCreateImageResponse3? Type276 { get; set; } /// /// /// - public global::MagicHour.AiHeadshotGeneratorCreateImageResponseMessage2? Type277 { get; set; } + public global::MagicHour.AiHeadshotGeneratorCreateImageResponseMessage? Type277 { get; set; } /// /// /// - public global::MagicHour.AiHeadshotGeneratorCreateImageResponse6? Type278 { get; set; } + public global::MagicHour.AiHeadshotGeneratorCreateImageResponse4? Type278 { get; set; } /// /// /// - public global::MagicHour.AiImageGeneratorCreateImageResponse? Type279 { get; set; } + public global::MagicHour.AiHeadshotGeneratorCreateImageResponse5? Type279 { get; set; } /// /// /// - public global::MagicHour.AiImageGeneratorCreateImageResponse2? Type280 { get; set; } + public global::MagicHour.AiHeadshotGeneratorCreateImageResponseMessage2? Type280 { get; set; } /// /// /// - public global::MagicHour.AiImageGeneratorCreateImageResponse3? Type281 { get; set; } + public global::MagicHour.AiHeadshotGeneratorCreateImageResponse6? Type281 { get; set; } /// /// /// - public global::MagicHour.AiImageGeneratorCreateImageResponseMessage? Type282 { get; set; } + public global::MagicHour.AiImageGeneratorCreateImageResponse? Type282 { get; set; } /// /// /// - public global::MagicHour.AiImageGeneratorCreateImageResponse4? Type283 { get; set; } + public global::MagicHour.AiImageGeneratorCreateImageResponse2? Type283 { get; set; } /// /// /// - public global::MagicHour.AiImageGeneratorCreateImageResponse5? Type284 { get; set; } + public global::MagicHour.AiImageGeneratorCreateImageResponse3? Type284 { get; set; } /// /// /// - public global::MagicHour.AiImageGeneratorCreateImageResponseMessage2? Type285 { get; set; } + public global::MagicHour.AiImageGeneratorCreateImageResponseMessage? Type285 { get; set; } /// /// /// - public global::MagicHour.AiImageGeneratorCreateImageResponse6? Type286 { get; set; } + public global::MagicHour.AiImageGeneratorCreateImageResponse4? Type286 { get; set; } /// /// /// - public global::MagicHour.AiImageUpscalerCreateImageResponse? Type287 { get; set; } + public global::MagicHour.AiImageGeneratorCreateImageResponse5? Type287 { get; set; } /// /// /// - public global::MagicHour.AiImageUpscalerCreateImageResponse2? Type288 { get; set; } + public global::MagicHour.AiImageGeneratorCreateImageResponseMessage2? Type288 { get; set; } /// /// /// - public global::MagicHour.AiImageUpscalerCreateImageResponse3? Type289 { get; set; } + public global::MagicHour.AiImageGeneratorCreateImageResponse6? Type289 { get; set; } /// /// /// - public global::MagicHour.AiImageUpscalerCreateImageResponseMessage? Type290 { get; set; } + public global::MagicHour.AiImageUpscalerCreateImageResponse? Type290 { get; set; } /// /// /// - public global::MagicHour.AiImageUpscalerCreateImageResponse4? Type291 { get; set; } + public global::MagicHour.AiImageUpscalerCreateImageResponse2? Type291 { get; set; } /// /// /// - public global::MagicHour.AiImageUpscalerCreateImageResponse5? Type292 { get; set; } + public global::MagicHour.AiImageUpscalerCreateImageResponse3? Type292 { get; set; } /// /// /// - public global::MagicHour.AiImageUpscalerCreateImageResponseMessage2? Type293 { get; set; } + public global::MagicHour.AiImageUpscalerCreateImageResponseMessage? Type293 { get; set; } /// /// /// - public global::MagicHour.AiImageUpscalerCreateImageResponse6? Type294 { get; set; } + public global::MagicHour.AiImageUpscalerCreateImageResponse4? Type294 { get; set; } /// /// /// - public global::MagicHour.AiMemeGeneratorCreateImageResponse? Type295 { get; set; } + public global::MagicHour.AiImageUpscalerCreateImageResponse5? Type295 { get; set; } /// /// /// - public global::MagicHour.AiMemeGeneratorCreateImageResponse2? Type296 { get; set; } + public global::MagicHour.AiImageUpscalerCreateImageResponseMessage2? Type296 { get; set; } /// /// /// - public global::MagicHour.AiMemeGeneratorCreateImageResponse3? Type297 { get; set; } + public global::MagicHour.AiImageUpscalerCreateImageResponse6? Type297 { get; set; } /// /// /// - public global::MagicHour.AiMemeGeneratorCreateImageResponseMessage? Type298 { get; set; } + public global::MagicHour.AiMemeGeneratorCreateImageResponse? Type298 { get; set; } /// /// /// - public global::MagicHour.AiMemeGeneratorCreateImageResponse4? Type299 { get; set; } + public global::MagicHour.AiMemeGeneratorCreateImageResponse2? Type299 { get; set; } /// /// /// - public global::MagicHour.AiMemeGeneratorCreateImageResponse5? Type300 { get; set; } + public global::MagicHour.AiMemeGeneratorCreateImageResponse3? Type300 { get; set; } /// /// /// - public global::MagicHour.AiMemeGeneratorCreateImageResponseMessage2? Type301 { get; set; } + public global::MagicHour.AiMemeGeneratorCreateImageResponseMessage? Type301 { get; set; } /// /// /// - public global::MagicHour.AiMemeGeneratorCreateImageResponse6? Type302 { get; set; } + public global::MagicHour.AiMemeGeneratorCreateImageResponse4? Type302 { get; set; } /// /// /// - public global::MagicHour.AiQrCodeGeneratorCreateImageResponse? Type303 { get; set; } + public global::MagicHour.AiMemeGeneratorCreateImageResponse5? Type303 { get; set; } /// /// /// - public global::MagicHour.AiQrCodeGeneratorCreateImageResponse2? Type304 { get; set; } + public global::MagicHour.AiMemeGeneratorCreateImageResponseMessage2? Type304 { get; set; } /// /// /// - public global::MagicHour.AiQrCodeGeneratorCreateImageResponse3? Type305 { get; set; } + public global::MagicHour.AiMemeGeneratorCreateImageResponse6? Type305 { get; set; } /// /// /// - public global::MagicHour.AiQrCodeGeneratorCreateImageResponseMessage? Type306 { get; set; } + public global::MagicHour.AiQrCodeGeneratorCreateImageResponse? Type306 { get; set; } /// /// /// - public global::MagicHour.AiQrCodeGeneratorCreateImageResponse4? Type307 { get; set; } + public global::MagicHour.AiQrCodeGeneratorCreateImageResponse2? Type307 { get; set; } /// /// /// - public global::MagicHour.AiQrCodeGeneratorCreateImageResponse5? Type308 { get; set; } + public global::MagicHour.AiQrCodeGeneratorCreateImageResponse3? Type308 { get; set; } /// /// /// - public global::MagicHour.AiQrCodeGeneratorCreateImageResponseMessage2? Type309 { get; set; } + public global::MagicHour.AiQrCodeGeneratorCreateImageResponseMessage? Type309 { get; set; } /// /// /// - public global::MagicHour.AiQrCodeGeneratorCreateImageResponse6? Type310 { get; set; } + public global::MagicHour.AiQrCodeGeneratorCreateImageResponse4? Type310 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageResponse? Type311 { get; set; } + public global::MagicHour.AiQrCodeGeneratorCreateImageResponse5? Type311 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageResponse2? Type312 { get; set; } + public global::MagicHour.AiQrCodeGeneratorCreateImageResponseMessage2? Type312 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageResponse3? Type313 { get; set; } + public global::MagicHour.AiQrCodeGeneratorCreateImageResponse6? Type313 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageResponseMessage? Type314 { get; set; } + public global::MagicHour.BodySwapCreateImageResponse? Type314 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageResponse4? Type315 { get; set; } + public global::MagicHour.BodySwapCreateImageResponse2? Type315 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageResponse5? Type316 { get; set; } + public global::MagicHour.BodySwapCreateImageResponse3? Type316 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageResponseMessage2? Type317 { get; set; } + public global::MagicHour.BodySwapCreateImageResponseMessage? Type317 { get; set; } /// /// /// - public global::MagicHour.FaceSwapPhotoCreateImageResponse6? Type318 { get; set; } + public global::MagicHour.BodySwapCreateImageResponse4? Type318 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageResponse? Type319 { get; set; } + public global::MagicHour.BodySwapCreateImageResponse5? Type319 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageResponse2? Type320 { get; set; } + public global::MagicHour.BodySwapCreateImageResponseMessage2? Type320 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageResponse3? Type321 { get; set; } + public global::MagicHour.BodySwapCreateImageResponse6? Type321 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageResponseMessage? Type322 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageResponse? Type322 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageResponse4? Type323 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageResponse2? Type323 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageResponse5? Type324 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageResponse3? Type324 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageResponseMessage2? Type325 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageResponseMessage? Type325 { get; set; } /// /// /// - public global::MagicHour.HeadSwapCreateImageResponse6? Type326 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageResponse4? Type326 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageResponse? Type327 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageResponse5? Type327 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageResponse2? Type328 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageResponseMessage2? Type328 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageResponse3? Type329 { get; set; } + public global::MagicHour.FaceSwapPhotoCreateImageResponse6? Type329 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageResponseMessage? Type330 { get; set; } + public global::MagicHour.HeadSwapCreateImageResponse? Type330 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageResponse4? Type331 { get; set; } + public global::MagicHour.HeadSwapCreateImageResponse2? Type331 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageResponse5? Type332 { get; set; } + public global::MagicHour.HeadSwapCreateImageResponse3? Type332 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageResponseMessage2? Type333 { get; set; } + public global::MagicHour.HeadSwapCreateImageResponseMessage? Type333 { get; set; } /// /// /// - public global::MagicHour.ImageBackgroundRemoverCreateImageResponse6? Type334 { get; set; } + public global::MagicHour.HeadSwapCreateImageResponse4? Type334 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageResponse? Type335 { get; set; } + public global::MagicHour.HeadSwapCreateImageResponse5? Type335 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageResponse2? Type336 { get; set; } + public global::MagicHour.HeadSwapCreateImageResponseMessage2? Type336 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageResponse3? Type337 { get; set; } + public global::MagicHour.HeadSwapCreateImageResponse6? Type337 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageResponseMessage? Type338 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageResponse? Type338 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageResponse4? Type339 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageResponse2? Type339 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageResponse5? Type340 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageResponse3? Type340 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageResponseMessage2? Type341 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageResponseMessage? Type341 { get; set; } /// /// /// - public global::MagicHour.PhotoColorizerCreateImageResponse6? Type342 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageResponse4? Type342 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponse? Type343 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageResponse5? Type343 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponseStatus? Type344 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageResponseMessage2? Type344 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type345 { get; set; } + public global::MagicHour.ImageBackgroundRemoverCreateImageResponse6? Type345 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponseDownload? Type346 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageResponse? Type346 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponseError? Type347 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageResponse2? Type347 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponse2? Type348 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageResponse3? Type348 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponse3? Type349 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageResponseMessage? Type349 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponseMessage? Type350 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageResponse4? Type350 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponse4? Type351 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageResponse5? Type351 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponse5? Type352 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageResponseMessage2? Type352 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsGetDetailsResponseMessage2? Type353 { get; set; } + public global::MagicHour.PhotoColorizerCreateImageResponse6? Type353 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsDeleteResponse? Type354 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponse? Type354 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsDeleteResponse2? Type355 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponseStatus? Type355 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsDeleteResponseMessage? Type356 { get; set; } + public global::System.Collections.Generic.IList? Type356 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsDeleteResponse3? Type357 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponseDownload? Type357 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsDeleteResponse4? Type358 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponseError? Type358 { get; set; } /// /// /// - public global::MagicHour.AudioProjectsDeleteResponseMessage2? Type359 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponse2? Type359 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioResponse? Type360 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponse3? Type360 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioResponse2? Type361 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponseMessage? Type361 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioResponse3? Type362 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponse4? Type362 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioResponseMessage? Type363 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponse5? Type363 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioResponse4? Type364 { get; set; } + public global::MagicHour.AudioProjectsGetDetailsResponseMessage2? Type364 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioResponse5? Type365 { get; set; } + public global::MagicHour.AudioProjectsDeleteResponse? Type365 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioResponseMessage2? Type366 { get; set; } + public global::MagicHour.AudioProjectsDeleteResponse2? Type366 { get; set; } /// /// /// - public global::MagicHour.AiVoiceGeneratorCreateAudioResponse6? Type367 { get; set; } + public global::MagicHour.AudioProjectsDeleteResponseMessage? Type367 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioResponse? Type368 { get; set; } + public global::MagicHour.AudioProjectsDeleteResponse3? Type368 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioResponse2? Type369 { get; set; } + public global::MagicHour.AudioProjectsDeleteResponse4? Type369 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioResponse3? Type370 { get; set; } + public global::MagicHour.AudioProjectsDeleteResponseMessage2? Type370 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioResponseMessage? Type371 { get; set; } + public global::MagicHour.AiVoiceGeneratorCreateAudioResponse? Type371 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioResponse4? Type372 { get; set; } + public global::MagicHour.AiVoiceGeneratorCreateAudioResponse2? Type372 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioResponse5? Type373 { get; set; } + public global::MagicHour.AiVoiceGeneratorCreateAudioResponse3? Type373 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioResponseMessage2? Type374 { get; set; } + public global::MagicHour.AiVoiceGeneratorCreateAudioResponseMessage? Type374 { get; set; } /// /// /// - public global::MagicHour.AiVoiceClonerCreateAudioResponse6? Type375 { get; set; } + public global::MagicHour.AiVoiceGeneratorCreateAudioResponse4? Type375 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceGeneratorCreateAudioResponse5? Type376 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceGeneratorCreateAudioResponseMessage2? Type377 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceGeneratorCreateAudioResponse6? Type378 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceClonerCreateAudioResponse? Type379 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceClonerCreateAudioResponse2? Type380 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceClonerCreateAudioResponse3? Type381 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceClonerCreateAudioResponseMessage? Type382 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceClonerCreateAudioResponse4? Type383 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceClonerCreateAudioResponse5? Type384 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceClonerCreateAudioResponseMessage2? Type385 { get; set; } + /// + /// + /// + public global::MagicHour.AiVoiceClonerCreateAudioResponse6? Type386 { get; set; } /// /// diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequest.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequest.g.cs index 7cce647..2857c43 100644 --- a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequest.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequest.g.cs @@ -49,7 +49,7 @@ public sealed partial class AiImageGeneratorCreateImageRequest /// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
/// - Available for tiers: free, creator, pro, business
- /// - Image count allowed: 1, 2, 3, 4
+ /// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
/// - Available for tiers: creator, pro, business
@@ -147,7 +147,7 @@ public sealed partial class AiImageGeneratorCreateImageRequest /// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
/// - Available for tiers: free, creator, pro, business
- /// - Image count allowed: 1, 2, 3, 4
+ /// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
/// - Available for tiers: creator, pro, business
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequestModel.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequestModel.g.cs index 613f1ba..7aaafa2 100644 --- a/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequestModel.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.Models.AiImageGeneratorCreateImageRequestModel.g.cs @@ -26,7 +26,7 @@ namespace MagicHour /// - `nano-banana-2` - from 100 credits/image
/// - Supported resolutions: 640px, 1k, 2k, 4k
/// - Available for tiers: free, creator, pro, business
- /// - Image count allowed: 1, 2, 3, 4
+ /// - Image count allowed: 1, 4, 9, 16
/// - `nano-banana-pro` - from 150 credits/image
/// - Supported resolutions: 1k, 2k, 4k
/// - Available for tiers: creator, pro, business
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequest.Json.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequest.Json.g.cs new file mode 100644 index 0000000..f2d150b --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace MagicHour +{ + public sealed partial class BodySwapCreateImageRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::MagicHour.BodySwapCreateImageRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::MagicHour.BodySwapCreateImageRequest), + jsonSerializerContext) as global::MagicHour.BodySwapCreateImageRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::MagicHour.BodySwapCreateImageRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::MagicHour.BodySwapCreateImageRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::MagicHour.BodySwapCreateImageRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequest.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequest.g.cs new file mode 100644 index 0000000..aa0f627 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequest.g.cs @@ -0,0 +1,78 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// + /// + public sealed partial class BodySwapCreateImageRequest + { + /// + /// Give your image a custom name for easy identification.
+ /// Default Value: Body Swap - dateTime
+ /// Example: My Body Swap image + ///
+ /// My Body Swap image + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Output resolution. Determines credits charged for the run.
+ /// Example: 1k + ///
+ /// 1k + [global::System.Text.Json.Serialization.JsonPropertyName("resolution")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::MagicHour.JsonConverters.BodySwapCreateImageRequestResolutionJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::MagicHour.BodySwapCreateImageRequestResolution Resolution { get; set; } + + /// + /// Person image and scene image for body swap + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assets")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::MagicHour.BodySwapCreateImageRequestAssets Assets { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Output resolution. Determines credits charged for the run.
+ /// Example: 1k + /// + /// + /// Person image and scene image for body swap + /// + /// + /// Give your image a custom name for easy identification.
+ /// Default Value: Body Swap - dateTime
+ /// Example: My Body Swap image + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BodySwapCreateImageRequest( + global::MagicHour.BodySwapCreateImageRequestResolution resolution, + global::MagicHour.BodySwapCreateImageRequestAssets assets, + string? name) + { + this.Name = name; + this.Resolution = resolution; + this.Assets = assets ?? throw new global::System.ArgumentNullException(nameof(assets)); + } + + /// + /// Initializes a new instance of the class. + /// + public BodySwapCreateImageRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestAssets.Json.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestAssets.Json.g.cs new file mode 100644 index 0000000..b4a3520 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestAssets.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace MagicHour +{ + public sealed partial class BodySwapCreateImageRequestAssets + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::MagicHour.BodySwapCreateImageRequestAssets? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::MagicHour.BodySwapCreateImageRequestAssets), + jsonSerializerContext) as global::MagicHour.BodySwapCreateImageRequestAssets; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::MagicHour.BodySwapCreateImageRequestAssets? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::MagicHour.BodySwapCreateImageRequestAssets), + jsonSerializerContext).ConfigureAwait(false)) as global::MagicHour.BodySwapCreateImageRequestAssets; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestAssets.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestAssets.g.cs new file mode 100644 index 0000000..cecbf30 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestAssets.g.cs @@ -0,0 +1,76 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// Person image and scene image for body swap + /// + public sealed partial class BodySwapCreateImageRequestAssets + { + /// + /// Image of the person to place into the scene. This value is either
+ /// - a direct URL to the video file
+ /// - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
+ /// See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
+ /// Example: api-assets/id/1234.png + ///
+ /// api-assets/id/1234.png + [global::System.Text.Json.Serialization.JsonPropertyName("person_file_path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string PersonFilePath { get; set; } + + /// + /// Target scene image (background). This value is either
+ /// - a direct URL to the video file
+ /// - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
+ /// See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
+ /// Example: api-assets/id/5678.png + ///
+ /// api-assets/id/5678.png + [global::System.Text.Json.Serialization.JsonPropertyName("scene_file_path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SceneFilePath { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Image of the person to place into the scene. This value is either
+ /// - a direct URL to the video file
+ /// - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
+ /// See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
+ /// Example: api-assets/id/1234.png + /// + /// + /// Target scene image (background). This value is either
+ /// - a direct URL to the video file
+ /// - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).
+ /// See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
+ /// Example: api-assets/id/5678.png + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BodySwapCreateImageRequestAssets( + string personFilePath, + string sceneFilePath) + { + this.PersonFilePath = personFilePath ?? throw new global::System.ArgumentNullException(nameof(personFilePath)); + this.SceneFilePath = sceneFilePath ?? throw new global::System.ArgumentNullException(nameof(sceneFilePath)); + } + + /// + /// Initializes a new instance of the class. + /// + public BodySwapCreateImageRequestAssets() + { + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestResolution.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestResolution.g.cs new file mode 100644 index 0000000..3207356 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageRequestResolution.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// Output resolution. Determines credits charged for the run.
+ /// Example: 1k + ///
+ public enum BodySwapCreateImageRequestResolution + { + /// + /// + /// + x1k, + /// + /// + /// + x2k, + /// + /// + /// + x4k, + /// + /// + /// + x640px, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class BodySwapCreateImageRequestResolutionExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this BodySwapCreateImageRequestResolution value) + { + return value switch + { + BodySwapCreateImageRequestResolution.x1k => "1k", + BodySwapCreateImageRequestResolution.x2k => "2k", + BodySwapCreateImageRequestResolution.x4k => "4k", + BodySwapCreateImageRequestResolution.x640px => "640px", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static BodySwapCreateImageRequestResolution? ToEnum(string value) + { + return value switch + { + "1k" => BodySwapCreateImageRequestResolution.x1k, + "2k" => BodySwapCreateImageRequestResolution.x2k, + "4k" => BodySwapCreateImageRequestResolution.x4k, + "640px" => BodySwapCreateImageRequestResolution.x640px, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse.Json.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse.Json.g.cs new file mode 100644 index 0000000..413417a --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace MagicHour +{ + public sealed partial class BodySwapCreateImageResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::MagicHour.BodySwapCreateImageResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::MagicHour.BodySwapCreateImageResponse), + jsonSerializerContext) as global::MagicHour.BodySwapCreateImageResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::MagicHour.BodySwapCreateImageResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::MagicHour.BodySwapCreateImageResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::MagicHour.BodySwapCreateImageResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse.g.cs new file mode 100644 index 0000000..96e2bbe --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse.g.cs @@ -0,0 +1,66 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// Success + /// + public sealed partial class BodySwapCreateImageResponse + { + /// + /// Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
+ /// Example: cuid-example + ///
+ /// cuid-example + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
+ /// If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
+ /// Example: 100 + ///
+ /// 100 + [global::System.Text.Json.Serialization.JsonPropertyName("credits_charged")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int CreditsCharged { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
+ /// Example: cuid-example + /// + /// + /// The amount of credits deducted from your account to generate the image. We charge credits right when the request is made.
+ /// If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.
+ /// Example: 100 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BodySwapCreateImageResponse( + string id, + int creditsCharged) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.CreditsCharged = creditsCharged; + } + + /// + /// Initializes a new instance of the class. + /// + public BodySwapCreateImageResponse() + { + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse2.Json.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse2.Json.g.cs new file mode 100644 index 0000000..e10dbc8 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace MagicHour +{ + public sealed partial class BodySwapCreateImageResponse2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::MagicHour.BodySwapCreateImageResponse2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::MagicHour.BodySwapCreateImageResponse2), + jsonSerializerContext) as global::MagicHour.BodySwapCreateImageResponse2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::MagicHour.BodySwapCreateImageResponse2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::MagicHour.BodySwapCreateImageResponse2), + jsonSerializerContext).ConfigureAwait(false)) as global::MagicHour.BodySwapCreateImageResponse2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse2.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse2.g.cs new file mode 100644 index 0000000..4cbc4c3 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse2.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// The request is invalid
+ /// Example: {"message":"Missing request body"} + ///
+ public sealed partial class BodySwapCreateImageResponse2 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BodySwapCreateImageResponse2( + string message) + { + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public BodySwapCreateImageResponse2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse3.Json.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse3.Json.g.cs new file mode 100644 index 0000000..d06e97e --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse3.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace MagicHour +{ + public sealed partial class BodySwapCreateImageResponse3 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::MagicHour.BodySwapCreateImageResponse3? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::MagicHour.BodySwapCreateImageResponse3), + jsonSerializerContext) as global::MagicHour.BodySwapCreateImageResponse3; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::MagicHour.BodySwapCreateImageResponse3? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::MagicHour.BodySwapCreateImageResponse3), + jsonSerializerContext).ConfigureAwait(false)) as global::MagicHour.BodySwapCreateImageResponse3; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse3.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse3.g.cs new file mode 100644 index 0000000..389463f --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse3.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// The request is not properly authenticated
+ /// Example: {"message":"Unauthorized"} + ///
+ public sealed partial class BodySwapCreateImageResponse3 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::MagicHour.JsonConverters.BodySwapCreateImageResponseMessageJsonConverter))] + public global::MagicHour.BodySwapCreateImageResponseMessage Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BodySwapCreateImageResponse3( + global::MagicHour.BodySwapCreateImageResponseMessage message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public BodySwapCreateImageResponse3() + { + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse4.Json.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse4.Json.g.cs new file mode 100644 index 0000000..c434775 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse4.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace MagicHour +{ + public sealed partial class BodySwapCreateImageResponse4 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::MagicHour.BodySwapCreateImageResponse4? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::MagicHour.BodySwapCreateImageResponse4), + jsonSerializerContext) as global::MagicHour.BodySwapCreateImageResponse4; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::MagicHour.BodySwapCreateImageResponse4? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::MagicHour.BodySwapCreateImageResponse4), + jsonSerializerContext).ConfigureAwait(false)) as global::MagicHour.BodySwapCreateImageResponse4; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse4.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse4.g.cs new file mode 100644 index 0000000..066be9b --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse4.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// The request requires payment
+ /// Example: {"message":"Payment required"} + ///
+ public sealed partial class BodySwapCreateImageResponse4 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BodySwapCreateImageResponse4( + string message) + { + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public BodySwapCreateImageResponse4() + { + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse5.Json.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse5.Json.g.cs new file mode 100644 index 0000000..269e78a --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse5.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace MagicHour +{ + public sealed partial class BodySwapCreateImageResponse5 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::MagicHour.BodySwapCreateImageResponse5? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::MagicHour.BodySwapCreateImageResponse5), + jsonSerializerContext) as global::MagicHour.BodySwapCreateImageResponse5; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::MagicHour.BodySwapCreateImageResponse5? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::MagicHour.BodySwapCreateImageResponse5), + jsonSerializerContext).ConfigureAwait(false)) as global::MagicHour.BodySwapCreateImageResponse5; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse5.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse5.g.cs new file mode 100644 index 0000000..6a3d21d --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse5.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// Requested resource is not found
+ /// Example: {"message":"Not Found"} + ///
+ public sealed partial class BodySwapCreateImageResponse5 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::MagicHour.JsonConverters.BodySwapCreateImageResponseMessage2JsonConverter))] + public global::MagicHour.BodySwapCreateImageResponseMessage2 Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BodySwapCreateImageResponse5( + global::MagicHour.BodySwapCreateImageResponseMessage2 message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public BodySwapCreateImageResponse5() + { + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse6.Json.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse6.Json.g.cs new file mode 100644 index 0000000..be3a573 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse6.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace MagicHour +{ + public sealed partial class BodySwapCreateImageResponse6 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::MagicHour.BodySwapCreateImageResponse6? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::MagicHour.BodySwapCreateImageResponse6), + jsonSerializerContext) as global::MagicHour.BodySwapCreateImageResponse6; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::MagicHour.BodySwapCreateImageResponse6? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::MagicHour.BodySwapCreateImageResponse6), + jsonSerializerContext).ConfigureAwait(false)) as global::MagicHour.BodySwapCreateImageResponse6; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse6.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse6.g.cs new file mode 100644 index 0000000..a7c3e35 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponse6.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// Unprocessable Entity + /// + public sealed partial class BodySwapCreateImageResponse6 + { + /// + /// Example: Unable to create image + /// + /// Unable to create image + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Example: Unable to create image + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public BodySwapCreateImageResponse6( + string message) + { + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + } + + /// + /// Initializes a new instance of the class. + /// + public BodySwapCreateImageResponse6() + { + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponseMessage.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponseMessage.g.cs new file mode 100644 index 0000000..136e910 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponseMessage.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// + /// + public enum BodySwapCreateImageResponseMessage + { + /// + /// + /// + Unauthorized, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class BodySwapCreateImageResponseMessageExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this BodySwapCreateImageResponseMessage value) + { + return value switch + { + BodySwapCreateImageResponseMessage.Unauthorized => "Unauthorized", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static BodySwapCreateImageResponseMessage? ToEnum(string value) + { + return value switch + { + "Unauthorized" => BodySwapCreateImageResponseMessage.Unauthorized, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponseMessage2.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponseMessage2.g.cs new file mode 100644 index 0000000..1226aa5 --- /dev/null +++ b/src/libs/MagicHour/Generated/MagicHour.Models.BodySwapCreateImageResponseMessage2.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace MagicHour +{ + /// + /// + /// + public enum BodySwapCreateImageResponseMessage2 + { + /// + /// + /// + NotFound, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class BodySwapCreateImageResponseMessage2Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this BodySwapCreateImageResponseMessage2 value) + { + return value switch + { + BodySwapCreateImageResponseMessage2.NotFound => "Not Found", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static BodySwapCreateImageResponseMessage2? ToEnum(string value) + { + return value switch + { + "Not Found" => BodySwapCreateImageResponseMessage2.NotFound, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequest.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequest.g.cs index 48827ab..3b7f741 100644 --- a/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequest.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.Models.ImageToVideoCreateVideoRequest.g.cs @@ -86,7 +86,7 @@ public sealed partial class ImageToVideoCreateVideoRequest /// * **`ltx-2`**: Automatically included with no extra credits
/// * **`wan-2.2`**: Not supported
/// * **`seedance`**: Not supported
- /// * **`seedance-2.0`**: Not supported
+ /// * **`seedance-2.0`**: Automatically included with no extra credits
/// * **`kling-2.5`**: Automatically included with no extra credits
/// * **`kling-3.0`**: Toggle-able (can enable/disable)
/// * **`sora-2`**: Automatically included with no extra credits
@@ -184,7 +184,7 @@ public sealed partial class ImageToVideoCreateVideoRequest /// * **`ltx-2`**: Automatically included with no extra credits
/// * **`wan-2.2`**: Not supported
/// * **`seedance`**: Not supported
- /// * **`seedance-2.0`**: Not supported
+ /// * **`seedance-2.0`**: Automatically included with no extra credits
/// * **`kling-2.5`**: Automatically included with no extra credits
/// * **`kling-3.0`**: Toggle-able (can enable/disable)
/// * **`sora-2`**: Automatically included with no extra credits
diff --git a/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequest.g.cs b/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequest.g.cs index 6433d9f..3ca1aad 100644 --- a/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequest.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.Models.TextToVideoCreateVideoRequest.g.cs @@ -106,7 +106,7 @@ public sealed partial class TextToVideoCreateVideoRequest /// * **`ltx-2`**: Automatically included with no extra credits
/// * **`wan-2.2`**: Not supported
/// * **`seedance`**: Not supported
- /// * **`seedance-2.0`**: Not supported
+ /// * **`seedance-2.0`**: Automatically included with no extra credits
/// * **`kling-2.5`**: Automatically included with no extra credits
/// * **`kling-3.0`**: Toggle-able (can enable/disable)
/// * **`sora-2`**: Automatically included with no extra credits
@@ -211,7 +211,7 @@ public sealed partial class TextToVideoCreateVideoRequest /// * **`ltx-2`**: Automatically included with no extra credits
/// * **`wan-2.2`**: Not supported
/// * **`seedance`**: Not supported
- /// * **`seedance-2.0`**: Not supported
+ /// * **`seedance-2.0`**: Automatically included with no extra credits
/// * **`kling-2.5`**: Automatically included with no extra credits
/// * **`kling-3.0`**: Toggle-able (can enable/disable)
/// * **`sora-2`**: Automatically included with no extra credits
diff --git a/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.ImageToVideoCreateVideo.g.cs b/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.ImageToVideoCreateVideo.g.cs index 94ff30d..a5bf937 100644 --- a/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.ImageToVideoCreateVideo.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.ImageToVideoCreateVideo.g.cs @@ -695,7 +695,7 @@ partial void ProcessImageToVideoCreateVideoResponseContent( /// * **`ltx-2`**: Automatically included with no extra credits
/// * **`wan-2.2`**: Not supported
/// * **`seedance`**: Not supported
- /// * **`seedance-2.0`**: Not supported
+ /// * **`seedance-2.0`**: Automatically included with no extra credits
/// * **`kling-2.5`**: Automatically included with no extra credits
/// * **`kling-3.0`**: Toggle-able (can enable/disable)
/// * **`sora-2`**: Automatically included with no extra credits
diff --git a/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.TextToVideoCreateVideo.g.cs b/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.TextToVideoCreateVideo.g.cs index 67e94f0..62dd288 100644 --- a/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.TextToVideoCreateVideo.g.cs +++ b/src/libs/MagicHour/Generated/MagicHour.VideoProjectsClient.TextToVideoCreateVideo.g.cs @@ -707,7 +707,7 @@ partial void ProcessTextToVideoCreateVideoResponseContent( /// * **`ltx-2`**: Automatically included with no extra credits
/// * **`wan-2.2`**: Not supported
/// * **`seedance`**: Not supported
- /// * **`seedance-2.0`**: Not supported
+ /// * **`seedance-2.0`**: Automatically included with no extra credits
/// * **`kling-2.5`**: Automatically included with no extra credits
/// * **`kling-3.0`**: Toggle-able (can enable/disable)
/// * **`sora-2`**: Automatically included with no extra credits
diff --git a/src/libs/MagicHour/Generated/autosdk.generated-examples.json b/src/libs/MagicHour/Generated/autosdk.generated-examples.json index c7f8718..984a7db 100644 --- a/src/libs/MagicHour/Generated/autosdk.generated-examples.json +++ b/src/libs/MagicHour/Generated/autosdk.generated-examples.json @@ -178,6 +178,17 @@ }, { "Order": 17, + "Title": "Body Swap", + "Slug": "bodyswap-createimage", + "Description": "Swap a person into a scene image using Nano Banana 2. Credits depend on \u0060resolution\u0060 (from 100 credits at 640px upward).", + "Language": "http", + "Code": "### Body Swap\n# @name bodySwap.createImage\nPOST {{host}}/v1/body-swap\nAuthorization: Bearer {{token}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022name\u0022: \u0022My Body Swap image\u0022,\n \u0022resolution\u0022: \u00221k\u0022,\n \u0022assets\u0022: {\n \u0022person_file_path\u0022: \u0022api-assets/id/1234.png\u0022,\n \u0022scene_file_path\u0022: \u0022api-assets/id/5678.png\u0022\n }\n}\n\n## Responses\n# 200\n# Description: Success\n# Content-Type: application/json\n# 400\n# Description: Invalid Request\n# Content-Type: application/json\n# 401\n# Description: Unauthorized\n# Content-Type: application/json\n# 402\n# Description: Payment Required\n# Content-Type: application/json\n# 404\n# Description: Not Found\n# Content-Type: application/json\n# 422\n# Description: Unprocessable Entity\n# Content-Type: application/json", + "Format": "http", + "OperationId": "bodySwap.createImage", + "Setup": null + }, + { + "Order": 18, "Title": "Face Swap Photo", "Slug": "faceswapphoto-createimage", "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", @@ -188,7 +199,7 @@ "Setup": null }, { - "Order": 18, + "Order": 19, "Title": "Head Swap", "Slug": "headswap-createimage", "Description": "Swap a head onto a body image. Each image costs 10 credits. Output resolution depends on your subscription; you may set \u0060max_resolution\u0060 lower than your plan maximum if desired.", @@ -199,7 +210,7 @@ "Setup": null }, { - "Order": 19, + "Order": 20, "Title": "Image Background Remover", "Slug": "imagebackgroundremover-createimage", "Description": "Remove background from image. Each image costs 5 credits.", @@ -210,7 +221,7 @@ "Setup": null }, { - "Order": 20, + "Order": 21, "Title": "Delete image", "Slug": "imageprojects-delete", "Description": "Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.", @@ -221,7 +232,7 @@ "Setup": null }, { - "Order": 21, + "Order": 22, "Title": "Get image details", "Slug": "imageprojects-getdetails", "Description": "Check the progress of a image project. The \u0060downloads\u0060 field is populated after a successful render.\n \n**Statuses**\n- \u0060queued\u0060 \u2014 waiting to start\n- \u0060rendering\u0060 \u2014 in progress\n- \u0060complete\u0060 \u2014 ready; see \u0060downloads\u0060\n- \u0060error\u0060 \u2014 a failure occurred (see \u0060error\u0060)\n- \u0060canceled\u0060 \u2014 user canceled\n- \u0060draft\u0060 \u2014 not used", @@ -232,7 +243,7 @@ "Setup": null }, { - "Order": 22, + "Order": 23, "Title": "Photo Colorizer", "Slug": "photocolorizer-createimage", "Description": "Colorize image. Each image costs 10 credits.", @@ -243,7 +254,7 @@ "Setup": null }, { - "Order": 23, + "Order": 24, "Title": "AI Talking Photo", "Slug": "aitalkingphoto-createtalkingphoto", "Description": "Create a talking photo from an image and audio or text input.", @@ -254,7 +265,7 @@ "Setup": null }, { - "Order": 24, + "Order": 25, "Title": "Animation", "Slug": "animation-createvideo", "Description": "Create a Animation video. The estimated frame cost is calculated based on the \u0060fps\u0060 and \u0060end_seconds\u0060 input.", @@ -265,7 +276,7 @@ "Setup": null }, { - "Order": 25, + "Order": 26, "Title": "Auto Subtitle Generator", "Slug": "autosubtitlegenerator-createvideo", "Description": "Automatically generate subtitles for your video in multiple languages.", @@ -276,7 +287,7 @@ "Setup": null }, { - "Order": 26, + "Order": 27, "Title": "Face Swap Video", "Slug": "faceswap-createvideo", "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 \u0060file_path\u0060. \n2) Send a request to create a face swap job with the basic fields. \n3) Check the job status until it\u0027s \u0060complete\u0060, then download the result from \u0060downloads\u0060.\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. \u0060face_swap_mode\u0060, \u0060start_seconds\u0060/\u0060end_seconds\u0060, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You\u0027ll see an estimate when the job is queued, and the final total after it\u0027s done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/face-swap).", @@ -287,7 +298,7 @@ "Setup": null }, { - "Order": 27, + "Order": 28, "Title": "Image-to-Video", "Slug": "imagetovideo-createvideo", "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 \u0060file_path\u0060. \n2) Send a request to create a image to video job with the basic fields. \n3) Check the job status until it\u0027s \u0060complete\u0060, then download the result from \u0060downloads\u0060.\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. \u0060face_swap_mode\u0060, \u0060start_seconds\u0060/\u0060end_seconds\u0060, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You\u0027ll see an estimate when the job is queued, and the final total after it\u0027s done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/image-to-video).", @@ -298,7 +309,7 @@ "Setup": null }, { - "Order": 28, + "Order": 29, "Title": "Lip Sync", "Slug": "lipsync-createvideo", "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 \u0060file_path\u0060. \n2) Send a request to create a lip sync job with the basic fields. \n3) Check the job status until it\u0027s \u0060complete\u0060, then download the result from \u0060downloads\u0060.\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. \u0060face_swap_mode\u0060, \u0060start_seconds\u0060/\u0060end_seconds\u0060, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You\u0027ll see an estimate when the job is queued, and the final total after it\u0027s done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/lip-sync).", @@ -309,7 +320,7 @@ "Setup": null }, { - "Order": 29, + "Order": 30, "Title": "Text-to-Video", "Slug": "texttovideo-createvideo", "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 \u0060file_path\u0060. \n2) Send a request to create a text to video job with the basic fields. \n3) Check the job status until it\u0027s \u0060complete\u0060, then download the result from \u0060downloads\u0060.\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. \u0060face_swap_mode\u0060, \u0060start_seconds\u0060/\u0060end_seconds\u0060, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You\u0027ll see an estimate when the job is queued, and the final total after it\u0027s done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/text-to-video).", @@ -320,7 +331,7 @@ "Setup": null }, { - "Order": 30, + "Order": 31, "Title": "Delete video", "Slug": "videoprojects-delete", "Description": "Permanently delete the rendered video. This action is not reversible, please be sure before deleting.", @@ -331,7 +342,7 @@ "Setup": null }, { - "Order": 31, + "Order": 32, "Title": "Get video details", "Slug": "videoprojects-getdetails", "Description": "Check the progress of a video project. The \u0060downloads\u0060 field is populated after a successful render.\n \n**Statuses**\n- \u0060queued\u0060 \u2014 waiting to start\n- \u0060rendering\u0060 \u2014 in progress\n- \u0060complete\u0060 \u2014 ready; see \u0060downloads\u0060\n- \u0060error\u0060 \u2014 a failure occurred (see \u0060error\u0060)\n- \u0060canceled\u0060 \u2014 user canceled\n- \u0060draft\u0060 \u2014 not used", @@ -342,7 +353,7 @@ "Setup": null }, { - "Order": 32, + "Order": 33, "Title": "Video-to-Video", "Slug": "videotovideo-createvideo", "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 \u0060file_path\u0060. \n2) Send a request to create a video to video job with the basic fields. \n3) Check the job status until it\u0027s \u0060complete\u0060, then download the result from \u0060downloads\u0060.\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. \u0060face_swap_mode\u0060, \u0060start_seconds\u0060/\u0060end_seconds\u0060, or a text prompt \n\n**Cost** \nCredits are only charged for the frames that actually render. You\u0027ll see an estimate when the job is queued, and the final total after it\u0027s done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/video-to-video).", diff --git a/src/libs/MagicHour/openapi.yaml b/src/libs/MagicHour/openapi.yaml index c02b5c1..9c350e2 100644 --- a/src/libs/MagicHour/openapi.yaml +++ b/src/libs/MagicHour/openapi.yaml @@ -5,9 +5,7 @@ "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, 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": { @@ -25,11 +23,7 @@ "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" }, @@ -40,28 +34,17 @@ "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"] } } } @@ -97,11 +80,7 @@ "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": [ @@ -118,9 +97,7 @@ ] } }, - "required": [ - "items" - ], + "required": ["items"], "description": "Success" } } @@ -132,18 +109,10 @@ "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" } } } } @@ -154,21 +123,10 @@ "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" } } } } @@ -179,18 +137,10 @@ "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" } } } } @@ -201,21 +151,10 @@ "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" } } } } @@ -232,20 +171,14 @@ "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", @@ -282,18 +215,13 @@ "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)." } ], @@ -318,12 +246,7 @@ }, "status": { "type": "string", - "enum": [ - "queued", - "rendering", - "complete", - "error" - ], + "enum": ["queued", "rendering", "complete", "error"], "description": "The status of the detection.", "example": "complete" }, @@ -343,10 +266,7 @@ "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": [ @@ -357,12 +277,7 @@ ] } }, - "required": [ - "id", - "credits_charged", - "status", - "faces" - ] + "required": ["id", "credits_charged", "status", "faces"] } } } @@ -373,18 +288,10 @@ "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" } } } } @@ -395,21 +302,10 @@ "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" } } } } @@ -420,18 +316,10 @@ "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" } } } } @@ -442,21 +330,10 @@ "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" } } } } @@ -473,20 +350,14 @@ "example": "Unable to get face detection details" } }, - "required": [ - "message" - ], + "required": ["message"], "description": "Unprocessable Entity" } } } } }, - "security": [ - { - "bearerAuth": [] - } - ], + "security": [{ "bearerAuth": [] }], "x-codeSamples": [ { "lang": "python", @@ -523,9 +394,7 @@ "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": { @@ -554,15 +423,11 @@ "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"] } } } @@ -585,10 +450,7 @@ "description": "The credits charged for the task." } }, - "required": [ - "id", - "credits_charged" - ] + "required": ["id", "credits_charged"] } } } @@ -599,18 +461,10 @@ "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" } } } } @@ -621,21 +475,10 @@ "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" } } } } @@ -646,18 +489,10 @@ "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" } } } } @@ -668,21 +503,10 @@ "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" } } } } @@ -694,25 +518,16 @@ "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", @@ -749,18 +564,13 @@ "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." } ], @@ -786,14 +596,7 @@ }, "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" }, @@ -802,10 +605,7 @@ "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, 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.", @@ -858,10 +658,7 @@ "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 @@ -882,10 +679,7 @@ "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" } } @@ -919,18 +713,10 @@ "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" } } } } @@ -941,21 +727,10 @@ "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" } } } } @@ -966,18 +741,10 @@ "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" } } } } @@ -988,31 +755,16 @@ "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", @@ -1047,44 +799,29 @@ "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" } } } } @@ -1095,21 +832,10 @@ "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" } } } } @@ -1120,18 +846,10 @@ "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" } } } } @@ -1142,21 +860,10 @@ "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" } } } } @@ -1167,14 +874,8 @@ "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." @@ -1184,11 +885,7 @@ } } }, - "security": [ - { - "bearerAuth": [] - } - ], + "security": [{ "bearerAuth": [] }], "x-codeSamples": [ { "lang": "python", @@ -1225,9 +922,7 @@ "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": { @@ -1274,10 +969,7 @@ "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": { @@ -1310,11 +1002,7 @@ "example": 1024 } }, - "required": [ - "start_seconds", - "end_seconds", - "assets" - ], + "required": ["start_seconds", "end_seconds", "assets"], "description": "Provide the assets for creating a talking photo" } } @@ -1339,11 +1027,7 @@ "example": 450 } }, - "required": [ - "id", - "estimated_frame_cost", - "credits_charged" - ], + "required": ["id", "estimated_frame_cost", "credits_charged"], "description": "Success" } } @@ -1355,18 +1039,10 @@ "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" } } } } @@ -1377,21 +1053,10 @@ "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" } } } } @@ -1402,18 +1067,10 @@ "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" } } } } @@ -1424,21 +1081,10 @@ "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" } } } } @@ -1450,25 +1096,16 @@ "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", @@ -1505,9 +1142,7 @@ "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": { @@ -1671,11 +1306,7 @@ }, "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`." }, @@ -1692,12 +1323,7 @@ "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": { @@ -1705,11 +1331,7 @@ "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" }, @@ -1732,20 +1354,11 @@ "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"] } } } @@ -1769,11 +1382,7 @@ "example": 450 } }, - "required": [ - "id", - "estimated_frame_cost", - "credits_charged" - ], + "required": ["id", "estimated_frame_cost", "credits_charged"], "description": "Success" } } @@ -1785,18 +1394,10 @@ "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" } } } } @@ -1807,21 +1408,10 @@ "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" } } } } @@ -1832,18 +1422,10 @@ "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" } } } } @@ -1854,21 +1436,10 @@ "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" } } } } @@ -1880,25 +1451,16 @@ "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", @@ -1935,9 +1497,7 @@ "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": { @@ -1978,9 +1538,7 @@ "example": "api-assets/id/1234.mp4" } }, - "required": [ - "video_file_path" - ], + "required": ["video_file_path"], "description": "Provide the assets for auto subtitle generator" }, "style": { @@ -1988,12 +1546,7 @@ "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": { @@ -2051,12 +1604,7 @@ "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"] } } } @@ -2080,11 +1628,7 @@ "example": 450 } }, - "required": [ - "id", - "estimated_frame_cost", - "credits_charged" - ], + "required": ["id", "estimated_frame_cost", "credits_charged"], "description": "Success" } } @@ -2096,18 +1640,10 @@ "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" } } } } @@ -2118,21 +1654,10 @@ "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" } } } } @@ -2143,18 +1668,10 @@ "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" } } } } @@ -2165,21 +1682,10 @@ "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" } } } } @@ -2191,25 +1697,16 @@ "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", @@ -2246,9 +1743,7 @@ "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": { @@ -2284,19 +1779,13 @@ "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", @@ -2304,10 +1793,7 @@ "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" }, @@ -2332,10 +1818,7 @@ "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`.", @@ -2348,10 +1831,7 @@ }, "video_source": { "type": "string", - "enum": [ - "file", - "youtube" - ], + "enum": ["file", "youtube"], "description": "Choose your video source.", "example": "file" }, @@ -2366,17 +1846,11 @@ "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"] } } } @@ -2400,11 +1874,7 @@ "example": 450 } }, - "required": [ - "id", - "estimated_frame_cost", - "credits_charged" - ], + "required": ["id", "estimated_frame_cost", "credits_charged"], "description": "Success" } } @@ -2416,18 +1886,10 @@ "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" } } } } @@ -2438,21 +1900,10 @@ "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" } } } } @@ -2463,18 +1914,10 @@ "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" } } } } @@ -2485,21 +1928,10 @@ "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" } } } } @@ -2511,25 +1943,16 @@ "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", @@ -2566,9 +1989,7 @@ "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": { @@ -2616,17 +2037,13 @@ }, "resolution": { "type": "string", - "enum": [ - "480p", - "720p", - "1080p" - ], + "enum": ["480p", "720p", "1080p"], "example": "720p", "description": "Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers.\n\n* **`ltx-2`**: Supports 480p, 720p, 1080p.\n* **`wan-2.2`**: Supports 480p, 720p, 1080p.\n* **`seedance`**: Supports 480p, 720p, 1080p.\n* **`seedance-2.0`**: Supports 480p, 720p.\n* **`kling-2.5`**: Supports 720p, 1080p.\n* **`kling-3.0`**: Supports 720p, 1080p.\n* **`sora-2`**: Supports 720p.\n* **`veo3.1`**: Supports 720p, 1080p.\n* **`veo3.1-lite`**: Supports 720p, 1080p.\n\nLegacy models:\n* **`kling-1.6`**: Supports 720p, 1080p." }, "audio": { "type": "boolean", - "description": "Whether to include audio in the video. Defaults to `false` if not specified.\n\nAudio support varies by model:\n* **`ltx-2`**: Automatically included with no extra credits\n* **`wan-2.2`**: Not supported\n* **`seedance`**: Not supported\n* **`seedance-2.0`**: Not supported\n* **`kling-2.5`**: Automatically included with no extra credits\n* **`kling-3.0`**: Toggle-able (can enable/disable)\n* **`sora-2`**: Automatically included with no extra credits\n* **`veo3.1`**: Toggle-able (can enable/disable)\n* **`veo3.1-lite`**: Toggle-able (can enable/disable)\n\nLegacy models:\n* **`kling-1.6`**: Not supported", + "description": "Whether to include audio in the video. Defaults to `false` if not specified.\n\nAudio support varies by model:\n* **`ltx-2`**: Automatically included with no extra credits\n* **`wan-2.2`**: Not supported\n* **`seedance`**: Not supported\n* **`seedance-2.0`**: Automatically included with no extra credits\n* **`kling-2.5`**: Automatically included with no extra credits\n* **`kling-3.0`**: Toggle-able (can enable/disable)\n* **`sora-2`**: Automatically included with no extra credits\n* **`veo3.1`**: Toggle-able (can enable/disable)\n* **`veo3.1-lite`**: Toggle-able (can enable/disable)\n\nLegacy models:\n* **`kling-1.6`**: Not supported", "example": true }, "style": { @@ -2656,16 +2073,11 @@ "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"] } } } @@ -2689,11 +2101,7 @@ "example": 450 } }, - "required": [ - "id", - "estimated_frame_cost", - "credits_charged" - ], + "required": ["id", "estimated_frame_cost", "credits_charged"], "description": "Success" } } @@ -2705,18 +2113,10 @@ "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" } } } } @@ -2727,21 +2127,10 @@ "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" } } } } @@ -2752,18 +2141,10 @@ "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" } } } } @@ -2774,21 +2155,10 @@ "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" } } } } @@ -2800,25 +2170,16 @@ "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", @@ -2855,9 +2216,7 @@ "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": { @@ -2905,10 +2264,7 @@ }, "video_source": { "type": "string", - "enum": [ - "file", - "youtube" - ], + "enum": ["file", "youtube"], "description": "Choose your video source.", "example": "file" }, @@ -2923,10 +2279,7 @@ "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": { @@ -2935,11 +2288,7 @@ "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" } @@ -2947,11 +2296,7 @@ "description": "Attributes used to dictate the style of the output" } }, - "required": [ - "start_seconds", - "end_seconds", - "assets" - ] + "required": ["start_seconds", "end_seconds", "assets"] } } } @@ -2975,11 +2320,7 @@ "example": 450 } }, - "required": [ - "id", - "estimated_frame_cost", - "credits_charged" - ], + "required": ["id", "estimated_frame_cost", "credits_charged"], "description": "Success" } } @@ -2991,18 +2332,10 @@ "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" } } } } @@ -3013,21 +2346,10 @@ "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" } } } } @@ -3038,18 +2360,10 @@ "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" } } } } @@ -3060,21 +2374,10 @@ "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" } } } } @@ -3086,25 +2389,16 @@ "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", @@ -3141,9 +2435,7 @@ "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": { @@ -3177,10 +2469,7 @@ "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" }, @@ -3270,22 +2559,14 @@ "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." }, @@ -3311,19 +2592,14 @@ "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" }, @@ -3338,18 +2614,11 @@ "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"] } } } @@ -3373,11 +2642,7 @@ "example": 450 } }, - "required": [ - "id", - "estimated_frame_cost", - "credits_charged" - ], + "required": ["id", "estimated_frame_cost", "credits_charged"], "description": "Success" } } @@ -3389,18 +2654,10 @@ "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" } } } } @@ -3411,21 +2668,10 @@ "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" } } } } @@ -3436,18 +2682,10 @@ "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" } } } } @@ -3458,21 +2696,10 @@ "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" } } } } @@ -3484,25 +2711,16 @@ "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", @@ -3539,9 +2757,7 @@ "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": { @@ -3568,21 +2784,13 @@ }, "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`**: Supports 9:16, 16:9, 1:1.\n* **`wan-2.2`**: Supports 9:16, 16:9, 1:1.\n* **`seedance`**: Supports 9:16, 16:9, 1:1.\n* **`seedance-2.0`**: 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* **`sora-2`**: Supports 9:16, 16:9.\n* **`veo3.1`**: Supports 9:16, 16:9.\n* **`veo3.1-lite`**: Supports 9:16, 16:9.\n\nLegacy models:\n* **`kling-1.6`**: Supports 9:16, 16:9, 1:1.", "example": "16:9" }, "resolution": { "type": "string", - "enum": [ - "480p", - "720p", - "1080p" - ], + "enum": ["480p", "720p", "1080p"], "example": "720p", "description": "Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers.\n\n* **`ltx-2`**: Supports 480p, 720p, 1080p.\n* **`wan-2.2`**: Supports 480p, 720p, 1080p.\n* **`seedance`**: Supports 480p, 720p, 1080p.\n* **`seedance-2.0`**: Supports 480p, 720p.\n* **`kling-2.5`**: Supports 720p, 1080p.\n* **`kling-3.0`**: Supports 720p, 1080p.\n* **`sora-2`**: Supports 720p.\n* **`veo3.1`**: Supports 720p, 1080p.\n* **`veo3.1-lite`**: Supports 720p, 1080p.\n\nLegacy models:\n* **`kling-1.6`**: Supports 720p, 1080p." }, @@ -3609,7 +2817,7 @@ }, "audio": { "type": "boolean", - "description": "Whether to include audio in the video. Defaults to `false` if not specified.\n\nAudio support varies by model:\n* **`ltx-2`**: Automatically included with no extra credits\n* **`wan-2.2`**: Not supported\n* **`seedance`**: Not supported\n* **`seedance-2.0`**: Not supported\n* **`kling-2.5`**: Automatically included with no extra credits\n* **`kling-3.0`**: Toggle-able (can enable/disable)\n* **`sora-2`**: Automatically included with no extra credits\n* **`veo3.1`**: Toggle-able (can enable/disable)\n* **`veo3.1-lite`**: Toggle-able (can enable/disable)\n\nLegacy models:\n* **`kling-1.6`**: Not supported", + "description": "Whether to include audio in the video. Defaults to `false` if not specified.\n\nAudio support varies by model:\n* **`ltx-2`**: Automatically included with no extra credits\n* **`wan-2.2`**: Not supported\n* **`seedance`**: Not supported\n* **`seedance-2.0`**: Automatically included with no extra credits\n* **`kling-2.5`**: Automatically included with no extra credits\n* **`kling-3.0`**: Toggle-able (can enable/disable)\n* **`sora-2`**: Automatically included with no extra credits\n* **`veo3.1`**: Toggle-able (can enable/disable)\n* **`veo3.1-lite`**: Toggle-able (can enable/disable)\n\nLegacy models:\n* **`kling-1.6`**: Not supported", "example": true }, "style": { @@ -3623,15 +2831,10 @@ "description": "The prompt used for the video." } }, - "required": [ - "prompt" - ] + "required": ["prompt"] } }, - "required": [ - "end_seconds", - "style" - ] + "required": ["end_seconds", "style"] } } } @@ -3655,11 +2858,7 @@ "example": 450 } }, - "required": [ - "id", - "estimated_frame_cost", - "credits_charged" - ], + "required": ["id", "estimated_frame_cost", "credits_charged"], "description": "Success" } } @@ -3671,18 +2870,10 @@ "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" } } } } @@ -3693,21 +2884,10 @@ "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" } } } } @@ -3718,18 +2898,10 @@ "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" } } } } @@ -3740,21 +2912,10 @@ "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" } } } } @@ -3766,25 +2927,16 @@ "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", @@ -3821,18 +2973,13 @@ "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." } ], @@ -3858,14 +3005,7 @@ }, "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" }, @@ -3879,10 +3019,7 @@ "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", "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." @@ -3908,10 +3045,7 @@ "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" } }, @@ -3929,10 +3063,7 @@ "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 @@ -3962,18 +3093,10 @@ "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" } } } } @@ -3984,21 +3107,10 @@ "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" } } } } @@ -4009,18 +3121,10 @@ "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" } } } } @@ -4031,31 +3135,16 @@ "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", @@ -4090,44 +3179,29 @@ "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" } } } } @@ -4138,21 +3212,10 @@ "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" } } } } @@ -4163,18 +3226,10 @@ "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" } } } } @@ -4185,31 +3240,16 @@ "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", @@ -4246,9 +3286,7 @@ "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": { @@ -4282,26 +3320,16 @@ }, "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"] } } } @@ -4325,11 +3353,7 @@ "example": 25 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -4341,18 +3365,10 @@ "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" } } } } @@ -4363,21 +3379,10 @@ "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" } } } } @@ -4388,18 +3393,10 @@ "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" } } } } @@ -4410,21 +3407,10 @@ "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" } } } } @@ -4436,25 +3422,16 @@ "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", @@ -4491,9 +3468,7 @@ "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": { @@ -4520,9 +3495,7 @@ "example": "api-assets/id/1234.png" } }, - "required": [ - "image_file_path" - ], + "required": ["image_file_path"], "description": "Provide the assets for face editor" }, "style": { @@ -4664,10 +3637,7 @@ "description": "Face editing parameters" } }, - "required": [ - "assets", - "style" - ] + "required": ["assets", "style"] } } } @@ -4691,11 +3661,7 @@ "example": 1 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -4707,18 +3673,10 @@ "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" } } } } @@ -4729,21 +3687,10 @@ "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" } } } } @@ -4754,18 +3701,10 @@ "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" } } } } @@ -4776,21 +3715,10 @@ "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" } } } } @@ -4802,25 +3730,16 @@ "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", @@ -4857,9 +3776,7 @@ "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": { @@ -4887,25 +3804,17 @@ "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"] } } } @@ -4929,11 +3838,7 @@ "example": 50 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -4945,18 +3850,10 @@ "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" } } } } @@ -4967,21 +3864,10 @@ "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" } } } } @@ -4992,18 +3878,10 @@ "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" } } } } @@ -5014,21 +3892,10 @@ "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" } } } } @@ -5040,25 +3907,16 @@ "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", @@ -5095,9 +3953,7 @@ "post": { "description": "Edit images with AI.", "summary": "AI Image Editor", - "tags": [ - "Image Projects" - ], + "tags": ["Image Projects"], "parameters": [], "operationId": "aiImageEditor.createImage", "requestBody": { @@ -5116,12 +3972,7 @@ }, "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 @@ -5142,28 +3993,13 @@ }, "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\nNote: Resolution availability depends on the model and your subscription tier.", "example": "1k" }, @@ -5178,34 +4014,23 @@ "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"] } } } @@ -5229,11 +4054,7 @@ "example": 50 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -5245,18 +4066,10 @@ "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" } } } } @@ -5267,21 +4080,10 @@ "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" } } } } @@ -5292,18 +4094,10 @@ "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" } } } } @@ -5314,21 +4108,10 @@ "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" } } } } @@ -5340,25 +4123,16 @@ "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", @@ -5395,9 +4169,7 @@ "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": { @@ -5433,15 +4205,11 @@ "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"] } } } @@ -5465,11 +4233,7 @@ "example": 50 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -5481,18 +4245,10 @@ "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" } } } } @@ -5503,21 +4259,10 @@ "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" } } } } @@ -5528,18 +4273,10 @@ "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" } } } } @@ -5550,21 +4287,10 @@ "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" } } } } @@ -5576,25 +4302,16 @@ "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", @@ -5631,9 +4348,7 @@ "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": { @@ -5669,29 +4384,19 @@ "nano-banana-pro", "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, 2, 3, 4\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\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: 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\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\nNote: Resolution availability depends on the model and your subscription tier.", "example": "auto" }, @@ -5748,16 +4453,11 @@ "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"] } } } @@ -5781,11 +4481,7 @@ "example": 5 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -5797,18 +4493,10 @@ "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" } } } } @@ -5819,21 +4507,10 @@ "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" } } } } @@ -5844,18 +4521,10 @@ "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" } } } } @@ -5866,21 +4535,10 @@ "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" } } } } @@ -5892,25 +4550,16 @@ "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", @@ -5947,9 +4596,7 @@ "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": { @@ -5976,20 +4623,14 @@ "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", @@ -6001,17 +4642,11 @@ "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"] } } } @@ -6035,11 +4670,7 @@ "example": 50 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -6051,18 +4682,10 @@ "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" } } } } @@ -6073,21 +4696,10 @@ "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" } } } } @@ -6098,18 +4710,10 @@ "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" } } } } @@ -6120,21 +4724,10 @@ "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" } } } } @@ -6146,25 +4739,16 @@ "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", @@ -6201,9 +4785,7 @@ "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": { @@ -6256,15 +4838,10 @@ "example": false } }, - "required": [ - "topic", - "template" - ] + "required": ["topic", "template"] } }, - "required": [ - "style" - ] + "required": ["style"] } } } @@ -6288,11 +4865,7 @@ "example": 10 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -6304,18 +4877,10 @@ "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" } } } } @@ -6326,21 +4891,10 @@ "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" } } } } @@ -6351,18 +4905,10 @@ "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" } } } } @@ -6373,21 +4919,10 @@ "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" } } } } @@ -6399,25 +4934,16 @@ "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", @@ -6454,9 +4980,7 @@ "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": { @@ -6487,15 +5011,10 @@ "example": "Watercolor" } }, - "required": [ - "art_style" - ] + "required": ["art_style"] } }, - "required": [ - "content", - "style" - ] + "required": ["content", "style"] } } } @@ -6519,11 +5038,7 @@ "example": 0 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -6535,18 +5050,10 @@ "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" } } } } @@ -6557,21 +5064,10 @@ "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" } } } } @@ -6582,18 +5078,10 @@ "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" } } } } @@ -6604,21 +5092,10 @@ "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" } } } } @@ -6630,25 +5107,16 @@ "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", @@ -6681,13 +5149,163 @@ ] } }, + "/v1/body-swap": { + "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"], + "parameters": [], + "operationId": "bodySwap.createImage", + "requestBody": { + "required": true, + "description": "Body", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Give your image a custom name for easy identification.", + "example": "My Body Swap image", + "default": "Body Swap - dateTime" + }, + "resolution": { + "type": "string", + "enum": ["640px", "1k", "2k", "4k"], + "description": "Output resolution. Determines credits charged for the run.", + "example": "1k" + }, + "assets": { + "type": "object", + "properties": { + "person_file_path": { + "type": "string", + "minLength": 1, + "description": "Image of the person to place into the scene. 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" + }, + "scene_file_path": { + "type": "string", + "minLength": 1, + "description": "Target scene image (background). 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/5678.png" + } + }, + "required": ["person_file_path", "scene_file_path"], + "description": "Person image and scene image for body swap" + } + }, + "required": ["resolution", "assets"] + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "cuid-example", + "description": "Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads." + }, + "credits_charged": { + "type": "integer", + "description": "The amount of credits deducted from your account to generate the image. We charge credits right when the request is made. \n\nIf an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.", + "example": 100 + } + }, + "required": ["id", "frame_cost", "credits_charged"], + "description": "Success" + } + } + } + }, + "400": { + "description": "Invalid Request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "message": { "type": "string" } }, + "required": ["message"], + "description": "The request is invalid", + "example": { "message": "Missing request body" } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "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"], + "description": "The request requires payment", + "example": { "message": "Payment required" } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "message": { "type": "string", "enum": ["Not Found"] } }, + "required": ["message"], + "description": "Requested resource is not found", + "example": { "message": "Not Found" } + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { "type": "string", "example": "Unable to create image" } + }, + "required": ["message"], + "description": "Unprocessable Entity" + } + } + } + } + }, + "security": [{ "bearerAuth": [] }] + } + }, "/v1/face-swap-photo": { "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": { @@ -6710,10 +5328,7 @@ "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" }, @@ -6739,10 +5354,7 @@ "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`.", @@ -6760,15 +5372,11 @@ "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"] } } } @@ -6792,11 +5400,7 @@ "example": 10 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -6808,18 +5412,10 @@ "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" } } } } @@ -6830,21 +5426,10 @@ "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" } } } } @@ -6855,18 +5440,10 @@ "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" } } } } @@ -6877,21 +5454,10 @@ "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" } } } } @@ -6903,25 +5469,16 @@ "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", @@ -6958,9 +5515,7 @@ "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": { @@ -6998,16 +5553,11 @@ "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"] } } } @@ -7031,11 +5581,7 @@ "example": 10 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -7047,18 +5593,10 @@ "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" } } } } @@ -7069,21 +5607,10 @@ "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" } } } } @@ -7094,18 +5621,10 @@ "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" } } } } @@ -7116,21 +5635,10 @@ "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" } } } } @@ -7142,25 +5650,16 @@ "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", @@ -7197,9 +5696,7 @@ "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": { @@ -7230,15 +5727,11 @@ "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"] } } } @@ -7262,11 +5755,7 @@ "example": 5 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -7278,18 +5767,10 @@ "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" } } } } @@ -7300,21 +5781,10 @@ "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" } } } } @@ -7325,18 +5795,10 @@ "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" } } } } @@ -7347,21 +5809,10 @@ "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" } } } } @@ -7373,25 +5824,16 @@ "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", @@ -7428,9 +5870,7 @@ "post": { "description": "Colorize image. Each image costs 10 credits.", "summary": "Photo Colorizer", - "tags": [ - "Image Projects" - ], + "tags": ["Image Projects"], "parameters": [], "operationId": "photoColorizer.createImage", "requestBody": { @@ -7457,15 +5897,11 @@ "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"] } } } @@ -7489,11 +5925,7 @@ "example": 10 } }, - "required": [ - "id", - "frame_cost", - "credits_charged" - ], + "required": ["id", "frame_cost", "credits_charged"], "description": "Success" } } @@ -7505,18 +5937,10 @@ "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" } } } } @@ -7527,21 +5951,10 @@ "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" } } } } @@ -7552,18 +5965,10 @@ "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" } } } } @@ -7574,21 +5979,10 @@ "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" } } } } @@ -7600,25 +5994,16 @@ "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", @@ -7655,18 +6040,13 @@ "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." } ], @@ -7692,14 +6072,7 @@ }, "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" }, @@ -7708,10 +6081,7 @@ "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." @@ -7737,10 +6107,7 @@ "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" } }, @@ -7758,10 +6125,7 @@ "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 @@ -7789,18 +6153,10 @@ "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" } } } } @@ -7811,21 +6167,10 @@ "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" } } } } @@ -7836,18 +6181,10 @@ "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" } } } } @@ -7858,31 +6195,16 @@ "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", @@ -7917,44 +6239,29 @@ "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" } } } } @@ -7965,21 +6272,10 @@ "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" } } } } @@ -7990,18 +6286,10 @@ "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" } } } } @@ -8012,31 +6300,16 @@ "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", @@ -8073,9 +6346,7 @@ "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": { @@ -8308,20 +6579,12 @@ "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"] } } } @@ -8345,10 +6608,7 @@ "example": 1 } }, - "required": [ - "id", - "credits_charged" - ], + "required": ["id", "credits_charged"], "description": "Success" } } @@ -8360,18 +6620,10 @@ "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" } } } } @@ -8382,21 +6634,10 @@ "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" } } } } @@ -8407,18 +6648,10 @@ "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" } } } } @@ -8429,21 +6662,10 @@ "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" } } } } @@ -8455,25 +6677,16 @@ "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", @@ -8510,9 +6723,7 @@ "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": { @@ -8539,9 +6750,7 @@ "example": "api-assets/id/1234.mp3" } }, - "required": [ - "audio_file_path" - ], + "required": ["audio_file_path"], "description": "Provide the assets for voice cloning." }, "style": { @@ -8555,15 +6764,10 @@ "example": "Hello, this is my cloned voice." } }, - "required": [ - "prompt" - ] + "required": ["prompt"] } }, - "required": [ - "assets", - "style" - ] + "required": ["assets", "style"] } } } @@ -8587,10 +6791,7 @@ "example": 1 } }, - "required": [ - "id", - "credits_charged" - ], + "required": ["id", "credits_charged"], "description": "Success" } } @@ -8602,18 +6803,10 @@ "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" } } } } @@ -8624,21 +6817,10 @@ "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" } } } } @@ -8649,18 +6831,10 @@ "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" } } } } @@ -8671,21 +6845,10 @@ "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" } } } } @@ -8697,25 +6860,16 @@ "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", @@ -8765,26 +6919,10 @@ } }, "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" - } - ] -} \ No newline at end of file + "servers": [{ "url": "https://api.magichour.ai" }] +}