train
ManagementcatalogTrain Models
Not in the default tool list
This tool lives in the tool catalog. Discover it with scenario_tools_search (or enumerate everything with scenario_tools_list) and run it via scenario_tool_execute_write. To list every tool directly, connect with ?toolsets=full.
Manage the custom model training lifecycle. Actions cover dataset upload, training-image updates, pair mapping, cost estimation, and start/stop controls.
action="start" is the ONLY action that launches training. It is paid and irreversible: the CU are charged the moment the job is created, not as epochs complete, and cancelling the run (action="stop") refunds nothing: a run cancelled at 0% still costs the full quote. Get the user's explicit go-ahead on the quoted CU before calling it.
action="configure" prices a configuration and launches nothing. It always sends ?dryRun=true, so it never creates a job and never charges. To launch what you priced, repeat the call as action="start" with the same config.
Args:
- action: required — upload_images, update_image, delete_image, set_pairs, configure, start, or stop
- model_id: required for every action
- images: required for upload_images
- training_image_id, image_data: required for the relevant update or pair actions
- config: training hyper-parameters, required for action=configure, optional for action=start. epochs (the primary duration/cost lever; cost scales linearly), nb_repeats, batch_size, learning_rate. Per-family ranges and defaults are documented on each config field in the input schema.
- dry_run: optional, only meaningful for action=start. true returns a cost estimate without starting the training job (sends ?dryRun=true). configure is always a dry run; dry_run=false there is rejected.
- team_id, project_id: required for OAuth callers
Returns: training-image updates, cost estimates, or training state changes depending on the action you call. Estimates (configure, or start with dry_run=true) carry creativeUnitsCost plus training_started=false and no job. Only a real action="start" returns a job; track it with jobs_wait or job_get.
Examples:
- "Upload training images" -> action="upload_images", model_id="model_xxx", images=["asset_xxx", "asset_yyy"] (upload local files with upload_asset first)
- "Estimate cost of 20 epochs" -> action="configure", model_id="model_xxx", config={"epochs": 20}
- "How much would this training cost?" -> action="configure", model_id="model_xxx", config={"epochs": 12}
- "Start training with 12 epochs" (after the user approved the quote) -> action="start", model_id="model_xxx", config={"epochs": 12}
- "Start training with defaults" -> action="start", model_id="model_xxx"
Don't use when: You want to run inference on an existing model. Prefer model_run instead.
open-world
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | enum(upload_images | update_image | delete_image | set_pairs | configure | start | stop) | ✓ | Training action: upload_images, update_image, delete_image, set_pairs, configure, start, or stop. Only 'start' launches paid training; 'configure' prices a configuration without launching. |
| model_id | string | ✓ | Model ID (required for all training actions). |
| training_image_id | string | — | Training image ID (for update_image/delete_image). |
| images | array | — | Asset IDs of pre-uploaded images (for upload_images). Pass the IDs returned by upload_asset, or existing asset_ids not raw URLs. |
| image_data | record | — | Metadata for update_image or pair mappings for set_pairs. |
| config | unknown | — | Training hyper-parameters. Required for configure (which only prices them); pass the same object to start to launch with them. |
| dry_run | boolean | — | Estimate cost without running. Sends ?dryRun=true so the API returns the cost estimate without starting the training job. Only meaningful for action=start (configure is always a dry run and ignores dry_run=true; dry_run=false is rejected there). |
| team_id | string | — | Team ID. Required if user belongs to multiple teams. |
| project_id | string | — | Project ID to scope the operation to. |
| response_format | enum(json | markdown) | json | Output format: 'json' for structured data, 'markdown' for human-readable text. |
Example Request
JSON
{
"action": "upload_images",
"model_id": "model_custom_abc",
"images": [
"https://cdn.example.com/ref1.png",
"https://cdn.example.com/ref2.png",
"https://cdn.example.com/ref3.png"
],
"team_id": "team_abc123",
"project_id": "proj_xyz789"
}Example Response
JSON
{
"status": "uploaded",
"count": 3
}Common Use Cases
- Upload reference images to a model before starting fine-tuning
- Configure training hyperparameters like steps and learning rate
- Start or stop a training job programmatically
- Set caption/description pairs for supervised style training