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 @@ -20,7 +20,7 @@ public partial interface IVideoProjectsClient
/// --header 'content-type: application/json' \<br/>
/// --data '<br/>
/// {<br/>
/// "name": "My Talking Photo image",<br/>
/// "name": "My Talking Photo video",<br/>
/// "start_seconds": 0,<br/>
/// "end_seconds": 15,<br/>
/// "assets": {<br/>
Expand Down Expand Up @@ -56,7 +56,7 @@ public partial interface IVideoProjectsClient
/// --header 'content-type: application/json' \<br/>
/// --data '<br/>
/// {<br/>
/// "name": "My Talking Photo image",<br/>
/// "name": "My Talking Photo video",<br/>
/// "start_seconds": 0,<br/>
/// "end_seconds": 15,<br/>
/// "assets": {<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,16 @@ public partial interface IVideoProjectsClient
/// Example: true
/// </param>
/// <param name="style"></param>
/// <param name="references"></param>
/// <param name="references">
/// Reference media for video generation. Name references without @ and refer to them as @name in style.prompt. Maximum 10 references total.<br/>
/// Supported models and reference media:<br/>
/// * **`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-mini`**: Supports images, videos, audio.<br/>
/// * **`seedance-2.5`**: Supports images, videos, audio.<br/>
/// * **`wan-3.0`**: Supports images, videos, audio.
/// </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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,14 @@ public sealed partial class TextToVideoCreateVideoRequest
public required global::MagicHour.TextToVideoCreateVideoRequestStyle Style { get; set; }

