#Image generation isn't returning a response, instead this error

47 messages · Page 1 of 1 (latest)

radiant breach
keen sluice
radiant breach
#

1 sec

keen sluice
#

Did you accidentally leak you API key? 😄

radiant breach
#

yes now resetted

#

key is right, text exists

radiant breach
keen sluice
radiant breach
#

oh ok, no worries.

little mortar
#
let url2 = response['data'][1]['url']```

?
keen sluice
carmine monolith
#

400 can mean your prompt is rejected by the safety system

#

There is an error object in the response that tells you the reason

little kestrel
radiant breach
little mortar
radiant breach
#

well I can't, its not getting any response.

little mortar
#

Did you try antoher way ? Like fetch, axios ?

radiant breach
#

Surely just missing smth

radiant breach
little mortar
radiant breach
#

no

little mortar
carmine monolith
#

Tryexcept the call to get the rrror

radiant breach
#

What's the endpoint syntax ?
https://api.openai.com/v1/images/generations/prompt=cat

radiant breach
#

..

carmine monolith
carmine monolith
#

I don’t understand your question

radiant breach
radiant breach
#

if you could spot the actual reason

radiant breach
carmine monolith
#

Do curl first?

#

I don’t know axio I just use the python sdk

radiant breach
radiant breach
#

¯_(ツ)_/¯

keen mural
#

As Moxi said, try curl first using the example in the docs

#

And you can also still receive information with an error header

#

Have you tried printing out the response object regardless?

radiant breach
#

Ok