Trigger
PUT/models/{modelId}/train
Trigger the given modelId training
Query Parameters
Trigger
curl https://api.cloud.scenario.com/v1/models/$MODEL_ID/train \
-X PUT \
-H 'Content-Type: application/json' \
-u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
-d '{}'{
"job": {
"createdAt": "createdAt",
"jobId": "jobId",
"jobType": "assets-download",
"metadata": {
"assetIds": [
"string"
],
"error": "error",
"flow": [
{
"id": "id",
"status": "failure",
"type": "custom-model",
"assets": [
{
"assetId": "assetId",
"url": "url"
}
],
"count": 0,
"dependsOn": [
"string"
],
"includeOutputsInWorkflowJob": true,
"inputs": [
{
"name": "name",
"type": "boolean",
"allowedValues": [
{}
],
"backgroundBehavior": "opaque",
"color": true,
"costImpact": true,
"default": {},
"description": "description",
"group": "group",
"hint": "hint",
"inputs": [
{
"foo": "bar"
}
],
"items": [
[
{
"name": "name",
"type": "boolean",
"allowedValues": [
{}
],
"backgroundBehavior": "opaque",
"color": true,
"costImpact": true,
"default": {},
"description": "description",
"group": "group",
"hint": "hint",
"inputs": [
{
"foo": "bar"
}
],
"kind": "3d",
"label": "label",
"maskFrom": "maskFrom",
"max": 0,
"maxLength": 0,
"maxSize": 0,
"min": 0,
"minLength": 0,
"modelTypes": [
"custom"
],
"parent": true,
"placeholder": "placeholder",
"prompt": true,
"promptSpark": true,
"ref": {
"conditional": [
"string"
],
"equal": "equal",
"name": "name",
"node": "node"
},
"required": {
"always": true,
"conditionalValues": {},
"ifDefined": {},
"ifNotDefined": {}
},
"step": 1,
"value": {}
}
]
],
"kind": "3d",
"label": "label",
"maskFrom": "maskFrom",
"max": 0,
"maxLength": 0,
"maxSize": 0,
"min": 0,
"minLength": 0,
"modelTypes": [
"custom"
],
"parent": true,
"placeholder": "placeholder",
"prompt": true,
"promptSpark": true,
"ref": {
"conditional": [
"string"
],
"equal": "equal",
"name": "name",
"node": "node"
},
"required": {
"always": true,
"conditionalValues": {},
"ifDefined": {},
"ifNotDefined": {}
},
"step": 1,
"value": {}
}
],
"items": [
"string"
],
"iterationIndex": 0,
"jobId": "jobId",
"logic": {
"cases": [
{
"condition": "condition",
"value": "value"
}
],
"default": "default",
"transform": "transform"
},
"logicType": "if-else",
"loopBodyNodeIds": [
"string"
],
"loopNodeId": "loopNodeId",
"modelId": "modelId",
"output": {},
"workflowId": "workflowId"
}
],
"hint": "hint",
"input": {
"foo": "bar"
},
"output": {
"foo": "bar"
},
"outputModelId": "outputModelId",
"workflowId": "workflowId",
"workflowJobId": "workflowJobId"
},
"progress": 0,
"status": "canceled",
"statusHistory": [
{
"date": "date",
"status": "canceled"
}
],
"updatedAt": "updatedAt",
"authorId": "authorId",
"billing": {
"cuCost": 0,
"cuDiscount": 0
},
"ownerId": "ownerId"
},
"model": {
"id": "id",
"capabilities": [
"3d23d"
],
"collectionIds": [
"string"
],
"createdAt": "createdAt",
"custom": true,
"exampleAssetIds": [
"string"
],
"privacy": "private",
"source": "civitai",
"status": "copying",
"tags": [
"string"
],
"trainingImagesNumber": 0,
"type": "custom",
"updatedAt": "updatedAt",
"accessRestrictions": 0,
"authorId": "authorId",
"class": {
"category": "category",
"conceptPrompt": "conceptPrompt",
"modelId": "modelId",
"name": "name",
"prompt": "prompt",
"slug": "slug",
"status": "published",
"thumbnails": [
"string"
]
},
"compliantModelIds": [
"string"
],
"concepts": [
{
"modelId": "modelId",
"scale": -2,
"modelEpoch": "modelEpoch"
}
],
"epoch": "epoch",
"epochs": [
{
"epoch": "epoch",
"assets": [
{
"assetId": "assetId",
"url": "url"
}
]
}
],
"inputs": [
{
"name": "name",
"type": "boolean",
"allowedValues": [
{}
],
"backgroundBehavior": "opaque",
"color": true,
"costImpact": true,
"default": {},
"description": "description",
"group": "group",
"hint": "hint",
"inputs": [
{
"foo": "bar"
}
],
"kind": "3d",
"label": "label",
"maskFrom": "maskFrom",
"max": 0,
"maxLength": 0,
"maxSize": 0,
"min": 0,
"minLength": 0,
"modelTypes": [
"custom"
],
"parent": true,
"placeholder": "placeholder",
"prompt": true,
"promptSpark": true,
"required": {
"always": true,
"conditionalValues": {},
"ifDefined": {},
"ifNotDefined": {}
},
"step": 1
}
],
"modelKeyword": "modelKeyword",
"name": "name",
"negativePromptEmbedding": "negativePromptEmbedding",
"ownerId": "ownerId",
"parameters": {
"age": "age",
"batchSize": 1,
"classPrompt": "classPrompt",
"cloneType": "cloneType",
"conceptPrompt": "conceptPrompt",
"gender": "gender",
"language": "language",
"learningRate": 1,
"learningRateTextEncoder": 0.0005,
"learningRateUnet": 1,
"lrScheduler": "constant",
"maxTrainSteps": 0,
"nbEpochs": 1,
"nbRepeats": 1,
"numTextTrainSteps": 0,
"numUNetTrainSteps": 0,
"optimizeFor": "likeness",
"priorLossWeight": 1,
"randomCrop": true,
"randomCropRatio": 0,
"randomCropScale": 0,
"rank": 2,
"removeBackgroundNoise": true,
"samplePrompts": [
"string"
],
"sampleSourceImages": [
"string"
],
"scaleLr": true,
"seed": 0,
"textEncoderTrainingRatio": 0,
"validationFrequency": 0,
"validationPrompt": "validationPrompt",
"voiceDescription": "voiceDescription",
"wandbKey": "wandbKey"
},
"parentModelId": "parentModelId",
"performanceStats": {
"variants": [
{
"capability": "capability",
"computedAt": "computedAt",
"variantKey": "variantKey",
"arenaScore": {
"arenaCategory": "arenaCategory",
"arenaModelName": "arenaModelName",
"fetchedAt": "fetchedAt",
"rank": 0,
"rating": 0,
"ratingLower": 0,
"ratingUpper": 0,
"votes": 0
},
"costPerAssetMaxCU": 0,
"costPerAssetMinCU": 0,
"costPerAssetP50CU": 0,
"inferenceLatencyP50Sec": 0,
"inferenceLatencyP75Sec": 0,
"resolution": "resolution",
"totalLatencyP50Sec": 0,
"totalLatencyP75Sec": 0
}
],
"default": "default"
},
"promptEmbedding": "promptEmbedding",
"shortDescription": "shortDescription",
"softDeletionOn": "softDeletionOn",
"thumbnail": {
"assetId": "assetId",
"url": "url"
},
"trainingImagePairs": [
{
"instruction": "instruction",
"sourceId": "sourceId",
"targetId": "targetId"
}
],
"trainingImages": [
{
"id": "id",
"automaticCaptioning": "automaticCaptioning",
"createdAt": "createdAt",
"description": "description",
"downloadUrl": "downloadUrl",
"name": "name"
}
],
"trainingProgress": {
"stage": "pending",
"updatedAt": 0,
"position": 0,
"progress": 0,
"remainingTimeMs": 0,
"startedAt": 0
},
"trainingStats": {
"endedAt": "endedAt",
"queueDuration": 0,
"startedAt": "startedAt",
"trainDuration": 0
},
"uiConfig": {
"inputProperties": {
"foo": {
"collapsed": true
}
},
"lorasComponent": {
"label": "label",
"modelInput": "modelInput",
"scaleInput": "scaleInput",
"modelIdInput": "modelIdInput"
},
"presets": [
{
"fields": [
"string"
],
"presets": {}
}
],
"resolutionComponent": {
"heightInput": "heightInput",
"label": "label",
"presets": [
{
"height": 0,
"label": "label",
"width": 0
}
],
"widthInput": "widthInput"
},
"selects": {
"foo": {}
},
"triggerGenerate": {
"label": "label",
"after": "after",
"position": "bottom"
}
},
"userId": "userId"
},
"creativeUnitsCost": 0,
"creativeUnitsDiscount": 0
}Returns Examples
{
"job": {
"createdAt": "createdAt",
"jobId": "jobId",
"jobType": "assets-download",
"metadata": {
"assetIds": [
"string"
],
"error": "error",
"flow": [
{
"id": "id",
"status": "failure",
"type": "custom-model",
"assets": [
{
"assetId": "assetId",
"url": "url"
}
],
"count": 0,
"dependsOn": [
"string"
],
"includeOutputsInWorkflowJob": true,
"inputs": [
{
"name": "name",
"type": "boolean",
"allowedValues": [
{}
],
"backgroundBehavior": "opaque",
"color": true,
"costImpact": true,
"default": {},
"description": "description",
"group": "group",
"hint": "hint",
"inputs": [
{
"foo": "bar"
}
],
"items": [
[
{
"name": "name",
"type": "boolean",
"allowedValues": [
{}
],
"backgroundBehavior": "opaque",
"color": true,
"costImpact": true,
"default": {},
"description": "description",
"group": "group",
"hint": "hint",
"inputs": [
{
"foo": "bar"
}
],
"kind": "3d",
"label": "label",
"maskFrom": "maskFrom",
"max": 0,
"maxLength": 0,
"maxSize": 0,
"min": 0,
"minLength": 0,
"modelTypes": [
"custom"
],
"parent": true,
"placeholder": "placeholder",
"prompt": true,
"promptSpark": true,
"ref": {
"conditional": [
"string"
],
"equal": "equal",
"name": "name",
"node": "node"
},
"required": {
"always": true,
"conditionalValues": {},
"ifDefined": {},
"ifNotDefined": {}
},
"step": 1,
"value": {}
}
]
],
"kind": "3d",
"label": "label",
"maskFrom": "maskFrom",
"max": 0,
"maxLength": 0,
"maxSize": 0,
"min": 0,
"minLength": 0,
"modelTypes": [
"custom"
],
"parent": true,
"placeholder": "placeholder",
"prompt": true,
"promptSpark": true,
"ref": {
"conditional": [
"string"
],
"equal": "equal",
"name": "name",
"node": "node"
},
"required": {
"always": true,
"conditionalValues": {},
"ifDefined": {},
"ifNotDefined": {}
},
"step": 1,
"value": {}
}
],
"items": [
"string"
],
"iterationIndex": 0,
"jobId": "jobId",
"logic": {
"cases": [
{
"condition": "condition",
"value": "value"
}
],
"default": "default",
"transform": "transform"
},
"logicType": "if-else",
"loopBodyNodeIds": [
"string"
],
"loopNodeId": "loopNodeId",
"modelId": "modelId",
"output": {},
"workflowId": "workflowId"
}
],
"hint": "hint",
"input": {
"foo": "bar"
},
"output": {
"foo": "bar"
},
"outputModelId": "outputModelId",
"workflowId": "workflowId",
"workflowJobId": "workflowJobId"
},
"progress": 0,
"status": "canceled",
"statusHistory": [
{
"date": "date",
"status": "canceled"
}
],
"updatedAt": "updatedAt",
"authorId": "authorId",
"billing": {
"cuCost": 0,
"cuDiscount": 0
},
"ownerId": "ownerId"
},
"model": {
"id": "id",
"capabilities": [
"3d23d"
],
"collectionIds": [
"string"
],
"createdAt": "createdAt",
"custom": true,
"exampleAssetIds": [
"string"
],
"privacy": "private",
"source": "civitai",
"status": "copying",
"tags": [
"string"
],
"trainingImagesNumber": 0,
"type": "custom",
"updatedAt": "updatedAt",
"accessRestrictions": 0,
"authorId": "authorId",
"class": {
"category": "category",
"conceptPrompt": "conceptPrompt",
"modelId": "modelId",
"name": "name",
"prompt": "prompt",
"slug": "slug",
"status": "published",
"thumbnails": [
"string"
]
},
"compliantModelIds": [
"string"
],
"concepts": [
{
"modelId": "modelId",
"scale": -2,
"modelEpoch": "modelEpoch"
}
],
"epoch": "epoch",
"epochs": [
{
"epoch": "epoch",
"assets": [
{
"assetId": "assetId",
"url": "url"
}
]
}
],
"inputs": [
{
"name": "name",
"type": "boolean",
"allowedValues": [
{}
],
"backgroundBehavior": "opaque",
"color": true,
"costImpact": true,
"default": {},
"description": "description",
"group": "group",
"hint": "hint",
"inputs": [
{
"foo": "bar"
}
],
"kind": "3d",
"label": "label",
"maskFrom": "maskFrom",
"max": 0,
"maxLength": 0,
"maxSize": 0,
"min": 0,
"minLength": 0,
"modelTypes": [
"custom"
],
"parent": true,
"placeholder": "placeholder",
"prompt": true,
"promptSpark": true,
"required": {
"always": true,
"conditionalValues": {},
"ifDefined": {},
"ifNotDefined": {}
},
"step": 1
}
],
"modelKeyword": "modelKeyword",
"name": "name",
"negativePromptEmbedding": "negativePromptEmbedding",
"ownerId": "ownerId",
"parameters": {
"age": "age",
"batchSize": 1,
"classPrompt": "classPrompt",
"cloneType": "cloneType",
"conceptPrompt": "conceptPrompt",
"gender": "gender",
"language": "language",
"learningRate": 1,
"learningRateTextEncoder": 0.0005,
"learningRateUnet": 1,
"lrScheduler": "constant",
"maxTrainSteps": 0,
"nbEpochs": 1,
"nbRepeats": 1,
"numTextTrainSteps": 0,
"numUNetTrainSteps": 0,
"optimizeFor": "likeness",
"priorLossWeight": 1,
"randomCrop": true,
"randomCropRatio": 0,
"randomCropScale": 0,
"rank": 2,
"removeBackgroundNoise": true,
"samplePrompts": [
"string"
],
"sampleSourceImages": [
"string"
],
"scaleLr": true,
"seed": 0,
"textEncoderTrainingRatio": 0,
"validationFrequency": 0,
"validationPrompt": "validationPrompt",
"voiceDescription": "voiceDescription",
"wandbKey": "wandbKey"
},
"parentModelId": "parentModelId",
"performanceStats": {
"variants": [
{
"capability": "capability",
"computedAt": "computedAt",
"variantKey": "variantKey",
"arenaScore": {
"arenaCategory": "arenaCategory",
"arenaModelName": "arenaModelName",
"fetchedAt": "fetchedAt",
"rank": 0,
"rating": 0,
"ratingLower": 0,
"ratingUpper": 0,
"votes": 0
},
"costPerAssetMaxCU": 0,
"costPerAssetMinCU": 0,
"costPerAssetP50CU": 0,
"inferenceLatencyP50Sec": 0,
"inferenceLatencyP75Sec": 0,
"resolution": "resolution",
"totalLatencyP50Sec": 0,
"totalLatencyP75Sec": 0
}
],
"default": "default"
},
"promptEmbedding": "promptEmbedding",
"shortDescription": "shortDescription",
"softDeletionOn": "softDeletionOn",
"thumbnail": {
"assetId": "assetId",
"url": "url"
},
"trainingImagePairs": [
{
"instruction": "instruction",
"sourceId": "sourceId",
"targetId": "targetId"
}
],
"trainingImages": [
{
"id": "id",
"automaticCaptioning": "automaticCaptioning",
"createdAt": "createdAt",
"description": "description",
"downloadUrl": "downloadUrl",
"name": "name"
}
],
"trainingProgress": {
"stage": "pending",
"updatedAt": 0,
"position": 0,
"progress": 0,
"remainingTimeMs": 0,
"startedAt": 0
},
"trainingStats": {
"endedAt": "endedAt",
"queueDuration": 0,
"startedAt": "startedAt",
"trainDuration": 0
},
"uiConfig": {
"inputProperties": {
"foo": {
"collapsed": true
}
},
"lorasComponent": {
"label": "label",
"modelInput": "modelInput",
"scaleInput": "scaleInput",
"modelIdInput": "modelIdInput"
},
"presets": [
{
"fields": [
"string"
],
"presets": {}
}
],
"resolutionComponent": {
"heightInput": "heightInput",
"label": "label",
"presets": [
{
"height": 0,
"label": "label",
"width": 0
}
],
"widthInput": "widthInput"
},
"selects": {
"foo": {}
},
"triggerGenerate": {
"label": "label",
"after": "after",
"position": "bottom"
}
},
"userId": "userId"
},
"creativeUnitsCost": 0,
"creativeUnitsDiscount": 0
}