Visual Compare

Create a Percy comparison between a reference image and a tab capture

Uploads a reference image (Figma frame or user upload) and a tab capture, uploads the reference as a Percy build and waits for it to finish, then uploads the capture on the same branch and starts the comparison. Both images must arrive pre-normalized to identical CSS-pixel dimensions (LV-3590).

post/api/v1/visual-compare/comparisons

Request

  • Base URL
    https://toolkit.browserstack.com
  • Auth
    API key in cookie _wdt_rails_session

Request body multipart/form-data

referencestring binary required

Reference image (the baseline)

capturestring binary required

Tab capture (the head image)

widthinteger required
heightinteger required

Example request

{
  "width": 1280,
  "height": 800
}

Response

Comparison started

Example response

{
  "data": {
    "comparison_id": "13",
    "build_id": "11",
    "baseline_build_id": "9"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.