Create Training Job

Initiates a new AI training job for the project's media.

Path Parameters

  • organization_idrequired
  • project_idrequired

Query Parameters

    Request Body Parameters

    • secretrequired
    • webhookrequired
    • class_promptrequired
    • seedoptional
    • inferenceoptional
    • unique_idoptional
    • center_cropoptional
    • learning_rateoptional
    • max_train_stepsoptional
    • mixed_precisionoptional
    • num_class_imagesoptional
    • num_train_epochsoptional
    • train_batch_sizeoptional
    • diffusers_versionoptional
    • optimization_typeoptional
    • prior_loss_weightoptional
    • sample_batch_sizeoptional
    • train_text_encoderoptional
    • pretrained_vae_nameoptional
    • training_resolutionoptional
    • pretrained_model_nameoptional
    • with_prior_preservationoptional

    Authentication Header

    • x-api-keyrequired
    ENDPOINT
    PUT /v1/project/{organization_id}/{project_id}/media/train
    REQUEST
    {
      "secret": "trainingSecret",
      "webhook": "https://webhook.site/valid-training-hook",
      "inference": {
        "name": "GBV Style Album Art Inference",
        "secret": "inferenceSecret",
        "prompts": [
          {
            "name": "Imaginary GBV Album Cover",
            "width": 512,
            "height": 512,
            "prompt": "Create an album cover in the style of Guided by Voices, embodying the band's indie rock ethos with a touch of surrealism.",
            "num_images": 1,
            "guidance_scale": 7.5,
            "num_inference_steps": 10
          }
        ],
        "webhook": "https://webhook.site/valid-inference-hook",
        "diffusers_version": "19.0"
      },
      "class_prompt": "Guided by Voices album covers",
      "learning_rate": "1e-6",
      "max_train_steps": 800,
      "mixed_precision": "fp16",
      "num_class_images": 200,
      "num_train_epochs": 1,
      "train_batch_size": 1,
      "diffusers_version": "19.0",
      "prior_loss_weight": 1,
      "sample_batch_size": 4,
      "train_text_encoder": true,
      "training_resolution": 512,
      "pretrained_model_name": "runwayml/stable-diffusion-v1-5",
      "with_prior_preservation": true
    }
    RESPONSE
    No body returned for response
    RESPONSE STATUS CODE
    200