OpenAI interview question

API related question . Had to create a function by using the response of an API