OpenAI
To get your OpenAI API key, you need to:
- Go to https://platform.openai.com/account/api-keys
- Create an account or log in with your existing one
- Add a payment method to your account
- Go to https://platform.openai.com/api-keys to get a key.
- You will need to set the following environment variable to your key, or you can set it to
user_providedfor users to provide their own.
- You can determine which models you would like to have available with
OPENAI_MODELS- When
OPENAI_API_KEYis set touser_provided→ only the models put in this list will be available- ⚠️New models won't automatically show up; you'll need to add them to this list first
- When
OPENAI_API_KEYis set to the actual API key value → as long asOPENAI_MODELSis left commented-out, it will do an API call to find out what models are available, which should include any new ones
- When
Notes:
- Selecting a vision model for messages with attachments is not necessary as it will be switched behind the scenes for you. If you didn't outright select a vision model, it will only be used for the vision request and you should still see the non-vision model you had selected after the request is successful
- OpenAI Vision models allow for messages without attachments
- OpenAI endpoint supports all Shared Endpoint Settings via the
librechat.yamlconfiguration file, includingstreamRate,titleModel,titleMethod,titlePrompt,titlePromptTemplate, andtitleEndpoint
How is this guide?