I have written a PowerShell module that provides a set of functions to help manage an OpenAI account programmatically.
It’s still very much in beta and I am not 100% sure the API endpoints are all supported.
The GitHub repo is https://github.com/mc1903/PS-OpenAI.
It can be installed directly from PowerShell Gallery https://www.powershellgallery.com/packages/PS-OpenAI.
I have recently made a request for it to be added to the Community Libraries page; just waiting to hear back on that.
Please let me know what you think. If you find a problem or have question, please open an GitHub issue https://github.com/mc1903/PS-OpenAI/issues
I plan on adding more functions as I find new API endpoints.