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.97,
        "bald": 0.32,
        "big_lips": 0.68,
        "big_nose": 0.82,
        "black_hair": 0.6,
        "blonde_hair": 0.73,
        "channel_ratio": 0.9,
        "eyeglass": 0.31,
        "generate_image": "generate_image_value",
        "image": "base64_encoded_image_contents",
        "male": 0.38,
        "mouth_open": 0.74,
        "mustache": 0.25,
        "pointy_nose": 0.31,
        "resolution": 49,
        "smiling": 0.33,
        "straight_hair": 0.67,
        "vector_id": "vector_id_value",
        "wavy_hair": 0.45,
        "young": 0.82
      }
    '
    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"
  ]
}