Back to Gallery
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 requestsRun 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
| Parameter | Type | Description |
|---|---|---|
| image_url | image | URL of the image to process. HTTPS required. |
| color_red | integer | Red channel 0–255. |
| file_input | string | Filename 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_green | integer | Green channel 0–255. |
| color_blue | integer | Blue channel 0–255. |
Output schema
| Field | Type | Description |
|---|---|---|
| outputs | json | Array of result items, each with at minimum a `url` field. |
| seed | json | Random seed used (null if N/A). |
| timing | json | Provider timing breakdown (null if not surfaced). |
| nsfw_detected | json | Provider NSFW flag (null if not surfaced). |
Related models
Outpaint (Expand)
runflow/outpaint
Expand the canvas of an image with AI-generated content that matches the existin...
$0.55/request
Skin Fix
runflow/skin-fix
Cleanup pass for portrait photography. Smoothes skin texture, fixes blemishes, p...
$0.12/request
Object Removal
runflow/object-removal
Remove an object from a photo by providing a black-and-white mask of the area to...
$0.48/request
GPT Image 2 Edit
openai/gpt-image-2/edit
GPT Image 2.0, OpenAI's latest image model, is capable of making fine-grained, d...
$0.133/image
Start generating with Background Color
Get API access in minutes. No GPU setup, no infrastructure to manage.