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
    • 数据模型
      • Schemas
        • AssetSlot
        • AssetSlotWithColor
        • AssetSlotWithColor
        • AssetSlots
        • AvatarBody
        • AvatarListItem
        • AvatarReadyWebhook
        • BoneScale
        • CreateOrEditExistingSessionConfig
        • CreateSessionConfig
        • EditExistingSessionConfig
        • ExportReadyWebhook
        • ExternalAvatarCustomization
        • ExternalAvatarCustomization
        • HTTPValidationError
        • NewAvatarRequest
        • NewAvatarResponse
        • NewExportResponse
        • NewSessionRequest
        • NewSessionResponse
        • NewUserResponse
        • RenderReadyWebhook
        • RenderResult
        • RenderStatus
        • ScanStatus
        • ValidationError
        • Model
        • Model

      New Session

      开发环境
      http://dev-cn.your-api-server.com
      开发环境
      http://dev-cn.your-api-server.com
      POST
      /api/v1/sessions/new
      Creates a new session (link for new user interaction with Avaturn UI) and returns it's url and id.
      There are 3 types of session:
      create_or_edit_existing: starts with avatar dashboard if user has any avatars
      or with avatar creation flow if user has no avatars;
      create: starts with avatar creation flow regardless avatar existence;
      edit_existing: starts with editor for avatar with provided id.
      Send resulting url to your frontend and open it in webview or iframe.
      Use session_id to distinguish webhook events between multiple sessions.
      NOTE: The resulting session url itself is considered implementation detail,
      and its structure is not guaranteed to be backward-compatible.

      请求参数

      Body 参数application/json

      示例

      返回响应

      🟢200Successful Response
      application/json
      Body

      🟠422Validation Error
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'http://dev-cn.your-api-server.com/api/v1/sessions/new' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "user_id": "<put-user-id-here>",
          "config": {
              "type": "create_or_edit_existing"
          }
      }'
      响应示例响应示例
      200 - 示例 1
      {
          "url": "string",
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "custom_upload_url": "string"
      }
      修改于 2024-05-30 08:40:21
      上一页
      Delete User
      下一页
      List User Avatars
      Built with