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!
@luke This seems to be gone from the docs now. Is there a reason it was removed?