Skip to content

train

Managementcatalog

Train 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 custom model training. Dataset: upload_images, update_image, delete_image, set_pairs (replaces every pair: send all in one call). Runs: configure prices a config, start launches training, stop cancels it. config fields: epochs, nb_repeats, batch_size, learning_rate, rank, sample_prompts, sample_source_images, sample_width, sample_height, guidance_loss_scale, max_timestep, attention_only. Confirm the exact target before replacing, deleting or stopping. action="start" is the ONLY action that launches training. It is paid and irreversible: CU are charged when the job is created. action="stop" refunds nothing, even at 0%. Get the user's explicit go-ahead on the quoted CU first. action="configure" sends ?dryRun=true: no job, no charge. It prices the dataset as is, unvalidated: price after the last dataset change. To launch the quote, repeat as action="start" with the same config. MiniMax H3 video LoRAs, by model_create data.type: minimax-h3-lora trains on images, clips or both; minimax-h3-int8-lora on images only, for less; minimax-h3-ref-lora on clips paired with their references. Flow: upload_asset, upload_images, set_pairs (Reference), captions, configure, start. Video entries bill far above images. Tell the user: Subject to the MiniMax H3 license (https://huggingface.co/MiniMaxAI/MiniMax-H3/blob/main/LICENSE). Its outputs may not be used to train other AI models. Captions are asset descriptions; start refuses an uncaptioned entry. Clips get one 40 s to 2 min after upload_images, or none: check with asset_get, set it with asset_update metadata.description (catalog-only — run via scenario_tool_execute_write). Returns: dataset changes, cost estimates or training state. Estimates carry creativeUnitsCost, training_started=false and no job. A real start returns a job; track it with jobs_wait or job_get. Examples: - "Start with 12 epochs" (quote approved) -> action="start", model_id="model_xxx", config={"epochs": 12, "sample_prompts": ["a stone bridge at night"]} Don't use for inference — use model_run.
destructiveopen-world

Parameters

NameTypeRequiredDescription
actionenum(upload_images | update_image | delete_image | set_pairs | configure | start | stop)✓Only 'start' launches paid training.
model_idstring✓Model ID.
training_image_idstring—update_image/delete_image target (asset id). update_image swaps in a different asset: the training image takes its id (returned as trainingImage.id) and caption; the old caption does not carry over.
imagesarray—upload_images: upload_asset ids (not URLs), any count. Images; minimax-h3-lora/-ref-lora also mp4/webm/mov clips (5.25-30 s, ≤400 MB, only the first ~5.3 s trains); -ref-lora audio too.
image_datarecord—update_image: assetId (existing asset) or data (data URL) plus name. Captions cannot be set here: see the tool description. set_pairs: { body: [{ sourceId, targetId, instruction }] }; H3 Reference, 5+ pairs: { body: [{ targetId, instruction, referenceIds }] }: a unique clip, its caption (else its description), 1-12 dataset assets in order (≤9 images, ≤3 videos of 2-15 s, ≤3 audio; ≥1 image or video).
configunknown—Required by configure; pass the same to start.
dry_runboolean—start only: true only estimates. configure always does; dry_run=false is rejected there.
task_idstring—Task of the team's task tracker (Jira, Wrike…) this call's Creative Units are attributed to. Required when the project enforces task ids: the call is then refused without one. Only an id the user chose from the project's task list or typed: never invent one, the API checks only its format. Pass the same task_id on later billed calls for the same work in the same project; ask again when the user moves to other work or switches project or team. A dry_run estimate needs none. project_tasks_list (catalog-only — run via scenario_tool_execute_read) lists the project's tasks.
team_idstring—Team ID. Required with project_id for OAuth callers; an API key is scoped by the key.
project_idstring—Project ID. Required with team_id for OAuth callers; an API key is scoped by the key.
response_formatenum(json | markdown)jsonOutput format: 'json' for structured data, 'markdown' for human-readable text.

Example Request

JSON
{
  "action": "upload_images",
  "model_id": "model_custom_abc",
  "images": [
    "asset_clip001",
    "asset_clip002",
    "asset_still003"
  ],
  "team_id": "team_abc123",
  "project_id": "proj_xyz789"
}

Example Response

JSON
{
  "trainingImages": [
    {
      "id": "asset_clip001",
      "name": "run-cycle.mp4"
    },
    {
      "id": "asset_clip002",
      "name": "jump.mp4"
    },
    {
      "id": "asset_still003",
      "name": "pose.png"
    }
  ]
}

Common Use Cases

  • Upload reference images to a model before starting fine-tuning
  • Build a MiniMax H3 video LoRA dataset from images and 5.25-30 s video clips
  • Price a configuration (epochs, learning rate, rank) before launching
  • Start or stop a training job programmatically
  • Pair before/after training images with an edit instruction for image-editing training