## Replace Pairs

**put** `/models/{modelId}/training-images/pairs`

Replace all training image pairs for the given `modelId`

### Path Parameters

- `modelId: string`

### Query Parameters

- `projectId: optional string`

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

### Body Parameters

- `body: array of object { instruction, sourceId, targetId }`

  Array of training image pairs

  - `instruction: optional string`

    The instruction for the image pair, source to target

  - `sourceId: optional string`

    The source asset ID (must be a training asset)

  - `targetId: optional string`

    The target asset ID (must be a training asset)

### Returns

- `count: number`

  Number of training image pairs

- `pairs: array of object { instruction, sourceId, targetId }`

  Array of training image pairs

  - `instruction: optional string`

    The instruction for the image pair, source to target

  - `sourceId: optional string`

    The source asset ID (must be a training asset)

  - `targetId: optional string`

    The target asset ID (must be a training asset)

### Example

```http
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",
            "sourceId": "sourceId",
            "targetId": "targetId"
          }
        ]'
```

#### Response

```json
{
  "count": 0,
  "pairs": [
    {
      "instruction": "instruction",
      "sourceId": "sourceId",
      "targetId": "targetId"
    }
  ]
}
```
