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 @@ -61,7 +61,9 @@ partial void ProcessPostAdResizerResponseContent(
/// | --- | --- |<br/>
/// | `google` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `tiktok` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `meta` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_stories` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_reels` | `1080x1920`, `2160x3840` |<br/>
/// | `meta` (legacy) | `1080x1920`, `2160x3840` |<br/>
/// | `snapchat` | `1080x1920`, `2160x3840` |<br/>
/// A `platform` combined with any other `resolution` is rejected with a<br/>
/// 400. When `platform` is omitted, every resolution in the request schema<br/>
Expand Down Expand Up @@ -118,7 +120,9 @@ partial void ProcessPostAdResizerResponseContent(
/// | --- | --- |<br/>
/// | `google` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `tiktok` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `meta` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_stories` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_reels` | `1080x1920`, `2160x3840` |<br/>
/// | `meta` (legacy) | `1080x1920`, `2160x3840` |<br/>
/// | `snapchat` | `1080x1920`, `2160x3840` |<br/>
/// A `platform` combined with any other `resolution` is rejected with a<br/>
/// 400. When `platform` is omitted, every resolution in the request schema<br/>
Expand Down Expand Up @@ -868,7 +872,9 @@ request.Imagename is null
/// | --- | --- |<br/>
/// | `google` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `tiktok` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `meta` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_stories` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_reels` | `1080x1920`, `2160x3840` |<br/>
/// | `meta` (legacy) | `1080x1920`, `2160x3840` |<br/>
/// | `snapchat` | `1080x1920`, `2160x3840` |<br/>
/// A `platform` combined with any other `resolution` is rejected with a<br/>
/// 400. When `platform` is omitted, every resolution in the request schema<br/>
Expand Down Expand Up @@ -909,11 +915,15 @@ request.Imagename is null
/// <param name="platform">
/// The ad platform whose published safe zone the advertisement must<br/>
/// stay inside. `google` covers YouTube and Google Ads placements;<br/>
/// `meta` covers Facebook and Instagram. When supplied, the<br/>
/// advertisement is generated inside that platform's safe zone for the<br/>
/// requested aspect ratio and the remaining space is filled in around<br/>
/// it. When omitted, the advertisement fills the whole frame. Any other<br/>
/// value is rejected with a 400.
/// use `meta_stories` or `meta_reels` for the placement-specific Meta<br/>
/// generation bounds. Reels uses the largest rectangle contained by<br/>
/// its notched safe-zone polygon. The legacy `meta` value remains<br/>
/// supported for existing callers with its conservative safe zone.<br/>
/// When supplied, the advertisement is generated inside that<br/>
/// platform's safe zone for the requested aspect ratio and the<br/>
/// remaining space is filled in around it. When omitted, the<br/>
/// advertisement fills the whole frame. Any other value is rejected<br/>
/// with a 400.
/// </param>
/// <param name="prompt">
/// Optional edit instruction to apply while reframing, for example "remove the logo" or "put the price bottom-right".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public partial interface IEditWorkflowClient
/// | --- | --- |<br/>
/// | `google` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `tiktok` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `meta` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_stories` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_reels` | `1080x1920`, `2160x3840` |<br/>
/// | `meta` (legacy) | `1080x1920`, `2160x3840` |<br/>
/// | `snapchat` | `1080x1920`, `2160x3840` |<br/>
/// A `platform` combined with any other `resolution` is rejected with a<br/>
/// 400. When `platform` is omitted, every resolution in the request schema<br/>
Expand Down Expand Up @@ -68,7 +70,9 @@ public partial interface IEditWorkflowClient
/// | --- | --- |<br/>
/// | `google` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `tiktok` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `meta` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_stories` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_reels` | `1080x1920`, `2160x3840` |<br/>
/// | `meta` (legacy) | `1080x1920`, `2160x3840` |<br/>
/// | `snapchat` | `1080x1920`, `2160x3840` |<br/>
/// A `platform` combined with any other `resolution` is rejected with a<br/>
/// 400. When `platform` is omitted, every resolution in the request schema<br/>
Expand Down Expand Up @@ -114,7 +118,9 @@ public partial interface IEditWorkflowClient
/// | --- | --- |<br/>
/// | `google` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `tiktok` | `1920x1080`, `3840x2160`, `1080x1080`, `2400x2400`, `2880x2880`, `1080x1920`, `2160x3840` |<br/>
/// | `meta` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_stories` | `1080x1920`, `2160x3840` |<br/>
/// | `meta_reels` | `1080x1920`, `2160x3840` |<br/>
/// | `meta` (legacy) | `1080x1920`, `2160x3840` |<br/>
/// | `snapchat` | `1080x1920`, `2160x3840` |<br/>
/// A `platform` combined with any other `resolution` is rejected with a<br/>
/// 400. When `platform` is omitted, every resolution in the request schema<br/>
Expand Down Expand Up @@ -155,11 +161,15 @@ public partial interface IEditWorkflowClient
/// <param name="platform">
/// The ad platform whose published safe zone the advertisement must<br/>
/// stay inside. `google` covers YouTube and Google Ads placements;<br/>
/// `meta` covers Facebook and Instagram. When supplied, the<br/>
/// advertisement is generated inside that platform's safe zone for the<br/>
/// requested aspect ratio and the remaining space is filled in around<br/>
/// it. When omitted, the advertisement fills the whole frame. Any other<br/>
/// value is rejected with a 400.
/// use `meta_stories` or `meta_reels` for the placement-specific Meta<br/>
/// generation bounds. Reels uses the largest rectangle contained by<br/>
/// its notched safe-zone polygon. The legacy `meta` value remains<br/>
/// supported for existing callers with its conservative safe zone.<br/>
/// When supplied, the advertisement is generated inside that<br/>
/// platform's safe zone for the requested aspect ratio and the<br/>
/// remaining space is filled in around it. When omitted, the<br/>
/// advertisement fills the whole frame. Any other value is rejected<br/>
/// with a 400.
/// </param>
/// <param name="prompt">
/// Optional edit instruction to apply while reframing, for example "remove the logo" or "put the price bottom-right".
Expand Down
28 changes: 18 additions & 10 deletions src/libs/Ideogram/Generated/Ideogram.Models.AdResizerRequest.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,15 @@ public sealed partial class AdResizerRequest
/// <summary>
/// The ad platform whose published safe zone the advertisement must<br/>
/// stay inside. `google` covers YouTube and Google Ads placements;<br/>
/// `meta` covers Facebook and Instagram. When supplied, the<br/>
/// advertisement is generated inside that platform's safe zone for the<br/>
/// requested aspect ratio and the remaining space is filled in around<br/>
/// it. When omitted, the advertisement fills the whole frame. Any other<br/>
/// value is rejected with a 400.
/// use `meta_stories` or `meta_reels` for the placement-specific Meta<br/>
/// generation bounds. Reels uses the largest rectangle contained by<br/>
/// its notched safe-zone polygon. The legacy `meta` value remains<br/>
/// supported for existing callers with its conservative safe zone.<br/>
/// When supplied, the advertisement is generated inside that<br/>
/// platform's safe zone for the requested aspect ratio and the<br/>
/// remaining space is filled in around it. When omitted, the<br/>
/// advertisement fills the whole frame. Any other value is rejected<br/>
/// with a 400.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("platform")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Ideogram.JsonConverters.AdResizerRequestPlatformJsonConverter))]
Expand Down Expand Up @@ -138,11 +142,15 @@ public sealed partial class AdResizerRequest
/// <param name="platform">
/// The ad platform whose published safe zone the advertisement must<br/>
/// stay inside. `google` covers YouTube and Google Ads placements;<br/>
/// `meta` covers Facebook and Instagram. When supplied, the<br/>
/// advertisement is generated inside that platform's safe zone for the<br/>
/// requested aspect ratio and the remaining space is filled in around<br/>
/// it. When omitted, the advertisement fills the whole frame. Any other<br/>
/// value is rejected with a 400.
/// use `meta_stories` or `meta_reels` for the placement-specific Meta<br/>
/// generation bounds. Reels uses the largest rectangle contained by<br/>
/// its notched safe-zone polygon. The legacy `meta` value remains<br/>
/// supported for existing callers with its conservative safe zone.<br/>
/// When supplied, the advertisement is generated inside that<br/>
/// platform's safe zone for the requested aspect ratio and the<br/>
/// remaining space is filled in around it. When omitted, the<br/>
/// advertisement fills the whole frame. Any other value is rejected<br/>
/// with a 400.
/// </param>
/// <param name="prompt">
/// Optional edit instruction to apply while reframing, for example "remove the logo" or "put the price bottom-right".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ namespace Ideogram
/// <summary>
/// The ad platform whose published safe zone the advertisement must<br/>
/// stay inside. `google` covers YouTube and Google Ads placements;<br/>
/// `meta` covers Facebook and Instagram. When supplied, the<br/>
/// advertisement is generated inside that platform's safe zone for the<br/>
/// requested aspect ratio and the remaining space is filled in around<br/>
/// it. When omitted, the advertisement fills the whole frame. Any other<br/>
/// value is rejected with a 400.
/// use `meta_stories` or `meta_reels` for the placement-specific Meta<br/>
/// generation bounds. Reels uses the largest rectangle contained by<br/>
/// its notched safe-zone polygon. The legacy `meta` value remains<br/>
/// supported for existing callers with its conservative safe zone.<br/>
/// When supplied, the advertisement is generated inside that<br/>
/// platform's safe zone for the requested aspect ratio and the<br/>
/// remaining space is filled in around it. When omitted, the<br/>
/// advertisement fills the whole frame. Any other value is rejected<br/>
/// with a 400.
/// </summary>
public enum AdResizerRequestPlatform
{
Expand All @@ -25,6 +29,14 @@ public enum AdResizerRequestPlatform
/// <summary>
///
/// </summary>
MetaReels,
/// <summary>
///
/// </summary>
MetaStories,
/// <summary>
///
/// </summary>
Snapchat,
/// <summary>
///
Expand All @@ -46,6 +58,8 @@ public static string ToValueString(this AdResizerRequestPlatform value)
{
AdResizerRequestPlatform.Google => "google",
AdResizerRequestPlatform.Meta => "meta",
AdResizerRequestPlatform.MetaReels => "meta_reels",
AdResizerRequestPlatform.MetaStories => "meta_stories",
AdResizerRequestPlatform.Snapchat => "snapchat",
AdResizerRequestPlatform.Tiktok => "tiktok",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
Expand All @@ -60,6 +74,8 @@ public static string ToValueString(this AdResizerRequestPlatform value)
{
"google" => AdResizerRequestPlatform.Google,
"meta" => AdResizerRequestPlatform.Meta,
"meta_reels" => AdResizerRequestPlatform.MetaReels,
"meta_stories" => AdResizerRequestPlatform.MetaStories,
"snapchat" => AdResizerRequestPlatform.Snapchat,
"tiktok" => AdResizerRequestPlatform.Tiktok,
_ => null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"Order": 15,
"Title": "Advertisement Resizer v2",
"Slug": "post-ad-resizer",
"Description": "Reframes the source creative to the exact requested ad resolution,\nregenerating the layout so text and key elements stay legible at the\ntarget size.\n\nSupply \u0060platform\u0060 to keep the whole advertisement clear of that\nplatform\u0027s own interface. The advertisement is generated at the largest\nrectangle that fits inside the platform\u0027s published safe zone for the\nrequested aspect ratio, placed at that rectangle\u0027s position, and the\nspace around it is filled in so the returned image is still exactly the\nrequested resolution. Omit \u0060platform\u0060 and the advertisement fills the\nwhole frame.\n\nEach platform accepts only the resolutions for which it publishes a\nsafe zone:\n\n| Platform | Accepted resolutions |\n| --- | --- |\n| \u0060google\u0060 | \u00601920x1080\u0060, \u00603840x2160\u0060, \u00601080x1080\u0060, \u00602400x2400\u0060, \u00602880x2880\u0060, \u00601080x1920\u0060, \u00602160x3840\u0060 |\n| \u0060tiktok\u0060 | \u00601920x1080\u0060, \u00603840x2160\u0060, \u00601080x1080\u0060, \u00602400x2400\u0060, \u00602880x2880\u0060, \u00601080x1920\u0060, \u00602160x3840\u0060 |\n| \u0060meta\u0060 | \u00601080x1920\u0060, \u00602160x3840\u0060 |\n| \u0060snapchat\u0060 | \u00601080x1920\u0060, \u00602160x3840\u0060 |\n\nA \u0060platform\u0060 combined with any other \u0060resolution\u0060 is rejected with a\n400. When \u0060platform\u0060 is omitted, every resolution in the request schema\nis accepted.\n\nThe request is processed asynchronously. Poll\n\u0060GET /v1/generations/{generation_id}\u0060 with the returned \u0060generation_id\u0060\nuntil the generation is completed or failed. The completed generation\nreports the exact amount billed for the request in\n\u0060usage_cost_usd_micros\u0060.\n\nSupply the source creative as either an \u0060AssetIdentifier\u0060 reference\n(\u0060image_asset_identifier\u0060) or the raw image bytes directly (\u0060image\u0060,\nmultipart requests only). Provide exactly one of the two forms;\nsupplying both, or neither, is rejected with a 400.",
"Description": "Reframes the source creative to the exact requested ad resolution,\nregenerating the layout so text and key elements stay legible at the\ntarget size.\n\nSupply \u0060platform\u0060 to keep the whole advertisement clear of that\nplatform\u0027s own interface. The advertisement is generated at the largest\nrectangle that fits inside the platform\u0027s published safe zone for the\nrequested aspect ratio, placed at that rectangle\u0027s position, and the\nspace around it is filled in so the returned image is still exactly the\nrequested resolution. Omit \u0060platform\u0060 and the advertisement fills the\nwhole frame.\n\nEach platform accepts only the resolutions for which it publishes a\nsafe zone:\n\n| Platform | Accepted resolutions |\n| --- | --- |\n| \u0060google\u0060 | \u00601920x1080\u0060, \u00603840x2160\u0060, \u00601080x1080\u0060, \u00602400x2400\u0060, \u00602880x2880\u0060, \u00601080x1920\u0060, \u00602160x3840\u0060 |\n| \u0060tiktok\u0060 | \u00601920x1080\u0060, \u00603840x2160\u0060, \u00601080x1080\u0060, \u00602400x2400\u0060, \u00602880x2880\u0060, \u00601080x1920\u0060, \u00602160x3840\u0060 |\n| \u0060meta_stories\u0060 | \u00601080x1920\u0060, \u00602160x3840\u0060 |\n| \u0060meta_reels\u0060 | \u00601080x1920\u0060, \u00602160x3840\u0060 |\n| \u0060meta\u0060 (legacy) | \u00601080x1920\u0060, \u00602160x3840\u0060 |\n| \u0060snapchat\u0060 | \u00601080x1920\u0060, \u00602160x3840\u0060 |\n\nA \u0060platform\u0060 combined with any other \u0060resolution\u0060 is rejected with a\n400. When \u0060platform\u0060 is omitted, every resolution in the request schema\nis accepted.\n\nThe request is processed asynchronously. Poll\n\u0060GET /v1/generations/{generation_id}\u0060 with the returned \u0060generation_id\u0060\nuntil the generation is completed or failed. The completed generation\nreports the exact amount billed for the request in\n\u0060usage_cost_usd_micros\u0060.\n\nSupply the source creative as either an \u0060AssetIdentifier\u0060 reference\n(\u0060image_asset_identifier\u0060) or the raw image bytes directly (\u0060image\u0060,\nmultipart requests only). Provide exactly one of the two forms;\nsupplying both, or neither, is rejected with a 400.",
"Language": "http",
"Code": "### Advertisement Resizer v2\n# @name post_ad_resizer\nPOST {{host}}/v2/tool/ad-resizer?dry_run=false\nAuthorization: Bearer {{token}}\nContent-Type: multipart/form-data; boundary=AutoSDKBoundary\nAccept: application/json\n\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022image_asset_identifier\u0022\n\n{\u0022asset_type\u0022:\u0022RESPONSE\u0022,\u0022asset_id\u0022:\u00227uS_VESkRI6O3-sVgHQp_A\u0022}\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022image\u0022; filename=\u0022image.bin\u0022\nContent-Type: application/octet-stream\n\n\u003C ./image.bin\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022resolution\u0022\n\n300x250\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022platform\u0022\n\ngoogle\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022prompt\u0022\n\nstring\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022quality\u0022\n\nlow\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022num_images\u0022\n\n1\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022target_collection_id\u0022\n\nstring\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022private\u0022\n\ntrue\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022webhook_url\u0022\n\nhttps://api.example.com/webhooks/ideogram\n--AutoSDKBoundary--\n\n## Responses\n# 200\n# Description: Ad resize accepted for asynchronous processing.\n# Content-Type: application/json\n# 400\n# Description: Invalid input provided.\n# 401\n# Description: Unauthorized.\n# 402\n# Description: Insufficient credits or quota.\n# Content-Type: application/json\n# 403\n# Description: Not authorized to resize an ad.\n# 404\n# Description: Source asset not found.\n# 422\n# Description: The prompt was rejected by safety checks.\n# 429\n# Description: Too many requests.\n# Content-Type: application/json",
"Format": "http",
Expand Down
Loading
Loading