Skip to content

Commit 6963729

Browse files
feat(api): manual updates
1 parent a296b66 commit 6963729

11 files changed

Lines changed: 67 additions & 84 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 232
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-5ae2eda70e6a4a375842fb8bf3e88deab8e0aad1b3871b86e73274f131bb37ce.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-5002c7ce1688cf372f6c268507494c5e6396f38db8d85d79029d949b7bb06fe3.yml
33
openapi_spec_hash: 92713b0825f6b8760836778e6d27e837
4-
config_hash: c15a744b2771a3948032b2438475b330
4+
config_hash: c6cf65d9b19a16ce4313602a2204d48f

src/resources/images.ts

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,14 @@ export interface ImageEditParamsBase {
579579

580580
/**
581581
* Allows to set transparency for the background of the generated image(s). This
582-
* parameter is only supported for the GPT image models. Must be one of
583-
* `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
584-
* model will automatically determine the best background for the image.
582+
* parameter is only supported for GPT image models that support transparent
583+
* backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
584+
* When `auto` is used, the model will automatically determine the best background
585+
* for the image.
586+
*
587+
* `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
588+
* backgrounds. Requests with `background` set to `transparent` will return an
589+
* error for these models; use `opaque` or `auto` instead.
585590
*
586591
* If `transparent`, the output format needs to support transparency, so it should
587592
* be set to either `png` (default value) or `webp`.
@@ -656,11 +661,19 @@ export interface ImageEditParamsBase {
656661
response_format?: 'url' | 'b64_json' | null;
657662

658663
/**
659-
* The size of the generated images. Must be one of `1024x1024`, `1536x1024`
660-
* (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
661-
* models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
664+
* The size of the generated images. For `gpt-image-2` and
665+
* `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
666+
* strings, for example `1536x864`. Width and height must both be divisible by 16
667+
* and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
668+
* `2560x1440` are experimental, and the maximum supported resolution is
669+
* `3840x2160`. The requested size must also satisfy the model's current pixel and
670+
* edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
671+
* supported by the GPT image models; `auto` is supported for models that allow
672+
* automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
673+
* `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
674+
* `1024x1792`.
662675
*/
663-
size?: '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null;
676+
size?: string | null;
664677

665678
/**
666679
* Edit the image in streaming mode. Defaults to `false`. See the
@@ -712,9 +725,14 @@ export interface ImageGenerateParamsBase {
712725

713726
/**
714727
* Allows to set transparency for the background of the generated image(s). This
715-
* parameter is only supported for the GPT image models. Must be one of
716-
* `transparent`, `opaque` or `auto` (default value). When `auto` is used, the
717-
* model will automatically determine the best background for the image.
728+
* parameter is only supported for GPT image models that support transparent
729+
* backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
730+
* When `auto` is used, the model will automatically determine the best background
731+
* for the image.
732+
*
733+
* `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
734+
* backgrounds. Requests with `background` set to `transparent` will return an
735+
* error for these models; use `opaque` or `auto` instead.
718736
*
719737
* If `transparent`, the output format needs to support transparency, so it should
720738
* be set to either `png` (default value) or `webp`.
@@ -785,21 +803,19 @@ export interface ImageGenerateParamsBase {
785803
response_format?: 'url' | 'b64_json' | null;
786804

787805
/**
788-
* The size of the generated images. Must be one of `1024x1024`, `1536x1024`
789-
* (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
790-
* models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
791-
* `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
792-
*/
793-
size?:
794-
| 'auto'
795-
| '1024x1024'
796-
| '1536x1024'
797-
| '1024x1536'
798-
| '256x256'
799-
| '512x512'
800-
| '1792x1024'
801-
| '1024x1792'
802-
| null;
806+
* The size of the generated images. For `gpt-image-2` and
807+
* `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
808+
* strings, for example `1536x864`. Width and height must both be divisible by 16
809+
* and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
810+
* `2560x1440` are experimental, and the maximum supported resolution is
811+
* `3840x2160`. The requested size must also satisfy the model's current pixel and
812+
* edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
813+
* supported by the GPT image models; `auto` is supported for models that allow
814+
* automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
815+
* `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
816+
* `1024x1792`.
817+
*/
818+
size?: string | null;
803819

804820
/**
805821
* Generate the image in streaming mode. Defaults to `false`. See the

src/resources/realtime/api.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,3 @@ Methods:
126126
- <code title="post /realtime/calls/{call_id}/hangup">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">hangup</a>(callID) -> void</code>
127127
- <code title="post /realtime/calls/{call_id}/refer">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">refer</a>(callID, { ...params }) -> void</code>
128128
- <code title="post /realtime/calls/{call_id}/reject">client.realtime.calls.<a href="./src/resources/realtime/calls.ts">reject</a>(callID, { ...params }) -> void</code>
129-
130-
## Translations
131-
132-
### ClientSecrets
133-
134-
### Calls

src/resources/realtime/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ export {
1111
type ClientSecretCreateParams,
1212
} from './client-secrets';
1313
export { Realtime } from './realtime';
14-
export { Translations } from './translations/index';

src/resources/realtime/realtime.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@ import {
1616
RealtimeTranscriptionSessionTurnDetection,
1717
} from './client-secrets';
1818
import * as ResponsesAPI from '../responses/responses';
19-
import * as TranslationsAPI from './translations/translations';
20-
import { Translations } from './translations/translations';
2119

2220
export class Realtime extends APIResource {
2321
clientSecrets: ClientSecretsAPI.ClientSecrets = new ClientSecretsAPI.ClientSecrets(this._client);
2422
calls: CallsAPI.Calls = new CallsAPI.Calls(this._client);
25-
translations: TranslationsAPI.Translations = new TranslationsAPI.Translations(this._client);
2623
}
2724

2825
export interface AudioTranscription {
@@ -4768,7 +4765,6 @@ export namespace TranscriptionSessionUpdatedEvent {
47684765

47694766
Realtime.ClientSecrets = ClientSecrets;
47704767
Realtime.Calls = Calls;
4771-
Realtime.Translations = Translations;
47724768

47734769
export declare namespace Realtime {
47744770
export {
@@ -4891,6 +4887,4 @@ export declare namespace Realtime {
48914887
type CallReferParams as CallReferParams,
48924888
type CallRejectParams as CallRejectParams,
48934889
};
4894-
4895-
export { Translations as Translations };
48964890
}

src/resources/realtime/translations.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/resources/realtime/translations/calls.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/resources/realtime/translations/client-secrets.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/resources/realtime/translations/index.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/resources/realtime/translations/translations.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)