# List Jobs - 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/gpu-instance-list-jobs

# List Jobs

GET

/

gpu-instance

/

openapi

/

v1

/

jobs

Try it

List Jobs

cURL

```
curl --request GET \
--url https://api.novita.ai/gpu-instance/openapi/v1/jobs \
--header 'Authorization: &#x3C;authorization>'
```

```
import requestsurl = "https://api.novita.ai/gpu-instance/openapi/v1/jobs"headers = {"Authorization": "&#x3C;authorization>"}response = requests.get(url, headers=headers)print(response.text)
```

```
const options = {method: 'GET', headers: {Authorization: '&#x3C;authorization>'}};fetch('https://api.novita.ai/gpu-instance/openapi/v1/jobs', 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/gpu-instance/openapi/v1/jobs", 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>" ],]);$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/gpu-instance/openapi/v1/jobs"	req, _ := http.NewRequest("GET", url, nil)	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/gpu-instance/openapi/v1/jobs") .header("Authorization", "&#x3C;authorization>") .asString();
```

```
require 'uri'require 'net/http'url = URI("https://api.novita.ai/gpu-instance/openapi/v1/jobs")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Get.new(url)request["Authorization"] = '&#x3C;authorization>'response = http.request(request)puts response.read_body
```

200

```
{
"jobs": [
{
"Id": "&#x3C;string>",
"user": "&#x3C;string>",
"type": "&#x3C;string>",
"envs": [
{
"key": "&#x3C;string>",
"value": "&#x3C;string>"
}
],
"state": {
"state": "&#x3C;string>",
"error": "&#x3C;string>",
"errorMessage": "&#x3C;string>"
},
"logAddress": "&#x3C;string>",
"createdAt": "&#x3C;string>",
"instanceId": "&#x3C;string>"
}
]
}
```

##

[​](#api-description)

API Description

Retrieve a paginated list of background jobs for GPU instances. You can filter by job ID, state, type, time range, and creators.

##

[​](#request-headers)

Request Headers

[​](#param-authorization)

Authorization

string

required

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

##

[​](#query-parameters)

Query Parameters

[​](#param-page-size)

pageSize

integer

Maximum number of items returned per page. Integer, value >= 0.

[​](#param-page-num)

pageNum

integer

Page number to retrieve. Integer, value >= 0.

[​](#param-job-id)

jobId

string

Filter by job ID. String, length 0–255.

[​](#param-state)

state

string

Filter by job state. One of: `pulling` (preparing), `running`, `fail`, `success`, `break`.

[​](#param-type)

type

string

Filter by job type. One of: `saveImage`, `instanceMigrate`, `autoInstanceMigrate`.

[​](#param-start-time)

startTime

integer

Start of time range (Unix timestamp in seconds). Integer, value >= 0. Default: 0.

[​](#param-end-time)

endTime

integer

End of time range (Unix timestamp in seconds). Integer, value >= 0. Default: 0.

[​](#param-creators)

creators

string

Filter by creator user ID.

##

[​](#curl-example)

cURL Example

```
curl --location --request GET 'https://api.novita.ai/gpu-instance/openapi/v1/jobs?pageSize=5&pageNum=1&jobId=&type=&state=&startTime=&endTime=&creators=' \
--header 'Authorization: Bearer {{API_KEY}}'
```

##

[​](#response)

Response

[​](#param-jobs)

jobs

object[]

required

Job list.

Hide properties

[​](#param-id)

Id

string

required

Job ID.

[​](#param-user)

user

string

required

The user ID who initiated the job.

[​](#param-type-1)

type

string

required

Job type. One of: `saveImage`, `instanceMigrate`, `autoInstanceMigrate`.

[​](#param-envs)

envs

object[]

Environment variables for the job.

Show properties

[​](#param-key)

key

string

Environment variable name.

[​](#param-value)

value

string

Environment variable value.

[​](#param-state-1)

state

object

required

Current job state information.

Show properties

[​](#param-state-2)

state

string

required

Current job state. One of: `pulling`, `running`, `fail`, `success`, `break`.

[​](#param-error)

error

string

Error code, if any.

[​](#param-error-message)

errorMessage

string

Error message, if any.

[​](#param-log-address)

logAddress

string

Log URL for viewing job execution logs.

[​](#param-created-at)

createdAt

string

required

Job creation time (Unix timestamp in seconds).

[​](#param-instance-id)

instanceId

string

required

Associated instance ID when the job was executed.

Last modified on October 15, 2025
