Create Model
Creates a new model using a list of image URLs.
This operation costs 50 credits.
Endpoint
Parameters
images
array[file]
Yes. Required if image_urls
is not provided.
List of images representing the model's dataset. Must be a list on length 1 to 30.
image_urls
array[string]
Yes. Required if images
is not provided.
List of image URLs representing the model's dataset. Must be a list on length 1 to 30.
gender
string
Yes
Possible values: woman
, man
.
model_type
string
Yes
Possible values: professional
, amateur
.
name
string
No
Name of the model
callback
string
No
A URL that will be called when the model is done training. If not provided, an email will be sent when it is trained.
Sending Images for Training
To create a new model, you need to send a list of images that will be used for training. You can send the images in two ways: by uploading the image files directly or by providing a list of image URLs.
Uploading Image Files
To upload image files, you need to send a multipart/form-data
request with the image files attached.
Example Request
Here's an example of how you can send a multipart/form-data
request using curl
:
Providing Image URLs
Alternatively, you can provide a list of image URLs instead of uploading the image files directly. The request body should contain image_urls
. The image URLs should be publicly accessible.
Example Request
Here's an example of how you can send a JSON request with a list of image URLs:
Important Notes
The maximum number of images you can send is 30.
The images should be in one of the following formats: jpg, jpeg, png, webp, or heic.
The API will validate the images and return an error if any of the images are invalid or cannot be accessed.
Response
Upon successful creation, the API returns the following response:
Last updated