init(image:model:n:responseFormat:size:user:)
ImageVariationsQuery.swift:31init(image: Data, model: Model? = nil, n: Int? = nil, responseFormat: Self.ResponseFormat? = nil, size: String? = nil, user: String? = nil)
init(image: Data, model: Model? = nil, n: Int? = nil, responseFormat: Self.ResponseFormat? = nil, size: String? = nil, user: String? = nil)
s6OpenAI20ImageVariationsQueryV5image5model1n14responseFormat4size4userAC20FoundationEssentials4DataV_SSSgSiSgAA06ImagesE0V08ResponseI0OSgA2Mtcfc
What are these?610UV
import OpenAI
struct ImageVariationsQuery
@frozen struct Data
typealias Model = String
Defines all available OpenAI models supported by the library.
@frozen struct Int
A signed integer value type.
typealias ResponseFormat = ImagesQuery.ResponseFormat
@frozen struct String
A Unicode string value that is a collection of characters.
init(from decoder: any Decoder) throws
let image: Data
The image to edit. Must be a valid PNG file, less than 4MB, and square.
let model: Model?
The model to use for image generation. Only dall-e-2 is supported at this time. Defaults to dall-e-2
let n: Int?
The number of images to generate. Must be between 1 and 10. Defaults to 1
let responseFormat: Self.ResponseFormat?
The format in which the generated images are returned. Must be one of url or b64_json. Defaults to url
let size: String?
The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024. Defaults to 1024x1024
let user: String?
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
enum CodingKeys