AI Fashion Model V3 - DEPRECATED

💡
Before using the API, make sure you have read our Authorization documentation to get set up with Vmake's API authentication.

AI Fashion Model API can specify parts of an image to remain unchanged using a Mask, and then replace existing models or mannequins with other models.

Create asynchronous task

🌐
POST https://open.vmake.ai/api/v3/image/ai-fashion-model/tasks

Create a asynchronous task to generate model images.

Pricing

Each task costs 1 credit and we provide different pricing plans to meet your needs. You can check the pricing details on the Pricing page (opens in a new tab).

Request body


image    string    Required
💡
The supported image formats are JPEG and PNG.
Input an image URL or Base64 encoded image data, pay attention to the size of the image must be consistent with the size of the Mask.

maskType    string    Optional    Defaults to custom
Indicates which type of mask to use. If the mask type is custom, the mask field must be set.
Allowed values:
  • custom: Indicates that the custom input mask is used.
  • clothes: Indicates that the clothes part of the image is automatically segmented as the mask.

maskColorModel    string    Optional    Defaults to white-black
💡
This field only required when the mask type is custom.
Indicates the color model of the custom mask. The image parts covered by the primary color will be retained.
Allowed values:
  • white-black: Indicates that the mask primary color is white and the secondary color is black.
  • black-white: Indicates that the mask primary color is black and the secondary color is white.

mask    string    Optional    Defaults to null
💡
This field only required when the mask type is custom.
Input PNG mask URL or Base64 encoded image data.

count    number    Optional    Min 1    Max 4    Defaults to 4
The count of output results in the Task object.

modelId    string    Required
The model ID indicates the model to use. Check out available models.

backgroundTypes    enum array    Required
The background types, must contain at least one element.
Allowed values:
  • original: Indicates that the original background is being used.
  • preset: Indicates that the preset background is being used.
  • transparent: Indicates that the transparent background is being used.

presetBackgroundId    string    Optional    Defaults to null
💡
This field only required when the background type is preset.
The preset background ID indicates the background to use, if the background type is preset, this field must be set.  Check out available backgrounds.

callbackUrl    string    Optional    Defaults to null
The callback URL to receive the task update notification. The notification will be sent to the callback URL every time the task status changes:
  • pending: The task has been created and is waiting to be processed.
  • running: The task is in progress and a notification will be sent each time there is an update.
  • success: The task completed successfully.
  • error: The task failed with error(s).

modelSize    enum    Optional    Defaults to similar
Indicates the size of the model. By default, the size of the model is similar to the size of the input image.
Allowed values:
  • similar: Indicates that the model size is similar to the size of the input image.
  • s: Indicates that the model size is small.
  • m: Indicates that the model size is medium.
  • l: Indicates that the model size is large.

modelExpression    enum    Optional    Defaults to similar
Indicates the expression of the model, by default, the expression of the model is similar to the expression of the input image.
Allowed values:
  • similar: Indicates that the expression of the model is similar to the expression of the input image.
  • smile: Indicates that the model is smiling.
  • laugh: Indicates that the model is laughing.
  • cool: Indicates that the model is cool.

Response body

The standard response body will be returned.


taskId    string    Required
The asynchronous task ID to query the status of the task.

{
  "code": 0,
  "message": "Success",
  "data": {
    "taskId": "0f1c2d3e-4f5g-6h7i-8j9k-a1b2c3d4e5f6"
  }
}

Query task status

🌐
GET https://open.vmake.ai/api/v3/image/ai-fashion-model/tasks/{taskId}

Query the status of the asynchronous task. You can poll the status of the task by calling this API periodically if callbackUrl field of the Create asynchronous task API is not set.

Different status will return different response body as follows:

The task has been created and is waiting to be processed.

{
  "code": 0,
  "message": "Success",
  "data": {
    "taskId": "0f1c2d3e-4f5g-6h7i-8j9k-a1b2c3d4e5f6",
    "status": "pending",
    "message": "Pending",
    "progress": 0
  }
}

Request parameters


taskId    string    Required
The asynchronous task ID returned by the Create asynchronous task API.

Response body

The standard response body will be returned. The data field is a Task object.

Task object

Represents the task returned by the Query task status API.


taskId    string    Required
The asynchronous task ID.

status    string    Required
The status indicates the current status of the task.
Allowed values:
  • pending: The task has been created and is waiting to be processed.
  • running: Indicates that the task is processing.
  • success: Indicates that the task has been successfully completed.
  • error: Indicates that the task failed with error(s).

