Skip to main content
POST
Train a Lora Model with Custom Images

Request

Make a POST request to below endpoint and pass the required parameters as a request body.
curl
You can train a model on normal lora models and sdxl and get its style for this endpoint, also each training cost $1. Fund your you wallet to get started

Training Types

The table below lists all the possible values for the training_type parameter.

Training Status Values

The table below describes all possible training statuses.

Body

json

Webhook

This is an example webhook post call in JSON format.
json

Request

  • JS
  • PHP
  • NODE
  • PYTHON
  • JAVA

Response

Body

application/json
key
string
required

Your API Key used for request authorization

instance_prompt
string
required

Text prompt with how you want to call your trained person/object

Example:

"photo of ambika0 man"

class_prompt
string
required

Classification of the trained person/object

Example:

"photo of a man"

images
string<uri>[]
required

Accessible direct links to images, cropped to 512x512 pixels. A good number is about 7-8 images

Minimum array length: 1
training_type
enum<string>
default:men
required

The type of the object you are training on

Available options:
men,
women,
couple,
null
max_train_steps
string
default:18
required

Set at 2 times the number of images (Ni*2); minimum value is 10 and maximum value is 50

Example:

"18"

wandb_key
string

Key to the wandb platform to monitor your training process

base_model_type
enum<string>
default:sdxl

The type of LoRA base model you want to train on

Available options:
normal,
sdxl
negative_prompt
string
default: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry

Items you don't want in the image

Example:

"lowres, bad anatomy, bad hands, text, error"

lora_type
enum<string>
default:lora

Type of LoRA model

Available options:
lora,
lycoris
seed
string
default:0

Random seed for reproducible results

webhook
string<uri> | null

Set a URL to receive a POST call when training is complete

Response

Training initiated successfully

status
string
Example:

"success"

messege
enum<string>

Current training status

Available options:
deploying_gpu,
training_started,
training_success,
trained_model_compressing,
trained_model_uploading,
trained_model_uploaded,
deploying_model,
model_ready
data
string

Additional information about the training process

training_id
string

Unique identifier for the training job