How to convert Gemini pro API’s response text into html code

How can I integrate the Gemini Pro API into my PHP website and effectively convert the received response text into HTML code?

I’m seeking guidance on the process of transforming the API response text into a format compatible with HTML, and I would appreciate any insights or instructions from those experienced with this particular task.