Avatar WEB API

Contents

1   API basics

Root API URL: https://api.avatarsdk.com/

API endpoints produce JSON responses unless stated otherwise. Please see Content-Type HTTP Header for particular response format.

All POST requests accept multipart/form-data unless stated otherwise.

All mesh/pointcloud retrieval endpoints produce zip archive with mesh/pointcloud in binary PLY format unless stated otherwise.

1.1   Authentication with OAuth 2.0

Before any of the API methods can be used, you should generate an application identifier (referenced later as client_id) for your app. This identifier is used to obtain the access token which is then used to sign actual API requests. You could use one of the official libraries listed on OAuth site (recommended) or any other on your taste to add OAuth 2.0 support in your app.

In order to get your client_id and client_secret please sign up for AvatarSDK developer account.

Besides client_id and client_secret (depending on application authorization grant type) you will need following settings:

For more information on grant types see section 4 of OAuth 2.0 RFC document.

1.3   Filtering

Results of list-retrieving requests may be filtered by some fields of requested objects (e.g. creation time, status, etc.) by specifying filters as a query parameter. All filters are case-insensitive unless stated otherwise. Filters may be specified several times. In this case, they all will be joined via logical AND. See example below:

$ curl -v -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" -X GET "https://api.avatarsdk.com/avatars/?status=completed&description=fb"
> GET /avatars/?status=completed&description=fb HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.avatarsdk.com
> Accept: */*
> Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu
>
< HTTP/1.0 200 OK
< Date: Mon, 03 Apr 2017 04:08:15 GMT
< Link: <https://api.avatarsdk.com/avatars/?description=fb&status=completed>; rel="first", <https://api.avatarsdk.com/avatars/?description=fb&page=1&status=completed>; rel="last"
< Vary: Accept, Cookie
< Content-Type: application/json
< Allow: GET, POST, HEAD, OPTIONS
<
[...]

Please see filters section in particular request documentation to find available filters.

1.4   Developer/Client access

API has two different access modes: developer and client access. Client access mode is slightly more restricted in terms of access to some methods: e.g. it is restricted to list all avatars created with the same client_id and allowed to list only those created with the same PlayerUID, etc.

Please see detailed description for each particular method to find more information about available access modes and its restrictions.

It is highly recommended to use Client access in applications released into production: malicious users won't be able to access or delete data of other users even if client_id and client_secret are compromised.

Client access mode requires to sign each request with PlayerUID identifier along with OAuth access token. To do this you need to register PlayerUID once per unique application (e.g. on the first launch) and then sign each request with this PlayerUID via X-PlayerUID HTTP header. See example below:

$ curl -v -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" -X GET "https://api.avatarsdk.com/avatars/"
> GET /avatars/ HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.avatarsdk.com
> Accept: */*
> Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu
> X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596
>
< HTTP/1.0 200 OK
< Date: Mon, 03 Apr 2017 04:08:15 GMT
< Vary: Accept, Cookie
< Link: <https://api.avatarsdk.com/avatars/>; rel="first", <https://api.avatarsdk.com/avatars/?page=1>; rel="last"
< Content-Type: application/json
< Allow: GET, POST, HEAD, OPTIONS
<
[...]

1.5   Throttling

To keep our system stable and healthy, we introduced a throttling mechanism which limits how many HTTP requests any particular client is allowed to make. Current limits are set to the following values:

  • 75 requests per minute per unique PlayerUID in Client access mode
  • 150 requests per minute for an entire account in Developer access mode

Please note: in the Client access mode there is no limit to a number of requests per SDK account. In order to avoid throttling, please make sure to follow these guidelines:

  • Make sure you are not using Developer access mode in production
  • Make sure that every user of your app has a unique PlayerUID associated with it, and that all requests are signed with this PlayerUID. Even if your app or game does not have user accounts, you should still register a unique ID for every client or device. Otherwise, you'll face throttling issues

If an application exceeds limits it will receive HTTP 429 TOO MANY REQUESTS response code and Retry-After HTTP Response Header will be set to the number of seconds application will need to wait to perform next request. See example below:

