Tools

Before & After Image

Free (no credits): one comparison image from a before and an after photo of the same place — e.g. an empty room and its virtual staging, a daylight shot and its dusk version, a room before and after a restyle. Side by side, stacked, or split by a line; original shape, square, 4:5 or 9:16. Write the labels in the user's language. Returns a finished image at once.

post/api/v1/tools/before_after_image

Request

  • Base URL: https://pixly.app
  • URL: https://pixly.app/api/v1/tools/before_after_image
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://pixly.app/oauth/authorize, token URL https://pixly.app/api/oauth/token, scopes: tools)

Headers

Idempotency-Keystring

Recommended. A retry with the same key and body returns the first run's result (header Idempotency-Replayed: true) instead of running and charging again. Kept 24 hours; failed runs release the key.

Request body

beforeImageUrlstring

The BEFORE photo (e.g. the empty room, the daylight shot). Public https URL or data: URI; or beforeR2Path.

beforeR2Pathstring

Storage path of the before photo — the alternative to beforeImageUrl. For a Pixly result, its original photo is the job's source.

afterImageUrlstring

The AFTER photo (e.g. the staged room, the dusk version). Public https URL or data: URI; or afterR2Path.

afterR2Pathstring

Storage path of the after photo — the alternative to afterImageUrl.

layout'side' | 'stack' | 'vsplit' | 'diagonal'

side = next to each other, stack = one above the other, vsplit = one frame split by a vertical line, diagonal = split by a slanted line.

aspect'original' | '1:1' | '4:5' | '9:16'

Shape of the image: original (follows the photos), 1:1 square, 4:5 Instagram post, 9:16 Stories/Reels.

labelsboolean

Show the Before / After labels.

beforeLabelstring

Label text for the before photo, in the user's language (default "Before").

afterLabelstring

Label text for the after photo, in the user's language (default "After").

Response

Finished inline — resultUrls present (photo tools)

jobIdstring required

Job id — pass to get_job to poll

type'image_staging' | 'video_pair' | 'video_tour' required

Job family

status'pending' | 'processing' | 'completed' | 'failed' required

Anything not completed/failed is still running

creditsChargednumber nullable required

Credits debited for this job

createdAtstring date-time required

Submission time

completedAtstring date-time

Present once finished

resultUrlsstring[]

Presigned download URLs (present when completed; valid 7 days)

resultPathsstring[]

Storage path of each result, in resultUrls order — pass one as r2Path (or beforeR2Path, a photos[] item…) to run another tool on this result

errorstring

Failure reason; the message says whether the credit came back immediately or is in 24h refund review

notestring

Hint for agents, e.g. poll again in a few seconds

Changes

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