You can embed the raw image data using base64_encode
Your API call is returning a GuzzleHttp Response object, so you can get the raw data by calling:
$rawData = $response->getBody()->getContents();
// Alternatively, you should be able to cast it to a string (I would try the first method then this alternative if you want)
$rawData = (string) $response->getBody();
To embed that raw data as an html <img />
you can do something like:
// Convert to base64 encoding
$imageData = base64_encode($rawData);
// Get the content-type of the image from the response
$contentType = $response->getHeader("content-type");
// Format the image src: data:{mime};base64,{data}
$src = 'data: '.$contentType.';base64,'.$imageData;
// Echo out a sample image
echo '<img src="'.$src.'" />';
Source