Skip to content

v0.10.0 — /collage: N-photo product collage

Choose a tag to compare

@TroyJLorents-GH TroyJLorents-GH released this 03 Jul 14:59
· 23 commits to main since this release

Added

  • POST /collage — send 2–9 photos, get back an e-commerce hero collage: every photo background-removed and tight-cropped, the main image dominant (~65% of canvas) at a chosen anchor, the rest laid out around it in clean equal cells.

    • main_index — which photo is the hero (default: first).
    • main_positionTL, T, TR, L, C, R, BL, B, BR (default BR).
    • bg_color, aspect (1:1 default, 1600px long side), padding, format/quality/max_dim.
    • Knockout Plus knobs work per-cutout: despill, watermark, preset.

    Layout uses fixed deterministic templates — an L-shape of satellite cells for corner anchors, a single strip for edge anchors, top+bottom rows for center. Predictable output, no bin-packing surprises.

Billing

Paid tiers only (not on free tier or the demo key). Billed at N base-image units — each photo is a full model pass, so a 9-photo collage costs 9× your per-image price. No new meters, no new prices.

Demo

curl -X POST "https://useknockout--api.modal.run/collage" \
  -H "Authorization: Bearer kno_YOUR_KEY" \
  -F "files=@main-product.jpg" \
  -F "files=@accessory-1.jpg" \
  -F "files=@accessory-2.jpg" \
  -F "files=@accessory-3.jpg" \
  -F "main_position=BR" \
  -o collage.jpg