Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack πŸŽ‰ Learn more
LibreChat

OpenAI

To get your OpenAI API key, you need to:

OPENAI_API_KEY=user_provided
  • You can determine which models you would like to have available with OPENAI_MODELS
    • When OPENAI_API_KEY is set to user_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_KEY is set to the actual API key value β†’ as long as OPENAI_MODELS is left commented-out, it will do an API call to find out what models are available, which should include any new ones
OPENAI_MODELS=gpt-5,gpt-5-codex,gpt-5-mini,gpt-5-nano,o3-pro,o3,o4-mini,gpt-4.1,gpt-4.1-mini,gpt-4.1-nano,o3-mini,o1-pro,o1,gpt-4o,gpt-4o-mini

Notes:

  • Internal OpenAI defaults include the current frontier catalog, including gpt-5.5, gpt-5.5-pro, chat-latest, gpt-5.4, gpt-5.4-pro, gpt-5.4-mini, gpt-5.4-nano, gpt-5.3-codex, and gpt-5.2. Deprecated legacy defaults are no longer included unless you add them explicitly with OPENAI_MODELS.
  • 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.yaml configuration file, including streamRate, headers, titleModel, titleMethod, titlePrompt, titlePromptTemplate, and titleEndpoint

How is this guide?