Sign in Contact sales
Ideogram Custom Branded Models API

Custom Model Training API

Create datasets, upload training images, train models, and generate at scale, all from a few API calls.

Overview

Custom model training lets you fine-tune an Ideogram model on your own dataset of images via the API. Once training completes, you can generate images using your trained model by passing its custom_model_uri to the Generate endpoint. To train a model in the Ideogram app instead, see Custom Image Models.

1 Create a dataset
→
2 Upload images
→
3 Train model
4 Check status
→
5 Generate

Endpoint reference

The dataset, training, and model endpoints are part of the v1 API. Generating with a trained model uses the v2 API.

Endpoint Method Description
/datasets GET List all datasets for the authenticated user
/datasets POST Create a new dataset
/datasets/{dataset_id} GET Get a dataset, including its file count and file list
/datasets/{dataset_id}/upload_assets POST Upload images and captions to a dataset
/v1/ideogram-v3/train-model POST Start training a custom Ideogram 3.0 model from a dataset
/models GET List custom models (owned or shared)
/models/{model_id} GET Get details for a specific model
/v2/image/generate/ideogram-3-custom-model POST Generate images with a custom Ideogram 3.0 model
/v2/image/generate/ideogram-4-custom-model POST Generate images with a custom Ideogram 4.0 model

Step 1: Create a dataset

import requests

response = requests.post(
  "https://api.ideogram.ai/datasets",
  headers={"Api-Key": "<apiKey>"},
  json={"name": "My Training Dataset"}
)
dataset = response.json()
dataset_id = dataset["dataset_id"]
print(f"Created dataset: {dataset_id}")

Step 2: Upload training images

Upload images (JPEG, PNG, WebP), optional .txt caption sidecar files, or ZIP archives containing both.

Minimum: 15 images to start training
Maximum: 100 images per dataset
Captions: Matched by filename stem (e.g. sunset.txt captions sunset.jpg)
Tip: Upload a ZIP file for larger datasets.
import requests
import glob

files = [("files", open(f, "rb")) for f in glob.glob("training_images/*.jpg")]

response = requests.post(
  f"https://api.ideogram.ai/datasets/{dataset_id}/upload_assets",
  headers={"Api-Key": "<apiKey>"},
  files=files
)
result = response.json()
print(f"Uploaded {result['success_count']}/{result['total_count']} images")

Step 3: Train the model

Once your dataset has at least 15 images, start training by sending its dataset_id and a name for your model. This endpoint trains a custom Ideogram 3.0 model. Model names must be 5 to 30 characters long and can use letters, numbers, spaces, and hyphens.

response = requests.post(
  "https://api.ideogram.ai/v1/ideogram-v3/train-model",
  headers={"Api-Key": "<apiKey>"},
  json={"dataset_id": dataset_id, "model_name": "my-custom-model"}
)
training = response.json()
model_id = training["model_id"]
print(f"Training started: {training['training_status']}")

Step 4: Check training status

Poll the model details endpoint to check when training completes. The status field returns one of the values below. Training is done when it reads COMPLETED, and ERRORED means training failed.

CREATING DRAFT TRAINING COMPLETED ERRORED ARCHIVED
import time

while True:
  response = requests.get(
    f"https://api.ideogram.ai/models/{model_id}",
    headers={"Api-Key": "<apiKey>"}
  )
  model = response.json()["model"]
  print(f"Status: {model['status']}")

  if model["status"] == "COMPLETED" and model["is_available_for_generation"]:
    custom_model_uri = model.get("custom_model_uri")
    print(f"Model ready! URI: {custom_model_uri}")
    break
  elif model["status"] == "ERRORED":
    print("Training failed.")
    break

  time.sleep(60)

Step 5: 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.

Generation uses the v2 API. A model trained in step 3 is a custom Ideogram 3.0 model, so it uses POST /v2/image/generate/ideogram-3-custom-model, which takes a multipart form. A custom Ideogram 4.0 model uses POST /v2/image/generate/ideogram-4-custom-model, which takes a JSON body.

response = requests.post(
  "https://api.ideogram.ai/v2/image/generate/ideogram-3-custom-model",
  headers={"Api-Key": "<apiKey>"},
  files={
    "prompt": (None, "A photo in my custom style"),
    "custom_model_uri": (None, custom_model_uri)
  }
)
result = response.json()
if response.status_code == 200:
  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, and they help the model separate what is in each image from the style or subject you are teaching.
  • Keep one thing the same in every image, the style, product, or character you are teaching, and vary everything else. For a style, change the subjects and scenes. For a product, change the angles, backgrounds, and lighting. For a character, change the poses, outfits, and settings.

Frequently asked questions

What are Ideogram Custom Models, and how do they work through the API?
Custom Models let you fine-tune an Ideogram 3.0 model on your own images, such as brand assets, art styles, product photos, or campaigns. Through the API, the full workflow is programmatic: create a dataset, upload 15 to 100 images with optional captions, train the model, receive a custom_model_uri, then pass it to the v2 custom model endpoints for Generate, Remix, and Inpaint.
How is custom model training through the Ideogram API billed?
Training through the API is self-serve, and each training run is charged once to the balance your API key uses. Custom model training in the Ideogram app is a separate option, available on Pro, Team, and Enterprise plans and not on Free or Plus.
How much does Ideogram custom model training and inference cost?
A self-serve training run costs $40 (4,000 credits). Generating with a custom Ideogram 3.0 model costs $0.06 per image at Turbo, $0.12 at Default, and $0.18 at Quality. A custom Ideogram 4.0 model costs $0.06, $0.12, and $0.20 per image at the same speeds. Enterprise pricing is custom, with volume discounts on the API and priority support. Contact [email protected]. All API fees are non-refundable.
How many images do I need to train a custom model through the Ideogram API?
A dataset needs at least 15 images to start training and can hold up to 100. High-quality, consistent images with optional captions give the best results.
What is the step-by-step process to train a custom model through the Ideogram API?
1. Send POST /datasets to create a dataset. 2. Send POST /datasets/{dataset_id}/upload_assets to upload images. 3. Send POST /v1/ideogram-v3/train-model with the dataset_id and a model_name to start training. 4. Poll GET /models/{model_id} until the status is COMPLETED. 5. Pass the returned custom_model_uri to POST /v2/image/generate/ideogram-3-custom-model.
How long does Ideogram custom model training take?
Training usually takes a few hours. Poll GET /models/{model_id} until the status is COMPLETED, or ERRORED if training failed. The example on this page checks once a minute.
What are the Enterprise options for Ideogram Custom Models?
Enterprise includes private custom models trained on your visual data, and Ideogram guarantees that your data and custom models will not be used for AI training or shared outside your organization. Enterprise custom model training adds dedicated data curation and has a minimum of 1 million images per month. Pricing is custom, with volume discounts on the API and priority support. To raise the default limit of 10 in-flight API requests, contact [email protected].
What are best practices for training a high-quality Ideogram custom model?
Use high-quality images that clearly show the style or subject you want the model to learn, and keep that style or subject consistent across the dataset. Add captions that describe what is in each image. A smaller set of strong images beats a large mixed one, so leave out blurry shots and near-duplicates.

Build it yourself, or have us build it.

Get an API key

Create a key yourself and pay only for what you generate.

Talk to an expert

We train a model on your data and build the workflow with you.