curl --request POST \
--url https://api.example.com/api/finetune/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"adapter_type": "qlora",
"hyperparameters": {},
"gpu_count": 32,
"trigger_now": true
}
'import requests
url = "https://api.example.com/api/finetune/jobs"
payload = {
"dataset_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"adapter_type": "qlora",
"hyperparameters": {},
"gpu_count": 32,
"trigger_now": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset_job_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
adapter_type: 'qlora',
hyperparameters: {},
gpu_count: 32,
trigger_now: true
})
};
fetch('https://api.example.com/api/finetune/jobs', 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://api.example.com/api/finetune/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_job_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'adapter_type' => 'qlora',
'hyperparameters' => [
],
'gpu_count' => 32,
'trigger_now' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/finetune/jobs"
payload := strings.NewReader("{\n \"dataset_job_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"adapter_type\": \"qlora\",\n \"hyperparameters\": {},\n \"gpu_count\": 32,\n \"trigger_now\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/finetune/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_job_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"adapter_type\": \"qlora\",\n \"hyperparameters\": {},\n \"gpu_count\": 32,\n \"trigger_now\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/finetune/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_job_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"adapter_type\": \"qlora\",\n \"hyperparameters\": {},\n \"gpu_count\": 32,\n \"trigger_now\": true\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"domain": "<string>",
"base_model": "<string>",
"owner": "<string>",
"adapter_type": "lora",
"status": "ready",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"hyperparameters": {},
"gpu_resources": {},
"rendered_dag": "<string>",
"airflow_dag_id": "<string>",
"airflow_dag_url": "<string>",
"mlflow_run_id": "<string>",
"registered_model_name": "<string>",
"model_version": "<string>",
"error_message": "<string>"
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "<string>",
"code": 500
}Create a fine-tune training job
Render the GPU training DAG from an approved dataset job and persist it.
curl --request POST \
--url https://api.example.com/api/finetune/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"adapter_type": "qlora",
"hyperparameters": {},
"gpu_count": 32,
"trigger_now": true
}
'import requests
url = "https://api.example.com/api/finetune/jobs"
payload = {
"dataset_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"adapter_type": "qlora",
"hyperparameters": {},
"gpu_count": 32,
"trigger_now": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset_job_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
adapter_type: 'qlora',
hyperparameters: {},
gpu_count: 32,
trigger_now: true
})
};
fetch('https://api.example.com/api/finetune/jobs', 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://api.example.com/api/finetune/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_job_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'adapter_type' => 'qlora',
'hyperparameters' => [
],
'gpu_count' => 32,
'trigger_now' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/finetune/jobs"
payload := strings.NewReader("{\n \"dataset_job_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"adapter_type\": \"qlora\",\n \"hyperparameters\": {},\n \"gpu_count\": 32,\n \"trigger_now\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/finetune/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_job_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"adapter_type\": \"qlora\",\n \"hyperparameters\": {},\n \"gpu_count\": 32,\n \"trigger_now\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/finetune/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_job_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"adapter_type\": \"qlora\",\n \"hyperparameters\": {},\n \"gpu_count\": 32,\n \"trigger_now\": true\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"domain": "<string>",
"base_model": "<string>",
"owner": "<string>",
"adapter_type": "lora",
"status": "ready",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"hyperparameters": {},
"gpu_resources": {},
"rendered_dag": "<string>",
"airflow_dag_id": "<string>",
"airflow_dag_url": "<string>",
"mlflow_run_id": "<string>",
"registered_model_name": "<string>",
"model_version": "<string>",
"error_message": "<string>"
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "<string>",
"code": 500
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Start a fine-tune training run from an approved dataset job.
A COMPLETE fine-tune dataset job supplying the JSONL + base model.
Human-friendly job name. Defaults to '-<base_model>'.
256Parameter-efficient fine-tuning method.
lora, qlora Trainer hyperparameters (epochs, learning_rate, lora_r, lora_alpha, lora_dropout, max_seq_len, ...). Trainer-side defaults fill any gaps.
Override GPU count; clamped to the configured min/max.
1 <= x <= 64Trigger the Airflow DAG immediately after creation.
Response
Job created with rendered DAG.
Full state of a fine-tune training job.
Parameter-efficient fine-tuning method.
lora, qlora Lifecycle of a fine-tune training job (mirrors the DB enum).
ready, queued, running, complete, failed Was this page helpful?

