Skip to main content
Runflow
Live
People ImageryOn-Model / FashionProduct Imagery

Edit foreground and background independently

Background Separation API

Separate subject from background and get both layers back as independent outputs. Edit, composite, or replace foreground and background separately with one API call.

Start with $10 in free GPU credits on signup — no commitment

Background Separation demo - after
Background Separation demo - before
Before
After
Rated 5/5 by early access developers

Trusted by teams shipping AI-powered products

ImagehostVisualIDMarkedBetterStudio
<5s
Average processing time
$0.20
Per image, fixed pricing
4096px
Max resolution supported
2 layers
Foreground + background, both returned

How it works

No pipeline to build, no models to configure.

1

Send your image

Pull a source image with a clear subject and background. JPEG, PNG, or WebP up to 4096x4096 pixels.

2

AI separates the layers

Runflow's pipeline extracts the subject with an alpha channel and generates a fully inpainted background in parallel — both layers produced in one pass.

3

Get both outputs

Receive the foreground (transparent PNG with alpha) and the background (inpainted to fill the subject's silhouette). Each call is $0.20/image and delivers both.

Subject and background, both returned

One API call returns two production-ready outputs — a clean subject with alpha channel, and a fully inpainted background with the subject erased. No more running two APIs or stitching outputs together.

Foreground layer — subject isolated with alpha channel
Background layer — subject silhouette filled via context-aware inpainting
Both layers delivered in a single API call

Edit foreground and background independently

Once separated, each layer is its own asset. Change the background without touching the subject. Retouch the subject without re-rendering the scene. Composite both into new compositions with precise, layer-level control.

Retouch subject without affecting background
Swap or edit background without losing foreground detail
Clean seams — no halos, no edge artifacts

Production-grade edge handling

Handles the hard edges automatically — hair, fur, fabric, transparent objects, complex outlines. The subject's alpha channel preserves fine details, and the background inpainting fills around them with scene-matched content.

Hair, fur, and fine-detail edges handled cleanly
Transparent and semi-transparent objects supported
Background inpainting matches scene lighting and texture

Built for compositing workflows at scale

Designed for teams building layer-aware pipelines — ad variation generators, virtual try-on, AR products, video compositing. Integrate as a single step; downstream systems work with both layers independently.

Two usable assets per call — downstream pipelines don't need to do more
Batch processing with async webhook delivery
JPEG, PNG, and WebP input/output up to 4096x4096px

Background separation for every compositing workflow

From ad campaign variations to AR try-on. Two usable layers per call, ready for independent editing.

Ad Creative & Marketing Teams

Generate campaign variations by swapping backgrounds independently of the subject. One shoot, unlimited creative across markets, placements, and seasons. Think: Meta Ads, Google Shopping, TikTok Ads.

Ecommerce & Virtual Try-On

Power virtual try-on and AR products. Separated layers let you place users into any scene, or scene elements into any user photo. Think: Amazon Try, IKEA Place, Warby Parker try-on.

Photo Editing Apps

Add advanced compositing features to your photo editor. Let users edit subject and background separately with one API call — no manual masking required. Think: Photoroom, Canva, Facetune.

Video & Motion Graphics Pipelines

Per-frame subject and background separation for compositing, VFX, and motion design. Batch-process entire sequences with consistent separation across frames.

AI Image Platforms

Layer-aware post-processing before delivery. Subject and background can be polished independently — different models for each — giving more control over final output quality.

Virtual Staging & Real Estate

Separate occupants or staging props from room backgrounds for independent editing. Stage empty rooms or de-stage furnished ones without losing either layer. Think: Zillow, Airbnb, Compass.

Working with Runflow changed how we build. Our developers can integrate a new AI feature by calling an endpoint — they don’t need machine learning expertise, infrastructure knowledge, or DevOps skills. We just focus on making the best product, and Runflow handles everything underneath.
Thibaut Hennau
Thibaut Hennau
CEO, BetterPic

Simple, per-image pricing

One price per separation. Both layers included. No GPU fees, no infrastructure to manage.

$0.20/image

Fixed pricing for background separation.

One API call returns two production-ready layers. No setup fees, no surcharges, no per-layer add-ons.

$10 in free GPU credits on signup
Two outputs per call — foreground + background
Subject isolated with alpha channel, background inpainted
Handles hair, fur, and complex edges
Up to 4096x4096px resolution
Batch processing with async webhooks
Under 5 seconds processing time
Get API access

Build vs. buy

Build your own
Weeks to ship
Subject segmentation + edge refinement + inpainting model + layer compositing + batching
Runflow API
$0.20/image
One API call, two layer outputs, under 5 seconds
Processing large volumes?Contact for volume pricing

Your data stays yours

Images are processed in isolated environments with automatic cleanup. Zero data retention by default.

SOC 2 Type II
ISO 27001· In progress (Q3 2026)
GDPR

SOC 2 Type II compliant.

AES-256 encryptionIsolated processingEU data residency available
Visit Trust Center

Frequently asked questions

Edit subject and background. Independently. At scale.

One API call. $0.20/image. Two outputs per call — foreground with alpha, background inpainted. Start with $10 in free GPU credits on signup.

First-in-line access: onboarding slots limited this month