How to render 3d avatar thumbnail from list through endpoint?

RoPro has a feature in which the avatar thumbnail can be rendered even if the user does not own the item, which makes me think that there is a way to apply an accessory and then retrieve the thumbnail for that in both 2D and 3D, but I am not sure which endpoints to use.

I am familiar with this post:

But this retrieves from an already created avatar and creates a thumbnail based on that.

To clarify I am not asking to render an outfit that is already made, I am asking to render an outfit given a list of items that should appear on the character.

Use the avatar.roblox.com/v1/avatar/render endpoint (cookie credentials are required) with POST body:

{
  "thumbnailConfig": {
    "thumbnailId": 1,
    "size": "420x420",
    "thumbnailType": "3d"
  },
  "avatarDefinition": {
    "scales": {
      "head": 1,
      "height": 1,
      "bodyType": 0,
      "width": 1,
      "depth": 1,
      "proportion": 0
    },
    "bodyColors": {
      "headColor": "#ffffff",
      "rightArmColor": "#ffffff",
      "leftLegColor": "#ffffff",
      "leftArmColor": "#ffffff",
      "rightLegColor": "#ffffff",
      "torsoColor": "#ffffff"
    },
    "playerAvatarType": {
      "playerAvatarType": "R15"
    },
    "assets": [
      {
        "id": 16289863481
      }
    ]
  }
}

This should return a body like: (If the state is not completed, keep retrying every 1s)

{
    "targetId": 1,
    "state": "Completed",
    "imageUrl": "https://t6.rbxcdn.com/1DAY-Avatar-D0F1AE041240525C7094A5E344667915-Obj",
    "version": "TN3"
}

To request a 2d thumbnail, change 3d to 2d in thumbnailConfig.thumbnailType

1 Like

One question, if you were to want to change the package, would you add the ID to the assets? or each individual body part id.

You’d have to add each individual body part asset ID. You could also look and see how the website uses /v1/avatar/render on Bundle pages for try-on previews.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.