增加环绕侦察场景适配

This commit is contained in:
2026-01-08 15:44:38 +08:00
parent 3eba1f962b
commit 10c5bb5a8a
5441 changed files with 40219 additions and 379695 deletions

View File

@@ -151,19 +151,20 @@ class Images(SyncAPIResource):
Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less than
For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
`gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
50MB. You can provide up to 16 images.
For `dall-e-2`, you can only provide one image, and it should be a square `png`
file less than 4MB.
prompt: A text description of the desired image(s). The maximum length is 1000
characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
characters for `dall-e-2`, and 32000 characters for the GPT image models.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
@@ -178,18 +179,18 @@ class Images(SyncAPIResource):
the mask will be applied on the first image. Must be a valid PNG file, less than
4MB, and have the same dimensions as `image`.
model: The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are
supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1`
is used.
model: The model to use for image generation. Only `dall-e-2` and the GPT image models
are supported. Defaults to `dall-e-2` unless a parameter specific to the GPT
image models is used.
n: The number of images to generate. Must be between 1 and 10.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. The
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
default value is `png`.
partial_images: The number of partial images to generate. This parameter is used for streaming
@@ -200,17 +201,17 @@ class Images(SyncAPIResource):
are generated if the full image is generated more quickly.
quality: The quality of the image that will be generated. `high`, `medium` and `low` are
only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality.
Defaults to `auto`.
only supported for the GPT image models. `dall-e-2` only supports `standard`
quality. Defaults to `auto`.
response_format: The format in which the generated images are returned. Must be one of `url` or
`b64_json`. URLs are only valid for 60 minutes after the image has been
generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1`
will always return base64-encoded images.
generated. This parameter is only supported for `dall-e-2`, as the GPT image
models always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
stream: Edit the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
@@ -264,23 +265,24 @@ class Images(SyncAPIResource):
Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less than
For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
`gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
50MB. You can provide up to 16 images.
For `dall-e-2`, you can only provide one image, and it should be a square `png`
file less than 4MB.
prompt: A text description of the desired image(s). The maximum length is 1000
characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
characters for `dall-e-2`, and 32000 characters for the GPT image models.
stream: Edit the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
@@ -295,18 +297,18 @@ class Images(SyncAPIResource):
the mask will be applied on the first image. Must be a valid PNG file, less than
4MB, and have the same dimensions as `image`.
model: The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are
supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1`
is used.
model: The model to use for image generation. Only `dall-e-2` and the GPT image models
are supported. Defaults to `dall-e-2` unless a parameter specific to the GPT
image models is used.
n: The number of images to generate. Must be between 1 and 10.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. The
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
default value is `png`.
partial_images: The number of partial images to generate. This parameter is used for streaming
@@ -317,17 +319,17 @@ class Images(SyncAPIResource):
are generated if the full image is generated more quickly.
quality: The quality of the image that will be generated. `high`, `medium` and `low` are
only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality.
Defaults to `auto`.
only supported for the GPT image models. `dall-e-2` only supports `standard`
quality. Defaults to `auto`.
response_format: The format in which the generated images are returned. Must be one of `url` or
`b64_json`. URLs are only valid for 60 minutes after the image has been
generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1`
will always return base64-encoded images.
generated. This parameter is only supported for `dall-e-2`, as the GPT image
models always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
user: A unique identifier representing your end-user, which can help OpenAI to monitor
and detect abuse.
@@ -377,23 +379,24 @@ class Images(SyncAPIResource):
Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less than
For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
`gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
50MB. You can provide up to 16 images.
For `dall-e-2`, you can only provide one image, and it should be a square `png`
file less than 4MB.
prompt: A text description of the desired image(s). The maximum length is 1000
characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
characters for `dall-e-2`, and 32000 characters for the GPT image models.
stream: Edit the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
@@ -408,18 +411,18 @@ class Images(SyncAPIResource):
the mask will be applied on the first image. Must be a valid PNG file, less than
4MB, and have the same dimensions as `image`.
model: The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are
supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1`
is used.
model: The model to use for image generation. Only `dall-e-2` and the GPT image models
are supported. Defaults to `dall-e-2` unless a parameter specific to the GPT
image models is used.
n: The number of images to generate. Must be between 1 and 10.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. The
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
default value is `png`.
partial_images: The number of partial images to generate. This parameter is used for streaming
@@ -430,17 +433,17 @@ class Images(SyncAPIResource):
are generated if the full image is generated more quickly.
quality: The quality of the image that will be generated. `high`, `medium` and `low` are
only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality.
Defaults to `auto`.
only supported for the GPT image models. `dall-e-2` only supports `standard`
quality. Defaults to `auto`.
response_format: The format in which the generated images are returned. Must be one of `url` or
`b64_json`. URLs are only valid for 60 minutes after the image has been
generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1`
will always return base64-encoded images.
generated. This parameter is only supported for `dall-e-2`, as the GPT image
models always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
user: A unique identifier representing your end-user, which can help OpenAI to monitor
and detect abuse.
@@ -555,33 +558,34 @@ class Images(SyncAPIResource):
Args:
prompt: A text description of the desired image(s). The maximum length is 32000
characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters
for `dall-e-3`.
characters for the GPT image models, 1000 characters for `dall-e-2` and 4000
characters for `dall-e-3`.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or
`gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to
`gpt-image-1` is used.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to
`dall-e-2` unless a parameter specific to the GPT image models is used.
moderation: Control the content-moderation level for images generated by `gpt-image-1`. Must
be either `low` for less restrictive filtering or `auto` (default value).
moderation: Control the content-moderation level for images generated by the GPT image
models. Must be either `low` for less restrictive filtering or `auto` (default
value).
n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
`n=1` is supported.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
partial_images: The number of partial images to generate. This parameter is used for streaming
responses that return partial images. Value must be between 0 and 3. When set to
@@ -594,23 +598,23 @@ class Images(SyncAPIResource):
- `auto` (default value) will automatically select the best quality for the
given model.
- `high`, `medium` and `low` are supported for `gpt-image-1`.
- `high`, `medium` and `low` are supported for the GPT image models.
- `hd` and `standard` are supported for `dall-e-3`.
- `standard` is the only option for `dall-e-2`.
response_format: The format in which generated images with `dall-e-2` and `dall-e-3` are
returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
after the image has been generated. This parameter isn't supported for
`gpt-image-1` which will always return base64-encoded images.
after the image has been generated. This parameter isn't supported for the GPT
image models, which always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and
one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
`1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
stream: Generate the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information. This parameter is only supported for `gpt-image-1`.
for more information. This parameter is only supported for the GPT image models.
style: The style of the generated images. This parameter is only supported for
`dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
@@ -665,37 +669,38 @@ class Images(SyncAPIResource):
Args:
prompt: A text description of the desired image(s). The maximum length is 32000
characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters
for `dall-e-3`.
characters for the GPT image models, 1000 characters for `dall-e-2` and 4000
characters for `dall-e-3`.
stream: Generate the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information. This parameter is only supported for `gpt-image-1`.
for more information. This parameter is only supported for the GPT image models.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or
`gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to
`gpt-image-1` is used.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to
`dall-e-2` unless a parameter specific to the GPT image models is used.
moderation: Control the content-moderation level for images generated by `gpt-image-1`. Must
be either `low` for less restrictive filtering or `auto` (default value).
moderation: Control the content-moderation level for images generated by the GPT image
models. Must be either `low` for less restrictive filtering or `auto` (default
value).
n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
`n=1` is supported.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
partial_images: The number of partial images to generate. This parameter is used for streaming
responses that return partial images. Value must be between 0 and 3. When set to
@@ -708,19 +713,19 @@ class Images(SyncAPIResource):
- `auto` (default value) will automatically select the best quality for the
given model.
- `high`, `medium` and `low` are supported for `gpt-image-1`.
- `high`, `medium` and `low` are supported for the GPT image models.
- `hd` and `standard` are supported for `dall-e-3`.
- `standard` is the only option for `dall-e-2`.
response_format: The format in which generated images with `dall-e-2` and `dall-e-3` are
returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
after the image has been generated. This parameter isn't supported for
`gpt-image-1` which will always return base64-encoded images.
after the image has been generated. This parameter isn't supported for the GPT
image models, which always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and
one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
`1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
style: The style of the generated images. This parameter is only supported for
`dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
@@ -775,37 +780,38 @@ class Images(SyncAPIResource):
Args:
prompt: A text description of the desired image(s). The maximum length is 32000
characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters
for `dall-e-3`.
characters for the GPT image models, 1000 characters for `dall-e-2` and 4000
characters for `dall-e-3`.
stream: Generate the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information. This parameter is only supported for `gpt-image-1`.
for more information. This parameter is only supported for the GPT image models.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or
`gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to
`gpt-image-1` is used.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to
`dall-e-2` unless a parameter specific to the GPT image models is used.
moderation: Control the content-moderation level for images generated by `gpt-image-1`. Must
be either `low` for less restrictive filtering or `auto` (default value).
moderation: Control the content-moderation level for images generated by the GPT image
models. Must be either `low` for less restrictive filtering or `auto` (default
value).
n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
`n=1` is supported.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
partial_images: The number of partial images to generate. This parameter is used for streaming
responses that return partial images. Value must be between 0 and 3. When set to
@@ -818,19 +824,19 @@ class Images(SyncAPIResource):
- `auto` (default value) will automatically select the best quality for the
given model.
- `high`, `medium` and `low` are supported for `gpt-image-1`.
- `high`, `medium` and `low` are supported for the GPT image models.
- `hd` and `standard` are supported for `dall-e-3`.
- `standard` is the only option for `dall-e-2`.
response_format: The format in which generated images with `dall-e-2` and `dall-e-3` are
returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
after the image has been generated. This parameter isn't supported for
`gpt-image-1` which will always return base64-encoded images.
after the image has been generated. This parameter isn't supported for the GPT
image models, which always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and
one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
`1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
style: The style of the generated images. This parameter is only supported for
`dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
@@ -1038,19 +1044,20 @@ class AsyncImages(AsyncAPIResource):
Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less than
For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
`gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
50MB. You can provide up to 16 images.
For `dall-e-2`, you can only provide one image, and it should be a square `png`
file less than 4MB.
prompt: A text description of the desired image(s). The maximum length is 1000
characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
characters for `dall-e-2`, and 32000 characters for the GPT image models.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
@@ -1065,18 +1072,18 @@ class AsyncImages(AsyncAPIResource):
the mask will be applied on the first image. Must be a valid PNG file, less than
4MB, and have the same dimensions as `image`.
model: The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are
supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1`
is used.
model: The model to use for image generation. Only `dall-e-2` and the GPT image models
are supported. Defaults to `dall-e-2` unless a parameter specific to the GPT
image models is used.
n: The number of images to generate. Must be between 1 and 10.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. The
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
default value is `png`.
partial_images: The number of partial images to generate. This parameter is used for streaming
@@ -1087,17 +1094,17 @@ class AsyncImages(AsyncAPIResource):
are generated if the full image is generated more quickly.
quality: The quality of the image that will be generated. `high`, `medium` and `low` are
only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality.
Defaults to `auto`.
only supported for the GPT image models. `dall-e-2` only supports `standard`
quality. Defaults to `auto`.
response_format: The format in which the generated images are returned. Must be one of `url` or
`b64_json`. URLs are only valid for 60 minutes after the image has been
generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1`
will always return base64-encoded images.
generated. This parameter is only supported for `dall-e-2`, as the GPT image
models always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
stream: Edit the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
@@ -1151,23 +1158,24 @@ class AsyncImages(AsyncAPIResource):
Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less than
For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
`gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
50MB. You can provide up to 16 images.
For `dall-e-2`, you can only provide one image, and it should be a square `png`
file less than 4MB.
prompt: A text description of the desired image(s). The maximum length is 1000
characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
characters for `dall-e-2`, and 32000 characters for the GPT image models.
stream: Edit the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
@@ -1182,18 +1190,18 @@ class AsyncImages(AsyncAPIResource):
the mask will be applied on the first image. Must be a valid PNG file, less than
4MB, and have the same dimensions as `image`.
model: The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are
supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1`
is used.
model: The model to use for image generation. Only `dall-e-2` and the GPT image models
are supported. Defaults to `dall-e-2` unless a parameter specific to the GPT
image models is used.
n: The number of images to generate. Must be between 1 and 10.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. The
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
default value is `png`.
partial_images: The number of partial images to generate. This parameter is used for streaming
@@ -1204,17 +1212,17 @@ class AsyncImages(AsyncAPIResource):
are generated if the full image is generated more quickly.
quality: The quality of the image that will be generated. `high`, `medium` and `low` are
only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality.
Defaults to `auto`.
only supported for the GPT image models. `dall-e-2` only supports `standard`
quality. Defaults to `auto`.
response_format: The format in which the generated images are returned. Must be one of `url` or
`b64_json`. URLs are only valid for 60 minutes after the image has been
generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1`
will always return base64-encoded images.
generated. This parameter is only supported for `dall-e-2`, as the GPT image
models always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
user: A unique identifier representing your end-user, which can help OpenAI to monitor
and detect abuse.
@@ -1264,23 +1272,24 @@ class AsyncImages(AsyncAPIResource):
Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
For `gpt-image-1`, each image should be a `png`, `webp`, or `jpg` file less than
For the GPT image models (`gpt-image-1`, `gpt-image-1-mini`, and
`gpt-image-1.5`), each image should be a `png`, `webp`, or `jpg` file less than
50MB. You can provide up to 16 images.
For `dall-e-2`, you can only provide one image, and it should be a square `png`
file less than 4MB.
prompt: A text description of the desired image(s). The maximum length is 1000
characters for `dall-e-2`, and 32000 characters for `gpt-image-1`.
characters for `dall-e-2`, and 32000 characters for the GPT image models.
stream: Edit the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
@@ -1295,18 +1304,18 @@ class AsyncImages(AsyncAPIResource):
the mask will be applied on the first image. Must be a valid PNG file, less than
4MB, and have the same dimensions as `image`.
model: The model to use for image generation. Only `dall-e-2` and `gpt-image-1` are
supported. Defaults to `dall-e-2` unless a parameter specific to `gpt-image-1`
is used.
model: The model to use for image generation. Only `dall-e-2` and the GPT image models
are supported. Defaults to `dall-e-2` unless a parameter specific to the GPT
image models is used.
n: The number of images to generate. Must be between 1 and 10.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`. The
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The
default value is `png`.
partial_images: The number of partial images to generate. This parameter is used for streaming
@@ -1317,17 +1326,17 @@ class AsyncImages(AsyncAPIResource):
are generated if the full image is generated more quickly.
quality: The quality of the image that will be generated. `high`, `medium` and `low` are
only supported for `gpt-image-1`. `dall-e-2` only supports `standard` quality.
Defaults to `auto`.
only supported for the GPT image models. `dall-e-2` only supports `standard`
quality. Defaults to `auto`.
response_format: The format in which the generated images are returned. Must be one of `url` or
`b64_json`. URLs are only valid for 60 minutes after the image has been
generated. This parameter is only supported for `dall-e-2`, as `gpt-image-1`
will always return base64-encoded images.
generated. This parameter is only supported for `dall-e-2`, as the GPT image
models always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`.
user: A unique identifier representing your end-user, which can help OpenAI to monitor
and detect abuse.
@@ -1442,33 +1451,34 @@ class AsyncImages(AsyncAPIResource):
Args:
prompt: A text description of the desired image(s). The maximum length is 32000
characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters
for `dall-e-3`.
characters for the GPT image models, 1000 characters for `dall-e-2` and 4000
characters for `dall-e-3`.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or
`gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to
`gpt-image-1` is used.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to
`dall-e-2` unless a parameter specific to the GPT image models is used.
moderation: Control the content-moderation level for images generated by `gpt-image-1`. Must
be either `low` for less restrictive filtering or `auto` (default value).
moderation: Control the content-moderation level for images generated by the GPT image
models. Must be either `low` for less restrictive filtering or `auto` (default
value).
n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
`n=1` is supported.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
partial_images: The number of partial images to generate. This parameter is used for streaming
responses that return partial images. Value must be between 0 and 3. When set to
@@ -1481,23 +1491,23 @@ class AsyncImages(AsyncAPIResource):
- `auto` (default value) will automatically select the best quality for the
given model.
- `high`, `medium` and `low` are supported for `gpt-image-1`.
- `high`, `medium` and `low` are supported for the GPT image models.
- `hd` and `standard` are supported for `dall-e-3`.
- `standard` is the only option for `dall-e-2`.
response_format: The format in which generated images with `dall-e-2` and `dall-e-3` are
returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
after the image has been generated. This parameter isn't supported for
`gpt-image-1` which will always return base64-encoded images.
after the image has been generated. This parameter isn't supported for the GPT
image models, which always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and
one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
`1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
stream: Generate the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information. This parameter is only supported for `gpt-image-1`.
for more information. This parameter is only supported for the GPT image models.
style: The style of the generated images. This parameter is only supported for
`dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
@@ -1552,37 +1562,38 @@ class AsyncImages(AsyncAPIResource):
Args:
prompt: A text description of the desired image(s). The maximum length is 32000
characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters
for `dall-e-3`.
characters for the GPT image models, 1000 characters for `dall-e-2` and 4000
characters for `dall-e-3`.
stream: Generate the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information. This parameter is only supported for `gpt-image-1`.
for more information. This parameter is only supported for the GPT image models.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or
`gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to
`gpt-image-1` is used.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to
`dall-e-2` unless a parameter specific to the GPT image models is used.
moderation: Control the content-moderation level for images generated by `gpt-image-1`. Must
be either `low` for less restrictive filtering or `auto` (default value).
moderation: Control the content-moderation level for images generated by the GPT image
models. Must be either `low` for less restrictive filtering or `auto` (default
value).
n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
`n=1` is supported.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
partial_images: The number of partial images to generate. This parameter is used for streaming
responses that return partial images. Value must be between 0 and 3. When set to
@@ -1595,19 +1606,19 @@ class AsyncImages(AsyncAPIResource):
- `auto` (default value) will automatically select the best quality for the
given model.
- `high`, `medium` and `low` are supported for `gpt-image-1`.
- `high`, `medium` and `low` are supported for the GPT image models.
- `hd` and `standard` are supported for `dall-e-3`.
- `standard` is the only option for `dall-e-2`.
response_format: The format in which generated images with `dall-e-2` and `dall-e-3` are
returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
after the image has been generated. This parameter isn't supported for
`gpt-image-1` which will always return base64-encoded images.
after the image has been generated. This parameter isn't supported for the GPT
image models, which always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and
one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
`1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
style: The style of the generated images. This parameter is only supported for
`dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean
@@ -1662,37 +1673,38 @@ class AsyncImages(AsyncAPIResource):
Args:
prompt: A text description of the desired image(s). The maximum length is 32000
characters for `gpt-image-1`, 1000 characters for `dall-e-2` and 4000 characters
for `dall-e-3`.
characters for the GPT image models, 1000 characters for `dall-e-2` and 4000
characters for `dall-e-3`.
stream: Generate the image in streaming mode. Defaults to `false`. See the
[Image generation guide](https://platform.openai.com/docs/guides/image-generation)
for more information. This parameter is only supported for `gpt-image-1`.
for more information. This parameter is only supported for the GPT image models.
background: Allows to set transparency for the background of the generated image(s). This
parameter is only supported for `gpt-image-1`. 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.
parameter is only supported for the GPT image models. 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`.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or
`gpt-image-1`. Defaults to `dall-e-2` unless a parameter specific to
`gpt-image-1` is used.
model: The model to use for image generation. One of `dall-e-2`, `dall-e-3`, or a GPT
image model (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`). Defaults to
`dall-e-2` unless a parameter specific to the GPT image models is used.
moderation: Control the content-moderation level for images generated by `gpt-image-1`. Must
be either `low` for less restrictive filtering or `auto` (default value).
moderation: Control the content-moderation level for images generated by the GPT image
models. Must be either `low` for less restrictive filtering or `auto` (default
value).
n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
`n=1` is supported.
output_compression: The compression level (0-100%) for the generated images. This parameter is only
supported for `gpt-image-1` with the `webp` or `jpeg` output formats, and
supported for the GPT image models with the `webp` or `jpeg` output formats, and
defaults to 100.
output_format: The format in which the generated images are returned. This parameter is only
supported for `gpt-image-1`. Must be one of `png`, `jpeg`, or `webp`.
supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`.
partial_images: The number of partial images to generate. This parameter is used for streaming
responses that return partial images. Value must be between 0 and 3. When set to
@@ -1705,19 +1717,19 @@ class AsyncImages(AsyncAPIResource):
- `auto` (default value) will automatically select the best quality for the
given model.
- `high`, `medium` and `low` are supported for `gpt-image-1`.
- `high`, `medium` and `low` are supported for the GPT image models.
- `hd` and `standard` are supported for `dall-e-3`.
- `standard` is the only option for `dall-e-2`.
response_format: The format in which generated images with `dall-e-2` and `dall-e-3` are
returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes
after the image has been generated. This parameter isn't supported for
`gpt-image-1` which will always return base64-encoded images.
after the image has been generated. This parameter isn't supported for the GPT
image models, which always return base64-encoded images.
size: The size of the generated images. Must be one of `1024x1024`, `1536x1024`
(landscape), `1024x1536` (portrait), or `auto` (default value) for
`gpt-image-1`, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and
one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
(landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image
models, one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`, and one of
`1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3`.
style: The style of the generated images. This parameter is only supported for
`dall-e-3`. Must be one of `vivid` or `natural`. Vivid causes the model to lean