train

Management

Train Models

Manage the custom model training lifecycle. Actions cover dataset upload, training-image updates, pair mapping, configuration, and start/stop controls. 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, config: required for the relevant update, pair, or configure actions - team_id, project_id: required for OAuth callers Returns: training-image updates, configuration payloads, or training state changes depending on the action you call. Examples: - "Upload training images" -> action="upload_images", model_id="model_xxx", images=["https://..."] - "Configure training" -> action="configure", model_id="model_xxx", config={"steps": 1200} - "Start training" -> action="start", model_id="model_xxx" Don't use when: You want to run inference on an existing model. Prefer run_model instead.

open-world

Parameters

NameTypeRequiredDescription
actionenum(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.
model_idstringModel ID (required for all training actions).
training_image_idstringTraining image ID (for update_image/delete_image).
imagesarrayImage URLs to upload (for upload_images).
image_datarecordMetadata for update_image or pair mappings for set_pairs.
configunknownTraining configuration (for configure).
team_idstringTeam ID. Required if user belongs to multiple teams.
project_idstringProject ID to scope the operation to.
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": [
    "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