Skip to main content

/images/variations

Create variations of an existing image.

Quick Start

Python

from openai import OpenAI

client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.haimaker.ai/v1"
)

response = client.images.create_variation(
model="openai/dall-e-2",
image=open("image.png", "rb"),
n=1,
size="1024x1024"
)

print(response.data[0].url)

cURL

curl https://api.haimaker.ai/v1/images/variations \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=openai/dall-e-2" \
-F "image=@image.png" \
-F "n=1" \
-F "size=1024x1024"

Supported Providers

  • OpenAI (openai/dall-e-2)
  • Topaz (topaz/Standard V2)