Instance Propertymacpaw.openai 0.3.2OpenAI
image
The image to edit. Must be a valid PNG file, less than 4MB, and square.
let image: Data
The image to edit. Must be a valid PNG file, less than 4MB, and square.
let image: Data
s6OpenAI20ImageVariationsQueryV5image20FoundationEssentials4DataVvp
What are these?210BN
import OpenAI
struct ImageVariationsQuery
@frozen struct Data
init(from decoder: any Decoder) throws
init(image: Data, model: Model? = nil, n: Int? = nil, responseFormat: Self.ResponseFormat? = nil, size: String? = nil, user: String? = nil)
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
typealias ResponseFormat = ImagesQuery.ResponseFormat