> For the complete documentation index, see [llms.txt](https://agent-llm.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agent-llm.gitbook.io/docs/providers/openai.md).

# OPENAI

## AI Provider: OpenAI

* [OpenAI](https://openai.com)
* [Agent-LLM](https://github.com/Josh-XT/Agent-LLM)

⚠️ **Please note that using some AI providers, such as OpenAI's API, can be expensive. Monitor your usage carefully to avoid incurring unexpected costs. We're NOT responsible for your usage under any circumstance.**

## Quick Start Guide

### Update your agent settings

1. Set `AI_PROVIDER` to `openai`.
2. Set `OPENAI_API_KEY` to your OpenAI API key.
3. Set `AI_MODEL` to `gpt-3.5-turbo` for ChatGPT.
4. Set `AI_TEMPERATURE` to a value between 0 and 1. The higher the value, the more creative the output.
5. Set `MAX_TOKENS` to the maximum number of tokens to generate. The higher the value, the longer the output. The maximum for `gpt-3.5-turbo` is 4000, `gpt-4` is 8000.
