project_ai_mern_image_generation
project_ai_mern_image_generation copied to clipboard
Hello, when I create a new image, the following error appears in the alert: SyntaxError: Unexpected token 'B', "Billing yes"... is not valid JSON
Same here!! No typos not know what to do
yup, same problem here error - SyntaxError: Unexpected token 'B', "Billing ha"... is not valid JSON
Also got the same error. SyntaxError: Unexpected token 'B', "Billing ha"... is not valid JSON
what does it mean by right api keys ??? I took the api key exacting like told in video ... even tried another time by creating a new key didnt work
use right api key becouse when we copy it last 2-3 words don't copy so create new api key from dell-e and copy to the last
and check when you made the function it gots an empty arrry
and check when you made the function it gots an empty arrry
in the server right?
There is a limitation of open ai api. Payment must be made and Open ai does not work in our country :(
Just learned it only works with paid account By "use right api key", Adrian meant "use paid api key" source - https://openai.com/api/pricing/
It's obvious when you think about it, when you use dall-e, you have limited queries to work with and you can't just infinitely query images using their api on your own app, that will be just as equal to abusing the api if they'd allow that.
Ho appena appreso che funziona solo con account a pagamento Con "usa la chiave API corretta", Adrian intendeva la fonte "usa la chiave API a pagamento" - https://openai.com/api/pricing/
È ovvio quando ci pensi, quando usi dall-e, hai query limitate con cui lavorare e non puoi semplicemente interrogare all'infinito le immagini usando la loro API sulla tua app, che sarà uguale ad abusare dell'API se lo permetterebbero.
hi! you are probably right but for example I ( in europe) have a credit of 18 dollars to use with the API even without having paid in advance. When I tested the code, the first few times the API worked and I was charged 0.02 cents per image. Today I spent a total of 0.10 cents so I still have plenty of credit to use but I still get the same error.
For anyone who is having the problem, OpenAI has two versions of accounts, free and paid. For certain API's as in this case DALL-E image generation you need paid account. Open AI, turns your account state into paid account
, then you add your card information in billing section. So, to solve this error, you just have to add your card information to Open AI billing section, and it is going to work, without any more hassle. Yes, it is paid API, but if you have credits, it is going to use them first, and if you do not, then you are going to pay for the image. Happy coding 👋
hi! I ( in europe) have a credit of 18 dollars to use with the API even without having paid in advance. When I tested the code, the first few times the API worked and I was charged 0.02 cents per image. Today I spent a total of 0.10 cents so I still have plenty of credit to use but I still get the same error.
Use the backend server url endpoint we created for dalleRoutes --> http://localhost:8080/api/v1/dalle
-> put the above url in the generateImage function in CreatePost.jsx.
const response = await fetch('http://localhost:8080/api/v1/dalle',
this worked for me. It may work for you.
hi! I ( in europe) have a credit of 18 dollars to use with the API even without having paid in advance. When I tested the code, the first few times the API worked and I was charged 0.02 cents per image. Today I spent a total of 0.10 cents so I still have plenty of credit to use but I still get the same error.
Exactly. OpenAI offers free credits when you create an account. To pay them later or not is your choice. Initially, you shouldn't have any problem. No cents needed
@ergashevislomjon, @rookasrudzianskas, @RvDstudio, and @shivvvuu, the reason you might be facing this issue can be the cause of Cloudinary. It's used to host images. And for that, you need your API keys as well. Or else, even if the image generates, you won't be able to share it with the community.
The functionality works like this:
- Generate image (You need OpenAI key) - This will send back the base64 data of the generated image to client-side
- Share image (You need both Cloudinary API Keys & MongoDB URL) - We're sending the selected generated image data, i.e., that base64, back to the server. Over here, using Cloudinary, we're first converting this base64 into an image URL. After that, we call MongoDB to store the post with this new image URL, not base64 data.
Note: Again, for all these services, you don't need to pay anything. They offer free credits.
We did the same. Sadly, everyone copy pasted the same API keys used in the Video leading to the free credits exhaustion we had. So kindly create your accounts & use your own API keys. Make sure to use the same API keys while deploying with Render as well.
Thank you!
and check when you made the function it gots an empty arrry
in the server right?
I don't know why but openai api key keeps changing ,not in the server when you make the function at the end of it
Just learned it only works with paid account By "use right api key", Adrian meant "use paid api key" source - https://openai.com/api/pricing/
It's obvious when you think about it, when you use dall-e, you have limited queries to work with and you can't just infinitely query images using their api on your own app, that will be just as equal to abusing the api if they'd allow that.
That's not the case here it also got free trial I'm using it
https://main.d1fpkqmfq4v7da.amplifyapp.com/
####this is my portfolio
Check this give a star on my github project and connect with me on LinkedIn
Its a billing issue. In his video. He created a new account on open AI. If you have used any of the OpenAI products in the past. Its likely you have run out of the trial version time. Your best bet would be to use an alternate email id to create a new account on openAI or buy a plan. This definitely works as i ran into the same issue. Hope this helps. Thank you
OpenAI gives $18 to new users. You have probably already spent it using one of their services. I recommend you to create another account and generate a new api key or pay to use it. Once it is set up it will not give you any more problems.
Greetings, Credits granted/purchased on labs.openai.com do not apply to DALL·E API. You need to add a payment method and pay $0.02 per image.
Greetings, Credits granted/purchased on labs.openai.com do not apply to DALL·E API. You need to add a payment method and pay $0.02 per image.
Hi friends,
in order to solve this issue we need to create a new account on openapi platform. Don't use Continue with google, we need to signup by providing our email address and password and then verify our account through email.
Same here!! No typos not know what to do
add your debit card and create new key that all
There is a limitation of open ai api. Payment must be made and Open ai does not work in our country :(
Add your debit card and create new key that all
Hi friends,
in order to solve this issue we need to create a new account on openapi platform. Don't use Continue with google, we need to signup by providing our email address and password and then verify our account through email.
Add your debit card and create new key that all
use right api key becouse when we copy it last 2-3 words don't copy so create new api key from dell-e and copy to the last
Add your debit card and create new key that all
what does it mean by right api keys ??? I took the api key exacting like told in video ... even tried another time by creating a new key didnt work
Add your debit card and create new key that all
can we do this with stable diffusion ai? it is free as of now.