Skip to main content
GET
/
gpu-instance
/
openapi
/
v1
/
gpu
/
instances
List Instances
curl --request GET \
  --url https://api.novita.ai/gpu-instance/openapi/v1/gpu/instances \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'
import requests

url = "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instances"

headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}

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

print(response.text)
const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};

fetch('https://api.novita.ai/gpu-instance/openapi/v1/gpu/instances', 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.novita.ai/gpu-instance/openapi/v1/gpu/instances",
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: <authorization>",
"Content-Type: <content-type>"
],
]);

$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://api.novita.ai/gpu-instance/openapi/v1/gpu/instances"

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

req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.novita.ai/gpu-instance/openapi/v1/gpu/instances")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.novita.ai/gpu-instance/openapi/v1/gpu/instances")

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

request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "instances": [
    {
      "id": "<string>",
      "name": "<string>",
      "clusterId": "<string>",
      "clusterName": "<string>",
      "status": "<string>",
      "imageUrl": "<string>",
      "imageAuthId": "<string>",
      "command": "<string>",
      "entrypoint": "<string>",
      "cpuNum": "<string>",
      "memory": "<string>",
      "gpuNum": "<string>",
      "portMappings": [
        {
          "port": 123,
          "type": "<string>"
        }
      ],
      "productId": "<string>",
      "productName": "<string>",
      "rootfsSize": 123,
      "volumeMounts": [
        {
          "type": "<string>",
          "size": "<string>",
          "id": "<string>",
          "mountPath": "<string>"
        }
      ],
      "statusError": {
        "state": "<string>",
        "message": "<string>"
      },
      "envs": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ],
      "kind": "<string>",
      "billingMode": "<string>",
      "endTime": "<string>",
      "spotStatus": "<string>",
      "spotReclaimTime": "<string>"
    }
  ]
}

Request Headers

Content-Type
string
required
Enum: application/json
Authorization
string
required
Bearer authentication format, for example: Bearer {{API Key}}.

Query Parameters

pageSize
integer
required
Maximum number of items returned per page. Integer, value >= 0.
pageNum
integer
required
Page number to retrieve. Integer, value >= 0.
name
string
Instance name (supports fuzzy search). String, length limit: 0-255 characters.
productName
string
Product name (supports fuzzy search). String, length limit: 0-255 characters.
status
string
Instance status. String, length limit: 0-63 characters. Possible values:
  • toCreate: Pending creation
  • creating: Creating
  • pulling: Pulling image
  • running: Running
  • toStart: Pending start
  • starting: Starting
  • toStop: Pending stop
  • stopping: Stopping
  • exited: Stopped
  • toRestart: Pending restart
  • restarting: Restarting
  • toRemove: Pending deletion
  • removing: Deleting
  • removed: Deleted
  • toReset: Pending reset (upgrade)
  • resetting: Resetting
  • migrating: Migrating
  • freezing: Freezing

Response

instances
object[]
required
Instance information.
Last modified on December 24, 2025