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 @@ -42,7 +42,7 @@ partial void ProcessGetModelsResponseContent(
/// <summary>
/// List Generation Models<br/>
/// List the generation models available for `prompt`-bearing image, video and audio<br/>
/// assets, with the options each accepts. Use `POST /generate/quote` for a credit estimate.<br/>
/// assets generated from a prompt or, for some models, a source file, with the options each accepts. Use `POST /generate/quote` for a credit estimate.<br/>
/// Use this to populate a model picker and render its option fields, rather than<br/>
/// hard coding a model list. A newly launched model appears here without any change<br/>
/// on your side. Each entry carries the asset type it generates, so filter the list<br/>
Expand All @@ -69,7 +69,7 @@ partial void ProcessGetModelsResponseContent(
/// <summary>
/// List Generation Models<br/>
/// List the generation models available for `prompt`-bearing image, video and audio<br/>
/// assets, with the options each accepts. Use `POST /generate/quote` for a credit estimate.<br/>
/// assets generated from a prompt or, for some models, a source file, with the options each accepts. Use `POST /generate/quote` for a credit estimate.<br/>
/// Use this to populate a model picker and render its option fields, rather than<br/>
/// hard coding a model list. A newly launched model appears here without any change<br/>
/// on your side. Each entry carries the asset type it generates, so filter the list<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ partial void ProcessPostGenerateResponseContent(

/// <summary>
/// Generate Asset<br/>
/// Generate a single image, video or audio asset from a text prompt without<br/>
/// rendering a full edit. Submit a prompt-bearing asset; the response is<br/>
/// Generate a single image, video or audio asset from a prompt or, for some models, a source file, without<br/>
/// rendering a full edit. Submit an asset with a prompt or source file; the response is<br/>
/// immediate when an identical asset has been generated before (results are<br/>
/// cached by prompt, model and options), otherwise the job is queued and can<br/>
/// be polled via the status endpoint.<br/>
Expand Down Expand Up @@ -80,8 +80,8 @@ partial void ProcessPostGenerateResponseContent(
}
/// <summary>
/// Generate Asset<br/>
/// Generate a single image, video or audio asset from a text prompt without<br/>
/// rendering a full edit. Submit a prompt-bearing asset; the response is<br/>
/// Generate a single image, video or audio asset from a prompt or, for some models, a source file, without<br/>
/// rendering a full edit. Submit an asset with a prompt or source file; the response is<br/>
/// immediate when an identical asset has been generated before (results are<br/>
/// cached by prompt, model and options), otherwise the job is queued and can<br/>
/// be polled via the status endpoint.<br/>
Expand Down Expand Up @@ -675,8 +675,8 @@ partial void ProcessPostGenerateResponseContent(
}
/// <summary>
/// Generate Asset<br/>
/// Generate a single image, video or audio asset from a text prompt without<br/>
/// rendering a full edit. Submit a prompt-bearing asset; the response is<br/>
/// Generate a single image, video or audio asset from a prompt or, for some models, a source file, without<br/>
/// rendering a full edit. Submit an asset with a prompt or source file; the response is<br/>
/// immediate when an identical asset has been generated before (results are<br/>
/// cached by prompt, model and options), otherwise the job is queued and can<br/>
/// be polled via the status endpoint.<br/>
Expand All @@ -688,7 +688,7 @@ partial void ProcessPostGenerateResponseContent(
/// Optional idempotency key. When omitted, the SDK generates one for this request.
/// </param>
/// <param name="asset">
/// An image, video or audio asset to generate from a text prompt.
/// An asset to generate, from a text `prompt` or, for models that take one, a source `src`.
/// </param>
/// <param name="length">
/// The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ partial void ProcessPostGenerateQuoteResponseContent(
/// **Base URL:** &lt;a href="#"&gt;https://api.shotstack.io/edit/{version}&lt;/a&gt;
/// </summary>
/// <param name="asset">
/// An image, video or audio asset to generate from a text prompt.
/// An asset to generate, from a text `prompt` or, for models that take one, a source `src`.
/// </param>
/// <param name="length">
/// The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial interface IEditClient
/// <summary>
/// List Generation Models<br/>
/// List the generation models available for `prompt`-bearing image, video and audio<br/>
/// assets, with the options each accepts. Use `POST /generate/quote` for a credit estimate.<br/>
/// assets generated from a prompt or, for some models, a source file, with the options each accepts. Use `POST /generate/quote` for a credit estimate.<br/>
/// Use this to populate a model picker and render its option fields, rather than<br/>
/// hard coding a model list. A newly launched model appears here without any change<br/>
/// on your side. Each entry carries the asset type it generates, so filter the list<br/>
Expand All @@ -26,7 +26,7 @@ public partial interface IEditClient
/// <summary>
/// List Generation Models<br/>
/// List the generation models available for `prompt`-bearing image, video and audio<br/>
/// assets, with the options each accepts. Use `POST /generate/quote` for a credit estimate.<br/>
/// assets generated from a prompt or, for some models, a source file, with the options each accepts. Use `POST /generate/quote` for a credit estimate.<br/>
/// Use this to populate a model picker and render its option fields, rather than<br/>
/// hard coding a model list. A newly launched model appears here without any change<br/>
/// on your side. Each entry carries the asset type it generates, so filter the list<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public partial interface IEditClient
{
/// <summary>
/// Generate Asset<br/>
/// Generate a single image, video or audio asset from a text prompt without<br/>
/// rendering a full edit. Submit a prompt-bearing asset; the response is<br/>
/// Generate a single image, video or audio asset from a prompt or, for some models, a source file, without<br/>
/// rendering a full edit. Submit an asset with a prompt or source file; the response is<br/>
/// immediate when an identical asset has been generated before (results are<br/>
/// cached by prompt, model and options), otherwise the job is queued and can<br/>
/// be polled via the status endpoint.<br/>
Expand All @@ -30,8 +30,8 @@ public partial interface IEditClient
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Generate Asset<br/>
/// Generate a single image, video or audio asset from a text prompt without<br/>
/// rendering a full edit. Submit a prompt-bearing asset; the response is<br/>
/// Generate a single image, video or audio asset from a prompt or, for some models, a source file, without<br/>
/// rendering a full edit. Submit an asset with a prompt or source file; the response is<br/>
/// immediate when an identical asset has been generated before (results are<br/>
/// cached by prompt, model and options), otherwise the job is queued and can<br/>
/// be polled via the status endpoint.<br/>
Expand All @@ -54,8 +54,8 @@ public partial interface IEditClient
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Generate Asset<br/>
/// Generate a single image, video or audio asset from a text prompt without<br/>
/// rendering a full edit. Submit a prompt-bearing asset; the response is<br/>
/// Generate a single image, video or audio asset from a prompt or, for some models, a source file, without<br/>
/// rendering a full edit. Submit an asset with a prompt or source file; the response is<br/>
/// immediate when an identical asset has been generated before (results are<br/>
/// cached by prompt, model and options), otherwise the job is queued and can<br/>
/// be polled via the status endpoint.<br/>
Expand All @@ -67,7 +67,7 @@ public partial interface IEditClient
/// Optional idempotency key. When omitted, the SDK generates one for this request.
/// </param>
/// <param name="asset">
/// An image, video or audio asset to generate from a text prompt.
/// An asset to generate, from a text `prompt` or, for models that take one, a source `src`.
/// </param>
/// <param name="length">
/// The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public partial interface IEditClient
/// **Base URL:** &lt;a href="#"&gt;https://api.shotstack.io/edit/{version}&lt;/a&gt;
/// </summary>
/// <param name="asset">
/// An image, video or audio asset to generate from a text prompt.
/// An asset to generate, from a text `prompt` or, for models that take one, a source `src`.
/// </param>
/// <param name="length">
/// The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it.<br/>
Expand Down
20 changes: 15 additions & 5 deletions src/libs/Shotstack/Generated/Shotstack.Models.GenerationAsset.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Shotstack
{
/// <summary>
/// An image, video or audio asset to generate from a text prompt.
/// An asset to generate, from a text `prompt` or, for models that take one, a source `src`.
/// </summary>
public sealed partial class GenerationAsset
{
Expand All @@ -24,8 +24,13 @@ public sealed partial class GenerationAsset
/// </summary>
/// <example>A lighthouse on a rocky coast at sunset, cinematic lighting</example>
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Prompt { get; set; }
public string? Prompt { get; set; }

/// <summary>
/// The source file for models that take one instead of a prompt, such as `shotstack-music-analysis`. A public HTTPS URL.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("src")]
public string? Src { get; set; }

/// <summary>
/// The generation model. Defaults to `nano-banana-2` for images, `seedance-2.0-text-to-video` for video and `elevenlabs-multilingual-v2` for audio. `GET /models` lists the models for each type.<br/>
Expand Down Expand Up @@ -60,6 +65,9 @@ public sealed partial class GenerationAsset
/// A description of the asset to generate. For text-to-speech models it is the text spoken.<br/>
/// Example: A lighthouse on a rocky coast at sunset, cinematic lighting
/// </param>
/// <param name="src">
/// The source file for models that take one instead of a prompt, such as `shotstack-music-analysis`. A public HTTPS URL.
/// </param>
/// <param name="model">
/// The generation model. Defaults to `nano-banana-2` for images, `seedance-2.0-text-to-video` for video and `elevenlabs-multilingual-v2` for audio. `GET /models` lists the models for each type.<br/>
/// Example: nano-banana-2
Expand All @@ -73,12 +81,14 @@ public sealed partial class GenerationAsset
#endif
public GenerationAsset(
global::Shotstack.GenerationAssetType type,
string prompt,
string? prompt,
string? src,
string? model,
object? options)
{
this.Type = type;
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
this.Prompt = prompt;
this.Src = src;
this.Model = model;
this.Options = options;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Shotstack
{
/// <summary>
/// A generation model available to `prompt`-bearing image, video and audio assets, with the options it accepts. Use `POST /generate/quote` for a credit estimate. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.
/// A generation model available to image, video and audio assets generated from a prompt or, for some models, a source file, with the options it accepts. Use `POST /generate/quote` for a credit estimate. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.
/// </summary>
public sealed partial class GenerationModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Shotstack
public sealed partial class GenerationRequest
{
/// <summary>
/// An image, video or audio asset to generate from a text prompt.
/// An asset to generate, from a text `prompt` or, for models that take one, a source `src`.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("asset")]
[global::System.Text.Json.Serialization.JsonRequired]
Expand All @@ -33,7 +33,7 @@ public sealed partial class GenerationRequest
/// Initializes a new instance of the <see cref="GenerationRequest" /> class.
/// </summary>
/// <param name="asset">
/// An image, video or audio asset to generate from a text prompt.
/// An asset to generate, from a text `prompt` or, for models that take one, a source `src`.
/// </param>
/// <param name="length">
/// The length, in seconds, of the clip the asset fills. A model that generates to a duration takes it from this value in place of its own duration option. Other models ignore it.<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"Order": 2,
"Title": "Generate Asset",
"Slug": "postgenerate",
"Description": "Generate a single image, video or audio asset from a text prompt without\nrendering a full edit. Submit a prompt-bearing asset; the response is\nimmediate when an identical asset has been generated before (results are\ncached by prompt, model and options), otherwise the job is queued and can\nbe polled via the status endpoint.\n\nGeneration is billed in credits per asset. Identical repeat requests\nresolve from the cache at no charge.\n\n**Base URL:** \u003Ca href=\u0022#\u0022\u003Ehttps://api.shotstack.io/edit/{version}\u003C/a\u003E",
"Description": "Generate a single image, video or audio asset from a prompt or, for some models, a source file, without\nrendering a full edit. Submit an asset with a prompt or source file; the response is\nimmediate when an identical asset has been generated before (results are\ncached by prompt, model and options), otherwise the job is queued and can\nbe polled via the status endpoint.\n\nGeneration is billed in credits per asset. Identical repeat requests\nresolve from the cache at no charge.\n\n**Base URL:** \u003Ca href=\u0022#\u0022\u003Ehttps://api.shotstack.io/edit/{version}\u003C/a\u003E",
"Language": "http",
"Code": "### Generate Asset\n# @name postGenerate\nPOST {{host}}/edit/v1/generate\nIdempotency-Key: {{Idempotency-Key}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022asset\u0022: {\n \u0022type\u0022: \u0022image\u0022,\n \u0022prompt\u0022: \u0022A lighthouse on a rocky coast at sunset, cinematic lighting\u0022,\n \u0022model\u0022: \u0022nano-banana-2\u0022\n }\n}\n\n## Responses\n# 200\n# Description: The asset was generated before: \u0060done\u0060 with its URL, or \u0060failed\u0060 with the error that ended it.\n# Content-Type: application/json\n# 202\n# Description: The generation job has been queued. Poll the status endpoint.\n# Content-Type: application/json\n# 400\n# Description: The request is invalid, for example a missing asset or prompt, a disallowed URL or a \u0060length\u0060 that is not positive.\n# Content-Type: application/json\n# 402\n# Description: The account has too few credits for this generation. \u0060available\u0060 holds how many it has.\n# Content-Type: application/json\n# 403\n# Description: The account cannot use this generation. \u0060code\u0060 says why.\n# Content-Type: application/json\n# 409\n# Description: The \u0060Idempotency-Key\u0060 was already used for a different asset.\n# Content-Type: application/json\n# 429\n# Description: The account has reached its generation quota.\n# Content-Type: application/json\n# 503\n# Description: A service the request depends on is temporarily unavailable. \u0060code\u0060 is \u0060AiAccessUnavailable\u0060 when access to AI generation could not be confirmed.\n# Content-Type: application/json",
"Format": "http",
Expand Down
Loading
Loading