#DALL-E DALL-E and openai api key differencess

35 messages · Page 1 of 1 (latest)

haughty gale
#

i have one question is the DALL-E: DALL-E api key the same way as the paid one i have from openai and can i use the DALL-E: DALL-E image generation next to my text-davinci-003 text generation in my python3 code?

charred nacelle
#

Try it

#

Then report back

haughty gale
#

thats why i have asked in here if there are differnces and how it works

#

because its either that i have made a mistake in my code or that i am missusing the api

mossy mantle
#

yes its the same api key

#

what do you mean generate image is not available

haughty gale
haughty gale
haughty gale
#

for example

#

imgur shows the image is not longer available or does not exist

#

i am pretty new to coding so i am a bit overasked curently what the problem there is

mossy mantle
#

our api has nothing to do with imgur

#

i dont know where you got that link from

haughty gale
#

i have a python telegram ai chatbot which currently works with text davinci and i wantet to integrate a second function which allows the users to generate images and that is the reply i get from the bot

mossy mantle
#

thats not dalle api

#

thats just the text model hallucinating

haughty gale
#

how can i seperate those two i have it currently so that the bot has a seperation between just the text and the mention for text davinci and a secondary for text mention and the words generate image

#

but that makes sense what your saying that should be a mistake on my side with my code

mossy mantle
#

the dalle api is a separate api, look on our api docs

haughty gale
#

same api key but different api?

mossy mantle
#

yes

#

the key is used for all our api

haughty gale
#

thats how i have defined the function in my function which gets called when all triggers are met

#

def process_images_privat(update, context):
message_text = update.message.text
response = openai.Image.create(
prompt=message_text,
size="1024x1024",
model="image-alpha-003",
api_key=openai.api_key,
)
image_url = response["data"]["url"]
context.bot.send_photo(chat_id=update.effective_chat.id, photo=image_url)

#

called so:

            elif (
                update.message is not None
                and bot_username in update.message.text
                and "generate image" in update.message.text
            ):
                process_images_privat(update, context)
pine wraith
#

The image urls expire after an hour after generation, so that could also be a possible reason

haughty gale
pine wraith
#

I would just test the image_url part and make sure that is working before you try and send it off anywhere

#

But I dont code in python so I cant really help you with the syntax stuff beyond that

haughty gale