Skip to content
Get started

Replace Pairs

PUT/models/{modelId}/training-images/pairs

Replace all training image pairs for the given modelId (at most 50). Edit models pair a sourceId with a targetId. MiniMax H3 Ref (minimax-h3-ref-lora) pairs are its dataset: a video targetId (5.25 to 30 seconds), its caption in instruction (or the video description) and 1 to 12 referenceIds (at most 9 images, 3 videos of 2 to 15 seconds and 3 audio files, at least one image or video, none of them the target or repeated); each video target may appear in only one pair. Training needs at least 5 pairs and checks the target durations and the 400 MB cap on every file when it starts.

Path ParametersExpand Collapse
modelId: string
Query ParametersExpand Collapse
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
body: array of object { instruction, referenceIds, sourceId, targetId }

Array of training image pairs

instruction: optional string

The instruction for the pair, source to target. For MiniMax H3 Ref training, this is the caption of the video target.

referenceIds: optional array of string

MiniMax H3 Ref training only: the training assets conditioning the video target (targetId), in the order the model reads them. At most 12 per entry, of which at most 9 images, 3 videos (2 to 15 seconds each) and 3 audio files, with at least one image or video. sourceId is not used.

sourceId: optional string

The source asset ID (must be a training asset)

targetId: optional string

The target asset ID (must be a training asset)

ReturnsExpand Collapse
count: number

Number of training image pairs

pairs: array of object { instruction, referenceIds, sourceId, targetId }

Array of training image pairs

instruction: optional string

The instruction for the pair, source to target. For MiniMax H3 Ref training, this is the caption of the video target.

referenceIds: optional array of string

MiniMax H3 Ref training only: the training assets conditioning the video target (targetId), in the order the model reads them. At most 12 per entry, of which at most 9 images, 3 videos (2 to 15 seconds each) and 3 audio files, with at least one image or video. sourceId is not used.

sourceId: optional string

The source asset ID (must be a training asset)

targetId: optional string

The target asset ID (must be a training asset)

Replace Pairs

curl https://api.cloud.scenario.com/v1/models/$MODEL_ID/training-images/pairs \
    -X PUT \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '[
          {
            "instruction": "instruction",
            "referenceIds": [
              "string"
            ],
            "sourceId": "sourceId",
            "targetId": "targetId"
          }
        ]'
{
  "count": 0,
  "pairs": [
    {
      "instruction": "instruction",
      "referenceIds": [
        "string"
      ],
      "sourceId": "sourceId",
      "targetId": "targetId"
    }
  ]
}
Returns Examples
{
  "count": 0,
  "pairs": [
    {
      "instruction": "instruction",
      "referenceIds": [
        "string"
      ],
      "sourceId": "sourceId",
      "targetId": "targetId"
    }
  ]
}