# List LoRA Training Task - Documentation

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/api-reference/model-apis-list-training-task

# List LoRA Training Task

GET

/

v3

/

training

Try it

List LoRA Training Task

cURL

```
curl --request GET \
--url https://api.novita.ai/v3/training \
--header 'Authorization: &#x3C;authorization>' \
--header 'Content-Type: &#x3C;content-type>'
```

```
import requestsurl = "https://api.novita.ai/v3/training"headers = { "Content-Type": "&#x3C;content-type>", "Authorization": "&#x3C;authorization>"}response = requests.get(url, headers=headers)print(response.text)
```

```
const options = { method: 'GET', headers: {'Content-Type': '&#x3C;content-type>', Authorization: '&#x3C;authorization>'}};fetch('https://api.novita.ai/v3/training', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
```

```
&#x3C;?php$curl = curl_init();curl_setopt_array($curl, [ CURLOPT_URL => "https://api.novita.ai/v3/training", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: &#x3C;authorization>", "Content-Type: &#x3C;content-type>" ],]);$response = curl_exec($curl);$err = curl_error($curl);curl_close($curl);if ($err) { echo "cURL Error #:" . $err;} else { echo $response;}
```

```
package mainimport (	"fmt"	"net/http"	"io")func main() {	url := "https://api.novita.ai/v3/training"	req, _ := http.NewRequest("GET", url, nil)	req.Header.Add("Content-Type", "&#x3C;content-type>")	req.Header.Add("Authorization", "&#x3C;authorization>")	res, _ := http.DefaultClient.Do(req)	defer res.Body.Close()	body, _ := io.ReadAll(res.Body)	fmt.Println(string(body))}
```

```
HttpResponse&#x3C;String> response = Unirest.get("https://api.novita.ai/v3/training") .header("Content-Type", "&#x3C;content-type>") .header("Authorization", "&#x3C;authorization>") .asString();
```

```
require 'uri'require 'net/http'url = URI("https://api.novita.ai/v3/training")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Get.new(url)request["Content-Type"] = '&#x3C;content-type>'request["Authorization"] = '&#x3C;authorization>'response = http.request(request)puts response.read_body
```

200

```
{
"tasks": [
{
"task_name": "&#x3C;string>",
"task_id": "&#x3C;string>",
"task_type": "&#x3C;string>",
"task_status": "&#x3C;string>",
"created_at": 123,
"models": [
{
"model_name": "&#x3C;string>",
"model_status": "&#x3C;string>"
}
]
}
],
"pagination": {
"next_cursor": "&#x3C;string>"
}
}
```

This API retrieves information about all the user’s training tasks.

##

[​](#request-headers)

Request Headers

[​](#param-content-type)

Content-Type

string

required

Enum: `application/json`

[​](#param-authorization)

Authorization

string

required

Bearer authentication format, for example: Bearer {{API Key}}.

##

[​](#query-parameters)

Query Parameters

[​](#param-pagination-limit)

pagination.limit

integer

The number of model records to query per request, within the range (0, 100].

[​](#param-pagination-cursor)

pagination.cursor

string

The pagination.cursor parameter specifies the record from which to start returning results. If it is empty, the results will start from the beginning. Generally, the content of the next page is obtained by passing the next_cursor field value from the response packet.

##

[​](#response)

Response

[​](#param-tasks)

tasks

object[]

Show properties

[​](#param-task-name)

task_name

string

The name of the training task.

[​](#param-task-id)

task_id

string

The unique identifier of the training task, which can be used to query the training status and results.

[​](#param-task-type)

task_type

string

The type of the training task.

[​](#param-task-status)

task_status

string

Represents the current status of a task, which is particularly useful for monitoring and managing the progress of training tasks. Each status indicates a specific phase in the task’s lifecycle: UNKNOWN - The status of the task is not known or has not been updated yet; QUEUING - The task is in the queue waiting to be processed; TRAINING - The task is currently undergoing training processes; SUCCESS - The task has been completed successfully; CANCELED - The task was canceled before completion; FAILED - The task failed to complete successfully due to an error or issue.

Enum: `UNKNOWN`, `QUEUING`, `TRAINING`, `SUCCESS`, `CANCELED`, `FAILED`

[​](#param-created-at)

created_at

integer

The timestamp of when the task was created.

[​](#param-models)

models

object[]

Show properties

[​](#param-model-name)

model_name

string

The name of the model.

[​](#param-model-status)

model_status

string

The status of the model. When the model is being deployed, the status will be `DEPLOYING`, and when the model is serving, the status will be `SERVING`.

Enum: `DEPLOYING`, `SERVING`

[​](#param-pagination)

pagination

object

Show properties

[​](#param-next-cursor)

next_cursor

string

##

[​](#example)

Example

In this step, we can obtain all the information about trained models.

```
curl --location --request GET 'https://api.novita.ai/v3/training?pagination.limit=10&pagination.cursor=c_0' \
--header 'Authorization: Bearer {{API Key}}'
```

`Response:`

```
{
"tasks": [
{
"task_name": "test_01",
"task_id": "a0c4cc90-0296-4972-a1d8-e6e227daf094",
"task_type": "subject",
"task_status": "SUCCESS",
"created_at": 1699325415,
"models": [
{
"model_name": "model_1699325939_E83A88DAC5.safetensors",
"model_status": "SERVING"
}
]
},
{
"task_name": "test_02",
"task_id": "51e9bf41-8f7a-464d-b5ad-2fa217a1ec93",
"task_type": "subject",
"task_status": "SUCCESS",
"created_at": 1699267268,
"models": [
{
"model_name": "model_1699267603_27F0D9C81C.safetensors",
"model_status": "SERVING"
}
]
},
{
"task_name": "test_03",
"task_id": "7bd205ab-63e9-452b-9a66-39c597000eaa",
"task_type": "subject",
"task_status": "FAILED",
"created_at": 1699264338,
"models": []
}
],
"pagination": {
"next_cursor": "c_10"
}
}
```

- `task_name`: The name of the training task.

- `task_id`: The unique identifier of the training task, which can be used to query the training status and results.

- `task_type`: The type of the training task.

- `task_status`: The status of the training task. Enum: `UNKNOWN`, `QUEUING`, `TRAINING`, `SUCCESS`, `CANCELED`, `FAILED`.

- `created_at`: The timestamp of when the training task was created.

- `models`: The trained models.

- `model_name`: The name of the model.

- `model_status`: The status of the model. Enum: `DEPLOYING`, `SERVING`.

Last modified on December 23, 2024
