#change image size
1 messages · Page 1 of 1 (latest)
Hi @tiny osprey. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, you can specify different image sizes when using DALL·E-3. It accepts three different image sizes: 1024px by 1024px, 1792px by 1024px, and 1024px by 1792px. The size you choose can have significant effects on the style and context of your generated image. For example, vertical images might work better when you're looking for an image that looks like it was taken by a cellphone camera, or horizontal images may work better for landscape paintings or digital designs.
Here's an example of how you might specify the size in a request:
from openai import OpenAI
client = OpenAI()
response = client.images.create_variation(
image=open("image_edit_original.png", "rb"),
n=2,
size="1792x1024"
)
image_url = response.data[0].url
In this example, the size is set to "1792x1024". You can replace this with any of the other accepted sizes as needed.
Please note that the input image must be a square PNG image less than 4MB in size.
Source: OpenAI Cookbook (https://cookbook.openai.com/articles/what_is_new_with_dalle_3#new-sizes), OpenAI Platform Documentation (https://platform.openai.com/docs/guides/images?context=node)
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@tiny osprey kapa.ai is still learning and improving, please let us know how it did by reacting below