generate-face

%!s()

Request parameters

Description
Parameter’s name Parameter’s type Description
out_filters string Optional. Comma separated list of model outputs to return.
image image Face to edit
smiling float
young float
wavy_hair float
straight_hair float
blonde_hair float
black_hair float
eyeglass float
mustache float
bald float
attractive float
big_nose float
pointy_nose float
big_lips float
male float
mouth_open float
resolution int
channel_ratio float
vector_id string
generate_image string
curl-form
curl -X POST \
    -H 'Authorization: Bearer YOUR_USER_TOKEN' \
    -H 'Content-Type: multipart/form-data' \
    -F "image=image_value" \
    -F "smiling=smiling_value" \
    -F "young=young_value" \
    -F "wavy_hair=wavy_hair_value" \
    -F "straight_hair=straight_hair_value" \
    -F "blonde_hair=blonde_hair_value" \
    -F "black_hair=black_hair_value" \
    -F "eyeglass=eyeglass_value" \
    -F "mustache=mustache_value" \
    -F "bald=bald_value" \
    -F "attractive=attractive_value" \
    -F "big_nose=big_nose_value" \
    -F "pointy_nose=pointy_nose_value" \
    -F "big_lips=big_lips_value" \
    -F "male=male_value" \
    -F "mouth_open=mouth_open_value" \
    -F "resolution=resolution_value" \
    -F "channel_ratio=channel_ratio_value" \
    -F "vector_id=vector_id_value" \
    -F "generate_image=generate_image_value" \
    https://dev.kibernetika.io/api/v0.2/workspace/kuberlab-demo/serving/generate-face/form-data
curl-json
curl -X POST \
    -H 'Authorization: Bearer YOUR_USER_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '
      {
        "attractive": 0.03,
        "bald": 0.18,
        "big_lips": 0.52,
        "big_nose": 0.85,
        "black_hair": 0.84,
        "blonde_hair": 0.65,
        "channel_ratio": 0.91,
        "eyeglass": 0.58,
        "generate_image": "generate_image_value",
        "image": "base64_encoded_image_contents",
        "male": 0.38,
        "mouth_open": 0.74,
        "mustache": 0.91,
        "pointy_nose": 0.23,
        "resolution": 7,
        "smiling": 0.05,
        "straight_hair": 0.11,
        "vector_id": "vector_id_value",
        "wavy_hair": 0.45,
        "young": 0.8
      }
    '
    https://dev.kibernetika.io/api/v0.2/workspace/kuberlab-demo/serving/generate-face/proxy
python
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={
    "smiling": 0.0,
    "young": 0.0,
    "wavy_hair": 0.0,
    "straight_hair": 0.0,
    "blonde_hair": 0.0,
    "black_hair": 0.0,
    "eyeglass": 0.0,
    "mustache": 0.0,
    "bald": 0.0,
    "attractive": 0.0,
    "big_nose": 0.0,
    "pointy_nose": 0.0,
    "big_lips": 0.0,
    "male": 0.0,
    "mouth_open": 0.0,
    "resolution": [1024 512 256 128],
    "channel_ratio": [1 0.75 0.5 0.25],
    "vector_id": "vector_id_value",
    "generate_image": "[true false]",
}, files={
    "image": "/path/to/image_file",
})
resp = serving_api.serving_proxy(data, "kuberlab-demo", "generate-face")

Response format

{
  "image": [
    "base64_encoded_string"
  ],
  "vector_id": [
    "string"
  ]
}