Runflow
Back to Gallery

runflow/background-color

Replace the background of a portrait or product shot with a flat color. Pick any RGB value; shading_percent baked at 30% for soft falloff.

$0.12/request 2026-04-28

Install

pip install requests

Run the model

import requests

response = requests.post(
    "https://api.runflow.io/v1/run/background-color",
    headers={"Authorization": "Bearer RUNFLOW_API_KEY"},
    json={
    "color_red": 245,
    "image_url": "https://public.runflow.io/images/models/runflow/background-color/examples/1/b...",
    "color_blue": 200,
    "file_input": "06-portrait-suit-corporate.png",
    "color_green": 220
    },
)

data = response.json()
print(data["images"][0]["url"])

Input schema

ParameterTypeDescription
image_urlimageURL of the image to process. HTTPS required.
color_redintegerRed channel 0–255.
file_inputstringFilename inside `image_url` (e.g. `photo.png` if the zip contains `photo.png`). Frontend should set this to match the inner filename when composing the zip.
color_greenintegerGreen channel 0–255.
color_blueintegerBlue channel 0–255.

Output schema

FieldTypeDescription
outputsjsonArray of result items, each with at minimum a `url` field.
seedjsonRandom seed used (null if N/A).
timingjsonProvider timing breakdown (null if not surfaced).
nsfw_detectedjsonProvider NSFW flag (null if not surfaced).

Related models

Start generating with Background Color

Get API access in minutes. No GPU setup, no infrastructure to manage.