import os
from openai import OpenAI
# from custom_apps.dalle3.const import API_KEY

#set api key
# os.environ['OPENAI_API_KEY'] = "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"

os.environ['OPENAI_API_KEY'] = "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"

client = OpenAI()

response = client.images.generate(
    model="dall-e-2",
    prompt="a white siamese cat",
    size="512x512",
    quality="standard",
    n=1,
)

print(response.data[0].url)