---
title: "Train a custom Ideogram v4 model with advanced hyperparameters"
method: POST
path: "/v1/ideogram-v4/train-model-advanced"
tags: ["models"]
---

# Train a custom Ideogram v4 model with advanced hyperparameters

`POST /v1/ideogram-v4/train-model-advanced`

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.

## Request body

- TrainModelV4AdvancedRequest — Advanced training request for a custom Ideogram v4 model. Hyperparameters are optional and fall back to defaults when omitted.
  - `dataset_id` string, required — ID of the dataset to train the model from.
  - `model_name` string, required — Name for the trained model. Must be 5-30 characters, alphanumeric with spaces and hyphens allowed.
  - `training_steps` integer — Number of training steps. Must be between 100 and 10000 and a multiple of 100. Defaults to 1000.
  - `lora_rank` integer — 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.
  - `ema` number — 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_rate` number — 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_size` integer — 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_project` string — 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.

## Response `200`

Training started successfully

- TrainDatasetModelResponse
  - `model_id` string, required — Unique identifier of the created model.
  - `dataset_id` string, required — Identifier of the dataset used for training.
  - `training_status` string, required — Current training status of the model.
  - `model_name` string, required — Name of the model.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Dataset not found

---

[API](https://skmtc.net/ideogram/apis/ideogram-openapi-3-0.md) · [All operations](https://skmtc.net/ideogram/apis/ideogram-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ideogram/ideogram-openapi-3-0/revisions/bd40f367a834/schema)
