For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Manage API keysIdeogram
  • Ideogram API
    • API Overview
    • API Setup
    • Account API Page
    • API Pricing
    • API Status
  • Tutorials
    • Custom Model Training
  • API Reference
    • POSTGenerate with Ideogram 3.0
    • POSTGenerate with Ideogram 3.0 (Transparent Background)
    • POSTInpaint with Ideogram 3.0
    • POSTRemix with Ideogram 3.0
    • POSTReframe with Ideogram 3.0
    • POSTReplace Background with Ideogram 3.0
    • POSTRemove Background
    • POSTLayerize Text
    • POSTEdit images with a prompt
    • POSTUpscale
    • POSTDescribe
    • POSTGenerate (legacy)
    • POSTEdit with Ideogram 3.0 (legacy)
    • POSTEdit (legacy)
    • POSTRemix (legacy)
    • POSTReframe (legacy)
  • Custom Model Training
    • GETList datasets
    • POSTCreate a new dataset
    • GETGet a dataset
    • POSTUpload assets to a dataset
    • POSTTrain a custom Ideogram v3 model
    • GETList models
    • GETGet model details
LogoLogo
LogoLogo
Manage API keysIdeogram
On this page
  • Overview
  • Step 1: Create a Dataset
  • Step 2: Upload Training Images
  • Step 3: Train the Model
  • Checking Training Status
  • Step 4: Generate with Your Model
  • Tips for Better Results
Tutorials

Custom Model Training

Was this page helpful?
Previous

Generate with Ideogram 3.0

Next
Built with

Train a custom model on your own images, then use it to generate new images in your unique style.

Overview

Custom model training lets you fine-tune an Ideogram model on your own dataset of images. Once training completes, you can use the model with the Generate endpoint by passing its custom_model_uri.

The workflow has four steps:

  1. Create a dataset to hold your training images.
  2. Upload images (and optional captions) to the dataset.
  3. Start training to kick off the model training job.
  4. Generate images using your trained model.

Step 1: Create a Dataset

Python
cURL
1import requests
2
3response = requests.post(
4 "https://api.ideogram.ai/datasets",
5 headers={"Api-Key": "<apiKey>"},
6 json={"name": "My Training Dataset"}
7)
8dataset = response.json()
9dataset_id = dataset["dataset_id"]
10print(f"Created dataset: {dataset_id}")

Step 2: Upload Training Images

Upload your training images to the dataset. You can upload individual images (JPEG, PNG, WebP), optional .txt caption sidecar files, or ZIP archives containing both.

  • A dataset needs at least 10 images to start training.
  • A dataset can hold up to 100 images.
  • Caption files are matched by filename stem (e.g. sunset.txt captions sunset.jpg).
Python
cURL
1import requests
2import glob
3
4# Upload individual images
5files = [("files", open(f, "rb")) for f in glob.glob("training_images/*.jpg")]
6
7response = requests.post(
8 f"https://api.ideogram.ai/datasets/{dataset_id}/upload_assets",
9 headers={"Api-Key": "<apiKey>"},
10 files=files
11)
12result = response.json()
13print(f"Uploaded {result['success_count']}/{result['total_count']} images")

You can also upload a ZIP file containing images and captions together, which is convenient for larger datasets.

Step 3: Train the Model

Once your dataset has enough images, start training by giving your model a name.

Python
cURL
1import requests
2
3response = requests.post(
4 "https://api.ideogram.ai/v1/ideogram-v3/train-model",
5 headers={"Api-Key": "<apiKey>"},
6 json={"dataset_id": dataset_id, "model_name": "my-custom-model"}
7)
8training = response.json()
9model_id = training["model_id"]
10print(f"Training started: {training['training_status']}")

Checking Training Status

Poll the model details endpoint to check when training completes.

Python
cURL
1import requests
2import time
3
4while True:
5 response = requests.get(
6 f"https://api.ideogram.ai/models/{model_id}",
7 headers={"Api-Key": "<apiKey>"}
8 )
9 model = response.json()["model"]
10 print(f"Status: {model['status']}")
11
12 if model["status"] == "COMPLETED":
13 print(f"Model ready! URI: {model.get('custom_model_uri')}")
14 break
15 elif model["status"] == "ERRORED":
16 print("Training failed.")
17 break
18
19 time.sleep(60)

Step 4: Generate with Your Model

Once training is complete and is_available_for_generation is true, use the custom_model_uri from the model details to generate images.

Python
cURL
1import requests
2
3response = requests.post(
4 "https://api.ideogram.ai/v1/ideogram-v3/generate",
5 headers={"Api-Key": "<apiKey>"},
6 data={
7 "prompt": "A photo in my custom style",
8 "custom_model_uri": "model/my-custom-model/version/1",
9 "rendering_speed": "DEFAULT"
10 }
11)
12result = response.json()
13if response.status_code == 200:
14 print(result["data"][0]["url"])

Tips for Better Results

  • Use high-quality images that clearly represent the style or subject you want the model to learn.
  • Add captions to guide the model on what each image represents. Captions are optional!
  • Use consistent subjects across your training images for best results with style transfer.