Create a training
POST
/v1/models/{model_owner}/{model_name}/versions/{version_id}/trainings
{
"destination": "{new_owner}/{new_name}",
"input": {
"train_data": "https://example.com/my-input-images.zip",
},
"webhook": "https://example.com/my-webhook",
}
curl -s -X POST \
-d '{"destination": "{new_owner}/{new_name}", "input": {"input_images": "https://example.com/my-input-images.zip"}}' \
-H "Authorization: Token <paste-your-token-here>" \
-H 'Content-Type: application/json' \
https://api.replicate.com/v1/models/stability-ai/sdxl/versions/da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf/trainings
{
"id": "zz4ibbonubfz7carwiefibzgga",
"model": "stability-ai/sdxl",
"version": "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf",
"input": {
"input_images": "https://example.com/my-input-images.zip"
},
"logs": "",
"error": null,
"status": "starting",
"created_at": "2023-09-08T16:32:56.990893084Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zz4ibbonubfz7carwiefibzgga/cancel",
"get": "https://api.replicate.com/v1/predictions/zz4ibbonubfz7carwiefibzgga"
}
}
webhook
HTTPS URL for us to call when the results are ready, or poll the get a training endpoint until it has finished.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.replicate.com/v1/models///versions//trainings' \
--header 'Content-Type: application/json' \
--data-raw ''
Response Response Example
{}
Request
Path Params
model_owner
string
required
model_name
string
required
version_id
string
required
Body Params application/json
Responses
Modified at 2023-12-22 03:33:22