progress    number    Required
The progress of the task.

results    array    Required
The results of the task. Each element in the list represents a Result object.

Result object

Represents each element in the results list in the Task object.


originalBackgroundImage    object    Optional
The output image with original background retained. If the backgroundTypes field of the Create asynchronous task API contains original, this field will be returned.

presetBackgroundImage    object    Optional
The output image with preset background. If the backgroundTypes field of the Create asynchronous task API contains preset, this field will be returned.

transparentBackgroundImage    object    Optional
The output image with transparent background. If the backgroundTypes field of the Create asynchronous task API contains transparent, this field will be returned.

Image object

Represents each element in the results list in the Result object.


imageWidth    number    Required
The width of the image.

imageHeight    number    Required
The height of the image.

imageFormat    string    Required
The format of image.

fileSize    number    Required
The size of the image in bytes.

downloadUrl    string    Required
The download URL of the image.

Get preset model list

🌐
GET https://open.vmake.ai/api/v3/image/ai-fashion-model/preset/models

Get a list of pre-trained models. Each element in the list represents a Preset model object.

Response body

The standard response body will be returned.


presets    array    Required
Represents a list containing all preset models. Each element in the list represents a Preset model object.

{
  "code": 0,
  "message": "Success",
  "data": {
    "presets": [
      {
        "presetId": "002",
        "thumbnail": "https://seawaveprod.blob.core.windows.net/bvbiz/vmake/admin/web/ai-fashion-model/bac25529-b993-4e10-bfd6-3db98406703d.jpeg",
        "name": "Clara",
        "gender": "Female",
        "skin": "Fair",
        "age": "Youth"
      },
      {
        "presetId": "003",
        "thumbnail": "https://seawaveprod.blob.core.windows.net/bvbiz/vmake/admin/web/ai-fashion-model/7b23fe20-6718-43f1-80ae-a80836e3664f.jpeg",
        "name": "Jamila",
        "gender": "Female",
        "skin": "Deep",
        "age": "Youth"
      },
    ]
  }
}

Preset model object

Represents each element in the preset model list returned by the Get preset model list API.


name    string    Required
The preset model name.

presetId    string    Required
The preset model ID.

thumbnail    string    Required
The preset model thumbnail image URL.

skin    enum    Required
The preset model skin tone.
Allowed values:
  • fair: Light or pale skin tone, often found in European and North American white individuals..
  • medium: Skin tone between light and dark, common in various populations.
  • olive: Skin with a greenish or yellowish undertone, often found in Mediterranean, Middle Eastern, and some Asian populations.
  • deep: Darker skin shades found in populations from Africa, the African diaspora, South Asia, and other regions.
  • tanned: Indicates that the skin tone is tanned.

age    enum    Required
The preset model age range.
Allowed values:
  • children: Indicates that the preset model is a child.
  • teen: Indicates that the preset model is a teenager.
  • youth: Indicates that the preset model is a youth.
  • middle-aged: Indicates that the preset model is middle-aged.
  • senior: Indicates that the preset model is a senior.

Get preset background list

🌐
GET https://open.vmake.ai/api/v3/image/ai-fashion-model/preset/backgrounds

Get a list of pre-trained backgrounds, each element in the list represents a Preset background object.

Response body

The standard response body will be returned.


presets    array    Required
Represents a list containing all preset backgrounds.

{
  "code": 0,
  "message": "Success",
  "data": {
    "presets": [
      {
        "presetId": "002",
        "thumbnail": "https://seawaveprod.blob.core.windows.net/bvbiz/vmake/admin/web/ai-fashion-model/4d3bf91c-a90e-42a1-9d90-2785517a0a8a.jpeg"
      },
      {
        "presetId": "003",
        "thumbnail": "https://seawaveprod.blob.core.windows.net/bvbiz/vmake/admin/web/ai-fashion-model/7c62b5a5-220d-438b-a88f-1773fd1632b1.jpeg"
      }
    ]
  }
}

Preset background object

Represents each element in the preset background list returned by the Get preset background list API.


presetId    string    Required
The preset background ID.

thumbnail    string    Required
The preset background thumbnail image URL.

Create private model

🌐
POST https://open.vmake.ai/api/v3/image/ai-fashion-model/private-models

Create a private model for AI fashion model generation.

Pricing

Each private model costs 100 credits and we provide different pricing plans to meet your needs. You can check the pricing details on the Pricing page (opens in a new tab).

Request body


