From 0deb713cb04c8d4ab079d6c532153212fd4e1856 Mon Sep 17 00:00:00 2001 From: apcha-oai <228803254+apcha-oai@users.noreply.github.com> Date: Thu, 20 Aug 2026 23:34:17 +0000 Subject: [PATCH] chore(api): clarify image transparency and audio delta docs Castiron-Internal-PR: https://github.com/openai/openai-node-internal/pull/70 Castiron-Source-SHA: eb589fd77a6cbf4c4d727008507559511ac59eb5 Castiron-Public-Base-SHA: 43173195e09bc916d58b4caffc6bf2e73002109f --- .castiron.stats.yml | 14 ++-- api_reference/openapi.transformed.yml | 87 ++++++++++------------- src/resources/beta/responses/responses.ts | 17 ++--- src/resources/images.ts | 34 ++++----- src/resources/realtime/realtime.ts | 5 +- src/resources/responses/responses.ts | 17 ++--- 6 files changed, 70 insertions(+), 104 deletions(-) diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 210a46897f..4bc34e8d65 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: 7793d050-80cb-4780-a86c-8946458ffcf2 -openapi_spec_hash: a85edbfc22ff719d064bce2705c7394e -openapi_transformed_spec_hash: f8e7644df5aee22dfcd0ea2b70942054 -config_hash: 85382dd94c503b5d225adc7636a77c9f -codegen_sha: a43cf9fdba6b38cce8895bde5325bdaeb4f0d410 -codegen_hash: 513299024e9d03cd7d2e30fc3039b6f6ca0d15ba9f8ed19a2e9bf99467b01d64 -public_codegen_sha: bcc959633ff60cf66571c15e55460f8f90a12191 +generation_id: d0402f5b-83b7-4452-9cf9-1cdc0f123988 +openapi_spec_hash: 92700e1a33a4f6174a01b46648c8186a +openapi_transformed_spec_hash: e37bbe0f04caa6093f1cb5d65d23ad03 +config_hash: d13c582815d0db08c374985806be7352 +codegen_sha: c63aa69f03e643fb33c7ae7af79751c51472c651 +codegen_hash: 293a4d1a245e83b84b133b17b9ca4758c78abcc8b0b466595efd5f23b60db6f7 +public_codegen_sha: f79c7f806e382e1057528b383c8603c8c675fe7c diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index f14d867a01..c12baba61f 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -33071,18 +33071,14 @@ components: nullable: true description: | Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Must be one of `transparent`, `opaque`, or `auto` (default value). When + `auto` is used, the model will automatically determine the best + background for the image. + + Transparent backgrounds are available for supported GPT Image models. + For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in + preview. When using `transparent`, set the output format to `png` or + `webp`. model: anyOf: - type: string @@ -33310,18 +33306,14 @@ components: nullable: true description: | Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Must be one of `transparent`, `opaque`, or `auto` (default value). When + `auto` is used, the model will automatically determine the best + background for the image. + + Transparent backgrounds are available for supported GPT Image models. + For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in + preview. When using `transparent`, set the output format to `png` or + `webp`. style: type: string enum: @@ -35512,7 +35504,7 @@ components: - type: 'null' default: auto example: transparent - description: Background behavior for generated image output. + description: Set the background of the generated image output. Transparent backgrounds are available for supported GPT Image models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`, set the output format to `png` or `webp`. stream: anyOf: - type: boolean @@ -39198,18 +39190,14 @@ components: - auto description: | Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Must be one of `transparent`, `opaque`, or `auto` (default value). When + `auto` is used, the model will automatically determine the best + background for the image. + + Transparent backgrounds are available for supported GPT Image models. + For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in + preview. When using `transparent`, set the output format to `png` or + `webp`. default: auto input_fidelity: anyOf: @@ -51417,8 +51405,9 @@ components: RealtimeTranslationServerEventSessionOutputAudioDelta: type: object description: | - Returned when translated output audio is available. Output audio deltas are - 200 ms frames of PCM16 audio. + Returned when translated output audio is available. The `delta` contains a + PCM16 audio chunk whose length can vary. Clients should decode and queue the + complete delta instead of assuming a fixed byte or sample count. properties: event_id: type: string @@ -68577,18 +68566,14 @@ components: - auto description: | Allows to set transparency for the background of the generated image(s). - This parameter is only supported for GPT image models that support - transparent backgrounds. Must be one of `transparent`, `opaque`, or - `auto` (default value). When `auto` is used, the model will - automatically determine the best background for the image. - - `gpt-image-2` and `gpt-image-2-2026-04-21` do not support - transparent backgrounds. Requests with `background` set to - `transparent` will return an error for these models; use `opaque` or - `auto` instead. - - If `transparent`, the output format needs to support transparency, - so it should be set to either `png` (default value) or `webp`. + Must be one of `transparent`, `opaque`, or `auto` (default value). When + `auto` is used, the model will automatically determine the best + background for the image. + + Transparent backgrounds are available for supported GPT Image models. + For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in + preview. When using `transparent`, set the output format to `png` or + `webp`. default: auto input_fidelity: anyOf: diff --git a/src/resources/beta/responses/responses.ts b/src/resources/beta/responses/responses.ts index fc5656d41a..8f64fcc80e 100644 --- a/src/resources/beta/responses/responses.ts +++ b/src/resources/beta/responses/responses.ts @@ -12438,18 +12438,13 @@ export namespace BetaTool { action?: 'generate' | 'edit' | 'auto'; /** - * Allows to set transparency for the background of the generated image(s). This - * parameter is only supported for GPT image models that support transparent - * backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value). - * When `auto` is used, the model will automatically determine the best background - * for the image. + * Allows to set transparency for the background of the generated image(s). Must be + * one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + * the model will automatically determine the best background for the image. * - * `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent - * backgrounds. Requests with `background` set to `transparent` will return an - * error for these models; use `opaque` or `auto` instead. - * - * If `transparent`, the output format needs to support transparency, so it should - * be set to either `png` (default value) or `webp`. + * Transparent backgrounds are available for supported GPT Image models. For + * `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When + * using `transparent`, set the output format to `png` or `webp`. */ background?: 'transparent' | 'opaque' | 'auto'; diff --git a/src/resources/images.ts b/src/resources/images.ts index 43ab16f5b9..2eca4ead50 100644 --- a/src/resources/images.ts +++ b/src/resources/images.ts @@ -584,18 +584,13 @@ export interface ImageEditParamsBase { prompt: string; /** - * Allows to set transparency for the background of the generated image(s). This - * parameter is only supported for GPT image models that support transparent - * backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value). - * When `auto` is used, the model will automatically determine the best background - * for the image. + * Allows to set transparency for the background of the generated image(s). Must be + * one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + * the model will automatically determine the best background for the image. * - * `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent - * backgrounds. Requests with `background` set to `transparent` will return an - * error for these models; use `opaque` or `auto` instead. - * - * If `transparent`, the output format needs to support transparency, so it should - * be set to either `png` (default value) or `webp`. + * Transparent backgrounds are available for supported GPT Image models. For + * `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When + * using `transparent`, set the output format to `png` or `webp`. */ background?: 'transparent' | 'opaque' | 'auto' | null; @@ -730,18 +725,13 @@ export interface ImageGenerateParamsBase { prompt: string; /** - * Allows to set transparency for the background of the generated image(s). This - * parameter is only supported for GPT image models that support transparent - * backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value). - * When `auto` is used, the model will automatically determine the best background - * for the image. - * - * `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent - * backgrounds. Requests with `background` set to `transparent` will return an - * error for these models; use `opaque` or `auto` instead. + * Allows to set transparency for the background of the generated image(s). Must be + * one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + * the model will automatically determine the best background for the image. * - * If `transparent`, the output format needs to support transparency, so it should - * be set to either `png` (default value) or `webp`. + * Transparent backgrounds are available for supported GPT Image models. For + * `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When + * using `transparent`, set the output format to `png` or `webp`. */ background?: 'transparent' | 'opaque' | 'auto' | null; diff --git a/src/resources/realtime/realtime.ts b/src/resources/realtime/realtime.ts index ccc470522e..801342922a 100644 --- a/src/resources/realtime/realtime.ts +++ b/src/resources/realtime/realtime.ts @@ -3850,8 +3850,9 @@ export interface RealtimeTranslationInputTranscriptDeltaEvent { } /** - * Returned when translated output audio is available. Output audio deltas are 200 - * ms frames of PCM16 audio. + * Returned when translated output audio is available. The `delta` contains a PCM16 + * audio chunk whose length can vary. Clients should decode and queue the complete + * delta instead of assuming a fixed byte or sample count. */ export interface RealtimeTranslationOutputAudioDeltaEvent { /** diff --git a/src/resources/responses/responses.ts b/src/resources/responses/responses.ts index 31b891763d..1a152ecdea 100644 --- a/src/resources/responses/responses.ts +++ b/src/resources/responses/responses.ts @@ -9336,18 +9336,13 @@ export namespace Tool { action?: 'generate' | 'edit' | 'auto'; /** - * Allows to set transparency for the background of the generated image(s). This - * parameter is only supported for GPT image models that support transparent - * backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value). - * When `auto` is used, the model will automatically determine the best background - * for the image. + * Allows to set transparency for the background of the generated image(s). Must be + * one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used, + * the model will automatically determine the best background for the image. * - * `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent - * backgrounds. Requests with `background` set to `transparent` will return an - * error for these models; use `opaque` or `auto` instead. - * - * If `transparent`, the output format needs to support transparency, so it should - * be set to either `png` (default value) or `webp`. + * Transparent backgrounds are available for supported GPT Image models. For + * `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When + * using `transparent`, set the output format to `png` or `webp`. */ background?: 'transparent' | 'opaque' | 'auto';