$ curl -v -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" -X GET "https://api.avatarsdk.com/avatars/"
> GET /avatars/ HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.avatarsdk.com
> Accept: */*
> Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu
>
< HTTP/1.0 429 TOO MANY REQUESTS
< Date: Mon, 03 Apr 2017 04:08:15 GMT
< Retry-After: 10
< Vary: Accept, Cookie
< Content-Type: application/json
< Allow: GET, POST, HEAD, OPTIONS
<
{"detail":"Request was throttled. Expected available in 10.0 seconds."}

2   Avatars

2.1   Available pipelines

We are constantly working on our avatars improvements in quality, recognizability and feature set. This way we have released several avatar pipelines. Each avatar pipeline may have pipeline subtype - different set of features available, different model topology, etc. Please find a list of currently available avatar pipelines with their subtypes below:

Source photo
static : deprecated

Static bald head with separate haircuts.

Available subtypes:

  • base/legacy - static bald head with separate haircuts
Model sample
animated_face

Bald head with the optional set of blendshapes for animations (45 facial, 17 visemes) and separate haircuts.

Available subtypes:

  • base/legacy - static bald head with set of blendshapes (45 facial, 17 visemes) for animations and separate haircuts. Default if no subtype specified
  • indie/legacy_styled subtype have different model topology to make available optional mesh modifications (see computation parameters section below)
Model sample
head_1.0 : deprecated

Predicted head, haircut and bust. All-in-one model with unique topology.

Available subtypes:

  • base/static - static predicted head, haircut and bust.
  • base/legacy - predicted head, haircut and bust with set of blendshapes (45 facial, 17 visemes) for animations
  • base/mobile - predicted head, haircut and bust with set of blendshapes (51 facial) for animations
Model samples
head_1.1 : deprecated

Predicted head, haircut and bust. All-in-one model with unique topology. Improved texture and mesh quality (compared to head_1.0).

Available subtypes:

  • base/static - static predicted head, haircut and bust.
  • base/legacy - predicted head, haircut and bust with set of blendshapes (45 facial, 17 visemes) for animations
  • base/mobile - predicted head, haircut and bust with set of blendshapes (51 facial) for animations
Model samples
head_1.2

Predicted head, haircut and bust. All-in-one model with unique topology. Fixed shape and texture artifacts in long hair and busts that are present in head_1.1.

Available subtypes:

  • base/static - static predicted head, haircut and bust
  • base/legacy - predicted head, haircut and bust with set of blendshapes (45 facial, 17 visemes) for animations
  • base/mobile - predicted head, haircut and bust with set of blendshapes (51 facial) for animations
Model samples
head_2.0

Takes the best of head_1.1 and animated_face avatars. Looks exactly like head_1.1, but a hairstyle is represented with a separate mesh (except for bust/static subtype), and a bust can be removed (head/mobile subtype).

Please note: available on Pro subscription plan only.

Available subtypes:

  • bust/mobile - predicted bust with detachable haircut and set of 51 facial blendshapes
  • bust/static - static predicted bust and haircut
  • head/mobile - predicted head with detachable haircut and set of 51 facial blendshapes. The mesh topology of a head is always the same
Model samples

2.2   Computation Parameters

Avatar computation parameters contain a set of flags and parameters to fine-tune resulting avatar and meta-information about it. These parameters have three levels of details:

  1. The first level is the parameter categories. E.g. set of blendshapes, haircuts, avatar modifications, etc. Please find all available categories with their description in the sections below.
  2. Next level is availability groups. Availability groups may be auto-assigned (e.g. base/common groups or pricing plan dependent groups) and custom (e.g. for custom work). base and public groups are assigned to everyone. Pricing plan dependent groups are indie, plus and pro in the order of priority, starting with least priority. Each next group includes all previous. The facegen group is available starting from the Plus plan.
  3. The last level is parameter types: enumerable and key-value parameters. Avatar computation parameters affect the computation process only if they are specified explicitly. Enumerable parameters are simply listed as JSON array, key-value parameters are specified as JSON object. Value type is parameter dependent. Please see parameter description in the sections below. Please note: all parameters are considered enumerable by default unless stated otherwise.

Please find parameters availability upon your subscription plan for each avatar pipeline in the tables at the end of each category section below. Each cell represents a lower pricing plan. If a cell is empty - it is not available at all.

Please see parameters retrieval request to retrieve a lists of available and default parameters for each particular pipeline and pipeline subtype on your account.

2.2.1   Haircuts

animated_face pipeline produces bald avatars (i.e. just head, without any haircut). We have three sets of artificial haircuts which are modified during avatar computation process to match each particular avatar head geometry:

base set

3 male and 3 female haircuts

Haircuts samples
facegen set

39 haircuts in total, some of them are unisex

Haircuts samples
plus set

50 haircuts in total, some of them are unisex

Haircuts samples

Availability of these sets depends on your current pricing plan.

For head_2.0 avatars we have additional generated haircut. This haircut is unique and generated for each particular avatar to match haircut from source photo.

It is also possible to add your haircut: contact us at support@avatarsdk.com

2.2.1.1   Parameters availability

Haircuts Set Pipeline / Pipeline Subtype
static animated_face head_2.0
base/legacy base/legacy indie/legacy_styled bust/mobile, head/mobile
base set Free Free Indie Pro
facegen set   Plus Plus  
generated       Pro
plus set       Pro

Please see parameters retrieval request to retrieve a list of available haircuts for particular pipeline type and pipeline subtype for your account. Please note: each particular haircut name must be specified in avatar creation request to be computed for particular avatar.

2.2.1.2   Usage Examples

curl
$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X POST \
       "https://api.avatarsdk.com/avatars/" \
       -F "pipeline=animated_face" \
       -F "pipeline_subtype=base/legacy" \
       -F "name=haircuts test" \
       -F "parameters={\"haircuts\": {\"base\": [\"female_NewSea_J086f\", \"male_NewSea_J003m\"]}}" \
       -F "photo=@photo.jpg"

{
    "code": "d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91",
    "created_on": "2019-10-01T08:16:03.831260Z",
    "description": "",
    "name": "test",
    "progress": 0,
    "status": "Uploading",
    "url": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/"
}

$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X GET \
       "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/"

[
    {
        "gender": "female",
        "identity": "female_NewSea_J086f",
        "mesh": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/female_NewSea_J086f/mesh/",
        "model": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/",
        "pointcloud": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/female_NewSea_J086f/pointcloud/",
        "preview": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/female_NewSea_J086f/preview/",
        "texture": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/female_NewSea_J086f/texture/",
        "url": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/female_NewSea_J086f/"
    },
    {
        "gender": "male",
        "identity": "male_NewSea_J003m",
        "mesh": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/male_NewSea_J003m/mesh/",
        "model": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/",
        "pointcloud": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/male_NewSea_J003m/pointcloud/",
        "preview": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/male_NewSea_J003m/preview/",
        "texture": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/male_NewSea_J003m/texture/",
        "url": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/male_NewSea_J003m/"
    }
]

$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X GET \
       "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/female_NewSea_J086f/mesh/" > female_NewSea_J086f.zip

$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X GET \
       "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/haircuts/female_NewSea_J086f/texture/" > female_NewSea_J086f.jpg
Python
import json, requests, io, zipfile

headers = {
    'Authorization': 'Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu',
    'X-PlayerUID': '9418fd52-baef-401c-a2b3-e6fe16d93596',
}

data = {
    'pipeline': 'animated_face',
    'pipeline_subtype': 'base/legacy',
    'name': 'haircuts test',
    'parameters': json.dumps({
        'haircuts': {
            'base': [
                'female_NewSea_J086f',
                'male_NewSea_J003m',
            ],
        },
    }),
}

files = {
    'photo': open('photo.jpg', 'rb'),
}

avatar = requests.post(
     'https://api.avatarsdk.com/avatars/',
     headers=headers, data=data, files=files,
).json()
avatar = requests.get(avatar['url'], headers=headers).json()

haircuts_url = avatar['haircuts']
haircuts = requests.get(haircuts_url, headers=headers).json()

for haircut in haircuts:
    identity = haircut['identity']

    mesh_url = haircut['mesh']
    mesh = requests.get(mesh_url, headers=headers)
    with io.BytesIO(mesh.content) as zipmemory:
        with zipfile.ZipFile(zipmemory) as archive:
            archive.extractall()

    texture_url = haircut['texture']
    texture = requests.get(texture_url, headers=headers)
    with open(identity + '.jpg', 'wb') as texture_file:
        texture_file.write(texture.content)

2.2.2   Blendshapes

Avatar SDK supports animated avatars using blendshapes. There are three different blendshapes sets available which should be used depending on your use-case: general animation or lip-sync. Please consult blendshapes set description for more information. Please note that legacy blendshapes set is not recommended to use in the new application as it will be deprecated eventually.

legacy_45
The basic set of 45 facial blendshapes
mobile_51
Set of 51 facial blendshapes. This set is compatible with Apple ARKit: https://developer.apple.com/documentation/arkit/creating_face-based_ar_experiences
visems_17

Set of 15 visemes (aa, ch, ee, ih, oh, ou, th, dd, ff, kk, nn, pp, rr, sil, ss) and two additional blendshapes: frown and smile. This set is compatible with Oculus Lipsync that required these 15 visemes. You can find more details here: https://developer.oculus.com/documentation/audiosdk/latest/concepts/book-audio-ovrlipsync/

Please find our guides on how to use visemes for lipsync here: https://docs.avatarsdk.com/unity-plugin/2.0.0/lipsync_samples.html

2.2.2.1   Parameters availability

Parameter Name Pipeline / Pipeline Subtype
animated_face head_1.0, head_1.1, head_1.2 head_2.0
base/legacy indie/legacy_styled base/legacy base/mobile bust/mobile, head/mobile
legacy_45 Free Indie Free    
mobile_51       Free Pro
visemes_17 Free Indie Free    

Please see parameters retrieval request to retrieve a list of available blendshapes for particular pipeline type and pipeline subtype for your account.

2.2.2.2   Usage Examples

curl
$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X POST \
       "https://api.avatarsdk.com/avatars/" \
       -F "pipeline=animated_face" \
       -F "pipeline_subtype=base/legacy" \
       -F "name=blendshapes test" \
       -F "parameters={\"blendshapes\": {\"base\": [\"legacy_45\", \"visems_17\"]}}" \
       -F "photo=@photo.jpg"

{
    "code": "d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91",
    "created_on": "2019-10-01T08:16:03.831260Z",
    "description": "",
    "name": "test",
    "progress": 0,
    "status": "Uploading",
    "url": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/"
}

$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X GET \
       "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/blendshapes/" > blendshapes_ply.zip
Python
import json, requests, io, zipfile

headers = {
    'Authorization': 'Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu',
    'X-PlayerUID': '9418fd52-baef-401c-a2b3-e6fe16d93596',
}

data = {
    'pipeline': 'animated_face',
    'pipeline_subtype': 'base/legacy',
    'name': 'blendshapes test',
    'parameters': json.dumps({
        'blendshapes': {
            'base': [
                'legacy_45',
                'visems_17',
            ],
        },
    }),
}

files = {
    'photo': open('photo.jpg', 'rb'),
}

avatar = requests.post(
     'https://api.avatarsdk.com/avatars/',
     headers=headers, data=data, files=files,
).json()
avatar = requests.get(avatar['url'], headers=headers).json()

blendshapes_url = avatar['blendshapes']
blendshapes = requests.get(blendshapes_url, headers=headers)
with io.BytesIO(blendshapes.content) as zipmemory:
    with zipfile.ZipFile(zipmemory) as archive:
        archive.extractall()

2.2.3   Model Info

Avatar SDK is capable to provide some meta-information about computed avatar from source photo like haircut, skin, eyes color, etc. Please find the list of available meta-information parameters below:

age
Classify a person's age from a submitted photo. Currently possible values are child and not_child. age_confidence also will be present in model_info to represent the confidence of age classification with value in the range [0.5, 1] inclusive
eye_iris_color
Compute average eye iris color [1] from a submitted photo
eye_sclera_color
Compute average eye sclera color [1] from a submitted photo
facial_landmarks_68

Compute facial landmarks. Landmark coordinates are represented as flat JSON array with X, Y, Z float components sequence for each landmark, or NaN (for each component) if no landmark detected

Landmarks correspondence
(click on image to magnify)
gender
Predict a person's gender from a submitted photo. Possible values are male and female. gender_confidence also will be present in model_info to represent the confidence of gender prediction with value in the range [0.5, 1] inclusive
hair_color
Compute average haircut color [1] from a submitted photo
lips_color
Compute average lips color [1] from a submitted photo
predict_haircut
Predict which haircut from the base and the facegen sets matches best to the submitted photo. haircut_name will contain corresponding haircut identifier. May contain special value absolutely_bald which represents the absence of haircut. Please note: predicted haircut is independent on which haircuts were requested to compute with a particular avatar
skin_color
Compute average skin color [1] from a submitted photo
Colors correspondence

2.2.3.1   Parameters availability

Parameter Name Pipeline / Pipeline Subtype
animated_face head_1.1, head_1.2 head_2.0
base/legacy indie/legacy_styled base/legacy, base/mobile, base/static bust/mobile, bust/static, head/mobile
age Plus Plus Plus Pro
eye_iris_color Plus Plus Plus Pro
eye_sclera_color Plus Plus Plus Pro
facial_landmarks_68 Plus Plus Plus  
gender Plus Plus Plus Pro
hair_color Free Indie   Pro
lips_color Plus Plus Plus  
predict_haircut Plus Plus    
skin_color Plus Plus Plus Pro

Please see parameters retrieval request to retrieve a list of available model info flags for particular pipeline type and pipeline subtype for your account.

2.2.3.2   Usage Examples

curl
$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X POST \
       "https://api.avatarsdk.com/avatars/" \
       -F "pipeline=animated_face" \
       -F "pipeline_subtype=base/legacy" \
       -F "name=info test" \
       -F "parameters={\"model_info\": {\"base\": [\"hair_color\"]}}" \
       -F "photo=@photo.jpg"

{
    "code": "d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91",
    "created_on": "2019-10-01T08:16:03.831260Z",
    "description": "",
    "name": "test",
    "progress": 0,
    "status": "Uploading",
    "url": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/"
}

$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X GET \
       "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/model_info/"

{
    "hair_color": {
        "blue": 109,
        "green": 131,
        "red": 172
    },
    "pipeline": "animated_face",
    "pipeline_subtype": "base/legacy"
}
Python
import json, requests

headers = {
    'Authorization': 'Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu',
    'X-PlayerUID': '9418fd52-baef-401c-a2b3-e6fe16d93596',
}

data = {
    'pipeline': 'animated_face',
    'pipeline_subtype': 'base/legacy',
    'name': 'info test',
    'parameters': json.dumps({
        'model_info': {
            'base': [
                'hair_color',
            ],
        },
    }),
}

files = {
    'photo': open('photo.jpg', 'rb'),
}

avatar = requests.post(
     'https://api.avatarsdk.com/avatars/',
     headers=headers, data=data, files=files,
).json()
avatar = requests.get(avatar['url'], headers=headers).json()

avatar_info = requests.get(avatar['model_info'], headers=headers).json()
print(avatar_info)

2.2.4   Avatar Modifications

Avatar SDK is aimed to produce recognizable photo-realistic avatars. However, there is demand on avatars modifications, leaving avatar recognizable, though. Please find available avatar modifications below.

Please note: all parameters for this category are key-value, and modifies original avatar respectively its description.

add_eyelid_shadow : boolean

Add an eyelid shadow on top of eye texture. Works only when parametric_eyes_texture is set. See textures comparison below

Models comparison
add_glare : boolean

Add a glare directly into parametric eye texture. Works only when parametric_eyes_texture is set. Enabled by default. See textures comparison below

Models comparison
allow_modify_neck : boolean

By default, all avatars have the same neck mesh across all models. If flag set to true, neck mesh will be modified to better match submitted photo. Please note: x-axis rotation is also applied to match a head pose from submitted photo

Models comparison
caricature_amount : float

Factor to strengthen differences between average model and a particular avatar. Valid values range is [0, +∞). Usable values range is model dependent and usually should be lower than 5

Models comparison
curved_bottom : boolean

Make the bottom of model bust slightly curved. See models comparison below

Models comparison
eye_iris_color : color [1]

Recolor eye iris directly on a model texture. Works only when parametric_eyes_texture is set. See textures comparison below for {"red": 0, "green": 255, "blue": 0} color

Models comparison
eye_sclera_color : color [1]

Recolor eye sclera directly on a model texture. Works only when parametric_eyes_texture is set. See textures comparison below for {"red": 0, "green": 255, "blue": 0} color

Models comparison
hair_color : color [1]

Recolor generated haircut directly on a haircut texture. See models comparison below for {"red": 0, "green": 255, "blue": 0} color

Models comparison
lips_color : color [1]

Recolor lips directly on a model texture. See models comparison below for {"red": 0, "green": 255, "blue": 0} color

Models comparison
parametric_eyes_texture : boolean

Replace eye texture from submitted photo to generated one with sclera and iris colors match the photo version. Please note: always set for the indie/legacy_styled subtype of the animated_face pipeline. See models comparison below

Models comparison
repack_texture : boolean

Optimize texture layout to occupy less space. See textures comparison below

Textures comparison
slightly_cartoonish_texture : boolean

Make the model texture look slightly cartoonish. Please note: replaces original avatar texture. See models comparison below

Models comparison
teeth_color : color [1]

Recolor teeth directly on a model texture. See models comparison below for {"red": 0, "green": 255, "blue": 0} color

Models comparison

2.2.4.1   Parameters availability

Parameter Name Pipeline / Pipeline Subtype
animated_face head_1.1 head_1.2 head_2.0
base/legacy indie/legacy_styled base/legacy base/mobile base/static base/legacy base/mobile base/static bust/mobile bust/static head/mobile
add_eyelid_shadow   Plus   Plus     Plus   Pro   Pro
add_glare   Plus   Plus     Plus   Pro   Pro
allow_modify_neck Indie Indie                 Pro
caricature_amount Plus Plus                  
curved_bottom     Plus Plus Plus Plus Plus Plus Pro Pro  
eye_iris_color   Plus   Plus     Plus   Pro   Pro
eye_sclera_color   Plus   Plus     Plus   Pro   Pro
hair_color                 Pro Pro Pro
lips_color Plus Plus   Plus Plus   Plus Plus      
parametric_eyes_texture   always set   Plus     Plus   Pro   Pro
repack_texture     Free Free   Free Free   always set    
slightly_cartoonish_texture     Plus Plus Plus Plus Plus Plus      
teeth_color Plus Plus       Plus Plus   Pro   Pro

Please see parameters retrieval request to retrieve a list of available avatar modification parameters for particular pipeline type and pipeline subtype for your account.

2.2.4.2   Usage Examples

curl
$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X POST \
       "https://api.avatarsdk.com/avatars/" \
       -F "pipeline=animated_face" \
       -F "pipeline_subtype=base/legacy" \
       -F "name=modifications test" \
       -F "parameters={\"avatar_modifications\": {\"plus\": {\"lips_color\": {\"red\": 222, \"green\": 173, \"blue\": 190}}}}" \
       -F "photo=@photo.jpg"
Python
import json, requests, io, zipfile

headers = {
    'Authorization': 'Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu',
    'X-PlayerUID': '9418fd52-baef-401c-a2b3-e6fe16d93596',
}

data = {
    'pipeline': 'animated_face',
    'pipeline_subtype': 'base/legacy',
    'name': 'modifications test',
    'parameters': json.dumps({
        'avatar_modifications': {
            'plus': {
                'lips_color': {
                    'red': 222,
                    'green': 173,
                    'blue': 190,
                },
            },
        },
    }),
}

files = {
    'photo': open('photo.jpg', 'rb'),
}

avatar = requests.post(
     'https://api.avatarsdk.com/avatars/',
     headers=headers, data=data, files=files,
).json()

2.2.5   Shape Modifications

Similar to avatar modification parameters, see description for that parameters category.

Please note: all parameters for this category are key-value, and modifies original avatar respectively its description.

cartoonish_v0.3 : float

Factor to modify avatar mesh to look more cartoon-like. Valid values range is [0, +∞). Usable values range is model dependent and usually should be lower than 1

Models comparison

2.2.5.1   Parameters availability

Parameter Name Pipeline / Pipeline Subtype
animated_face
indie/legacy_styled
cartoonish_v0.3 Indie

Please see parameters retrieval request to retrieve a list of available shape modifications parameters for particular pipeline type and pipeline subtype for your account.

2.2.5.2   Usage Examples

curl
$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X POST \
       "https://api.avatarsdk.com/avatars/" \
       -F "pipeline=animated_face" \
       -F "pipeline_subtype=indie/legacy_styled" \
       -F "name=modifications test" \
       -F "parameters={\"shape_modifications\": {\"indie\": {\"cartoonish_v0.3\": 0.5}}}" \
       -F "photo=@photo.jpg"
Python
import json, requests, io, zipfile

headers = {
    'Authorization': 'Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu',
    'X-PlayerUID': '9418fd52-baef-401c-a2b3-e6fe16d93596',
}

data = {
    'pipeline': 'animated_face',
    'pipeline_subtype': 'indie/legacy_styled',
    'name': 'modifications test',
    'parameters': json.dumps({
        'shape_modifications': {
            'indie': {
                'cartoonish_v0.3': 0.5,
            },
        },
    }),
}

files = {
    'photo': open('photo.jpg', 'rb'),
}

avatar = requests.post(
     'https://api.avatarsdk.com/avatars/',
     headers=headers, data=data, files=files,
).json()

2.2.6   Additional Textures

You could request to compute additional textures along with default one, which is always computed. See avatar textures to find out how to retrieve additional textures.

cartoonish_texture

Uniformly colored texture

Textures comparison
lips_mask

Mask in PNG format

Textures comparison
slightly_cartoonish_texture

Slightly smoother than the original texture

Textures comparison
smooth_eyelashes_texture

Original texture with smoothed area of eyelashes

Textures comparison

2.2.6.1   Parameters availability

Parameter Name Pipeline / Pipeline Subtype
animated_face head_1.1, head_1.2
base/legacy indie/legacy_styled base/mobile, base/static
cartoonish_texture   Plus  
lips_mask Plus Plus Plus
slightly_cartoonish_texture Free Indie  
smooth_eyelashes_texture Plus Plus  

Please see parameters retrieval request to retrieve a list of available additional textures for particular pipeline type and pipeline subtype for your account.

2.2.6.2   Usage Examples

curl
$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X POST \
       "https://api.avatarsdk.com/avatars/" \
       -F "pipeline=animated_face" \
       -F "pipeline_subtype=base/legacy" \
       -F "name=textures test" \
       -F "parameters={\"additional_textures\": {\"base\": [\"slightly_cartoonish_texture\"]}}" \
       -F "photo=@photo.jpg"

{
    "code": "d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91",
    "created_on": "2019-10-01T08:16:03.831260Z",
    "description": "",
    "name": "test",
    "progress": 0,
    "status": "Uploading",
    "url": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/"
}

$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X GET \
       "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/textures/"

[
    {
        "file": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/textures/model/file/",
        "identity": "model"
    },
    {
        "file": "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/textures/slightly_cartoonish_texture/file/",
        "identity": "slightly_cartoonish_texture"
    }
]

$ curl -H "Authorization: Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu" \
       -H "X-PlayerUID: 9418fd52-baef-401c-a2b3-e6fe16d93596" \
       -X GET \
       "https://api.avatarsdk.com/avatars/d4a31ac7-4aab-4cdc-b70b-75e75fc6bd91/textures/slightly_cartoonish_texture/file/" > slightly_cartoonish_texture.jpg
Python
import json, requests, io, zipfile

headers = {
    'Authorization': 'Bearer F88pQWs8hoPzbeCg4xTGifDxxs1eKu',
    'X-PlayerUID': '9418fd52-baef-401c-a2b3-e6fe16d93596',
}

data = {
    'pipeline': 'animated_face',
    'pipeline_subtype': 'base/legacy',
    'name': 'textures test',
    'parameters': json.dumps({
        'additional_textures': {
            'base': [
                'slightly_cartoonish_texture',
            ],
        },
    }),
}

files = {
    'photo': open('photo.jpg', 'rb'),
}

avatar = requests.post(
     'https://api.avatarsdk.com/avatars/',
     headers=headers, data=data, files=files,
).json()

textures_url = requests.compat.urljoin(avatar['url'], 'textures/')
textures = requests.get(textures_url, headers=headers).json()

for texture in textures:
    identity = texture['identity']

    texture_url = texture['file']
    texture_rsp = requests.get(texture_url, headers=headers)
    with open(identity + '.jpg', 'wb') as texture_file:
        texture_file.write(texture_rsp.content)

[1](1, 2, 3, 4, 5, 6, 7, 8, 9, 10) Color is represented as JSON object with red, green and blue keys and [0, 255] values inclusive for corresponding color channels. E.g. {"red": 222, "green": 173, "blue": 190}

3   Usage Examples

We have developed several samples where you could see this API in action:

More API usage examples are coming.

4   Methods

4.1   Players

Player model DTO [*]:

{
  // Absolute URL to this DTO
  "url": string,

  // Player unique identifier (PlayerUID)
  "code": string,

  // ISO 8601 datetime
  "created_on": string,

  // May be used to contain arbitrary information for your taste
  "comment": string
}

[*]DTO is acronym for Data Transfer Object

4.1.1   list

Method
GET
URL
/players/
Description
Retrieve a paginated list of registered players available for your developer account. Available only in developer access mode. See pagination section for paginated responses details. See response example below:
[
  {
    "url":"https://api.avatarsdk.com/players/9418fd52-baef-401c-a2b3-e6fe16d93596/",
    "code":"9418fd52-baef-401c-a2b3-e6fe16d93596",
    "created_on":"2017-04-03T04:08:15.589833Z",
    "comment":""
  },
  ...
]
Filters
  • created_before - filter Players with creation datetime before specified one (inclusive)
  • created_after - filter Players with creation datetime after specified one (inclusive)
  • comment - filter by part of the Player comment

4.1.2   retrieve

Method
GET
URL
/players/{code}/
Description
Retrieve a particular instance of Player identified by code URL part. See player DTO for the response format description. Available in developer and client access modes.

4.1.3   create

Method
POST
URL
/players/
Description
Register a new Player. See player DTO for response format description. Available in developer and client access modes.
Request parameters
No request parameters are required.

4.2   Parameters

Parameters DTO:

{
  // Category of parameters. E.g. 'haircuts', 'blendshapes', etc.
  "category": {
    // Group of parameters. E.g. pricing plan or customer-specific group
    "group": [
      // List of parameter names
      "name",
      ...
    ]
  },
  ...
}

4.2.1   retrieve

Method
GET
URL
/parameters/(available | default)/{pipeline}/
Description

Retrieve all available or default parameters for specified pipeline and default pipeline subtype. Use filters to retrieve parameters for non-default pipeline subtype. The response is one key-value pair with pipeline_subtype as a key and parameters as a value.

Parameters may be just copy-pasted as-is (or partially) into parameters field of create avatar request parameters. The only exception is avatar_modifications parameters category: this category contains key-value parameters. See avatar modification parameters section for details.

Please see example response below (a little bit shortened for the sake of simplicity):

{
  "base/legacy": {
    "blendshapes": {
      "base": [
        "legacy_45",
        "visemes_17"
      ]
    },
    "haircuts": {
      "base": [
        "female_NewSea_J086f",
        "female_NewSea_J096f",
        "female_NewSea_J123f",
        "male_NewSea_J003m",
        "male_NewSea_J082m",
        "male_makehuman_short02"
      ],
      "facegen": [
        "facegen_afro",
        "facegen_balding",
        ...
        "facegen_wavy_shag"
      ]
    }
  }
}
Filters

4.3   Avatars

Avatar model DTO:

{
  // Absolute URL to this DTO
  "url": string,

  // Avatar identifier
  "code": string,

  // Avatar models computing status. One of [Uploading, Queued, Computing, Completed, Failed, Timed Out]
  "status": string,

  // Current progress of avatar status. In rage [0:100]
  "progress": integer,

  // Avatar name
  "name": string,

  // Pipeline used to calculate avatar
  "pipeline": string,

  // Avatar description
  "description": string,

  // ISO 8601 datetime
  "created_on": string,

  // ISO 8601 last change datetime. May be `null` if haven't changed yet since creation
  "ctime": string,

  // Absolute URL to retrieve zip with mesh of avatar
  "mesh": string,

  // Absolute URL to retrieve jpeg texture of avatar
  "texture": string,

  // Absolute URL to retrieve Avatar source image thumbnail
  "thumbnail": string,

  // Absolute URL to retrieve list of available haircuts for this avatar model
  "haircuts": string,

  // Absolute URL to retrieve zip archive of available blendshapes
  // for this avatar model
  "blendshapes": string,

  // Absolute URL to retrieve JSON object with this avatar meta-information
  "model_info": string
}

See avatar blendshapes for more information about blendshapes retrieval

4.3.1   list

Method
GET
URL
/avatars/
Description
Retrieve a paginated list of available avatar models for your account. Available in developer and client access modes. In client access mode list of avatars is restricted to models created by specified PlayerUID. See pagination section for paginated responses details. See response example below:
[
  {
    "url":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/",
    "code":"b63f9737-8594-460a-99a4-74e60b042bd4",
    "status":"Completed",
    "progress":100,
    "name":"Leo",
    "pipeline": "static",
    "description":"",
    "created_on":"2017-04-03T04:08:15.589833Z",
    "ctime":null,
    "mesh":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/mesh/",
    "texture":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/texture/",
    "thumbnail":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/thumbnail/",
    "haircuts":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/haircuts/",
    "blendshapes":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/blendshapes/"
  },
  ...
]
Filters
  • name - filter by part of the avatar name
  • description - filter by part of the avatar description
  • status - filter by part of the avatar status
  • created_before - filter avatars with creation datetime before specified one (inclusive)
  • created_after - filter avatars with creation datetime after specified one (inclusive)
  • changed_before - filter avatars with change datetime before specified one (inclusive)
  • changed_after - filter avatars with change datetime after specified one (inclusive)
  • pipeline - filter by used pipeline

4.3.2   retrieve

Method
GET
URL
/avatars/{code}/
Description
Retrieve particular instance of avatar identified by code URL part. See avatar DTO for response format description. Available in developer and client access modes.

4.3.3   create

Method
POST
URL
/avatars/
Description

Create a new avatar calculation task. Available in developer and client access modes. After POSTing a request, avatar photo for the calculation is being uploaded to calculation backend (state Uploading), then Queued until free calculation backend is found, then Computing and finally Completed.

In some cases, calculation task may be Failed due to bad (blurry/dark/etc.) photo was submitted or for some other reasons. In rare cases task may be Timed out - calculation took too long time.

It is your responsibility to poll avatar calculation task for progress (status and progress fields of avatar DTO). Access to the URL fields of incomplete avatar will not succeed.

Request parameters

Accepts multipart/form-data requests with the following fields:

  • name - new avatar name
  • description - new avatar description
  • photo - new avatar source photo
  • preserve_original_texture - boolean flag, indicates whether to preserve original texture size, or not. By default texture is padded with black fields so that its size is multiple of power-of-two (for compatibility reasons). If you do not need this - set this flag to True. Affects only static pipeline
  • pipeline - optional field to specify which pipeline to use for new avatar generation. Please see available pipelines for the list of possible field values. Assumed value is static if form field is not provided
  • pipeline_subtype - modification of pipeline. Please see available pipelines for the list of possible field values
  • parameters - specific parameters to compute for submitted avatar. See parameters DTO for this field format. If no value submitted - replaced with default parameters for specified pipeline and (optionally) pipeline subtype. See parameters retrieval request to find out default/available parameters for pipeline type/subtype pairs. If no parameters required to compute avatar - submit empty JSON object: {}

4.3.4   update

Method
PATCH, PUT
URL
/avatars/{code}/
Description
Update name/description of the particular avatar model identified by the code URL part. PATCH method supports partial update (e.g. only one field may be submitted), PUT method requires both fields to be submitted. Available in developer and client access modes. In client access mode restricted to avatars created by specified PlayerUID.
Request parameters

Accepts multipart/form-data requests with the following fields:

  • name - new avatar name
  • description - new avatar description

4.3.5   delete

Method
DELETE
URL
/avatars/{code}/
Description
Delete particular avatar model identified by code URL part. Available in developer and client access modes. In client access mode restricted to avatars created by specified PlayerUID.

4.4   Avatar Haircuts

Represents per-avatar haircuts morphed to fit particular avatar model geometry.

The same haircuts meshes are interchangeable between different avatars if the corresponding pointcloud is applied. E.g. you could store mesh from haircut1 of avatar1, then download only pointclouds for haircut1 of avatar2, avatar3 etc. and replace pointcloud in previously-stored mesh. This way you could save customer's network traffic.

Per-Avatar haircut DTO:

{
  // Identifier of haircut
  "identity": string,

  // Haircut formal gender. One of [male, female, unisex]
  "gender": string,

  // Absolute URL to preview of specified haircut
  "preview": string,

  // Absolute URL to this haircut
  "url": string,

  // Absolute URL to haircut png texture
  "texture": string,

  // Absolute URL to avatar model
  "model": string,

  // Absolute URL to per-avatar haircut point cloud zip
  "pointcloud": string,

  // Absolute URL to per-avatar haircut mesh zip
  "mesh": string
}

4.4.1   list

Method
GET
URL
/avatars/{code}/haircuts/
Description
Retrieve list of per-avatar haircuts. Particular avatar is identified by code URL part. Available in developer and client access modes. In client access mode restricted to avatars created by specified PlayerUID. Please see avatar haircut DTO for response format description. Please see example response below:
[
  {
    "identity":"female_NewSea_J086f",
    "gender":"female",
    "preview":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/haircuts/female_NewSea_J086f/preview/",
    "url":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/haircuts/female_NewSea_J086f/",
    "texture":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/haircuts/female_NewSea_J086f/texture/",
    "model":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/",
    "pointcloud":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/haircuts/female_NewSea_J086f/pointcloud/",
    "mesh":"https://api.avatarsdk.com/avatars/b63f9737-8594-460a-99a4-74e60b042bd4/haircuts/female_NewSea_J086f/mesh/"
  },
  ...
]
Filters
  • gender - filter by haircut gender

4.4.2   retrieve

Method
GET
URL
/avatars/{code}/haircuts/{identity}/
Description
Retrieve a particular instance of per-avatar haircut. Avatar is identified by code URL part, haircut - by identity URL part. Available in developer and client access modes. In client access mode restricted to avatars created by specified PlayerUID. Please see avatar haircut DTO for response object description.

4.5   Avatar Mesh

4.5.1   retrieve

Method
GET
URL
/avatars/{code}/mesh/
Description

Retrieve zip archive with avatar mesh.

Avatars computed with animated_face, head_1.0, head_1.1, head_1.2 and head_2.0 (head/mobile subtype only) pipelines support different levels of mesh details (LOD). Specify desired LOD on mesh retrieval as a request parameter. Please find more information on mesh properties in the table below:

  animated_face head_1.0, head_1.1, head_1.2 head_2.0
LOD# vertices faces vertices faces vertices faces
0 13043 24479 28651 53171 11894 23404
1 9898 18674 16481 30000 9969 19054
2 8122 15122 8677 15000 8732 16860
3 6107 11128 6012 10000 5713 11007
4 5363 9772 4921 8000 4953 9497
5 3859 6844 4333 7000 4259 7889
6 3062 5430 3742 6000 3789 6937
7 2342 3996 3191 5000 2034 3926
8 1425 2680 N/A N/A N/A N/A

Note: The structure of the head in LOD8 for animated_face pipeline is the same as in LOD7, but without teeth.

Request Parameters
  • lod - level of details, integer in range [0, 8]

4.6   Avatar Textures

Avatar texture DTO:

{
  // Identifier of avatar texture
  "identity": string,

  // Absolute URL to this texture file
  "file": string,
}

4.6.1   list

Method
GET
URL
/avatars/{code}/textures/
Description

Additional textures (along with default one) can be requested to compute for a particular avatar. See additional textures parameters to find out which textures can be requested.

Use this request to retrieve a list of available textures for particular avatar. Particular avatar is identified by code URL part.

Please see the example response below:

[
    {
        "file": "https://api.avatarsdk.com/avatars/33639df4-7593-44ab-a793-5e61a82bc81b/textures/slightly_cartoonish_texture/file/",
        "identity": "slightly_cartoonish_texture"
    },
    {
        "file": "https://api.avatarsdk.com/avatars/33639df4-7593-44ab-a793-5e61a82bc81b/textures/model_cartoonish/file/",
        "identity": "model_cartoonish"
    },
    {
        "file": "https://api.avatarsdk.com/avatars/33639df4-7593-44ab-a793-5e61a82bc81b/textures/model/file/",
        "identity": "model"
    }
]

4.6.2   retrieve

Method
GET
URL
/avatars/{code}/textures/{identity}/file/
Description
Retrieve particular texture file identified by its identity for particular avatar identified by code. Texture format may vary (i.e. JPEG, PNG, etc.), thus consult Content-Type HTTP Response Header for particular texture format.

4.7   Avatar Blendshapes

4.7.1   retrieve

Method
GET
URL
/avatars/{code}/blendshapes/
Description

Retrieve zip archive with all available blendshapes for specific avatar. If no blendshapes available - request will end with HTTP 204 NO CONTENT response.

By default blendshapes are delivered in ply files packed into zip archive. Blendshapes format may be changed to one fbx file also packed into zip archive.

Avatars computed with animated_face, head_1.0, head_1.1, head_1.2 and head_2.0 (head/mobile subtype only) pipelines support different levels of blendshapes details (LOD). For more information on LOD details see avatar mesh retrieve request. Specify desired LOD on blendshapes retrieval as a request parameter.

Request Parameters
  • fmt - blendshapes format. Available choices are: ply and fbx
  • lod - level of details, integer in range [0, 8]

4.8   Avatar Thumbnail

4.8.1   retrieve

Method
GET
URL
/avatars/{code}/thumbnail/
Description
Retrieve thumbnail of submitted for calculations avatar photo.
Request Parameters
  • max_w - limit thumbnail width, in range (0, 1024]
  • max_h - limit thumbnail height, in range (0, 1024]

4.9   Avatar Model Information

4.9.1   retrieve

Method
GET
URL
/avatars/{code}/model_info/
Description

Retrieve JSON object with avatar model meta-information requested on avatar creation. Please see model info parameters section for available parameters.

Please see example response below:

{
    "age": "not_child",
    "age_confidence": 1,
    "gender": "male",
    "gender_confidence": 0.9999961853027344,
    "hair_color": {
        "blue": 114,
        "green": 145,
        "red": 199
    },
    "pipeline": "animated_face",
    "pipeline_subtype": "base/legacy",
    "skin_color": {
        "blue": 151,
        "green": 181,
        "red": 235
    }
}