ChangeFace
    ChangeFace
    • Introduction
    • Image Face Swap
      POST
    • Video Face Swap
      POST
    • Face Detection
      POST
    • Get Result
      GET

      Face Detection

      POST
      https://api.changeface.io/api/v1/face-detection

      Request

      Authorization
      Provide your bearer token in the
      Authorization
      header when making requests to protected resources.
      Example:
      Authorization: Bearer ********************
      Body Params application/json
      image_url
      string 
      required
      The face image url(heic、jpeg、jpg、png、webp) you want to detected.
      Example
      {
          "image_url": "https://1250948203.rsc.cdn77.org/images/4435c59e-7fae-4a7c-acc2-9fbf56878acb.jpg"
      }

      Request samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.changeface.io/api/v1/face-detection' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "image_url": "https://1250948203.rsc.cdn77.org/images/4435c59e-7fae-4a7c-acc2-9fbf56878acb.jpg"
      }'

      Responses

      🟢200成功
      application/json
      Body
      faces
      array [object {1}] 
      required
      The detected face information array. The length of the array represents the number of detected faces, when no face is detected, faces is an empty array.
      position
      array [object {2}] 
      required
      The coordinate information of the face. It includes 4 coordinate objects, each of which includes x and y coordinates, and the origin of the coordinates is in the upper left corner of the image. The 4 coordinate objects correspond to top-left, top-right, bottom-right, and bottom-left from top to bottom.
      Example
      {
          "faces": [
              {
                  "position": [
                      {
                          "x": 258,
                          "y": 70
                      },
                      {
                          "x": 566,
                          "y": 70
                      },
                      {
                          "x": 566,
                          "y": 428
                      },
                      {
                          "x": 258,
                          "y": 428
                      }
                  ]
              },
              {
                  "position": [
                      {
                          "x": 139,
                          "y": 373
                      },
                      {
                          "x": 354,
                          "y": 373
                      },
                      {
                          "x": 354,
                          "y": 623
                      },
                      {
                          "x": 139,
                          "y": 623
                      }
                  ]
              }
          ]
      }
      Previous
      Video Face Swap
      Next
      Get Result
      Built with