Skip to content
Get started

Add

POST/models/{modelId}/training-images

Add a training asset to the given modelId. Every trainable model accepts images. MiniMax H3 (minimax-h3-lora) also accepts video clips, which must last 5.25 to 30 seconds and weigh at most 400 MB when training starts, of which only the first ~5.3 seconds are used for training: split longer videos into clips first. MiniMax H3 Ref (minimax-h3-ref-lora) accepts videos and audio, combined into its dataset through PUT /models/{modelId}/training-images/pairs. ElevenLabs voice models accept audio. Videos and audio are attached by assetId or assetIds; data only takes an image. Images are captioned automatically when possible; videos are not, so set their description before training. A manual description always takes precedence over an automatic caption.

Path ParametersExpand Collapse
modelId: string
Query ParametersExpand Collapse
originalAssets: optional boolean

If set to true, returns the original asset without transformation

projectId: optional string

The projectId used for ownership resource management. Either to assert ownership or to set the owner of the resource(s)

Body ParametersJSONExpand Collapse
assetId: optional string

The asset ID to use as a training asset (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”). If provided, “data” and “name” parameters will be ignored. Images for every model; videos for MiniMax H3 and H3 Ref; audio for H3 Ref and ElevenLabs voice models.

assetIds: optional array of string

The asset IDs to use as training assets (example: [“asset_GTrL3mq4SXWyMxkOHRxlpw”, “asset_GTrL3mq4SXWyMxkOHRxlpw”]) Used in batch mode, up to 10 asset IDs are allowed. Cannot be used with “assetId” or “data” and “name” parameters. Images for every model; videos for MiniMax H3 and H3 Ref; audio for H3 Ref and ElevenLabs voice models.

data: optional string

The training image as a data URL (example: “data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=”) Images only: attach videos and audio by “assetId” or “assetIds”

name: optional string

The original file name of the image (example: “my-training-image.jpg”)

preset: optional "default" or "style" or "subject"

The preset to use for training images

One of the following:
"default"
"style"
"subject"
ReturnsExpand Collapse
trainingImage: object { id, automaticCaptioning, createdAt, 3 more }
id: string

The training image ID (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”)

automaticCaptioning: string

Automatic captioning of the image

createdAt: string

The training image upload date as an ISO string (example: “2023-02-03T11:19:41.579Z”)

description: string

Description for the image

downloadUrl: string

The URL of the image

name: string

The original file name of the image (example: “my-training-image.jpg”)

Add

curl https://api.cloud.scenario.com/v1/models/$MODEL_ID/training-images \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '{}'
{
  "trainingImage": {
    "id": "id",
    "automaticCaptioning": "automaticCaptioning",
    "createdAt": "createdAt",
    "description": "description",
    "downloadUrl": "downloadUrl",
    "name": "name"
  }
}
Returns Examples
{
  "trainingImage": {
    "id": "id",
    "automaticCaptioning": "automaticCaptioning",
    "createdAt": "createdAt",
    "description": "description",
    "downloadUrl": "downloadUrl",
    "name": "name"
  }
}