Service APIs for creating virtual avatars
  • Welcome
    • Overview
    • About us
    • Glossary
  • What's New
    • Changelog
    • Subscribe for updates
  • EXAMPLES
    • 3D model from single photo
  • Getting started
    • Introduction
    • Getting a token
    • 3D Face Reconstruction
    • 3D Hair Reconstruction
    • GLB Constructor
      • Easy - Head Visualization
      • Advanced - Schema preparation
      • Advanced - Assembling
  • API Methods
    • 3D Face Reconstruction
      • Bad Case Examples
    • 3D Hair Reconstruction
    • GLB Constructor
  • Errors
    • 3D Face Reconstruction
    • 3D Hair Reconstruction
    • GLB Constructor
  • API Metrics
    • SLA
Powered by GitBook
On this page
  • API METHODS
  • /schema
  • Method for loading the schema
  • /glb
  • Method for loading GLB models
  • /assemble
  • Method for constructing result GLB
  • /status
  • Method for checking status
  1. API Methods

GLB Constructor

API METHODS

HTTP type
name

PUT

PUT

POST

POST

/schema

Declaring a file structure for a given token.

In order to use your GLB models (e.g. clothes, hair) to create an avatar, you must declare model IDs in the models config.

Model config example: There are 2 types of models declared here: a hair model and a body model. "hair_male", "hair_female", "body_01" are IDs for each GLB model you upload.

models_config.json
{
	"hair" : [
		"hair_male", "hair_female"
	],
	"body": [
		"body_01"
	]
}

Method for loading the schema

PUT https://api.metahumansdk.io/glb_const/schema

Declaring a file structure for a given token.

Request Body

Name
Type
Description

token*

string

Registered token.

schema*

binary

JSON file with description of the structure of your models.

{
  "result": {
    "status": "schema loaded successfully"
  }
}
{
    "error": {
            "code": int
            "message": str
    }
}

/glb

Uploading the GLB model declared in your schema.

A token is used for authorization.

Note: the GLB models you upload must fit our embbeded head size and position.

Method for loading GLB models

PUT https://api.metahumansdk.io/glb_const/glb

Upload your GLB model declared in your schema.

Request Body

Name
Type
Description

token*

string

Registered token.

data*

binary

GLB model loaded as a binary stream using an in-memory bytes buffer.

sha256*

string

Check sum sha256 of GLB file.

data_type*

string

Loaded model type in schema.

data_id*

string

Loaded model ID in schema.

{
  "result": {
    "status": "model loaded successfully"
  }
}

{
    "error": {
            "code": int
            "message": str
    }
}

/assemble

Assembling the GLB model of a 3D avatar.

Embbeded head model description:

  • number of vertices: 5255

  • blendshapes: ARKit standard

Method for constructing result GLB

POST https://api.metahumansdk.io/glb_const/assemble

Assembling a GLB model of an 3D avatar.

Request Body

Name
Type
Description

token*

string

Registered token.

head_uv*

binary

head_config*

binary

models_congig*

binary

JSON file with model ID for model types from the schema.

custom_models

array

List of custom (not preloaded) GLB model loaded as a binary stream using an in-memory bytes buffer.

add_facs

boolean

Adding FACS blendshapes in GLB model.

string($binary)
{
    "error": {
            "code": int
            "message": str
    }
}

/status

Server and token health check.

Method for checking status

POST https://api.metahumansdk.io/glb_const/status

Server and token health check.

Request Body

Name
Type
Description

token

string

Registered token.

{
    "result": {
        "status": "ok"
    }
}
{
    "error": {
            "code": int
            "message": str
    }
}
Previous3D Hair ReconstructionNext3D Face Reconstruction

Last updated 1 year ago

Check in section for possible error response examples.

Check in section for possible error response examples.

UV texture: created using from photo

Image texture from .

JSON file with model parameters from .

Check in section for possible error response examples.

Check in section for possible error response examples.

ERRORS
ERRORS
3D Face Reconstruction Service
ERRORS
ERRORS
3D Face Reconstruction Service
3D Face Reconstruction Service
/schema
/glb
/assemble
/token_status