v4

latestOpenAPI 3.0.22026-08-02109239415.7 KB
models

Train a custom Ideogram v4 model with advanced hyperparameters

Start training a custom Ideogram v4 model from a dataset with caller-supplied hyperparameters (training steps, LoRA rank, EMA decay, learning rate). All hyperparameters are optional and fall back to defaults when omitted. The dataset must contain at least 15 images and a maximum of 100 images. Returns the model ID and training status.

post/v1/ideogram-v4/train-model-advanced

Request body

dataset_idstring required

ID of the dataset to train the model from.

model_namestring required

Name for the trained model. Must be 5-30 characters, alphanumeric with spaces and hyphens allowed.

training_stepsinteger

Number of training steps. Must be between 100 and 10000 and a multiple of 100. Defaults to 1000.

lora_rankinteger

LoRA rank for model training. Must be one of 64 or 128. Defaults to 128. Higher rank increases model capacity at the cost of longer training and larger weights.

emanumber

Exponential moving average decay rate for the model weights. Must be between 0 and 1 (exclusive). Typical values are 0.99-0.9999; higher values produce smoother weight averages but respond more slowly to training updates.

learning_ratenumber

Learning rate for the optimizer. Must be greater than 0. Typical values for LoRA fine-tuning are 1e-5 to 1e-4; larger values train faster but risk instability.

batch_sizeinteger

Per-step training batch size. Must be one of 1, 2, 4, 8, 16, or 32. Defaults to a trainer-side value when omitted. Larger batches can improve throughput at the cost of more memory.

wandb_projectstring

Weights & Biases project to log this training run to. When set, the run streams metrics to this W&B project; when omitted, no W&B logging happens.

Example request

{
  "batch_size": 8,
  "wandb_project": "my-wandb-project",
  "model_name": "my-custom-model",
  "lora_rank": 64,
  "dataset_id": "abc123",
  "ema": 0.999,
  "training_steps": 1000,
  "learning_rate": 0.0001
}

Response

Training started successfully

model_idstring required

Unique identifier of the created model.

dataset_idstring required

Identifier of the dataset used for training.

training_statusstring required

Current training status of the model.

model_namestring required

Name of the model.

Example response

{
  "training_status": "training_status",
  "model_name": "model_name",
  "dataset_id": "dataset_id",
  "model_id": "model_id"
}