Skip to main content
Version: V2

Face refiner

POST 

/v2/artworks/face-refiner

Clean up and sharpen faces in an image. Useful when a generated photo has good composition but the faces need an extra pass to look right.

Request

Body

required

    imageUrl urirequired

    URL of the source image to refine.

    model string

    Possible values: [tengrai-20231128-m-d.safetensors, tengrai-20240423-m-f.safetensors]

    denoising integer

    Possible values: >= 1 and <= 5

    Default value: 3

    Denoising strength level from 1 (very subtle) to 5 (extreme). Controls how much the face is refined.

    seed integer

    Possible values: >= 1 and <= 2147483647

    Optional random seed for deterministic generation. The Tengrai pipeline applies a deterministic transform (floor(seed * 1.2) + 17) before submitting to the workflow engine. Range: 1-2147483647. Omit to let the server pick a random seed.

    webhook uri

    Optional webhook URL. When provided, the server will POST the final artwork result to this URL upon completion. Must be HTTPS and a publicly routable host — loopback, link-local, private, and cloud-metadata addresses are rejected.

    outputFormat string

    Possible values: [auto, png, webp]

    Default value: auto

    Output image format. auto (the default) uses the server default (webp with high-quality settings); png is lossless; webp is equivalent to auto.

Responses

Response indicating that the artwork was successfully created.

Schema

    id uuidrequired
    artworkType stringrequired

    Possible values: [face_refiner]

    parameters

    object

    required

    imageUrl uri

    URL of the source image to refine.

    model string

    Possible values: [tengrai-20231128-m-d.safetensors, tengrai-20240423-m-f.safetensors]

    denoising integer

    Possible values: >= 1 and <= 5

    Default value: 3

    Denoising strength level from 1 (very subtle) to 5 (extreme). Controls how much the face is refined.

    seed integer

    Possible values: >= 1 and <= 2147483647

    Optional random seed for deterministic generation. The Tengrai pipeline applies a deterministic transform (floor(seed * 1.2) + 17) before submitting to the workflow engine. Range: 1-2147483647. Omit to let the server pick a random seed.

    webhook uri

    Optional webhook URL. When provided, the server will POST the final artwork result to this URL upon completion. Must be HTTPS and a publicly routable host — loopback, link-local, private, and cloud-metadata addresses are rejected.

    outputFormat string

    Possible values: [auto, png, webp]

    Default value: auto

    Output image format. auto (the default) uses the server default (webp with high-quality settings); png is lossless; webp is equivalent to auto.

    duration numberrequired
    results string[]required
    status stringrequired

    Possible values: [starting, processing, succeeded, failed, canceled]

    createdAt date-timerequired
Loading...