Get Instance
curl --request GET \
--url https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance"
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/instance', 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/instance",
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/instance"
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/instance")
.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/instance")
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{
"id": "<string>",
"name": "<string>",
"clusterId": "<string>",
"clusterName": "<string>",
"imageUrl": "<string>",
"imageAuthId": "<string>",
"command": "<string>",
"entrypoint": "<string>",
"cpuNum": "<string>",
"memory": "<string>",
"gpuNum": "<string>",
"status": "<string>",
"statusError": {
"state": "<string>",
"message": "<string>"
},
"network": {
"id": "<string>",
"ip": "<string>"
},
"portMappings": [
{
"port": 123,
"endpoint": "<string>",
"type": "<string>"
}
],
"volumeMounts": [
{
"type": "<string>",
"size": 123,
"id": "<string>",
"mountPath": "<string>"
}
],
"node": [
{
"maxRootfsSize": 123
}
],
"jobs": [
{
"id": "<string>",
"type": "<string>"
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"connectComponentSSH": {
"sshCommand": "<string>",
"password": "<string>",
"isRunning": true
},
"connectComponentWebTerminal": {
"address": "<string>",
"username": "<string>",
"password": "<string>",
"isRunning": true
},
"connectComponentJupyter": {
"port": 123,
"address": "<string>",
"isRunning": true
},
"connectComponentLog": {
"systemLogAddress": "<string>",
"instanceLogAddress": "<string>",
"isRunning": true
},
"kind": "<string>",
"billingMode": "<string>",
"endTime": "<string>",
"freeStorageSize": 123,
"keepDataDay": 123
}Instance
Get Instance
GET
/
gpu-instance
/
openapi
/
v1
/
gpu
/
instance
Get Instance
curl --request GET \
--url https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance"
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/instance', 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/instance",
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/instance"
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/instance")
.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/instance")
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{
"id": "<string>",
"name": "<string>",
"clusterId": "<string>",
"clusterName": "<string>",
"imageUrl": "<string>",
"imageAuthId": "<string>",
"command": "<string>",
"entrypoint": "<string>",
"cpuNum": "<string>",
"memory": "<string>",
"gpuNum": "<string>",
"status": "<string>",
"statusError": {
"state": "<string>",
"message": "<string>"
},
"network": {
"id": "<string>",
"ip": "<string>"
},
"portMappings": [
{
"port": 123,
"endpoint": "<string>",
"type": "<string>"
}
],
"volumeMounts": [
{
"type": "<string>",
"size": 123,
"id": "<string>",
"mountPath": "<string>"
}
],
"node": [
{
"maxRootfsSize": 123
}
],
"jobs": [
{
"id": "<string>",
"type": "<string>"
}
],
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"connectComponentSSH": {
"sshCommand": "<string>",
"password": "<string>",
"isRunning": true
},
"connectComponentWebTerminal": {
"address": "<string>",
"username": "<string>",
"password": "<string>",
"isRunning": true
},
"connectComponentJupyter": {
"port": 123,
"address": "<string>",
"isRunning": true
},
"connectComponentLog": {
"systemLogAddress": "<string>",
"instanceLogAddress": "<string>",
"isRunning": true
},
"kind": "<string>",
"billingMode": "<string>",
"endTime": "<string>",
"freeStorageSize": 123,
"keepDataDay": 123
}Request Headers
string
vereist
Enum:
application/jsonstring
vereist
Bearer authentication format, for example: Bearer {{API Key}}.
Query Parameters
string
vereist
ID of the instance being queried.
Response
string
vereist
Instance ID.
string
vereist
Instance name.
string
vereist
Cluster ID.
string
vereist
Name of the cluster.
string
vereist
Container image URL.
string
vereist
Image registry authentication information.
string
vereist
Container startup command.
string
vereist
Container startup entrypoint.
string
vereist
Number of CPU cores allocated to the instance.
string
vereist
Memory size allocated to the instance, in GB.
string
vereist
Number of GPU cards allocated to the instance.
string
vereist
Instance status. Possible values:
toCreate: Pending creationcreating: Creatingpulling: Pulling imagerunning: RunningtoStart: Pending startstarting: StartingtoStop: Pending stopstopping: Stoppingexited: StoppedtoRestart: Pending restartrestarting: RestartingtoRemove: Pending deletionremoving: Deletingremoved: DeletedtoReset: Pending reset (upgrade)resetting: Resettingmigrating: Migratingfreezing: Freezing
object
object
object[]
vereist
object[]
object[]
object[]
object
object
object
object
string
Instance type.
string
vereist
Billing mode for the instance. Values:
- onDemand: Pay-as-you-go billing.
- monthly: Subscription (monthly or yearly) billing.
- spot: Spot instance billing.
string
Expiration time for subscription instances. For pay-as-you-go instances, returns -1.
integer
Free system disk size (GB).
integer
Number of days data is retained after the instance is shut down.
Laatst gewijzigd op 10 augustus 2026