jiayev / GPT4V-Image-Captioner

GNU General Public License v3.0
762 stars 58 forks source link

HTTP Error: 404 Client Error: Not Found for url #6

Open rubikstriangle opened 8 months ago

rubikstriangle commented 8 months ago

I installed on Ubuntu 22.04 and I get this when I try to caption an image: HTTP Error: 401 Client Error: Unauthorized for url: https://api.openai.com/v1/chat/completions

I obtained an api key from https://platform.openai.com/api-keys and pasted it into the first box "API Key" in the GUI but it still doesn't work. Is this the correct location to obtain an API key? Still getting: HTTP Error: 404 Client Error: Not Found for url: https://api.openai.com/v1/chat/completions

can you clarify the key/url setup?

rubikstriangle commented 8 months ago

My appologies, but I'm still not clear on how to obtain an API key. I have a paid account with https://chat.openai.com/ is not compatible? Do I need to sign up with a third party? Your tool looks very very cool, I'm excited to give it a try. Thanks!

On Jan 12, 2024, at 4:39 AM, 周公不解梦 @.> wrote: You need to obtain the URL of the API from the website where you purchased the API key, https://api.openai.com/v1/chat/completions It is the URL of the official OpenAI API, which is different from third-party. — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: @.>

SleeeepyZhou commented 8 months ago

I'm very sorry for the mistake in my previous answer, I deleted it. For your question, I hope you can confirm if your API is the gpt4v API, which is different from chatgpt plus.

Boldor83 commented 8 months ago

will this work when i add deposit to https://platform.openai.com/account/billing/overview or do i have to enter something different then to not get "HTTP Error: 401 Client Error: Unauthorized for url: https://api.openai.com/v1/chat/completions" ? Also how much would it roughly cost for like 50 images?

liuy156 commented 7 months ago

also ran into this issue, other platforms request model is no problem, in this project is not completely different request, sometimes encountered 404

AdrianY0809 commented 7 months ago

同样的问题

AdrianY0809 commented 7 months ago

I'm very sorry for the mistake in my previous answer, I deleted it. For your question, I hope you can confirm if your API is the gpt4v API, which is different from chatgpt plus.

i think i may find the reason but dont know how to solve

https://community.openai.com/t/recurring-max-retries-exceeded-error-with-long-prompts-using-chatgpt-api/318979

cubo94857 commented 6 months ago

Has this issue ever been solved? im having this problem. I get this: HTTP Error: 401 Client Error: Unauthorized for url: https://api.openai.com/v1/chat/completions

cubo94857 commented 6 months ago

the error is saying i need an api key but I already inserted mine

cubo94857 commented 6 months ago

wait nevermind lol my empty brain was typing it in incorrectly

Gh20221205 commented 5 months ago

是还没有给openai付钱的原因。使用gpt4需要充值$5以上。刚充了$5,立刻能用了。

ScilenceForest commented 2 months ago

I think I found the reason, in Api_Utils.py under lib2, change the model from gpt-4-vision-preview to gpt-4o, problem solved! image

chaewai commented 2 weeks ago

The above fix worked for my 404 issue, thanks!

kslz commented 6 days ago

如果有人按楼上那么改之后提示400 bad request 那么请去掉请求中detail的字段,4o模型已不需要这个字段 image