/// <summary>
///
/// Reference media for video generation. Name references without @ and refer to them as @name in style.prompt. Maximum 10 references total.<br/>
/// Supported models and reference media:<br/>
/// * **`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-mini`**: Supports images, videos, audio.<br/>
/// * **`seedance-2.5`**: Supports images, videos, audio.<br/>
/// * **`wan-3.0`**: Supports images, videos, audio.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("references")]
public global::System.Collections.Generic.IList<global::MagicHour.TextToVideoCreateVideoRequestReference>? References { get; set; }
Expand Down Expand Up @@ -247,7 +254,16 @@ public sealed partial class TextToVideoCreateVideoRequest
/// * **`wan-3.0`**: Toggle-able: no additional credits for audio<br/>
/// Example: true
/// </param>
/// <param name="references"></param>
/// <param name="references">
/// Reference media for video generation. Name references without @ and refer to them as @name in style.prompt. Maximum 10 references total.<br/>
/// Supported models and reference media:<br/>
/// * **`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-mini`**: Supports images, videos, audio.<br/>
/// * **`seedance-2.5`**: Supports images, videos, audio.<br/>
/// * **`wan-3.0`**: Supports images, videos, audio.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ partial void ProcessAiTalkingPhotoCreateTalkingPhotoResponseContent(
/// --header 'content-type: application/json' \<br/>
/// --data '<br/>
/// {<br/>
/// "name": "My Talking Photo image",<br/>
/// "name": "My Talking Photo video",<br/>
/// "start_seconds": 0,<br/>
/// "end_seconds": 15,<br/>
/// "assets": {<br/>
Expand Down Expand Up @@ -103,7 +103,7 @@ partial void ProcessAiTalkingPhotoCreateTalkingPhotoResponseContent(
/// --header 'content-type: application/json' \<br/>
/// --data '<br/>
/// {<br/>
/// "name": "My Talking Photo image",<br/>
/// "name": "My Talking Photo video",<br/>
/// "start_seconds": 0,<br/>
/// "end_seconds": 15,<br/>
/// "assets": {<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,16 @@ partial void ProcessTextToVideoCreateVideoResponseContent(
/// Example: true
/// </param>
/// <param name="style"></param>
/// <param name="references"></param>
/// <param name="references">
/// Reference media for video generation. Name references without @ and refer to them as @name in style.prompt. Maximum 10 references total.<br/>
/// Supported models and reference media:<br/>
/// * **`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-mini`**: Supports images, videos, audio.<br/>
/// * **`seedance-2.5`**: Supports images, videos, audio.<br/>
/// * **`wan-3.0`**: Supports images, videos, audio.
/// </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>
Expand Down
17 changes: 9 additions & 8 deletions src/libs/MagicHour/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1800,23 +1800,23 @@
},
{
"lang": "go",
"source": "package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tnullable \"github.com/magichourhq/magic-hour-go/nullable\"\n\tai_talking_photo \"github.com/magichourhq/magic-hour-go/resources/v1/ai_talking_photo\"\n\ttypes \"github.com/magichourhq/magic-hour-go/types\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"MAGIC_HOUR_API_KEY\")),\n\t)\n\tres, err := client.V1.AiTalkingPhoto.Create(ai_talking_photo.CreateRequest{\n\t\tAssets: types.V1AiTalkingPhotoCreateBodyAssets{\n\t\t\tAudioFilePath: \"api-assets/id/1234.mp3\",\n\t\t\tImageFilePath: \"api-assets/id/1234.png\",\n\t\t},\n\t\tEndSeconds: 15.0,\n\t\tMaxResolution: nullable.NewValue(1024),\n\t\tName: nullable.NewValue(\"My Talking Photo image\"),\n\t\tStartSeconds: 0.0,\n\t})\n}"
"source": "package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tnullable \"github.com/magichourhq/magic-hour-go/nullable\"\n\tai_talking_photo \"github.com/magichourhq/magic-hour-go/resources/v1/ai_talking_photo\"\n\ttypes \"github.com/magichourhq/magic-hour-go/types\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"MAGIC_HOUR_API_KEY\")),\n\t)\n\tres, err := client.V1.AiTalkingPhoto.Create(ai_talking_photo.CreateRequest{\n\t\tAssets: types.V1AiTalkingPhotoCreateBodyAssets{\n\t\t\tAudioFilePath: \"api-assets/id/1234.mp3\",\n\t\t\tImageFilePath: \"api-assets/id/1234.png\",\n\t\t},\n\t\tEndSeconds: 15.0,\n\t\tMaxResolution: nullable.NewValue(1024),\n\t\tName: nullable.NewValue(\"My Talking Photo video\"),\n\t\tStartSeconds: 0.0,\n\t})\n}"
},
{
"lang": "rust",
"source": "let client = magic_hour::Client::default()\n .with_bearer_auth(&std::env::var(\"MAGIC_HOUR_API_KEY\").unwrap());\nlet res = client\n .v1()\n .ai_talking_photo()\n .create(magic_hour::resources::v1::ai_talking_photo::CreateRequest {\n assets: magic_hour::models::V1AiTalkingPhotoCreateBodyAssets {\n audio_file_path: \"api-assets/id/1234.mp3\".to_string(),\n image_file_path: \"api-assets/id/1234.png\".to_string(),\n },\n end_seconds: 15.0,\n max_resolution: Some(1024),\n name: Some(\"My Talking Photo image\".to_string()),\n start_seconds: 0.0,\n ..Default::default()\n })\n .await;"
"source": "let client = magic_hour::Client::default()\n .with_bearer_auth(&std::env::var(\"MAGIC_HOUR_API_KEY\").unwrap());\nlet res = client\n .v1()\n .ai_talking_photo()\n .create(magic_hour::resources::v1::ai_talking_photo::CreateRequest {\n assets: magic_hour::models::V1AiTalkingPhotoCreateBodyAssets {\n audio_file_path: \"api-assets/id/1234.mp3\".to_string(),\n image_file_path: \"api-assets/id/1234.png\".to_string(),\n },\n end_seconds: 15.0,\n max_resolution: Some(1024),\n name: Some(\"My Talking Photo video\".to_string()),\n start_seconds: 0.0,\n ..Default::default()\n })\n .await;"
},
{
"lang": "curl",
"source": "curl --request POST \\\n --url https://api.magichour.ai/v1/ai-talking-photo \\\n --header 'accept: application/json' \\\n --header \"authorization: Bearer $MAGIC_HOUR_API_KEY\" \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"name\": \"My Talking Photo image\",\n \"start_seconds\": 0,\n \"end_seconds\": 15,\n \"assets\": {\n \"image_file_path\": \"api-assets/id/1234.png\",\n \"audio_file_path\": \"api-assets/id/1234.mp3\"\n },\n \"style\": {\n \"generation_mode\": \"realistic\",\n \"prompt\": \"string\"\n },\n \"max_resolution\": 1024\n}\n'"
"source": "curl --request POST \\\n --url https://api.magichour.ai/v1/ai-talking-photo \\\n --header 'accept: application/json' \\\n --header \"authorization: Bearer $MAGIC_HOUR_API_KEY\" \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"name\": \"My Talking Photo video\",\n \"start_seconds\": 0,\n \"end_seconds\": 15,\n \"assets\": {\n \"image_file_path\": \"api-assets/id/1234.png\",\n \"audio_file_path\": \"api-assets/id/1234.mp3\"\n },\n \"style\": {\n \"generation_mode\": \"realistic\",\n \"prompt\": \"string\"\n },\n \"max_resolution\": 1024\n}\n'"
},
{
"lang": "php",
"source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.magichour.ai/v1/ai-talking-photo\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode([\n 'name' => 'My Talking Photo image',\n 'start_seconds' => 0,\n 'end_seconds' => 15,\n 'assets' => [\n 'image_file_path' => 'api-assets/id/1234.png',\n 'audio_file_path' => 'api-assets/id/1234.mp3'\n ],\n 'style' => [\n 'generation_mode' => 'realistic',\n 'prompt' => 'string'\n ],\n 'max_resolution' => 1024\n ]),\n CURLOPT_HTTPHEADER => [\n \"accept: application/json\",\n \"authorization: Bearer <token>\",\n \"content-type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
"source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.magichour.ai/v1/ai-talking-photo\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode([\n 'name' => 'My Talking Photo video',\n 'start_seconds' => 0,\n 'end_seconds' => 15,\n 'assets' => [\n 'image_file_path' => 'api-assets/id/1234.png',\n 'audio_file_path' => 'api-assets/id/1234.mp3'\n ],\n 'style' => [\n 'generation_mode' => 'realistic',\n 'prompt' => 'string'\n ],\n 'max_resolution' => 1024\n ]),\n CURLOPT_HTTPHEADER => [\n \"accept: application/json\",\n \"authorization: Bearer <token>\",\n \"content-type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
},
{
"lang": "java",
"source": "HttpResponse<String> response = Unirest.post(\"https://api.magichour.ai/v1/ai-talking-photo\")\n .header(\"accept\", \"application/json\")\n .header(\"content-type\", \"application/json\")\n .header(\"authorization\", \"Bearer <token>\")\n .body(\"{\\\"name\\\":\\\"My Talking Photo image\\\",\\\"start_seconds\\\":0,\\\"end_seconds\\\":15,\\\"assets\\\":{\\\"image_file_path\\\":\\\"api-assets/id/1234.png\\\",\\\"audio_file_path\\\":\\\"api-assets/id/1234.mp3\\\"},\\\"style\\\":{\\\"generation_mode\\\":\\\"realistic\\\",\\\"prompt\\\":\\\"string\\\"},\\\"max_resolution\\\":1024}\")\n .asString();"
"source": "HttpResponse<String> response = Unirest.post(\"https://api.magichour.ai/v1/ai-talking-photo\")\n .header(\"accept\", \"application/json\")\n .header(\"content-type\", \"application/json\")\n .header(\"authorization\", \"Bearer <token>\")\n .body(\"{\\\"name\\\":\\\"My Talking Photo video\\\",\\\"start_seconds\\\":0,\\\"end_seconds\\\":15,\\\"assets\\\":{\\\"image_file_path\\\":\\\"api-assets/id/1234.png\\\",\\\"audio_file_path\\\":\\\"api-assets/id/1234.mp3\\\"},\\\"style\\\":{\\\"generation_mode\\\":\\\"realistic\\\",\\\"prompt\\\":\\\"string\\\"},\\\"max_resolution\\\":1024}\")\n .asString();"
}
]
}
Expand Down Expand Up @@ -3603,11 +3603,11 @@
},
{
"lang": "go",
"source": "package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tnullable \"github.com/magichourhq/magic-hour-go/nullable\"\n\tcharacter_replace \"github.com/magichourhq/magic-hour-go/resources/v1/character_replace\"\n\ttypes \"github.com/magichourhq/magic-hour-go/types\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"MAGIC_HOUR_API_KEY\")),\n\t)\n\tres, err := client.V1.CharacterReplace.Create(character_replace.CreateRequest{\n\t\tAssets: types.V1CharacterReplaceCreateBodyAssets{\n\t\t\tImageFilePath: \"api-assets/id/5678.png\",\n\t\t\tVideoFilePath: \"api-assets/id/1234.mp4\",\n\t\t},\n\t\tEndSeconds: 15.0,\n\t\tName: nullable.NewValue(\"My Character Replace video\"),\n\t\tResolution: nullable.NewValue(types.V1CharacterReplaceCreateBodyResolutionEnum720p),\n\t\tStartSeconds: nullable.NewValue(0.0),\n\t\tStyle: nullable.NewValue(types.V1CharacterReplaceCreateBodyStyle{\n\t\t\tMode: nullable.NewValue(types.V1CharacterReplaceCreateBodyStyleModeEnumReplace),\n\t\t\tSelectionMode: nullable.NewValue(types.V1CharacterReplaceCreateBodyStyleSelectionModeEnumAuto),\n\t\t}),\n\t})\n}"
"source": "package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tnullable \"github.com/magichourhq/magic-hour-go/nullable\"\n\tcharacter_replace \"github.com/magichourhq/magic-hour-go/resources/v1/character_replace\"\n\ttypes \"github.com/magichourhq/magic-hour-go/types\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"MAGIC_HOUR_API_KEY\")),\n\t)\n\tres, err := client.V1.CharacterReplace.Create(character_replace.CreateRequest{\n\t\tAssets: types.V1CharacterReplaceCreateBodyAssets{\n\t\t\tImageFilePath: \"api-assets/id/5678.png\",\n\t\t\tVideoFilePath: \"api-assets/id/1234.mp4\",\n\t\t},\n\t\tEndSeconds: 15.0,\n\t\tModel: nullable.NewValue(types.V1CharacterReplaceCreateBodyModelEnumWanAnimate),\n\t\tName: nullable.NewValue(\"My Character Replace video\"),\n\t\tResolution: nullable.NewValue(types.V1CharacterReplaceCreateBodyResolutionEnum720p),\n\t\tStartSeconds: nullable.NewValue(0.0),\n\t\tStyle: nullable.NewValue(types.V1CharacterReplaceCreateBodyStyle{\n\t\t\tMode: nullable.NewValue(types.V1CharacterReplaceCreateBodyStyleModeEnumReplace),\n\t\t\tSelectionMode: nullable.NewValue(types.V1CharacterReplaceCreateBodyStyleSelectionModeEnumAuto),\n\t\t}),\n\t})\n}"
},
{
"lang": "rust",
"source": "let client = magic_hour::Client::default()\n .with_bearer_auth(&std::env::var(\"MAGIC_HOUR_API_KEY\").unwrap());\nlet res = client\n .v1()\n .character_replace()\n .create(magic_hour::resources::v1::character_replace::CreateRequest {\n assets: magic_hour::models::V1CharacterReplaceCreateBodyAssets {\n image_file_path: \"api-assets/id/5678.png\".to_string(),\n video_file_path: \"api-assets/id/1234.mp4\".to_string(),\n },\n end_seconds: 15.0,\n name: Some(\"My Character Replace video\".to_string()),\n resolution: Some(\n magic_hour::models::V1CharacterReplaceCreateBodyResolutionEnum::Enum720p,\n ),\n start_seconds: Some(0.0),\n style: Some(magic_hour::models::V1CharacterReplaceCreateBodyStyle {\n mode: Some(\n magic_hour::models::V1CharacterReplaceCreateBodyStyleModeEnum::Replace,\n ),\n selection_mode: Some(\n magic_hour::models::V1CharacterReplaceCreateBodyStyleSelectionModeEnum::Auto,\n ),\n ..Default::default()\n }),\n })\n .await;"
"source": "let client = magic_hour::Client::default()\n .with_bearer_auth(&std::env::var(\"MAGIC_HOUR_API_KEY\").unwrap());\nlet res = client\n .v1()\n .character_replace()\n .create(magic_hour::resources::v1::character_replace::CreateRequest {\n assets: magic_hour::models::V1CharacterReplaceCreateBodyAssets {\n image_file_path: \"api-assets/id/5678.png\".to_string(),\n video_file_path: \"api-assets/id/1234.mp4\".to_string(),\n },\n end_seconds: 15.0,\n model: Some(\n magic_hour::models::V1CharacterReplaceCreateBodyModelEnum::WanAnimate,\n ),\n name: Some(\"My Character Replace video\".to_string()),\n resolution: Some(\n magic_hour::models::V1CharacterReplaceCreateBodyResolutionEnum::Enum720p,\n ),\n start_seconds: Some(0.0),\n style: Some(magic_hour::models::V1CharacterReplaceCreateBodyStyle {\n mode: Some(\n magic_hour::models::V1CharacterReplaceCreateBodyStyleModeEnum::Replace,\n ),\n selection_mode: Some(\n magic_hour::models::V1CharacterReplaceCreateBodyStyleSelectionModeEnum::Auto,\n ),\n ..Default::default()\n }),\n })\n .await;"
},
{
"lang": "curl",
Expand Down Expand Up @@ -4566,7 +4566,8 @@
"required": ["name", "file_path"]
},
"minItems": 1,
"maxItems": 10
"maxItems": 10,
"description": "Reference media for video generation. Name references without @ and refer to them as @name in style.prompt. Maximum 10 references total.\n\nSupported models and reference media:\n* **`kling-3.0`**: Supports images, videos.\n* **`minimax-h3`**: Supports images, videos, audio.\n* **`seedance-2.0`**: Supports images, videos, audio.\n* **`seedance-2.0-mini`**: Supports images, videos, audio.\n* **`seedance-2.5`**: Supports images, videos, audio.\n* **`wan-3.0`**: Supports images, videos, audio."
}
},
"required": ["end_seconds", "style"]
Expand Down
Loading