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 @@ -24,7 +24,7 @@ public partial interface IImageProjectsClient
/// "image_count": 1,<br/>
/// "model": "default",<br/>
/// "aspect_ratio": "1:1",<br/>
/// "resolution": "auto",<br/>
/// "resolution": "1k",<br/>
/// "style": {<br/>
/// "prompt": "Cool image",<br/>
/// "tool": "ai-anime-generator"<br/>
Expand Down Expand Up @@ -57,7 +57,7 @@ public partial interface IImageProjectsClient
/// "image_count": 1,<br/>
/// "model": "default",<br/>
/// "aspect_ratio": "1:1",<br/>
/// "resolution": "auto",<br/>
/// "resolution": "1k",<br/>
/// "style": {<br/>
/// "prompt": "Cool image",<br/>
/// "tool": "ai-anime-generator"<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public partial interface IVideoProjectsClient
/// Example: 0
/// </param>
/// <param name="endSeconds">
/// End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni-1.1`: 3s, LTX 2.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 45s.<br/>
/// End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni-1.1`: 3s, LTX 2.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 20s.<br/>
/// Example: 5
/// </param>
/// <param name="model">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ public partial interface IVideoProjectsClient
/// <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>
/// <remarks>
/// curl --request POST \<br/>
/// --url https://api.magichour.ai/v1/ai-video-translator \<br/>
/// --header 'accept: application/json' \<br/>
/// --header "authorization: Bearer $MAGIC_HOUR_API_KEY" \<br/>
/// --header 'content-type: application/json' \<br/>
/// --data '<br/>
/// {<br/>
/// "name": "My Video Translator video",<br/>
/// "start_seconds": 0,<br/>
/// "end_seconds": 15,<br/>
/// "target_language": "Spanish",<br/>
/// "resolution": "720p",<br/>
/// "assets": {<br/>
/// "video_file_path": "api-assets/id/1234.mp4"<br/>
/// }<br/>
/// }<br/>
/// '
/// </remarks>
global::System.Threading.Tasks.Task<global::MagicHour.AiVideoTranslatorCreateVideoResponse> AiVideoTranslatorCreateVideoAsync(

global::MagicHour.AiVideoTranslatorCreateVideoRequest request,
Expand Down Expand Up @@ -57,6 +76,25 @@ public partial interface IVideoProjectsClient
/// <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>
/// <remarks>
/// curl --request POST \<br/>
/// --url https://api.magichour.ai/v1/ai-video-translator \<br/>
/// --header 'accept: application/json' \<br/>
/// --header "authorization: Bearer $MAGIC_HOUR_API_KEY" \<br/>
/// --header 'content-type: application/json' \<br/>
/// --data '<br/>
/// {<br/>
/// "name": "My Video Translator video",<br/>
/// "start_seconds": 0,<br/>
/// "end_seconds": 15,<br/>
/// "target_language": "Spanish",<br/>
/// "resolution": "720p",<br/>
/// "assets": {<br/>
/// "video_file_path": "api-assets/id/1234.mp4"<br/>
/// }<br/>
/// }<br/>
/// '
/// </remarks>
global::System.Threading.Tasks.Task<global::MagicHour.AutoSDKHttpResponse<global::MagicHour.AiVideoTranslatorCreateVideoResponse>> AiVideoTranslatorCreateVideoAsResponseAsync(

global::MagicHour.AiVideoTranslatorCreateVideoRequest request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public partial interface IVideoProjectsClient
/// "name": "My Character Replace video",<br/>
/// "start_seconds": 0,<br/>
/// "end_seconds": 15,<br/>
/// "model": "wan-animate",<br/>
/// "resolution": "720p",<br/>
/// "assets": {<br/>
/// "video_file_path": "api-assets/id/1234.mp4",<br/>
Expand Down Expand Up @@ -91,6 +92,7 @@ public partial interface IVideoProjectsClient
/// "name": "My Character Replace video",<br/>
/// "start_seconds": 0,<br/>
/// "end_seconds": 15,<br/>
/// "model": "wan-animate",<br/>
/// "resolution": "720p",<br/>
/// "assets": {<br/>
/// "video_file_path": "api-assets/id/1234.mp4",<br/>
Expand Down Expand Up @@ -142,8 +144,15 @@ public partial interface IVideoProjectsClient
/// End time of your clip (seconds). Must be greater than start_seconds.<br/>
/// Example: 15
/// </param>
/// <param name="model">
/// Model to use. Defaults to `wan-animate`.<br/>
/// * **`wan-animate`**: 480p, 720p. Supports `points` subject selection.<br/>
/// * **`kling-3.0`**: 720p, 1080p. Clips of 3–10 seconds in `replace` mode or 3–30 seconds in `animate` mode. Picks the main person automatically, so `points` are rejected.<br/>
/// Default Value: wan-animate<br/>
/// Example: wan-animate
/// </param>
/// <param name="resolution">
/// Output video resolution. Defaults to 480p, the lowest resolution available on your plan.<br/>
/// Output video resolution. Must be supported by `model`. Defaults to the lowest resolution available on your plan for that model.<br/>
/// Example: 720p
/// </param>
/// <param name="assets">
Expand All @@ -161,6 +170,7 @@ public partial interface IVideoProjectsClient
global::MagicHour.CharacterReplaceCreateVideoRequestAssets assets,
string? name = default,
float? startSeconds = default,
global::MagicHour.CharacterReplaceCreateVideoRequestModel? model = default,
global::MagicHour.CharacterReplaceCreateVideoRequestResolution? resolution = default,
global::MagicHour.CharacterReplaceCreateVideoRequestStyle? style = default,
global::MagicHour.AutoSDKRequestOptions? requestOptions = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public partial interface IVideoProjectsClient
/// * **`seedance-2.0`**: any integer from 4 to 15<br/>
/// * **`seedance-2.0-mini`**: any integer from 4 to 15<br/>
/// * **`seedance-2.5`**: any integer from 4 to 30<br/>
/// * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60<br/>
/// * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56<br/>
/// * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56<br/>
/// * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15<br/>
Expand All @@ -163,7 +162,6 @@ public partial interface IVideoProjectsClient
/// * `seedance-2.0`: Best for reference-led clips with precise subject control.<br/>
/// * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.<br/>
/// * `seedance-2.5`: Best for premium realism, detail, and natural motion.<br/>
/// * `sora-2`: Best for creative concepts and longer clips with audio.<br/>
/// * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.<br/>
/// * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1.<br/>
/// * `wan-2.2`: Best for physical motion, action, and camera movement.<br/>
Expand All @@ -183,7 +181,6 @@ public partial interface IVideoProjectsClient
/// * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.<br/>
/// * **`seedance-2.0-mini`**: Supports 480p, 720p.<br/>
/// * **`seedance-2.5`**: Supports 480p, 720p, 1080p.<br/>
/// * **`sora-2`**: Supports 720p.<br/>
/// * **`veo3.1`**: Supports 720p, 1080p.<br/>
/// * **`veo3.1-lite`**: Supports 720p, 1080p.<br/>
/// * **`wan-2.2`**: Supports 480p, 720p, 1080p.<br/>
Expand All @@ -202,7 +199,6 @@ public partial interface IVideoProjectsClient
/// * **`seedance-2.0`**: Toggle-able: no additional credits for audio<br/>
/// * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio<br/>
/// * **`seedance-2.5`**: Toggle-able: no additional credits for audio<br/>
/// * **`sora-2`**: Toggle-able: no additional credits for audio<br/>
/// * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled<br/>
/// * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled<br/>
/// * **`wan-2.2`**: Not supported<br/>
Expand All @@ -213,7 +209,7 @@ public partial interface IVideoProjectsClient
/// Attributed used to dictate the style of the output
/// </param>
/// <param name="assets">
/// Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
/// Provide the assets for image-to-video.
/// </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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public partial interface IVideoProjectsClient
/// * **`seedance-2.0`**: any integer from 4 to 15<br/>
/// * **`seedance-2.0-mini`**: any integer from 4 to 15<br/>
/// * **`seedance-2.5`**: any integer from 4 to 30<br/>
/// * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60<br/>
/// * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56<br/>
/// * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56<br/>
/// * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15<br/>
Expand All @@ -168,7 +167,6 @@ public partial interface IVideoProjectsClient
/// * **`seedance-2.0`**: Supports 9:16, 16:9, 1:1.<br/>
/// * **`seedance-2.0-mini`**: Supports 9:16, 16:9, 1:1.<br/>
/// * **`seedance-2.5`**: Supports 9:16, 16:9, 1:1.<br/>
/// * **`sora-2`**: Supports 9:16, 16:9.<br/>
/// * **`veo3.1`**: Supports 9:16, 16:9.<br/>
/// * **`veo3.1-lite`**: Supports 9:16, 16:9.<br/>
/// * **`wan-2.2`**: Supports 9:16, 16:9, 1:1.<br/>
Expand All @@ -186,7 +184,6 @@ public partial interface IVideoProjectsClient
/// * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.<br/>
/// * **`seedance-2.0-mini`**: Supports 480p, 720p.<br/>
/// * **`seedance-2.5`**: Supports 480p, 720p, 1080p.<br/>
/// * **`sora-2`**: Supports 720p.<br/>
/// * **`veo3.1`**: Supports 720p, 1080p.<br/>
/// * **`veo3.1-lite`**: Supports 720p, 1080p.<br/>
/// * **`wan-2.2`**: Supports 480p, 720p, 1080p.<br/>
Expand All @@ -205,7 +202,6 @@ public partial interface IVideoProjectsClient
/// * `seedance-2.0`: Best for reference-led clips with precise subject control.<br/>
/// * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio.<br/>
/// * `seedance-2.5`: Best for premium realism, detail, and natural motion.<br/>
/// * `sora-2`: Best for creative concepts and longer clips with audio.<br/>
/// * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.<br/>
/// * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1.<br/>
/// * `wan-2.2`: Best for physical motion, action, and camera movement.<br/>
Expand All @@ -226,7 +222,6 @@ public partial interface IVideoProjectsClient
/// * **`seedance-2.0`**: Toggle-able: no additional credits for audio<br/>
/// * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio<br/>
/// * **`seedance-2.5`**: Toggle-able: no additional credits for audio<br/>
/// * **`sora-2`**: Toggle-able: no additional credits for audio<br/>
/// * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled<br/>
/// * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled<br/>
/// * **`wan-2.2`**: Not supported<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ partial void ProcessAiImageGeneratorCreateImageResponseContent(
/// "image_count": 1,<br/>
/// "model": "default",<br/>
/// "aspect_ratio": "1:1",<br/>
/// "resolution": "auto",<br/>
/// "resolution": "1k",<br/>
/// "style": {<br/>
/// "prompt": "Cool image",<br/>
/// "tool": "ai-anime-generator"<br/>
Expand Down Expand Up @@ -104,7 +104,7 @@ partial void ProcessAiImageGeneratorCreateImageResponseContent(
/// "image_count": 1,<br/>
/// "model": "default",<br/>
/// "aspect_ratio": "1:1",<br/>
/// "resolution": "auto",<br/>
/// "resolution": "1k",<br/>
/// "style": {<br/>
/// "prompt": "Cool image",<br/>
/// "tool": "ai-anime-generator"<br/>
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 CharacterReplaceCreateVideoRequestModelJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::MagicHour.CharacterReplaceCreateVideoRequestModel>
{
/// <inheritdoc />
public override global::MagicHour.CharacterReplaceCreateVideoRequestModel 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.CharacterReplaceCreateVideoRequestModelExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

writer.WriteStringValue(global::MagicHour.CharacterReplaceCreateVideoRequestModelExtensions.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 CharacterReplaceCreateVideoRequestModelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::MagicHour.CharacterReplaceCreateVideoRequestModel?>
{
/// <inheritdoc />
public override global::MagicHour.CharacterReplaceCreateVideoRequestModel? 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.CharacterReplaceCreateVideoRequestModelExtensions.ToEnum(stringValue);
}

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

return default;
}

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