Create Avatar & Render

Tutorial on how to use the API to create an avatar and render a preview.

1. Authenticate

Select the appropriate oauth2 authentication flow for your use case and obtain an API access token. See Authentication for details.

For sake of simplicity of this example, you can use your application's client credentials to authenticate directly using the oauth2 resource owner flow. Returns an access token on success.

If you use other authentication flows, make sure to enable scopes read:avatars write:avatars read:renderings write:renderings.

curl --request POST \
--url '' \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type= \
--data realm=Username-Password-Authentication \
--data username={PASSWORD} \
--data password={USERNAME} \
--data \
--data client_id={CLIENT_ID} \
--data client_secret={CLIENT_SECRET}

2. Create Avatar

Post a photo of a face to create an avatar. Returns response header X-Loom-Status containing the id of created avatar if successful. See Avatars > Create for details.

curl -X POST "" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: multipart/form-data" \
-F "image=@{IMAGE_FILE};type=image/jpeg"

3. Resolve Rendering

A rendered preview of created avatar is automatically created and can be resolved using the avatar ID. See Avatars > Attachments > List for details.

"entries": [
"id": 5754466256551936,
"type": "renderings_preview",
"name": "neutral",
"url": "",
"updated_at": "2020-04-05T16:37:57Z"

This returns a list of attachments - including uploaded photo, rendered preview (type renderings_preview) etc.