Download OpenAPI specification:Download
API for managing custom AI models, training data, training jobs and predictions.
This API allows you to:
Authentication is done via an API key that must be included in the header of all requests.
Creates a new custom model that can be trained on your data.
Example use case: Creating a model to generate images of clothing items in your brand's style.
displayName | string Human-readable name for the model (e.g. "Summer Collection Style Model") |
customModelType | string Type of custom model (reserved for future use) |
{- "displayName": "Summer Collection Style Model"
}
{- "id": "abc123",
- "displayName": "Summer Collection Style Model"
}
Retrieves details about a specific custom model.
Example use case: Checking the name of your clothing style model.
modelId required | string Example: abc123 Unique identifier of the model |
{- "displayName": "Summer Collection Style Model"
}
Updates the display name of an existing model.
Example use case: Renaming your clothing style model to be more specific.
modelId required | string Example: abc123 Unique identifier of the model |
updatedDisplayName | string New display name for the model |
{- "updatedDisplayName": "Summer Dresses Style Model"
}
Marks a model as deleted without physically removing it. This preserves the model's history and associated predictions.
Example use case: Removing an old clothing style model you no longer need.
modelId required | string Example: abc123 Unique identifier of the model |
Uploads a single image to use as training data for the model.
Supported formats: webp, png, jpeg, jpg Maximum file size: 10MB
Example use case: Uploading photos of dresses in your brand's style to train the model.
modelId required | string Example: abc123 Unique identifier of the model |
Raw binary image data
{- "dataId": "xyz789"
}
Retrieves a list of all training images uploaded for a specific model.
Example use case: Reviewing all the dress photos you've uploaded for training.
modelId required | string Example: abc123 Unique identifier of the model |
[
]
Retrieves details about a specific training image, including the image data.
Example use case: Retrieving a specific dress photo you uploaded for training.
modelId required | string Example: abc123 Unique identifier of the model |
dataId required | string Example: xyz789 Unique identifier of the data item |
{- "dataUrl": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
Replaces an existing training image with a new one.
Example use case: Replacing a low-quality dress photo with a better one.
modelId required | string Example: abc123 Unique identifier of the model |
dataId required | string Example: xyz789 Unique identifier of the data item |
New image data
Permanently removes a training image from the model.
Example use case: Removing a dress photo that doesn't match your brand's style.
modelId required | string Example: abc123 Unique identifier of the model |
dataId required | string Example: xyz789 Unique identifier of the data item |
Initiates a training job for the model using uploaded training images.
The trainingStrength parameter determines the extent to which the model aligns with the dataset content. Stronger = closer to dataset.
The trainingSpeed parameter affects training time and quality:
Example use case: Training your model to generate images in your brand's dress style.
modelId required | string Example: abc123 Unique identifier of the model |
trainingStrength | integer [ 0 .. 10 ] How strongly the model should learn from your training data |
trainingSpeed | string Enum: "fast" "high_quality" Trade-off between training speed and quality |
{- "trainingStrength": 7,
- "trainingSpeed": "high_quality"
}
{- "trainingId": "def456"
}
Retrieves a list of all training jobs for a specific model.
Example use case: Checking the history of training attempts for your dress style model.
modelId required | string Example: abc123 Unique identifier of the model |
[- {
- "id": "def456",
- "status": "succeeded"
}, - {
- "id": "def457",
- "status": "processing"
}
]
Checks the current status of a specific training job.
Example use case: Monitoring the progress of your dress style model training.
modelId required | string Example: abc123 Unique identifier of the model |
trainingId required | string Example: def456 Unique identifier of the training job |
{- "status": "processing",
- "triggerWord": "FJA90AB"
}
Attempts to cancel an in-progress training job. Note that:
Example use case: Stopping a training job that's using incorrect parameters.
modelId required | string Example: abc123 Unique identifier of the model |
trainingId required | string Example: def456 Unique identifier of the training job |
Marks a training job as deleted without actually canceling it. This is a soft-delete that preserves the training history.
Example use case: Cleaning up old training records while preserving the trained model.
modelId required | string Example: abc123 Unique identifier of the model |
trainingId required | string Example: def456 Unique identifier of the training job |
Generates new images using your trained model(s).
Example use case: Generating new dress designs in your brand's style.
You can combine multiple trained models by specifying their weights in scaleConfigs.
object Configuration for which models to use and their weights | |
prompt | string Text description of the image to generate. Must include trigger word for custom model in order to activate it. |
seed | integer Random seed for reproducible results |
object Dimensions of generated images (width and height between 512-1536) | |
num_images | integer [ 1 .. 4 ] Number of images to generate (1-4) |
output_format | string Enum: "jpeg" "png" Format of generated images |
guidance_scale | number [ 0 .. 10 ] How closely to follow the prompt (0.0-10.0) |
num_inference_steps | integer [ 1 .. 50 ] Number of denoising steps (1-50) |
{- "scaleConfigs": {
- "1": {
- "scale": 0.8,
- "modelId": "abc123",
- "trainingId": "def456"
}
}, - "prompt": "A summer dress with floral pattern in style of FJA90AB",
- "image_size": {
- "width": 512,
- "height": 512
}, - "num_images": 4,
- "output_format": "png",
- "guidance_scale": 7.5,
- "num_inference_steps": 50
}
{- "predictionId": "ghi789"
}
Retrieves the current status and generated images (if available) for a specific prediction.
Example use case: Checking if your dress designs have been generated and downloading them.
predictionId required | string Example: ghi789 Unique identifier of the prediction |
{- "status": "succeeded",
- "outputImages": [
- "data:image/png;base64,iVBORw0KGgo...",
- "data:image/png;base64,aABCDEFGHij..."
]
}
Marks a prediction as deleted. This is a soft-delete that preserves the prediction history.
Example use case: Removing old or unsuccessful dress design generations from your list.
predictionId required | string Example: ghi789 Unique identifier of the prediction |