## 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` ### Parameters - `model_id: str` - `body: Iterable[Body]` Array of training image pairs - `instruction: Optional[str]` The instruction for the image pair, source to target - `source_id: Optional[str]` The source asset ID (must be a training asset) - `target_id: Optional[str]` The target asset ID (must be a training asset) ### Returns - `class TrainingImageReplacePairsResponse: …` - `count: float` Number of training image pairs - `pairs: List[Pair]` Array of training image pairs - `instruction: Optional[str]` The instruction for the image pair, source to target - `source_id: Optional[str]` The source asset ID (must be a training asset) - `target_id: Optional[str]` The target asset ID (must be a training asset) ### Example ```python 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) ``` #### Response ```json { "count": 0, "pairs": [ { "instruction": "instruction", "sourceId": "sourceId", "targetId": "targetId" } ] } ```