---
title: "Create Tune"
method: POST
path: "/v1/tune"
tags: ["tune"]
---

# Create Tune

`POST /v1/tune`

Spawn a tune.

## Request body

- CreateTuneRequest — The create tune request.
  - `continue_on_rejection` boolean, nullable — Continue fine-tuning if any asset was rejected.
  - `description` string, nullable — Description for the tune.
  - `details` union, required — Details of the tune.
    - LoraTuneInput — A LoRA Tune.
      - `base_checkpoint` LoraTuneCheckpoint, required — A checkpoint used for a LoRA Tune.
        - `checkpoint_id` string, required — The checkpoint asset ID.
        - `engine` 'text/llama-2-7b' | 'text/llama-2-13b' | 'text/llama-2-70b' | 'text/codellama-7b' | 'text/codellama-13b' | 'text/codellama-34b' | 'text/codellama-70b' | 'text/mistral-7b' | 'text/mixtral-8x7b' | 'image/controlnet-sd15' | 'image/controlnet-sdxl' | 'image/stable-diffusion-v1-5' | 'image/stable-diffusion-xl-v1-0' | 'image/stable-diffusion-ssd' | 'audio/tortoise-tts' | 'audio/rvc' — BaseEngine
        - `name` string, nullable — The name of the checkpoint. This is cached from asset lake in case the asset is deleted.
      - `files` LoraTuneFile[], required — The files used for this LoRA Tune.
        - `caption` string, nullable — The caption used when the LoRA tune was requested.
        - `file_id` string, required — The ID of the file on asset lake.
      - `resize_images` boolean, nullable — Resize training images to the "native" dimensions of the respective engine prior to tuning. Images will be proportinally resized to such that the shorter edge will fit the native dimension. For Stable Diffusion 1.5, this is 512 pixels, and for Stable Diffusion XL, this is 1024 pixels. If the shorter edge is shorter than the native dimension, no scaling up will be performed.
      - `seed` integer, nullable — The seed used for this LoRA Tune.
      - `steps` integer, required — The number of steps used for this LoRA Tune.
      - `trigger_words` string[], required — The trigger words used for this tune. As of now, only one trigger word is supported. `List` is used for future-proofing.
      - `tune_type` 'lora_tune' — Tune type.
    - TextToSpeechLatentTune — A TextToSpeechLatentTune.
      - `asset_ids` string[], required — The Asset Lake asset ids used for this task.
      - `inline_assets` boolean, nullable — All assets provided inline.
      - `tune_type` 'text_to_speech_latent_tune' — Tune type.
  - `name` string, required — The name of the tune.

## Response `201`

Successful Response

