OPENAI_API_KEY variable not found
cecilia0906
HOBBYOP

a year ago

can't find the OPENAI_API_KEY variable

In my app.openia project I set that variable but when deploying it I get the error of

[Nest] 27 - 02/17/2025, 12:34:02 AM ERROR [ExceptionHandler] The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).

I'm using the nest framework and from there I access the variable like this:

apiKey: process.env.OPENAI_API_KEY

I hope you can help me with this problem, thanks.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

1 Replies

a year ago

Hello,

Looks like you resolved your issue! going to mark this as solved!

Best,

Brody


Welcome!

Sign in to your Railway account to join the conversation.

Loading...