Photo Effects

Apply effects to your photo. Select person on a photo, blur or grayscale background


Request parameters

Parameter’s name Parameter’s type Description
out_filters string Optional. Comma separated list of model outputs to return.
inputs image Input image
max_objects int Max number of objects to detect
object_class string Objects to find
effect string Effect to apply
blur_radius int Blurring radius for Blur
background string New Background
curl -X POST \
    -H 'Authorization: Bearer YOUR_USER_TOKEN' \
    -H 'Content-Type: multipart/form-data' \
    -F "out_filters=output" \
    -F "inputs=inputs_value" \
    -F "max_objects=max_objects_value" \
    -F "object_class=object_class_value" \
    -F "effect=effect_value" \
    -F "blur_radius=blur_radius_value" \
    -F "background=background_value" \
curl -X POST \
    -H 'Authorization: Bearer YOUR_USER_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '
        "background": "background_value",
        "blur_radius": 45,
        "effect": "effect_value",
        "inputs": "base64_encoded_inputs_contents",
        "max_objects": 2,
        "object_class": "object_class_value"
import kclient
from kclient.utils import client, request

cl = client.with_bearer_token("YOUR_USER_TOKEN")
serving_api = kclient.api.serving_api.ServingApi(cl)

data = request.make(data={
    "max_objects": 1,
    "object_class": "[Person]",
    "effect": "[Grey[] Blur[] Remove background[]]",
    "blur_radius": 3,
    "background": "[None[] Beach1[] Hell1[]]",
}, files={
    "inputs": "/path/to/inputs_file",
resp = serving_api.serving_proxy(data, "kuberlab-demo", "photo-robot")

Response format

  "output": "base64_encoded_image"