#Fail to retreive DALL-E generated image from GPTs API...

1 messages · Page 1 of 1 (latest)

pure skiff
#

In my GPTs I would like to be able to fetch the images generated by DALL-E in the GPTs conversation with the user, however, charGpt give me an URL which is not fetcheable from the internet, is there any way for a custom GPTs API to fetch the DALL-E generated images ?

idle galeBOT
#

Hi @pure skiff. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the information provided in the extracts, it seems that the images generated by DALL-E in a GPT conversation are not directly fetchable from the internet. The GPTs are for use within ChatGPT Plus and they may rely on other developer’s APIs, authentication, and subscription. You would need to develop your own code-based solution using API models that offer the same techniques to have an application you can integrate into your own software or site (source (https://community.openai.com/t/545254)).

However, you can use the DALL-E API to generate images based on a text prompt. Here's an example of how to do this:

# set the prompt
prompt = "A cyberpunk monkey hacker dreaming of a beautiful bunch of bananas, digital art"

# call the OpenAI API
generation_response = client.images.generate(
 model = "dall-e-3"
 prompt=prompt,
 n=1,
 size="1024x1024",
 response_format="url",
)

(source (https://cookbook.openai.com/examples/dalle/image_generations_edits_and_variations_with_dall-e#generations))

This will return a URL to the generated image, which you can then fetch and use in your application. Please note that you need to have an OpenAI API account to access the DALL-E API (source (https://help.openai.com/en/articles/8555480-dall-e-3-api)).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@pure skiff kapa.ai is still learning and improving, please let us know how it did by reacting below