Skip to main content
POST
/
api
/
repos
/
{namespace}
/
{repo_name}
/
fine_tunes
/
{id}
/
actions
/
run
Run a fine-tune job
curl --request POST \
  --url https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes/{id}/actions/run \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes/{id}/actions/run"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes/{id}/actions/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes/{id}/actions/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes/{id}/actions/run"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes/{id}/actions/run")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/fine_tunes/{id}/actions/run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "fine_tune": {
    "base_model": "<string>",
    "created_by": {
      "id": "<string>",
      "image": "<string>",
      "name": "<string>",
      "username": "<string>"
    },
    "credits_used": "<string>",
    "deployed_model": {},
    "description": "<string>",
    "display_name": "<string>",
    "error": "<string>",
    "fine_tune_script": {
      "description": "<string>",
      "display_name": "<string>",
      "docker_image_name": "<string>",
      "fine_tune_schema": {
        "description": "<string>",
        "id": "<string>",
        "name": "<string>",
        "schema": {
          "additionalProperties": true,
          "basic": [
            "<string>"
          ],
          "properties": {},
          "required": [
            "<string>"
          ],
          "type": "<string>"
        }
      },
      "id": "<string>",
      "name": "<string>",
      "script_type": "<string>"
    },
    "finished_at": "<string>",
    "gpu_count": 123,
    "gpu_model": "<string>",
    "id": "<string>",
    "inserted_at": "<string>",
    "last_credit_check": "<string>",
    "name": "<string>",
    "output_resource": {},
    "queue_position": 123,
    "rate_per_second": "<string>",
    "repository_id": "<string>",
    "resource": {
      "path": "<string>",
      "version": "<string>"
    },
    "source_model": {},
    "started_at": "<string>",
    "status": "<string>",
    "total_token_count": 0,
    "training_params": {
      "answer_column": "<string>",
      "batch_size": 123,
      "enable_thinking": true,
      "epochs": 123,
      "grad_accum": 123,
      "learning_rate": 123,
      "logging_steps": 123,
      "lora_alpha": 123,
      "lora_rank": 123,
      "neftune_noise_alpha": 123,
      "question_column": "<string>",
      "save_steps_ratio": 123,
      "save_strategy": "<string>",
      "seq_length": 123,
      "use_lora": true
    },
    "updated_at": "<string>",
    "use_lora": true
  },
  "status": "<string>",
  "status_message": "<string>"
}
{}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Fine-tune ID

Response

Run fine-tune response

Standard wrapper for fine-tune /run responses.

fine_tune
FineTuneRun · object

Fine-tune job resource as returned by /run

status
string

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

status_message
string

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