Avaturn
    Avaturn
    • Create User
      POST
    • Delete User
      DELETE
    • New Session
      POST
    • List User Avatars
      GET
    • New Avatar
      POST
    • Get Customization
      GET
    • Set Customization
      PUT
    • Delete User Avatar
      DELETE
    • Render User Avatar Async
      POST
    • Create Export
      POST

      Set Customization

      开发环境
      http://dev-cn.your-api-server.com
      开发环境
      http://dev-cn.your-api-server.com
      PUT
      /api/v1/avatars/{id}/customization
      Set avatar customization.
      Customization is the combination of applied assets (clothes, hairstyles, accessories etc), as well as the body type and other parameters.You can set not more than one assets in each category.
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request PUT 'http://dev-cn.your-api-server.com/api/v1/avatars//customization' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "assets": {
              "clothing": {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              },
              "hair_and_headwear": {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "color": "#aabbcc"
              },
              "eyewear": {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
                  "color": "#aabbccaa"
              },
              "footwear": {
                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              }
          },
          "body": "body_0",
          "age": "adult",
          "metadata": {
              "property1": "string",
              "property2": "string"
          },
          "bone_scale": {
              "head": 0,
              "arms": 0,
              "chest": 0
          },
          "skin_tone_correction": 0
      }'
      响应示例响应示例
      202 - 示例 1
      null

      请求参数

      Path 参数
      id
      string <uuid>
      Id
      必需
      Body 参数application/json
      assets
      object (AssetSlots) 
      必需
      clothing
      可选
      hair_and_headwear
      可选
      eyewear
      可选
      footwear
      可选
      body
      enum<string> 
      必需
      Avatar body type
      枚举值:
      body_0body_1body_2body_3body_4
      age
      enum<string> 
      Age
      可选
      枚举值:
      3-67-1213-16adult
      默认值:
      adult
      metadata
      object 
      Metadata
      可选
      Arbitrary key-value pairs. Use them to store any data associated with avatar. 10 pairs max, 50 chars max key length, 500 chars max value length
      额外字段
      string 
      可选
      <= 500 字符
      bone_scale
      object (BoneScale) 
      可选
      head
      number 
      Head
      可选
      默认值:
      0
      arms
      number 
      Arms
      可选
      默认值:
      0
      chest
      number 
      Chest
      可选
      默认值:
      0
      skin_tone_correction
      number 
      Skin Tone Correction
      可选
      默认值:
      0
      示例

      返回响应

      🟢202Avatar configuration updated
      application/json
      Body
      No schema defined
      🟠409Asset 018ee7a6-7b80-7c07-a9fa-d0a07bd4d06d added to wrong placement - clothing
      🟠410Asset(s) 018ee7a6-7b7e-7b19-afdd-66ae9bf6a641, 018ee7a6-7b7f-78fb-928c-155087ab9d48 not found in project
      🟠422Validation Error
      修改于 2024-05-30 08:40:21
      上一页
      Get Customization
      下一页
      Delete User Avatar
      Built with