Images

Create Variation

Creates variations of an image. Request must be sent as multipart/form-data with model and image (or image[]). Does not support streaming.

post/v1/images/variations

Request

Request body multipart/form-data

modelstring required

Model identifier in format provider/model

imagestring binary required

Image file to create variations of. Use field name image for a single file or image[] for multiple (first image is used).

ninteger

Number of variations to generate

size'256x256' | '512x512' | '1024x1024' | '1792x1024' | '1024x1792' | '1536x1024' | '1024x1536' | 'auto'

Size of the output images

response_format'url' | 'b64_json'

Format of the response

userstring

User identifier for tracking

Response

Successful response. Returns JSON with generated image variation(s).

idstring

Unique identifier for the generation request

createdinteger

Unix timestamp when the image was created

modelstring

Model used for generation

backgroundstring

Background type for the image

output_format'png' | 'webp' | 'jpeg'

Output image format

qualitystring

Quality of the generated image

size'256x256' | '512x512' | '1024x1024' | '1792x1024' | '1024x1792' | '1536x1024' | '1024x1536' | 'auto'

Size of the generated image

Changes

No recorded changes to this operation across all 1 revision of this API.