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
erforderlich
Enum:
application/jsonstring
erforderlich
Bearer authentication format, for example: Bearer {{API Key}}.
Query Parameters
string
erforderlich
ID of the instance being queried.
Response
string
erforderlich
Instance ID.
string
erforderlich
Instance name.
string
erforderlich
Cluster ID.
string
erforderlich
Name of the cluster.
string
erforderlich
Container image URL.
string
erforderlich
Image registry authentication information.
string
erforderlich
Container startup command.
string
erforderlich
Container startup entrypoint.
string
erforderlich
Number of CPU cores allocated to the instance.
string
erforderlich
Memory size allocated to the instance, in GB.
string
erforderlich
Number of GPU cards allocated to the instance.
string
erforderlich
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[]
erforderlich
object[]
object[]
object[]
object
object
object
object
string
Instance type.
string
erforderlich
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.
Zuletzt geändert am 15. Mai 2026