image    string    Required
The reference image URL or Base64 encoded image data. The reference image must be a portrait image with a clear face so that the model can learn the facial features to generate the model.

name    string    Required
The private model name.

gender    enum    Required
Specify the gender of the private model.
Allowed values:
  • male: Indicates that the private model is male.
  • female: Indicates that the private model is female.

skin    enum    Required
Specify the skin tone of the private model.
Allowed values:
  • fair: Light or pale skin tone, often found in European and North American white individuals.
  • medium: Skin tone between light and dark, common in various populations.
  • olive: Skin with a greenish or yellowish undertone, often found in Mediterranean, Middle Eastern, and some Asian populations.
  • deep: Darker skin shades found in populations from Africa, the African diaspora, South Asia, and other regions.
  • tanned: Indicates that the skin tone is tanned.

age    enum    Required
Specify the age range of the private model.
Allowed values:
  • children: Indicates that the private model is a child.
  • teen: Indicates that the private model is a teenager.
  • youth: Indicates that the private model is a youth.
  • middle-aged: Indicates that the private model is middle-aged.
  • senior: Indicates that the private model is a senior.

Response body

The standard response body will be returned.


privateModelId    string    Required
The private model ID.

Get private model list

🌐
GET https://open.vmake.ai/api/v3/image/ai-fashion-model/private-models

Get a list of private models. Each element in the list represents a Private model object.

Response body

The standard response body will be returned.


models    array    Required
Represents a list containing all private models. Each element in the list represents a Private model object.

{
    "code": 0,
    "message": "Success",
    "data": {
        "models": [
            {
                "id": "private-1754698211949416448",
                "name": "Lisa",
                "thumbnail": "URL",
                "gender": "female",
                "skin": "fair",
                "age": "youth"
            },
            {
                "id": "private-1755066466379632640",
                "name": "John",
                "thumbnail": "URL",
                "gender": "male",
                "skin": "fair",
                "age": "youth"
            }
        ]
    }
}

Private model object

Represents each element in the private model list returned by the Get private model list API.


id    string    Required
The private model ID.

thumbnail    string    Required
The private model thumbnail image URL.

gender    enum    Required
Gender of the private model.

skin    enum    Required
Skin tone of the private model.
Allowed values:
  • fair: Light or pale skin tone, often found in European and North American white individuals..
  • medium: Skin tone between light and dark, common in various populations.
  • olive: Skin with a greenish or yellowish undertone, often found in Mediterranean, Middle Eastern, and some Asian populations.
  • deep: Darker skin shades found in populations from Africa, the African diaspora, South Asia, and other regions.
  • tanned: Indicates that the skin tone is tanned.

age    enum    Required
Age range of the private model.
Allowed values:
  • children: Indicates that the preset model is a child.
  • teen: Indicates that the preset model is a teenager.
  • youth: Indicates that the preset model is a youth.
  • middle-aged: Indicates that the preset model is middle-aged.
  • senior: Indicates that the preset model is a senior.

Get private model information

🌐
GET https://open.vmake.ai/api/v3/image/ai-fashion-model/private-models/{id}

Get the information of a private model. The response data is a Private model object.

Path parameters


id    string    Required
The private model ID.

Response body

The standard response body will be returned. The structure of the data object is shown below.


id    string    Required
The private model ID.

thumbnail    string    Required
The private model thumbnail image URL.

gender    enum    Required
Gender of the private model.

skin    enum    Required
Skin tone of the private model.
Allowed values:
  • fair: Light or pale skin tone, often found in European and North American white individuals..
  • medium: Skin tone between light and dark, common in various populations.
  • olive: Skin with a greenish or yellowish undertone, often found in Mediterranean, Middle Eastern, and some Asian populations.
  • deep: Darker skin shades found in populations from Africa, the African diaspora, South Asia, and other regions.
  • tanned: Indicates that the skin tone is tanned.

age    enum    Required
Age range of the private model.
Allowed values:
  • children: Indicates that the preset model is a child.
  • teen: Indicates that the preset model is a teenager.
  • youth: Indicates that the preset model is a youth.
  • middle-aged: Indicates that the preset model is middle-aged.
  • senior: Indicates that the preset model is a senior.

Delete private model

🌐
DELETE https://open.vmake.ai/api/v3/image/ai-fashion-model/private-models/{id}
⚠️
After deleting the private model, the model will be permanently removed and cannot be recovered.

Delete a private model by ID.

Path parameters


id    string    Required
The private model ID.

Response body

The standard response body will be returned.


{
  "code": 0,
  "message": "Success"
}