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 @@ -99,9 +99,9 @@ public partial interface IVideoProjectsClient
/// <param name="style">
/// Attributes used to dictate the style of the output
/// </param>
/// <param name="maxResolution">
/// Constrains the larger dimension (height or width) of the output video. Allows you to set a lower resolution than your plan's maximum if desired. The value is capped by your plan's max resolution.<br/>
/// Example: 512
/// <param name="resolution">
/// Output preset. Overrides `max_resolution`. Defaults to 480p in prompted mode; realistic mode uses the mapped plan maximum.<br/>
/// Example: 480p
/// </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 All @@ -112,7 +112,7 @@ public partial interface IVideoProjectsClient
global::MagicHour.AiTalkingPhotoCreateTalkingPhotoRequestAssets assets,
string? name = default,
global::MagicHour.AiTalkingPhotoCreateTalkingPhotoRequestStyle? style = default,
int? maxResolution = default,
global::MagicHour.AiTalkingPhotoCreateTalkingPhotoRequestResolution? resolution = default,
global::MagicHour.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#nullable enable

namespace MagicHour
{
public partial interface IVideoProjectsClient
{
/// <summary>
/// AI UGC Ad Generator<br/>
/// Create a spoken UGC video from a prepared image and script. Returns a project ID; poll GET /v1/video-projects/{id} for status and downloads. To compose an image, generate the image separately with the Image Editor API and supply its download URL.
/// </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.AiUgcAdCreateVideoResponse> AiUgcAdCreateVideoAsync(

global::MagicHour.AiUgcAdCreateVideoRequest request,
global::MagicHour.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// AI UGC Ad Generator<br/>
/// Create a spoken UGC video from a prepared image and script. Returns a project ID; poll GET /v1/video-projects/{id} for status and downloads. To compose an image, generate the image separately with the Image Editor API and supply its download URL.
/// </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.AiUgcAdCreateVideoResponse>> AiUgcAdCreateVideoAsResponseAsync(

global::MagicHour.AiUgcAdCreateVideoRequest request,
global::MagicHour.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// AI UGC Ad Generator<br/>
/// Create a spoken UGC video from a prepared image and script. Returns a project ID; poll GET /v1/video-projects/{id} for status and downloads. To compose an image, generate the image separately with the Image Editor API and supply its download URL.
/// </summary>
/// <param name="assets"></param>
/// <param name="script">
/// The words the actor should speak. Character limits apply after trimming:<br/>
/// * kling-3.0: 2500 characters.<br/>
/// * ltx-2.5: 1981 characters.<br/>
/// * veo3.1: 2500 characters.<br/>
/// LTX's dialogue wrapper counts toward its model prompt limit.<br/>
/// Example: Meet your new everyday essential.
/// </param>
/// <param name="endSeconds">
/// Video duration in seconds. Supported values by model:<br/>
/// * kling-3.0: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 seconds.<br/>
/// * ltx-2.5: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 seconds.<br/>
/// * veo3.1: 4, 6, 8, 15, 22, 29, 36, 43, 50, 57, 64, 71, 78, 85, 92, 99, 106, 113, 120, 127, 134, 141 seconds.<br/>
/// Free plans are limited to 5 seconds unless a credit pack has been purchased.<br/>
/// Example: 4
/// </param>
/// <param name="model">
/// Defaults to kling-3.0 on paid plans and ltx-2.5 on free plans.
/// </param>
/// <param name="resolution">
/// Defaults to 720p on paid plans and 480p on free plans. Unsupported model/resolution combinations and resolutions unavailable for your plan are rejected.
/// </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.AiUgcAdCreateVideoResponse> AiUgcAdCreateVideoAsync(
global::MagicHour.AiUgcAdCreateVideoRequestAssets assets,
string script,
double endSeconds,
global::MagicHour.AiUgcAdCreateVideoRequestModel? model = default,
global::MagicHour.AiUgcAdCreateVideoRequestResolution? 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 @@ -142,6 +142,7 @@ public partial interface IVideoProjectsClient
/// * **`minimax-h3`**: any integer from 1 to 30<br/>
/// * **`seedance-1.5`**: any integer from 4 to 12<br/>
/// * **`seedance-2.0`**: any integer from 4 to 15<br/>
/// * **`seedance-2.0-fast`**: 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/>
/// * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56<br/>
Expand All @@ -160,6 +161,7 @@ public partial interface IVideoProjectsClient
/// * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.<br/>
/// * `seedance-1.5`: Best for smooth, consistent motion with an end frame.<br/>
/// * `seedance-2.0`: Best for reference-led clips with precise subject control.<br/>
/// * `seedance-2.0-fast`: Fast reference-led clips with consistent motion and audio.<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/>
/// * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.<br/>
Expand All @@ -179,6 +181,7 @@ public partial interface IVideoProjectsClient
/// * **`minimax-h3`**: Supports 480p, 720p, 1080p.<br/>
/// * **`seedance-1.5`**: Supports 480p, 720p, 1080p.<br/>
/// * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.<br/>
/// * **`seedance-2.0-fast`**: Supports 480p, 720p.<br/>
/// * **`seedance-2.0-mini`**: Supports 480p, 720p.<br/>
/// * **`seedance-2.5`**: Supports 480p, 720p, 1080p.<br/>
/// * **`veo3.1`**: Supports 720p, 1080p.<br/>
Expand All @@ -197,6 +200,7 @@ public partial interface IVideoProjectsClient
/// * **`minimax-h3`**: Toggle-able: no additional credits for audio<br/>
/// * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled<br/>
/// * **`seedance-2.0`**: Toggle-able: no additional credits for audio<br/>
/// * **`seedance-2.0-fast`**: 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/>
/// * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@ public partial interface IVideoProjectsClient
/// --header 'content-type: application/json' \<br/>
/// --data '<br/>
/// {<br/>
/// "name": "My Text To Video video",<br/>
/// "end_seconds": 5,<br/>
/// "aspect_ratio": "16:9",<br/>
/// "resolution": "480p",<br/>
/// "model": "ltx-2.5",<br/>
/// "audio": true,<br/>
/// "style": {<br/>
/// "prompt": "a dog running"<br/>
/// }<br/>
Expand Down Expand Up @@ -85,12 +81,8 @@ public partial interface IVideoProjectsClient
/// --header 'content-type: application/json' \<br/>
/// --data '<br/>
/// {<br/>
/// "name": "My Text To Video video",<br/>
/// "end_seconds": 5,<br/>
/// "aspect_ratio": "16:9",<br/>
/// "resolution": "480p",<br/>
/// "model": "ltx-2.5",<br/>
/// "audio": true,<br/>
/// "style": {<br/>
/// "prompt": "a dog running"<br/>
/// }<br/>
Expand Down Expand Up @@ -136,6 +128,7 @@ public partial interface IVideoProjectsClient
/// * **`minimax-h3`**: any integer from 1 to 30<br/>
/// * **`seedance-1.5`**: any integer from 4 to 12<br/>
/// * **`seedance-2.0`**: any integer from 4 to 15<br/>
/// * **`seedance-2.0-fast`**: 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/>
/// * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56<br/>
Expand All @@ -145,14 +138,15 @@ public partial interface IVideoProjectsClient
/// Example: 5
/// </param>
/// <param name="aspectRatio">
/// Determines the aspect ratio of the output video.<br/>
/// Provide `aspect_ratio` to set the video’s aspect ratio. Determines the aspect ratio of the output video.<br/>
/// * **`gemini-omni-1.1`**: Supports 16:9, 9:16.<br/>
/// * **`kling-2.6`**: Supports 9:16, 16:9, 1:1.<br/>
/// * **`kling-3.0`**: Supports 9:16, 16:9, 1:1.<br/>
/// * **`ltx-2.5`**: Supports 9:16, 16:9, 1:1.<br/>
/// * **`minimax-h3`**: Supports 16:9, 9:16, 1:1.<br/>
/// * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1.<br/>
/// * **`seedance-2.0`**: Supports 9:16, 16:9, 1:1.<br/>
/// * **`seedance-2.0-fast`**: 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/>
/// * **`veo3.1`**: Supports 9:16, 16:9.<br/>
Expand All @@ -170,6 +164,7 @@ public partial interface IVideoProjectsClient
/// * **`minimax-h3`**: Supports 480p, 720p, 1080p.<br/>
/// * **`seedance-1.5`**: Supports 480p, 720p, 1080p.<br/>
/// * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.<br/>
/// * **`seedance-2.0-fast`**: Supports 480p, 720p.<br/>
/// * **`seedance-2.0-mini`**: Supports 480p, 720p.<br/>
/// * **`seedance-2.5`**: Supports 480p, 720p, 1080p.<br/>
/// * **`veo3.1`**: Supports 720p, 1080p.<br/>
Expand All @@ -188,6 +183,7 @@ public partial interface IVideoProjectsClient
/// * `minimax-h3`: Great for reference-driven clips with native audio and longer durations.<br/>
/// * `seedance-1.5`: Best for smooth, consistent motion with an end frame.<br/>
/// * `seedance-2.0`: Best for reference-led clips with precise subject control.<br/>
/// * `seedance-2.0-fast`: Fast reference-led clips with consistent motion and audio.<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/>
/// * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail.<br/>
Expand All @@ -208,6 +204,7 @@ public partial interface IVideoProjectsClient
/// * **`minimax-h3`**: Toggle-able: no additional credits for audio<br/>
/// * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled<br/>
/// * **`seedance-2.0`**: Toggle-able: no additional credits for audio<br/>
/// * **`seedance-2.0-fast`**: 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/>
/// * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled<br/>
Expand All @@ -223,6 +220,7 @@ public partial interface IVideoProjectsClient
/// * **`kling-3.0`**: Supports images, videos.<br/>
/// * **`minimax-h3`**: Supports images, videos, audio.<br/>
/// * **`seedance-2.0`**: Supports images, videos, audio.<br/>
/// * **`seedance-2.0-fast`**: Supports images, videos, audio.<br/>
/// * **`seedance-2.0-mini`**: Supports images, videos, audio.<br/>
/// * **`seedance-2.5`**: Supports images, videos, audio.<br/>
/// * **`wan-3.0`**: Supports images, videos, audio.
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 AiTalkingPhotoCreateTalkingPhotoRequestResolutionJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::MagicHour.AiTalkingPhotoCreateTalkingPhotoRequestResolution>
{
/// <inheritdoc />
public override global::MagicHour.AiTalkingPhotoCreateTalkingPhotoRequestResolution 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.AiTalkingPhotoCreateTalkingPhotoRequestResolutionExtensions.ToEnum(stringValue) ?? default;
}

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

return default;
}

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

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

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

return default;
}

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