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 @@ -17,13 +17,17 @@ public partial interface IObjectRemovalClient
/// This is the `/v2` capability-first shape; no `model` or `model_uri` field is<br/>
/// exposed until a second backend exists.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <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::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.RemoveObjectFromV2AssetsResponse> PostRemoveObjectFromV2AssetsAsync(

global::Ideogram.RemoveObjectFromV2AssetsRequest request,
bool? dryRun = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
Expand All @@ -39,13 +43,17 @@ public partial interface IObjectRemovalClient
/// This is the `/v2` capability-first shape; no `model` or `model_uri` field is<br/>
/// exposed until a second backend exists.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <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::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.AutoSDKHttpResponse<global::Ideogram.RemoveObjectFromV2AssetsResponse>> PostRemoveObjectFromV2AssetsAsResponseAsync(

global::Ideogram.RemoveObjectFromV2AssetsRequest request,
bool? dryRun = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
Expand All @@ -61,6 +69,9 @@ public partial interface IObjectRemovalClient
/// This is the `/v2` capability-first shape; no `model` or `model_uri` field is<br/>
/// exposed until a second backend exists.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <param name="imageAssetIdentifier">
/// An identifier for an ideogram asset.<br/>
/// Example: {"asset_type":"RESPONSE","asset_id":"7uS_VESkRI6O3-sVgHQp_A"}
Expand Down Expand Up @@ -98,6 +109,7 @@ public partial interface IObjectRemovalClient
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.RemoveObjectFromV2AssetsResponse> PostRemoveObjectFromV2AssetsAsync(
bool? dryRun = default,
global::Ideogram.AssetIdentifier? imageAssetIdentifier = default,
byte[]? image = default,
string? imagename = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ public partial class ObjectRemovalClient
};
partial void PreparePostRemoveObjectFromV2AssetsArguments(
global::System.Net.Http.HttpClient httpClient,
ref bool? dryRun,
global::Ideogram.RemoveObjectFromV2AssetsRequest request);
partial void PreparePostRemoveObjectFromV2AssetsRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
bool? dryRun,
global::Ideogram.RemoveObjectFromV2AssetsRequest request);
partial void ProcessPostRemoveObjectFromV2AssetsResponse(
global::System.Net.Http.HttpClient httpClient,
Expand All @@ -54,19 +56,24 @@ partial void ProcessPostRemoveObjectFromV2AssetsResponseContent(
/// This is the `/v2` capability-first shape; no `model` or `model_uri` field is<br/>
/// exposed until a second backend exists.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <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::Ideogram.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Ideogram.RemoveObjectFromV2AssetsResponse> PostRemoveObjectFromV2AssetsAsync(

global::Ideogram.RemoveObjectFromV2AssetsRequest request,
bool? dryRun = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await PostRemoveObjectFromV2AssetsAsResponseAsync(

request: request,
dryRun: dryRun,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
Expand All @@ -86,13 +93,17 @@ partial void ProcessPostRemoveObjectFromV2AssetsResponseContent(
/// This is the `/v2` capability-first shape; no `model` or `model_uri` field is<br/>
/// exposed until a second backend exists.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <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::Ideogram.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Ideogram.AutoSDKHttpResponse<global::Ideogram.RemoveObjectFromV2AssetsResponse>> PostRemoveObjectFromV2AssetsAsResponseAsync(

global::Ideogram.RemoveObjectFromV2AssetsRequest request,
bool? dryRun = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -102,6 +113,7 @@ partial void ProcessPostRemoveObjectFromV2AssetsResponseContent(
client: HttpClient);
PreparePostRemoveObjectFromV2AssetsArguments(
httpClient: HttpClient,
dryRun: ref dryRun,
request: request);


Expand Down Expand Up @@ -130,6 +142,9 @@ partial void ProcessPostRemoveObjectFromV2AssetsResponseContent(
var __pathBuilder = new global::Ideogram.PathBuilder(
path: "/v2/image/remove-object/ideogram-1",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("dry_run", dryRun?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::Ideogram.AutoSDKRequestOptionsSupport.AppendQueryParameters(
path: __path,
Expand Down Expand Up @@ -299,6 +314,7 @@ request.Maskname is null
PreparePostRemoveObjectFromV2AssetsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
dryRun: dryRun,
request: request);

return __httpRequest;
Expand Down Expand Up @@ -853,6 +869,9 @@ request.Maskname is null
/// This is the `/v2` capability-first shape; no `model` or `model_uri` field is<br/>
/// exposed until a second backend exists.
/// </summary>
/// <param name="dryRun">
/// Default Value: false
/// </param>
/// <param name="imageAssetIdentifier">
/// An identifier for an ideogram asset.<br/>
/// Example: {"asset_type":"RESPONSE","asset_id":"7uS_VESkRI6O3-sVgHQp_A"}
Expand Down Expand Up @@ -890,6 +909,7 @@ request.Maskname is null
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Ideogram.RemoveObjectFromV2AssetsResponse> PostRemoveObjectFromV2AssetsAsync(
bool? dryRun = default,
global::Ideogram.AssetIdentifier? imageAssetIdentifier = default,
byte[]? image = default,
string? imagename = default,
Expand All @@ -916,6 +936,7 @@ request.Maskname is null
};

return await PostRemoveObjectFromV2AssetsAsync(
dryRun: dryRun,
request: __request,
requestOptions: requestOptions,
cancellationToken: cancellationToken).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@
"Slug": "post-remove-object-from-v2-assets",
"Description": "Remove a masked object from an image. For each of the source image and the\nmask, supply either an \u0060AssetIdentifier\u0060 reference (\u0060image_asset_identifier\u0060\n/ \u0060mask_asset_identifier\u0060) or the raw image bytes directly (\u0060image\u0060 / \u0060mask\u0060,\nmultipart requests only) \u2014 callers are never required to call\n\u0060POST /v2/assets\u0060 first. If both a reference and bytes are supplied for the\nsame input, the reference wins and the bytes are ignored.\n\nPoll for completion with \u0060GET /v1/generations/{generation_id}\u0060 using the\nreturned \u0060generation_id\u0060.\n\nThis is the \u0060/v2\u0060 capability-first shape; no \u0060model\u0060 or \u0060model_uri\u0060 field is\nexposed until a second backend exists.",
"Language": "http",
"Code": "### Remove a masked object from an image, by asset id or by uploaded bytes\n# @name post_remove_object_from_v2_assets\nPOST {{host}}/v2/image/remove-object/ideogram-1\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=\u0022mask_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=\u0022mask\u0022; filename=\u0022mask.bin\u0022\nContent-Type: application/octet-stream\n\n\u003C ./mask.bin\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022seed\u0022\n\n12345\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022target_collection_id\u0022\n\nstring\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022store_assets\u0022\n\nfalse\n--AutoSDKBoundary--\n\n## Responses\n# 200\n# Description: Object removal request accepted; poll for completion with \u0060GET /v1/generations/{generation_id}\u0060.\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 remove an object.\n# 404\n# Description: A referenced source or mask asset was not found.\n# 413\n# Description: An uploaded source or mask image is too large.\n# 429\n# Description: Too many requests.\n# Content-Type: application/json\n# 503\n# Description: The endpoint is temporarily unavailable.",
"Code": "### Remove a masked object from an image, by asset id or by uploaded bytes\n# @name post_remove_object_from_v2_assets\nPOST {{host}}/v2/image/remove-object/ideogram-1?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=\u0022mask_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=\u0022mask\u0022; filename=\u0022mask.bin\u0022\nContent-Type: application/octet-stream\n\n\u003C ./mask.bin\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022seed\u0022\n\n12345\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022target_collection_id\u0022\n\nstring\n--AutoSDKBoundary\nContent-Disposition: form-data; name=\u0022store_assets\u0022\n\nfalse\n--AutoSDKBoundary--\n\n## Responses\n# 200\n# Description: Object removal request accepted; poll for completion with \u0060GET /v1/generations/{generation_id}\u0060.\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 remove an object.\n# 404\n# Description: A referenced source or mask asset was not found.\n# 413\n# Description: An uploaded source or mask image is too large.\n# 429\n# Description: Too many requests.\n# Content-Type: application/json\n# 503\n# Description: The endpoint is temporarily unavailable.",
"Format": "http",
"OperationId": "post_remove_object_from_v2_assets",
"Setup": null
Expand Down
12 changes: 12 additions & 0 deletions src/libs/Ideogram/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -10415,6 +10415,18 @@
"post": {
"description": "Remove a masked object from an image. For each of the source image and the\nmask, supply either an `AssetIdentifier` reference (`image_asset_identifier`\n/ `mask_asset_identifier`) or the raw image bytes directly (`image` / `mask`,\nmultipart requests only) — callers are never required to call\n`POST /v2/assets` first. If both a reference and bytes are supplied for the\nsame input, the reference wins and the bytes are ignored.\n\nPoll for completion with `GET /v1/generations/{generation_id}` using the\nreturned `generation_id`.\n\nThis is the `/v2` capability-first shape; no `model` or `model_uri` field is\nexposed until a second backend exists.\n",
"operationId": "post_remove_object_from_v2_assets",
"parameters": [
{
"description": "When true, the request is validated and priced but not run: nothing is\ngenerated, stored, or billed, and no safety review is performed. The\nresponse is a `PriceQuote` object instead of the usual response for this\nendpoint. Send exactly the request you would send to generate, so the\nquote reflects the same options.\n",
"in": "query",
"name": "dry_run",
"required": false,
"schema": {
"default": false,
"type": "boolean"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
Expand Down
Loading