I relied on this package here: https://github.com/srcnalt/OpenAI-Unity
It's a C# wrapper library designed for the OpenAI API, complete with a getting-started guide and a variety of examples.
For a more thorough understanding of the API, check OpenAI's official page: https://platform.openai.com/docs/guides/chat
There, you can explore all the parameters and understand what each of them does. I hope this helps!