- Tune — A tune base class.
  - `created_at` string, date-time, required — The time this tune task was created.
  - `deleted_at` string, date-time, nullable — The time this tune task was deleted.
  - `description` string, required — The description of the tune.
  - `details` union, required — Tune details.
    - LoraTuneOutput — A LoRA Tune.
      - `base_checkpoint` LoraTuneCheckpoint, required — A checkpoint used for a LoRA Tune.
        - `checkpoint_id` string, required — The checkpoint asset ID.
        - `engine` 'text/llama-2-7b' | 'text/llama-2-13b' | 'text/llama-2-70b' | 'text/codellama-7b' | 'text/codellama-13b' | 'text/codellama-34b' | 'text/codellama-70b' | 'text/mistral-7b' | 'text/mixtral-8x7b' | 'image/controlnet-sd15' | 'image/controlnet-sdxl' | 'image/stable-diffusion-v1-5' | 'image/stable-diffusion-xl-v1-0' | 'image/stable-diffusion-ssd' | 'audio/tortoise-tts' | 'audio/rvc' — BaseEngine
        - `name` string, nullable — The name of the checkpoint. This is cached from asset lake in case the asset is deleted.
      - `files` LoraTuneFile[], required — The files used for this LoRA Tune.
        - `caption` string, nullable — The caption used when the LoRA tune was requested.
        - `file_id` string, required — The ID of the file on asset lake.
      - `resize_images` boolean, nullable — Resize training images to the "native" dimensions of the respective engine prior to tuning. Images will be proportinally resized to such that the shorter edge will fit the native dimension. For Stable Diffusion 1.5, this is 512 pixels, and for Stable Diffusion XL, this is 1024 pixels. If the shorter edge is shorter than the native dimension, no scaling up will be performed.
      - `seed` integer, nullable — The seed used for this LoRA Tune.
      - `steps` integer, required — The number of steps used for this LoRA Tune.
      - `trigger_words` string[], required — The trigger words used for this tune. As of now, only one trigger word is supported. `List` is used for future-proofing.
      - `tune_type` 'lora_tune' — Tune type.
    - TextToSpeechLatentTune — A TextToSpeechLatentTune.
      - `asset_ids` string[], required — The Asset Lake asset ids used for this task.
      - `inline_assets` boolean, nullable — All assets provided inline.
      - `tune_type` 'text_to_speech_latent_tune' — Tune type.
  - `id` string, required — The ID of the LoRA tune.
  - `name` string, required — The name of the tune.
  - `output_lora_ids` string[], required — The output LoRA IDs, if the task was successful.
  - `result` TuneResult — Tune result on worker.
    - `number_of_available_assets` integer, nullable — Number of assets from tune request that are available.
    - `output_assets` string[], nullable — Tune generated assets. This field is filled only when tune was successful.
    - `rejected_assets` string[], nullable — Tune rejected assets.
    - `unready_assets` string[], nullable — Tune unready assets.
  - `status` 'pending' | 'running' | 'succeeded' | 'cancelled' | 'failed', required — The status of the tune job.
  - `status_details` string, required — The details of the status, only used when the associated task failed.
  - `succeeded_at` string, date-time, nullable — The time the tune task succeeded.
  - `tenant_id` string, uuid, required — The tenant who requested the LoRA tune.
  - `tune_type` 'lora_tune' | 'text_to_speech_latent_tune' | 'text_to_speech_rvc_tune' | 'text_to_speech_tortoise_tune', required — The type of tune requested.
  - `updated_at` string, date-time, required — The time this tune task was updated.

## Other responses

- `422` — Validation Error

## Changes

- **2024-09-11** `4896c10d36cc` — 9 breaking, 8 info
  - removed the enum value `lora_tune` of the request property `details/oneOf[subschema #1: LoraTune]/tune_type`
  - removed the enum value `text/llama-3-70b` of the request property `details/oneOf[subschema #1: LoraTune]/base_checkpoint/allOf[subschema #1: LoraTuneCheckpoint]/engine/anyOf[subschema #1: BaseEngine]/`
  - removed the enum value `text/llama-3-8b` of the request property `details/oneOf[subschema #1: LoraTune]/base_checkpoint/allOf[subschema #1: LoraTuneCheckpoint]/engine/anyOf[subschema #1: BaseEngine]/`
  - removed the enum value `text_to_speech_latent_tune` of the request property `details/oneOf[subschema #2: TextToSpeechLatentTune]/tune_type`
  - …13 more
- **2024-06-05** `ef5265223612` — 7 breaking, 5 warning, 7 info
  - request property `details/oneOf[subschema #1: LoraTune]/tune_type` was restricted to a list of enum values
  - request property `details/oneOf[subschema #2: TextToSpeechLatentTune]/tune_type` was restricted to a list of enum values
  - the `details/oneOf[subschema #1: LoraTune]/tune_type` request property type changed from no type to `string`
  - the `details/oneOf[subschema #2: TextToSpeechLatentTune]/tune_type` request property type changed from no type to `string`
  - …15 more
- …earlier changes not shown

[Full history](https://skmtc.dev/octoml/apis/fine-tuning-api-server/changes/v1/tune/post.md)

---

[API](https://skmtc.dev/octoml/apis/fine-tuning-api-server.md) · [All operations](https://skmtc.dev/octoml/apis/fine-tuning-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/octoml/fine-tuning-api-server/revisions/4896c10d36cc/schema)
