1998code / DALLE-2-App

DALLE 2 on Next.js
https://dalle2.vercel.app
MIT License
62 stars 35 forks source link

API Keys don't work for Dalle 2 #13

Closed scottk2 closed 2 years ago

scottk2 commented 2 years ago

Hi there,

I tried this approach and package but it seems that teh API keys don't work for Dalle access (401). From what I've read, they don't support this at the moment. Did you get this working, and if so, does it still work for you?

Thanks!

ezzcodeezzlife commented 2 years ago

@scottk2 make sure you have a fresh bearer key. it runs out after some time ⏲️ (dont use GPT3 API key)

realandygithub commented 2 years ago

Hi, I have the same(?) issue. I had trouble getting the bearer key when I visit https://labs.openai.com/api/labs/tasks, because it prompted me for a username and password. As I only login with google oAuth, I don't have a username & password for openai. I also tried to put my api key in my password and leaving username blank, but no luck...

I tried to input my api key into the app directly, and it throws the error below.

Error: getaddrinfo EAI_AGAIN labs.openai.com at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:83:26) { errno: -3001, code: 'EAI_AGAIN', syscall: 'getaddrinfo', hostname: 'labs.openai.com' }

ezzcodeezzlife commented 2 years ago

@realandygithub make sure you are invited through the waitlist... then getting the bearer key should work like described in the readme. do not use the GPT3 Api Key 🗝️

1998code commented 2 years ago

Hi @scottk2 @realandygithub,

Please see the steps below for your reference.

  1. Open https://labs.openai.com/ and Right Click to inspect. Go to network. You may need to refresh the page first.

CleanShot 2022-07-16 at 00 22 23@2x

  1. Input something and click generate.
CleanShot 2022-07-16 at 00 21 26@2x
  1. Find the Tasks, and scroll down to see your token.

CleanShot 2022-07-16 at 00 24 16@2x

Let me know if it works for you.

realandygithub commented 2 years ago

It works! Thank you!

xishoon commented 1 year ago

The token expired after some time. How we can avoid this ? I Don't want to get token through inspect element again and again. Is there any solution ?

1998code commented 1 year ago

@xishoon Please try the latest v2 instead.