Skip to main content
POST
/
api
/
repos
/
{namespace}
/
{repo_name}
/
fine_tunes
Create a fine-tune job
curl --request POST \
  --url https://dev.hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "base_model": "<string>",
  "resource": "<string>",
  "script_type": "<string>",
  "is_public": false,
  "oxen_model_path": "<string>",
  "training_params": {
    "batch_size": 123,
    "caption_column": "<string>",
    "gradient_accumulation": 123,
    "image_column": "<string>",
    "learning_rate": 123,
    "lora_alpha": 123,
    "lora_rank": 123,
    "sample_every": 123,
    "samples": 123,
    "steps": 123,
    "timestep_type": "<string>",
    "use_lora": true
  }
}
'
{
  "fine_tune": {
    "base_model": "<string>",
    "created_at": "<string>",
    "id": "<string>",
    "name": "<string>",
    "status": "<string>",
    "updated_at": "<string>"
  },
  "status": "<string>",
  "status_message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create fine-tune request

Request payload to create a fine-tune job for a repository.

base_model
string
required

Canonical name of the base model to fine-tune

resource
string
required

Repository path to the training data file or directory

script_type
string
required

Name of the fine-tune script to run

is_public
boolean
default:false

Whether the resulting fine-tuned model should be public. Defaults to false.

oxen_model_path
string | null

Optional override for where the resulting model weights live in Oxen. Defaults to the fine-tune resource.

training_params
object

Training configuration parameters

Response

Create fine-tune response

Standard wrapper for fine-tune responses.

fine_tune
FineTune · object

Fine-tune job resource

status
string

High-level status string (for example, 'success').

status_message
string

Human-readable status message (for example, 'resource_found').