You can get your API key from https://platform.openai.com/account/api-keysAutoRAG do not store your API key.
If you don't like it, try to optimize it with AutoRAG. Press below button and go to make evaluation data and optimize it. Both on the Huggingface space so you don't need to install anything.