Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public partial interface IImageProjectsClient
/// - `z-image-turbo` - 640px, 1k, 2k<br/>
/// Note: Resolution availability depends on the model and your subscription tier.<br/>
/// Default Value: auto<br/>
/// Example: auto
/// Example: 1k
/// </param>
/// <param name="style">
/// The art style to use for image generation.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#nullable enable

namespace MagicHour
{
public partial interface IVideoProjectsClient
{
/// <summary>
/// AI Video Translator<br/>
/// **What this API does**<br/>
/// Create the same Video Translator 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.<br/>
/// <br/>
/// **Good for**<br/>
/// - Automation and batch processing <br/>
/// - Adding video translator into apps, pipelines, or tools <br/>
/// **How it works (3 steps)**<br/>
/// 1) 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`. <br/>
/// 2) Send a request to create a video translator job with the basic fields. <br/>
/// 3) Check the job status until it's `complete`, then download the result from `downloads`.<br/>
/// **Key options**<br/>
/// - Inputs: usually a file, sometimes a YouTube link, depending on project type <br/>
/// - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes <br/>
/// - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt <br/>
/// **Cost** <br/>
/// Credits 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.<br/>
/// For detailed examples, see the [product page](https://magichour.ai/products/ai-video-translator).
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::MagicHour.ApiException"></exception>
global::System.Threading.Tasks.Task<global::MagicHour.AiVideoTranslatorCreateVideoResponse> AiVideoTranslatorCreateVideoAsync(

global::MagicHour.AiVideoTranslatorCreateVideoRequest request,
global::MagicHour.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// AI Video Translator<br/>
/// **What this API does**<br/>
/// Create the same Video Translator 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.<br/>
/// <br/>
/// **Good for**<br/>
/// - Automation and batch processing <br/>
/// - Adding video translator into apps, pipelines, or tools <br/>
/// **How it works (3 steps)**<br/>
/// 1) 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`. <br/>
/// 2) Send a request to create a video translator job with the basic fields. <br/>
/// 3) Check the job status until it's `complete`, then download the result from `downloads`.<br/>
/// **Key options**<br/>
/// - Inputs: usually a file, sometimes a YouTube link, depending on project type <br/>
/// - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes <br/>
/// - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt <br/>
/// **Cost** <br/>
/// Credits 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.<br/>
/// For detailed examples, see the [product page](https://magichour.ai/products/ai-video-translator).
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::MagicHour.ApiException"></exception>
global::System.Threading.Tasks.Task<global::MagicHour.AutoSDKHttpResponse<global::MagicHour.AiVideoTranslatorCreateVideoResponse>> AiVideoTranslatorCreateVideoAsResponseAsync(

global::MagicHour.AiVideoTranslatorCreateVideoRequest request,
global::MagicHour.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// AI Video Translator<br/>
/// **What this API does**<br/>
/// Create the same Video Translator 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.<br/>
/// <br/>
/// **Good for**<br/>
/// - Automation and batch processing <br/>
/// - Adding video translator into apps, pipelines, or tools <br/>
/// **How it works (3 steps)**<br/>
/// 1) 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`. <br/>
/// 2) Send a request to create a video translator job with the basic fields. <br/>
/// 3) Check the job status until it's `complete`, then download the result from `downloads`.<br/>
/// **Key options**<br/>
/// - Inputs: usually a file, sometimes a YouTube link, depending on project type <br/>
/// - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes <br/>
/// - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt <br/>
/// **Cost** <br/>
/// Credits 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.<br/>
/// For detailed examples, see the [product page](https://magichour.ai/products/ai-video-translator).
/// </summary>
/// <param name="name">
/// Give your video a custom name for easy identification.<br/>
/// Default Value: Video Translator - dateTime<br/>
/// Example: My Video Translator video
/// </param>
/// <param name="startSeconds">
/// Start time of your clip (seconds). Must be ≥ 0.<br/>
/// Default Value: 0<br/>
/// Example: 0
/// </param>
/// <param name="endSeconds">
/// End time of your clip (seconds). Must be greater than start_seconds. The clip must be 1-30 seconds long.<br/>
/// Example: 15
/// </param>
/// <param name="targetLanguage">
/// Language to translate the video's speech into.<br/>
/// Example: Spanish
/// </param>
/// <param name="resolution">
/// Output video resolution. Defaults to 480p. 720p and 1080p require a paid plan.<br/>
/// Example: 720p
/// </param>
/// <param name="assets">
/// Source video for the translation job.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::MagicHour.AiVideoTranslatorCreateVideoResponse> AiVideoTranslatorCreateVideoAsync(
float endSeconds,
global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage targetLanguage,
global::MagicHour.AiVideoTranslatorCreateVideoRequestAssets assets,
string? name = default,
float? startSeconds = default,
global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution? resolution = default,
global::MagicHour.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ partial void ProcessAiImageGeneratorCreateImageResponseContent(
/// - `z-image-turbo` - 640px, 1k, 2k<br/>
/// Note: Resolution availability depends on the model and your subscription tier.<br/>
/// Default Value: auto<br/>
/// Example: auto
/// Example: 1k
/// </param>
/// <param name="style">
/// The art style to use for image generation.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace MagicHour.JsonConverters
{
/// <inheritdoc />
public sealed class AiVideoTranslatorCreateVideoRequestResolutionJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution>
{
/// <inheritdoc />
public override global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution 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.AiVideoTranslatorCreateVideoRequestResolutionExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::MagicHour.AiVideoTranslatorCreateVideoRequestResolutionExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace MagicHour.JsonConverters
{
/// <inheritdoc />
public sealed class AiVideoTranslatorCreateVideoRequestResolutionNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution?>
{
/// <inheritdoc />
public override global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution? 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.AiVideoTranslatorCreateVideoRequestResolutionExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::MagicHour.AiVideoTranslatorCreateVideoRequestResolution? 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.AiVideoTranslatorCreateVideoRequestResolutionExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace MagicHour.JsonConverters
{
/// <inheritdoc />
public sealed class AiVideoTranslatorCreateVideoRequestTargetLanguageJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage>
{
/// <inheritdoc />
public override global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage 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.AiVideoTranslatorCreateVideoRequestTargetLanguageExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguageExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace MagicHour.JsonConverters
{
/// <inheritdoc />
public sealed class AiVideoTranslatorCreateVideoRequestTargetLanguageNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage?>
{
/// <inheritdoc />
public override global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage? 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.AiVideoTranslatorCreateVideoRequestTargetLanguageExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::MagicHour.AiVideoTranslatorCreateVideoRequestTargetLanguage? 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.AiVideoTranslatorCreateVideoRequestTargetLanguageExtensions.ToValueString(value.Value));
}
}
}
}
Loading
Loading