curl --request GET \
--url https://api.novita.ai/gpus/v2/instances/{instance_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.novita.ai/gpus/v2/instances/{instance_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.novita.ai/gpus/v2/instances/{instance_id}', 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/gpus/v2/instances/{instance_id}",
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>"
],
]);
$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/gpus/v2/instances/{instance_id}"
req, _ := http.NewRequest("GET", url, nil)
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/gpus/v2/instances/{instance_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpus/v2/instances/{instance_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "ca338f12f3",
"name": "example-instance",
"type": "gpu",
"product_id": "product-id",
"image": "registry.example.com/namespace/image:tag",
"registry_auth_id": "registry-auth-id",
"entrypoint": "",
"command": "",
"billing": {
"mode": "prepaid",
"prepaid": {
"months": 1,
"end_time": 1714464000,
"auto_renew": {
"enabled": true,
"months": 1,
"status": "active"
}
}
},
"envs": [
{
"key": "ENV_NAME",
"value": "ENV_VALUE"
}
],
"ports": [
{
"port": 8080,
"protocol": "tcp",
"endpoint": "http://1.2.3.4:8080"
}
],
"resource_specs": {
"rootfs_size_gb": 20,
"gpu_num": 1,
"cpu_num": 8,
"memory_gb": 32,
"gpu_ids": [
0
]
},
"network": {
"id": "vpc-550e8400-e29b-41d4-a716-446655440000",
"ip": "10.2.1.1"
},
"volumes": [
{
"type": "network",
"id": "network-storage-id",
"mount_point": "/data"
}
],
"region": "region-id",
"tools": {
"jupyter": {
"endpoint": "https://jupyter.example.com/instance/ca338f12f3",
"enabled": true,
"port": 8888
},
"ssh": {
"command": "ssh -p 51039 root@proxy.cn-south-nas-1.gpu-instance.novita.ai",
"password": "xxx",
"username": "xxx"
},
"web_terminal": {
"endpoint": "wss://terminal.example.com/instance/ca338f12f3",
"enabled": true,
"username": "root",
"password": "xxx"
},
"log": {
"instance_endpoint": "https://log.example.com/system/ca338f12f3",
"system_endpoint": "https://log.example.com/instance/ca338f12f3"
}
},
"auto_migrate": {
"enabled": false,
"include_system_disk": false
},
"status": {
"status": "running",
"error": "",
"message": ""
},
"pricing": {
"instance_price": 100,
"instance_base_price": 120,
"rootfs_storage_price": 10,
"prepaid": {
"monthly_price": [
{
"price": 1000,
"base_price": 1200,
"month": 1,
"price_precision": 2,
"month_spec_id": "spec-1m"
}
]
},
"spot": {
"spot_status": "<string>",
"spot_reclaim_time": 123
}
},
"created_at": 1714464000,
"last_started_at": 1714467600,
"last_stopped_at": 0,
"member_id": "member-id",
"owner_id": "550e8400-e29b-41d4-a716-446655440000",
"region_version": "v1.0"
}Get Instance
curl --request GET \
--url https://api.novita.ai/gpus/v2/instances/{instance_id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.novita.ai/gpus/v2/instances/{instance_id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.novita.ai/gpus/v2/instances/{instance_id}', 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/gpus/v2/instances/{instance_id}",
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>"
],
]);
$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/gpus/v2/instances/{instance_id}"
req, _ := http.NewRequest("GET", url, nil)
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/gpus/v2/instances/{instance_id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/gpus/v2/instances/{instance_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "ca338f12f3",
"name": "example-instance",
"type": "gpu",
"product_id": "product-id",
"image": "registry.example.com/namespace/image:tag",
"registry_auth_id": "registry-auth-id",
"entrypoint": "",
"command": "",
"billing": {
"mode": "prepaid",
"prepaid": {
"months": 1,
"end_time": 1714464000,
"auto_renew": {
"enabled": true,
"months": 1,
"status": "active"
}
}
},
"envs": [
{
"key": "ENV_NAME",
"value": "ENV_VALUE"
}
],
"ports": [
{
"port": 8080,
"protocol": "tcp",
"endpoint": "http://1.2.3.4:8080"
}
],
"resource_specs": {
"rootfs_size_gb": 20,
"gpu_num": 1,
"cpu_num": 8,
"memory_gb": 32,
"gpu_ids": [
0
]
},
"network": {
"id": "vpc-550e8400-e29b-41d4-a716-446655440000",
"ip": "10.2.1.1"
},
"volumes": [
{
"type": "network",
"id": "network-storage-id",
"mount_point": "/data"
}
],
"region": "region-id",
"tools": {
"jupyter": {
"endpoint": "https://jupyter.example.com/instance/ca338f12f3",
"enabled": true,
"port": 8888
},
"ssh": {
"command": "ssh -p 51039 root@proxy.cn-south-nas-1.gpu-instance.novita.ai",
"password": "xxx",
"username": "xxx"
},
"web_terminal": {
"endpoint": "wss://terminal.example.com/instance/ca338f12f3",
"enabled": true,
"username": "root",
"password": "xxx"
},
"log": {
"instance_endpoint": "https://log.example.com/system/ca338f12f3",
"system_endpoint": "https://log.example.com/instance/ca338f12f3"
}
},
"auto_migrate": {
"enabled": false,
"include_system_disk": false
},
"status": {
"status": "running",
"error": "",
"message": ""
},
"pricing": {
"instance_price": 100,
"instance_base_price": 120,
"rootfs_storage_price": 10,
"prepaid": {
"monthly_price": [
{
"price": 1000,
"base_price": 1200,
"month": 1,
"price_precision": 2,
"month_spec_id": "spec-1m"
}
]
},
"spot": {
"spot_status": "<string>",
"spot_reclaim_time": 123
}
},
"created_at": 1714464000,
"last_started_at": 1714467600,
"last_stopped_at": 0,
"member_id": "member-id",
"owner_id": "550e8400-e29b-41d4-a716-446655440000",
"region_version": "v1.0"
}ヘッダー
Bearer authentication format, e.g.: Bearer {{API_KEY}}.
パスパラメータ
Instance ID. String, length: 1-255 characters.
レスポンス
OK
Instance ID
"ca338f12f3"
Instance name
"example-instance"
Instance type. Allowed values: gpu, cpu
gpu, cpu "gpu"
Product ID
"product-id"
Image address
"registry.example.com/namespace/image:tag"
Registry authentication ID
"registry-auth-id"
Container entrypoint
""
Container startup command
""
Billing configuration
Show child attributes
Show child attributes
Environment variable list
Show child attributes
Show child attributes
Exposed port list
Show child attributes
Show child attributes
Resource specification (with system-allocated info)
Show child attributes
Show child attributes
VPC network configuration
Show child attributes
Show child attributes
Data disk / network storage mounts
Show child attributes
Show child attributes
Region of the instance
"region-id"
Instance tool information
Show child attributes
Show child attributes
Auto-migrate configuration
Show child attributes
Show child attributes
Instance status information
Show child attributes
Show child attributes
Pricing information
Show child attributes
Show child attributes
Creation time. Unix timestamp
1714464000
Last start time. Unix timestamp
1714467600
Last stop time. Unix timestamp
0
Creator member ID
"member-id"
Owner user ID (team owner UUID)
"550e8400-e29b-41d4-a716-446655440000"
Instance version
"v1.0"