Create Avatars
FIXME: Enable this lock when the slots feature is up running and the slots are being consumed if slots.has_exhausted(): raise HTTPException( status_code=status.HTTP_406_NOT_ACCEPTABLE, detail="You have reached the maximum number of avatars", )
Request Body required
head object
Default value: false
Default value: false
Only available for .glb files. You need to load KHR_mesh_quantization EXT_meshopt_compression, KHR_texture_transform extensions in your environment to be able to use optimized avatars.
Default value: false
When sending lod=True we're gonna generate your avatar with different level of detail, but process will take longer
Default value: false
It will generate a Color and Normal Atlas of all the avatar's textures. It will also merge all the meshes (except the head)
Default value: false
- 201
- 422
Successful Response
Schema
Possible values: non-empty
Possible values: [custom
, default
, exclusive
, payable
, promotion
, designed
, external
, assembled
, generated
]
{ "name": "string", "output_format": "glb", "style": "phr", "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "url": "string", "source_type": "custom", "created_at": "2025-03-24T13:36:24.953Z", "updated_at": "2025-03-24T13:36:24.953Z", "thumbnail_url": "string", "outfit_id": "string", "head_id": "string", "lod": {}, "vrm_url": "string", "vrm_updated_at": "string", "usdz_url": "string", "usdz_updated_at": "string", "halfbody_url": "string", "facial_exp": {}, "nft_url": "string", "armature_rest_pose": "string", "facial_morph_system": "string", "provider": "string" }
Validation Error
Schema
detail object[]
{ "detail": [ { "loc": [ "string", 0 ], "msg": "string", "type": "string" } ] }
POST /avatars
Authorization
name: OAuth2PasswordBearertype: oauth2flows: {
"password": {
"scopes": {},
"tokenUrl": "login"
}
}
Request
Request
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'
curl -L -X POST 'https://api.unionavatars.com/v2/avatars' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <TOKEN>' \ --data-raw '{ "name": "string", "output_format": "glb", "style": "phr", "img": "string", "head": { "name": "string", "output_format": "glb", "style": "phr", "version": "v2", "selfie_img": "string", "hair_id": "string", "hair_color": {}, "use_lod": false, "create_ar": false }, "head_id": "string", "outfit_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "create_thumbnail": false, "optimize": false, "use_lod": false, "atlas": false, "create_vrm": false }'