[GH-ISSUE #336] OPENAI key not working #219

Closed
opened 2026-03-02 11:47:43 +03:00 by kerem · 3 comments
Owner

Originally created by @rserbitar on GitHub (Jul 29, 2024).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/336

openai key does not seem to work. I re-created the key several times just to make sure that its not a copy and paste error . . .

2024-07-29T09:56:20.405Z error: [inference][6] inference job failed: Error: 401 Incorrect API key provided: .... You can find your API key at https://platform.openai.com/account/api-keys.

Whats the best way to debug this? Whats the best place to check what is being sent to the API?

Originally created by @rserbitar on GitHub (Jul 29, 2024). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/336 openai key does not seem to work. I re-created the key several times just to make sure that its not a copy and paste error . . . ` 2024-07-29T09:56:20.405Z error: [inference][6] inference job failed: Error: 401 Incorrect API key provided: .... You can find your API key at https://platform.openai.com/account/api-keys.` Whats the best way to debug this? Whats the best place to check what is being sent to the API?
kerem closed this issue 2026-03-02 11:47:43 +03:00
Author
Owner

@lnicola commented on GitHub (Jul 29, 2024):

FWIW, I've just set up Hoarder, OpenAI seems to be working fine. I was getting "Error: 429 You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors." in the begging, but it sorted itself out after 10 minutes or so.

<!-- gh-comment-id:2255577369 --> @lnicola commented on GitHub (Jul 29, 2024): FWIW, I've just set up Hoarder, OpenAI seems to be working fine. I was getting "Error: 429 You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors." in the begging, but it sorted itself out after 10 minutes or so.
Author
Owner

@rserbitar commented on GitHub (Jul 29, 2024):

Because of whaterver reason inside the worker container printenv looks like that (just showing parts of it):

YARN_VERSION=1.22.19
SHLVL=1
HOME=/root
OPENAI_API_KEY=...
DATA_DIR=/data
container=podman
HOARDER_VERSION=release
DISABLE_SIGNUPS=true
TERM=xterm
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_VERSION=0.15.0

All other secrets are shown normally and not like ... (removed them for security reasons obviously).

<!-- gh-comment-id:2255663163 --> @rserbitar commented on GitHub (Jul 29, 2024): Because of whaterver reason inside the worker container `printenv` looks like that (just showing parts of it): ``` YARN_VERSION=1.22.19 SHLVL=1 HOME=/root OPENAI_API_KEY=... DATA_DIR=/data container=podman HOARDER_VERSION=release DISABLE_SIGNUPS=true TERM=xterm PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SERVER_VERSION=0.15.0 ``` All other secrets are shown normally and not like ... (removed them for security reasons obviously).
Author
Owner

@rserbitar commented on GitHub (Jul 29, 2024):

got it. own stupidity.
I commented out:

# OPENAI_API_KEY: ...

in the default docker-compose.yaml and added the correct value in addition to an .env file. The .yaml took precedence . . .

<!-- gh-comment-id:2255695818 --> @rserbitar commented on GitHub (Jul 29, 2024): got it. own stupidity. I commented out: `# OPENAI_API_KEY: ...` in the default docker-compose.yaml and added the correct value in addition to an .env file. The .yaml took precedence . . .
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#219
No description provided.