GET
/
v3
/
training

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

Request Headers

Content-Type
string
required

Enum: application/json

Authorization
string
required

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

Query Parameters

pagination.limit
integer

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

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

tasks
object[]
pagination
object

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.