GET
/
gpu-instance
/
openapi
/
v1
/
gpu
/
instance

Request Headers

Content-Type
string
required

Enum: application/json

Authorization
string
required

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

Query Parameters

instanceId
string

ID of the instance being queried.

Response

id
string

Instance ID.

name
string

Instance name.

clusterId
string

Cluster ID.

clusterName
string

Cluster name.

status
string

Instance status.

sshCommand
string

SSH command for remote login.

sshPassword
string

SSH password for remote login.

imageUrl
string

Docker image URL used to initialize the instance.

imageAuthId
string

Image authentication ID.

command
string

Command to be executed on instance startup.

cpuNum
string

Number of CPUs allocated to the instance.

memory
string

Amount of memory allocated to the instance.

gpuNum
string

Number of GPUs allocated to the instance.

createdAt
string

Timestamp when the instance was created.

lastStartedAt
string

Timestamp when the instance was last started.

lastStoppedAt
string

Timestamp when the instance was last stopped.

useTime
string

Total time the instance has been in use.

portMappings
object[]
billingMode
string

Billing mode for the instance.

productId
string

Product ID associated with the instance.

productName
string

Product name associated with the instance.

rootfsSize
integer

Size of the root filesystem in GB.

volumeMounts
object[]
tools
string[]

List of tools installed on the instance.

statusError
object
envs
object[]
diskSize
integer

Size of the disk allocated to the instance.

instancePrice
string

Price of the instance.

localStoragePrice
string

Price for local storage.

exitedLocalStoragePrice
string

Price for exited local storage.

connectComponentSSH
object
connectComponentWebTerminal
object
connectComponentJupyter
object
connectComponentLog
object

Example

Request

curl --request GET \
  --url 'https://api.novita.ai/gpu-instance/openapi/v1/gpu/instance' \
  --header 'Authorization: Bearer {{API Key}}'

Response

{
  "id": "12948885700ef8e3",
  "name": "",
  "clusterId": "China",
  "clusterName": "",
  "status": "running",
  "sshCommand": "",
  "sshPassword": "",
  "imageUrl": "nginx:latest",
  "imageAuthId": "",
  "command": "",
  "cpuNum": "8",
  "memory": "63",
  "gpuNum": "1",
  "createdAt": "1713230117",
  "lastStartedAt": "1713258924",
  "lastStoppedAt": "0",
  "useTime": "30286",
  "portMappings": [
    {
      "port": 6000,
      "endpoint": "http://12948885700ef8e3-6000-proxy.gpu-instance.novita.ai.com:54080",
      "type": "http"
    },
    {
      "port": 60001,
      "endpoint": "http://12948885700ef8e3-60001-proxy.gpu-instance.novita.ai.com:54080",
      "type": "http"
    },
    {
      "port": 8080,
      "endpoint": "54.193.255.99:42741",
      "type": "tcp"
    },
    {
      "port": 8090,
      "endpoint": "54.193.255.99:34121",
      "type": "tcp"
    }
  ],
  "billingMode": "instance_afterusage",
  "productId": "26",
  "productName": "RTX 4090 24GB",
  "rootfsSize": 10,
  "volumeMounts": [
    {
      "type": "local",
      "size": 20,
      "Id": "054358de-a6a4-40fa-8b9d-f7eb461b7da8",
      "mountPath": "/workspace"
    }
  ],
  "tools": [],
  "statusError": {
    "state": "",
    "message": ""
  },
  "envs": [
    {
      "key": "testkey",
      "value": "123"
    }
  ],
  "diskSize": 0,
  "instancePrice": "269100",
  "localStoragePrice": "100",
  "exitedLocalStoragePrice": "100",
  "connectComponentSSH": null,
  "connectComponentWebTerminal": {
    "port": 0,
    "address": "54.193.255.99:41219",
    "isRunning": false,
    "isShow": true
  },
  "connectComponentJupyter": null,
  "connectComponentLog": {
    "port": 0,
    "address": "http://12948885700ef8e3-2224-proxy.gpu-instance.novita.ai.com:54080/pod",
    "isRunning": false,
    "isShow": true
  }
}