/opt/canhelp/node_modules/openai/resources
NameSizeModeActions
audio/-0755rm
beta/-0755rm
chat/-0755rm
containers/-0755rm
conversations/-0755rm
evals/-0755rm
fine-tuning/-0755rm
graders/-0755rm
realtime/-0755rm
responses/-0755rm
skills/-0755rm
uploads/-0755rm
vector-stores/-0755rm
webhooks/-0755rm
audio.d.mts710644editdlrm
audio.d.mts.map1150644editdlrm
audio.d.ts690644editdlrm
audio.d.ts.map1140644editdlrm
audio.js3060644editdlrm
audio.js.map1390644editdlrm
audio.mjs1560644editdlrm
audio.mjs.map1240644editdlrm
batches.d.mts96670644editdlrm
batches.d.mts.map34990644editdlrm
batches.d.ts96600644editdlrm
batches.d.ts.map34980644editdlrm
batches.js14420644editdlrm
batches.js.map8340644editdlrm
batches.mjs12690644editdlrm
batches.mjs.map8350644editdlrm
beta.d.mts690644editdlrm
beta.d.mts.map1130644editdlrm
beta.d.ts670644editdlrm
beta.d.ts.map1120644editdlrm
beta.js3040644editdlrm
beta.js.map1370644editdlrm
beta.mjs1540644editdlrm
beta.mjs.map1220644editdlrm
chat.d.mts690644editdlrm
chat.d.mts.map1130644editdlrm
chat.d.ts670644editdlrm
chat.d.ts.map1120644editdlrm
chat.js3040644editdlrm
chat.js.map1370644editdlrm
chat.mjs1540644editdlrm
chat.mjs.map1220644editdlrm
completions.d.mts137800644editdlrm
completions.d.mts.map38290644editdlrm
completions.d.ts137730644editdlrm
completions.d.ts.map38280644editdlrm
completions.js6700644editdlrm
completions.js.map3850644editdlrm
completions.mjs5260644editdlrm
completions.mjs.map3820644editdlrm
containers.d.mts810644editdlrm
containers.d.mts.map1250644editdlrm
containers.d.ts790644editdlrm
containers.d.ts.map1240644editdlrm
containers.js3160644editdlrm
containers.js.map1490644editdlrm
containers.mjs1660644editdlrm
containers.mjs.map1340644editdlrm
conversations.d.mts870644editdlrm
conversations.d.mts.map1310644editdlrm
conversations.d.ts850644editdlrm
conversations.d.ts.map1300644editdlrm
conversations.js3220644editdlrm
conversations.js.map1550644editdlrm
conversations.mjs1720644editdlrm
conversations.mjs.map1400644editdlrm
embeddings.d.mts42480644editdlrm
embeddings.d.mts.map14440644editdlrm
embeddings.d.ts42440644editdlrm
embeddings.d.ts.map14430644editdlrm
embeddings.js26100644editdlrm
embeddings.js.map12640644editdlrm
embeddings.mjs24480644editdlrm
embeddings.mjs.map12600644editdlrm
evals.d.mts710644editdlrm
evals.d.mts.map1150644editdlrm
evals.d.ts690644editdlrm
evals.d.ts.map1140644editdlrm
evals.js3060644editdlrm
evals.js.map1390644editdlrm
evals.mjs1560644editdlrm
evals.mjs.map1240644editdlrm
files.d.mts66190644editdlrm
files.d.mts.map24350644editdlrm
files.d.ts66130644editdlrm
files.d.ts.map24340644editdlrm
files.js37700644editdlrm
files.js.map19190644editdlrm
files.mjs35770644editdlrm
files.mjs.map19340644editdlrm
fine-tuning.d.mts830644editdlrm
fine-tuning.d.mts.map1270644editdlrm
fine-tuning.d.ts810644editdlrm
fine-tuning.d.ts.map1260644editdlrm
fine-tuning.js3180644editdlrm
fine-tuning.js.map1510644editdlrm
fine-tuning.mjs1680644editdlrm
fine-tuning.mjs.map1360644editdlrm
graders.d.mts750644editdlrm
graders.d.mts.map1190644editdlrm
graders.d.ts730644editdlrm
graders.d.ts.map1180644editdlrm
graders.js3100644editdlrm
graders.js.map1430644editdlrm
graders.mjs1600644editdlrm
graders.mjs.map1280644editdlrm
images.d.mts261750644editdlrm
images.d.mts.map84160644editdlrm
images.d.ts261680644editdlrm
images.d.ts.map84150644editdlrm
images.js12800644editdlrm
images.js.map8080644editdlrm
images.mjs11390644editdlrm
images.mjs.map8040644editdlrm
index.d.mts39670644editdlrm
index.d.mts.map24540644editdlrm
index.d.ts39430644editdlrm
index.d.ts.map24530644editdlrm
index.js42100644editdlrm
index.js.map8820644editdlrm
index.mjs12070644editdlrm
index.mjs.map5570644editdlrm
models.d.mts17790644editdlrm
models.d.mts.map9950644editdlrm
models.d.ts17740644editdlrm
models.d.ts.map9940644editdlrm
models.js12800644editdlrm
models.js.map6450644editdlrm
models.mjs11040644editdlrm
models.mjs.map6450644editdlrm
moderations.d.mts103030644editdlrm
moderations.d.mts.map35270644editdlrm
moderations.d.ts102990644editdlrm
moderations.d.ts.map35260644editdlrm
moderations.js7570644editdlrm
moderations.js.map3520644editdlrm
moderations.mjs6130644editdlrm
moderations.mjs.map3510644editdlrm
realtime.d.mts770644editdlrm
realtime.d.mts.map1210644editdlrm
realtime.d.ts750644editdlrm
realtime.d.ts.map1200644editdlrm
realtime.js3120644editdlrm
realtime.js.map1450644editdlrm
realtime.mjs1620644editdlrm
realtime.mjs.map1300644editdlrm
responses.d.mts790644editdlrm
responses.d.mts.map1230644editdlrm
responses.d.ts770644editdlrm
responses.d.ts.map1220644editdlrm
responses.js3140644editdlrm
responses.js.map1470644editdlrm
responses.mjs1640644editdlrm
responses.mjs.map1320644editdlrm
shared.d.mts125110644editdlrm
shared.d.mts.map39900644editdlrm
shared.d.ts125100644editdlrm
shared.d.ts.map39890644editdlrm
shared.js1980644editdlrm
shared.js.map1260644editdlrm
shared.mjs1330644editdlrm
shared.mjs.map1260644editdlrm
skills.d.mts730644editdlrm
skills.d.mts.map1170644editdlrm
skills.d.ts710644editdlrm
skills.d.ts.map1160644editdlrm
skills.js3080644editdlrm
skills.js.map1410644editdlrm
skills.mjs1580644editdlrm
skills.mjs.map1260644editdlrm
uploads.d.mts750644editdlrm
uploads.d.mts.map1190644editdlrm
uploads.d.ts730644editdlrm
uploads.d.ts.map1180644editdlrm
uploads.js3100644editdlrm
uploads.js.map1430644editdlrm
uploads.mjs1600644editdlrm
uploads.mjs.map1280644editdlrm
vector-stores.d.mts870644editdlrm
vector-stores.d.mts.map1310644editdlrm
vector-stores.d.ts850644editdlrm
vector-stores.d.ts.map1300644editdlrm
vector-stores.js3220644editdlrm
vector-stores.js.map1550644editdlrm
vector-stores.mjs1720644editdlrm
vector-stores.mjs.map1400644editdlrm
videos.d.mts91520644editdlrm
videos.d.mts.map45430644editdlrm
videos.d.ts91460644editdlrm
videos.d.ts.map45420644editdlrm
videos.js31940644editdlrm
videos.js.map21350644editdlrm
videos.mjs29650644editdlrm
videos.mjs.map21230644editdlrm
webhooks.d.mts770644editdlrm
webhooks.d.mts.map1210644editdlrm
webhooks.d.ts750644editdlrm
webhooks.d.ts.map1200644editdlrm
webhooks.js3120644editdlrm
webhooks.js.map1450644editdlrm
webhooks.mjs1620644editdlrm
webhooks.mjs.map1300644editdlrm
Edit: /opt/canhelp/node_modules/openai/resources/images.d.ts (26168B)
import { APIResource } from "../core/resource.js"; import * as ImagesAPI from "./images.js"; import { APIPromise } from "../core/api-promise.js"; import { Stream } from "../core/streaming.js"; import { type Uploadable } from "../core/uploads.js"; import { RequestOptions } from "../internal/request-options.js"; /** * Given a prompt and/or an input image, the model will generate a new image. */ export declare class Images extends APIResource { /** * Creates a variation of a given image. This endpoint only supports `dall-e-2`. * * @example * ```ts * const imagesResponse = await client.images.createVariation({ * image: fs.createReadStream('otter.png'), * }); * ``` */ createVariation(body: ImageCreateVariationParams, options?: RequestOptions): APIPromise; /** * Creates an edited or extended image given one or more source images and a * prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, * `gpt-image-1-mini`, and `chatgpt-image-latest`) and `dall-e-2`. * * @example * ```ts * const imagesResponse = await client.images.edit({ * image: fs.createReadStream('path/to/file'), * prompt: 'A cute baby sea otter wearing a beret', * }); * ``` */ edit(body: ImageEditParamsNonStreaming, options?: RequestOptions): APIPromise; edit(body: ImageEditParamsStreaming, options?: RequestOptions): APIPromise>; edit(body: ImageEditParamsBase, options?: RequestOptions): APIPromise | ImagesResponse>; /** * Creates an image given a prompt. * [Learn more](https://platform.openai.com/docs/guides/images). * * @example * ```ts * const imagesResponse = await client.images.generate({ * prompt: 'A cute baby sea otter', * }); * ``` */ generate(body: ImageGenerateParamsNonStreaming, options?: RequestOptions): APIPromise; generate(body: ImageGenerateParamsStreaming, options?: RequestOptions): APIPromise>; generate(body: ImageGenerateParamsBase, options?: RequestOptions): APIPromise | ImagesResponse>; } /** * Represents the content or the URL of an image generated by the OpenAI API. */ export interface Image { /** * The base64-encoded JSON of the generated image. Returned by default for the GPT * image models, and only present if `response_format` is set to `b64_json` for * `dall-e-2` and `dall-e-3`. */ b64_json?: string; /** * For `dall-e-3` only, the revised prompt that was used to generate the image. */ revised_prompt?: string; /** * When using `dall-e-2` or `dall-e-3`, the URL of the generated image if * `response_format` is set to `url` (default value). Unsupported for the GPT image * models. */ url?: string; } /** * Emitted when image editing has completed and the final image is available. */ export interface ImageEditCompletedEvent { /** * Base64-encoded final edited image data, suitable for rendering as an image. */ b64_json: string; /** * The background setting for the edited image. */ background: 'transparent' | 'opaque' | 'auto'; /** * The Unix timestamp when the event was created. */ created_at: number; /** * The output format for the edited image. */ output_format: 'png' | 'webp' | 'jpeg'; /** * The quality setting for the edited image. */ quality: 'low' | 'medium' | 'high' | 'auto'; /** * The size of the edited image. */ size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; /** * The type of the event. Always `image_edit.completed`. */ type: 'image_edit.completed'; /** * For the GPT image models only, the token usage information for the image * generation. */ usage: ImageEditCompletedEvent.Usage; } export declare namespace ImageEditCompletedEvent { /** * For the GPT image models only, the token usage information for the image * generation. */ interface Usage { /** * The number of tokens (images and text) in the input prompt. */ input_tokens: number; /** * The input tokens detailed information for the image generation. */ input_tokens_details: Usage.InputTokensDetails; /** * The number of image tokens in the output image. */ output_tokens: number; /** * The total number of tokens (images and text) used for the image generation. */ total_tokens: number; } namespace Usage { /** * The input tokens detailed information for the image generation. */ interface InputTokensDetails { /** * The number of image tokens in the input prompt. */ image_tokens: number; /** * The number of text tokens in the input prompt. */ text_tokens: number; } } } /** * Emitted when a partial image is available during image editing streaming. */ export interface ImageEditPartialImageEvent { /** * Base64-encoded partial image data, suitable for rendering as an image. */ b64_json: string; /** * The background setting for the requested edited image. */ background: 'transparent' | 'opaque' | 'auto'; /** * The Unix timestamp when the event was created. */ created_at: number; /** * The output format for the requested edited image. */ output_format: 'png' | 'webp' | 'jpeg'; /** * 0-based index for the partial image (streaming). */ partial_image_index: number; /** * The quality setting for the requested edited image. */ quality: 'low' | 'medium' | 'high' | 'auto'; /** * The size of the requested edited image. */ size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; /** * The type of the event. Always `image_edit.partial_image`. */ type: 'image_edit.partial_image'; } /** * Emitted when a partial image is available during image editing streaming. */ export type ImageEditStreamEvent = ImageEditPartialImageEvent | ImageEditCompletedEvent; /** * Emitted when image generation has completed and the final image is available. */ export interface ImageGenCompletedEvent { /** * Base64-encoded image data, suitable for rendering as an image. */ b64_json: string; /** * The background setting for the generated image. */ background: 'transparent' | 'opaque' | 'auto'; /** * The Unix timestamp when the event was created. */ created_at: number; /** * The output format for the generated image. */ output_format: 'png' | 'webp' | 'jpeg'; /** * The quality setting for the generated image. */ quality: 'low' | 'medium' | 'high' | 'auto'; /** * The size of the generated image. */ size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; /** * The type of the event. Always `image_generation.completed`. */ type: 'image_generation.completed'; /** * For the GPT image models only, the token usage information for the image * generation. */ usage: ImageGenCompletedEvent.Usage; } export declare namespace ImageGenCompletedEvent { /** * For the GPT image models only, the token usage information for the image * generation. */ interface Usage { /** * The number of tokens (images and text) in the input prompt. */ input_tokens: number; /** * The input tokens detailed information for the image generation. */ input_tokens_details: Usage.InputTokensDetails; /** * The number of image tokens in the output image. */ output_tokens: number; /** * The total number of tokens (images and text) used for the image generation. */ total_tokens: number; } namespace Usage { /** * The input tokens detailed information for the image generation. */ interface InputTokensDetails { /** * The number of image tokens in the input prompt. */ image_tokens: number; /** * The number of text tokens in the input prompt. */ text_tokens: number; } } } /** * Emitted when a partial image is available during image generation streaming. */ export interface ImageGenPartialImageEvent { /** * Base64-encoded partial image data, suitable for rendering as an image. */ b64_json: string; /** * The background setting for the requested image. */ background: 'transparent' | 'opaque' | 'auto'; /** * The Unix timestamp when the event was created. */ created_at: number; /** * The output format for the requested image. */ output_format: 'png' | 'webp' | 'jpeg'; /** * 0-based index for the partial image (streaming). */ partial_image_index: number; /** * The quality setting for the requested image. */ quality: 'low' | 'medium' | 'high' | 'auto'; /** * The size of the requested image. */ size: '1024x1024' | '1024x1536' | '1536x1024' | 'auto'; /** * The type of the event. Always `image_generation.partial_image`. */ type: 'image_generation.partial_image'; } /** * Emitted when a partial image is available during image generation streaming. */ export type ImageGenStreamEvent = ImageGenPartialImageEvent | ImageGenCompletedEvent; export type ImageModel = 'gpt-image-1.5' | 'dall-e-2' | 'dall-e-3' | 'gpt-image-1' | 'gpt-image-1-mini'; /** * The response from the image generation endpoint. */ export interface ImagesResponse { /** * The Unix timestamp (in seconds) of when the image was created. */ created: number; /** * The background parameter used for the image generation. Either `transparent` or * `opaque`. */ background?: 'transparent' | 'opaque'; /** * The list of generated images. */ data?: Array; /** * The output format of the image generation. Either `png`, `webp`, or `jpeg`. */ output_format?: 'png' | 'webp' | 'jpeg'; /** * The quality of the image generated. Either `low`, `medium`, or `high`. */ quality?: 'low' | 'medium' | 'high'; /** * The size of the image generated. Either `1024x1024`, `1024x1536`, or * `1536x1024`. */ size?: '1024x1024' | '1024x1536' | '1536x1024'; /** * For `gpt-image-1` only, the token usage information for the image generation. */ usage?: ImagesResponse.Usage; } export declare namespace ImagesResponse { /** * For `gpt-image-1` only, the token usage information for the image generation. */ interface Usage { /** * The number of tokens (images and text) in the input prompt. */ input_tokens: number; /** * The input tokens detailed information for the image generation. */ input_tokens_details: Usage.InputTokensDetails; /** * The number of output tokens generated by the model. */ output_tokens: number; /** * The total number of tokens (images and text) used for the image generation. */ total_tokens: number; /** * The output token details for the image generation. */ output_tokens_details?: Usage.OutputTokensDetails; } namespace Usage { /** * The input tokens detailed information for the image generation. */ interface InputTokensDetails { /** * The number of image tokens in the input prompt. */ image_tokens: number; /** * The number of text tokens in the input prompt. */ text_tokens: number; } /** * The output token details for the image generation. */ interface OutputTokensDetails { /** * The number of image output tokens generated by the model. */ image_tokens: number; /** * The number of text output tokens generated by the model. */ text_tokens: number; } } } export interface ImageCreateVariationParams { /** * The image to use as the basis for the variation(s). Must be a valid PNG file, * less than 4MB, and square. */ image: Uploadable; /** * The model to use for image generation. Only `dall-e-2` is supported at this * time. */ model?: (string & {}) | ImageModel | null; /** * The number of images to generate. Must be between 1 and 10. */ n?: number | null; /** * 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. */ response_format?: 'url' | 'b64_json' | null; /** * The size of the generated images. Must be one of `256x256`, `512x512`, or * `1024x1024`. */ size?: '256x256' | '512x512' | '1024x1024' | null; /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } export type ImageEditParams = ImageEditParamsNonStreaming | ImageEditParamsStreaming; export interface ImageEditParamsBase { /** * The image(s) to edit. Must be a supported image file or an array of images. * * 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. `chatgpt-image-latest` follows the same * input constraints as GPT image models. * * For `dall-e-2`, you can only provide one image, and it should be a square `png` * file less than 4MB. */ image: Uploadable | Array; /** * A text description of the desired image(s). The maximum length is 1000 * characters for `dall-e-2`, and 32000 characters for the GPT image models. */ prompt: string; /** * Allows to set transparency for the background of the generated image(s). This * 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`. */ background?: 'transparent' | 'opaque' | 'auto' | null; /** * Control how much effort the model will exert to match the style and features, * especially facial features, of input images. This parameter is only supported * for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for * `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. */ input_fidelity?: 'high' | 'low' | null; /** * An additional image whose fully transparent areas (e.g. where alpha is zero) * indicate where `image` should be edited. If there are multiple images provided, * 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`. */ mask?: Uploadable; /** * The model to use for image generation. Defaults to `gpt-image-1.5`. */ model?: (string & {}) | ImageModel | null; /** * The number of images to generate. Must be between 1 and 10. */ n?: number | null; /** * The compression level (0-100%) for the generated images. This parameter is only * supported for the GPT image models with the `webp` or `jpeg` output formats, and * defaults to 100. */ output_compression?: number | null; /** * The format in which the generated images are returned. This parameter is only * supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. The * default value is `png`. */ output_format?: 'png' | 'jpeg' | 'webp' | null; /** * 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 * 0, the response will be a single image sent in one streaming event. * * Note that the final image may be sent before the full number of partial images * are generated if the full image is generated more quickly. */ partial_images?: number | null; /** * The quality of the image that will be generated for GPT image models. Defaults * to `auto`. */ quality?: 'standard' | 'low' | 'medium' | 'high' | 'auto' | null; /** * 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` (default is `url` for * `dall-e-2`), as GPT image models always return base64-encoded images. */ response_format?: 'url' | 'b64_json' | null; /** * The size of the generated images. Must be one of `1024x1024`, `1536x1024` * (landscape), `1024x1536` (portrait), or `auto` (default value) for the GPT image * models, and one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. */ size?: '256x256' | '512x512' | '1024x1024' | '1536x1024' | '1024x1536' | 'auto' | null; /** * 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. */ stream?: boolean | null; /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } export declare namespace ImageEditParams { type ImageEditParamsNonStreaming = ImagesAPI.ImageEditParamsNonStreaming; type ImageEditParamsStreaming = ImagesAPI.ImageEditParamsStreaming; } export interface ImageEditParamsNonStreaming extends ImageEditParamsBase { /** * 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. */ stream?: false | null; } export interface ImageEditParamsStreaming extends ImageEditParamsBase { /** * 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. */ stream: true; } export type ImageGenerateParams = ImageGenerateParamsNonStreaming | ImageGenerateParamsStreaming; export interface ImageGenerateParamsBase { /** * A text description of the desired image(s). The maximum length is 32000 * characters for the GPT image models, 1000 characters for `dall-e-2` and 4000 * characters for `dall-e-3`. */ prompt: string; /** * Allows to set transparency for the background of the generated image(s). This * 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`. */ background?: 'transparent' | 'opaque' | 'auto' | null; /** * 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. */ model?: (string & {}) | ImageModel | null; /** * 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). */ moderation?: 'low' | 'auto' | null; /** * The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only * `n=1` is supported. */ n?: number | null; /** * The compression level (0-100%) for the generated images. This parameter is only * supported for the GPT image models with the `webp` or `jpeg` output formats, and * defaults to 100. */ output_compression?: number | null; /** * The format in which the generated images are returned. This parameter is only * supported for the GPT image models. Must be one of `png`, `jpeg`, or `webp`. */ output_format?: 'png' | 'jpeg' | 'webp' | null; /** * 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 * 0, the response will be a single image sent in one streaming event. * * Note that the final image may be sent before the full number of partial images * are generated if the full image is generated more quickly. */ partial_images?: number | null; /** * The quality of the image that will be generated. * * - `auto` (default value) will automatically select the best quality for the * given model. * - `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`. */ quality?: 'standard' | 'hd' | 'low' | 'medium' | 'high' | 'auto' | null; /** * 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 the GPT * image models, which always return base64-encoded images. */ response_format?: 'url' | 'b64_json' | null; /** * The size of the generated images. Must be one of `1024x1024`, `1536x1024` * (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`. */ size?: 'auto' | '1024x1024' | '1536x1024' | '1024x1536' | '256x256' | '512x512' | '1792x1024' | '1024x1792' | null; /** * 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 the GPT image models. */ stream?: boolean | null; /** * 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 * towards generating hyper-real and dramatic images. Natural causes the model to * produce more natural, less hyper-real looking images. */ style?: 'vivid' | 'natural' | null; /** * A unique identifier representing your end-user, which can help OpenAI to monitor * and detect abuse. * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ user?: string; } export declare namespace ImageGenerateParams { type ImageGenerateParamsNonStreaming = ImagesAPI.ImageGenerateParamsNonStreaming; type ImageGenerateParamsStreaming = ImagesAPI.ImageGenerateParamsStreaming; } export interface ImageGenerateParamsNonStreaming extends ImageGenerateParamsBase { /** * 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 the GPT image models. */ stream?: false | null; } export interface ImageGenerateParamsStreaming extends ImageGenerateParamsBase { /** * 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 the GPT image models. */ stream: true; } export declare namespace Images { export { type Image as Image, type ImageEditCompletedEvent as ImageEditCompletedEvent, type ImageEditPartialImageEvent as ImageEditPartialImageEvent, type ImageEditStreamEvent as ImageEditStreamEvent, type ImageGenCompletedEvent as ImageGenCompletedEvent, type ImageGenPartialImageEvent as ImageGenPartialImageEvent, type ImageGenStreamEvent as ImageGenStreamEvent, type ImageModel as ImageModel, type ImagesResponse as ImagesResponse, type ImageCreateVariationParams as ImageCreateVariationParams, type ImageEditParams as ImageEditParams, type ImageEditParamsNonStreaming as ImageEditParamsNonStreaming, type ImageEditParamsStreaming as ImageEditParamsStreaming, type ImageGenerateParams as ImageGenerateParams, type ImageGenerateParamsNonStreaming as ImageGenerateParamsNonStreaming, type ImageGenerateParamsStreaming as ImageGenerateParamsStreaming, }; } //# sourceMappingURL=images.d.ts.map