Replace
models.training_images.replace(strtraining_image_id, TrainingImageReplaceParams**kwargs) -> TrainingImageReplaceResponse
PUT/models/{modelId}/training-images/{trainingImageId}
Replace the given trainingImageId for the given modelId
Parameters
asset_id: Optional[str]
The asset ID to use as a training image (example: “asset_GTrL3mq4SXWyMxkOHRxlpw”). If provided, “data” and “name” parameters will be ignored.
asset_ids: Optional[Sequence[str]]
The asset IDs to use as training images (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.
Replace
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(
training_image_id="trainingImageId",
model_id="modelId",
)
print(response.training_image){
"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"
}
}