<!-- Click this button to send the request. -->
<button onclick="return render()">Render</button>
// Replace with the .glb URL for the desired avatar.
model: "https://d1a370nemizbjq.cloudfront.net/b31d89e2-bca5-45e6-bf1a-eb24b1afbe72.glb",
// Type of portrait to render.
scene: "fullbody-portrait-v1",
// Optional: Pose. Default: T-pose.
armature: "ArmatureTargetMale",
// Optional: Facial expression. Default: Empty.
"blendShapes": {"Wolf3D_Avatar": {"mouthSmile": 0.2 }}
const http = new XMLHttpRequest()
http.open("POST", "https://render.readyplayer.me/render")
http.setRequestHeader("Content-type", "application/json")
http.send(JSON.stringify(params))
// Parse the response and display the image
var image = JSON.parse(http.responseText)["renders"]
var outputImg = document.createElement('img')
document.body.appendChild(outputImg)