Do I need LLM's API keys when I call gpt4 or other LLM models?

When I run Chart Generation example, I found the code calls gpt4-mini. I am wondering if I run the code locally, I will need gpt4’s API key, but I can’t find where it was.

Yes, if you run the code which calls gpt4-mini, you will need to have the API key, that you can get from the OpenAI platform. Please, check the OpenAI documentation to see how to get the Key.

Yes, and you need your own private key for running locally!