Backbone LabDocs
Workflow

Enhancer

Enhance and upscale real estate photos with automatic perspective correction and intelligent color enhancement adapted to each region of the image.

Enhancer preview

How it works

  1. Upload assetsPOST /v1/assets/upload with each image file. Returns a sha256:... hash.
  2. Run the workflowPOST /v1/workflows/enhancer/run with asset hashes and parameters. Returns a jobId.
  3. Get results — Poll GET /v1/jobs/:jobId or stream via GET /v1/jobs/:jobId/events (SSE).
  4. Download outputsGET /v1/assets/:hash/raw to download each output file.

Code examples

import { bkbnlab } from '@bkbnlab/api'
import { readFile } from 'node:fs/promises'

// export BKBNLAB_API_KEY=sk-...

const result = await bkbnlab.subscribe('enhancer', {
  input: {
    image: await readFile('image.jpg'),
    enhanceStrength: 1,
    perspectiveStrength: 1,
  },
})

// Download output image
await bkbnlab.download(result.outputs.image, 'result.png')

Endpoint

POST/v1/workflows/enhancer/run

Requires X-API-Key header. See Authentication.

Inputs

FieldTypeRequiredDescription
imageasset:imageSource image to enhance
enhanceStrengthnumberColor enhancement intensity (0 = disabled, 1 = full) Default: 1. Range: 01.
perspectiveStrengthnumberPerspective correction intensity (0 = disabled, 1 = full) Default: 1. Range: 01.

Outputs

Each output is a sha256:... asset hash. Download via GET /v1/assets/:hash/raw.

FieldTypeDescription
imageasset:imageEnhanced real estate photo

Before / After

Drag the slider to compare input and output. Switch between examples below.

BEFORE
AFTER

Request

{
  "inputs": {
    "image": "sha256:<hash_image>",
    "enhanceStrength": 1,
    "perspectiveStrength": 1
  }
}

Response — queued

{
  "jobId": "job_abc123",
  "status": "queued"
}

Response — completed

{
  "jobId": "job_abc123",
  "status": "completed",
  "outputs": {
    "image": "sha256:..."
  }
}

Download an output

curl -o result.png \
  -H "X-API-Key: $BKBNLAB_API_KEY" \
  https://api.bkbnlab.ai/v1/assets/$IMAGE_HASH/raw