This is possible per daveshapautomator below!
Your use case is written exactly in the documentation here: OpenAI API
Hope this helps.
Feel free to reach out if you have trouble!