#can we access dalle 3 api

1 messages · Page 1 of 1 (latest)

quick garden
#

How to get dalle 3 api ready to pay for api

muted sapphire
quick garden
#

Yeh thanks

#

Great

#

Thanks solbus one quick question it will work with the api provided by open ai

muted sapphire
quick garden
muted sapphire
#

Sure thing!

quick garden
#

@muted sapphireHII can u help me?

muted sapphire
quick garden
muted sapphire
quick garden
#

@app.route('/generate_image', methods=['POST'])
def generate_image():
print("Request method:", request.method) # Debug statement
prompt = request.form.get('prompt')
print("Received prompt:", prompt) # Debug statement

if not prompt:
    return jsonify({'error': 'Prompt not found in form data'})

response = openai.Image.create(prompt=prompt, n=1, size="1024x1024", model="dall-e-2") 
print(response)
return jsonify(response)
muted sapphire
muted sapphire
quick garden
muted sapphire
# quick garden

It looks like there's a few placeholder comments in your code that say things like "Replace with your code for..." so I'm wondering if the implementation is perhaps just not yet complete.

muted sapphire