Replace Pairs
models.training_images.replace_pairs(strmodel_id, TrainingImageReplacePairsParams**kwargs) -> TrainingImageReplacePairsResponse
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.
Replace Pairs
import os
from scenario_sdk import Scenario
client = Scenario(
api_key=os.environ.get("SCENARIO_SDK_API_KEY"), # This is the default and can be omitted
api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"), # This is the default and can be omitted
)
response = client.models.training_images.replace_pairs(
model_id="modelId",
body=[{}],
)
print(response.count){
"count": 0,
"pairs": [
{
"instruction": "instruction",
"referenceIds": [
"string"
],
"sourceId": "sourceId",
"targetId": "targetId"
}
]
}Returns Examples
{
"count": 0,
"pairs": [
{
"instruction": "instruction",
"referenceIds": [
"string"
],
"sourceId": "sourceId",
"targetId": "targetId"
}
]
}