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>'
{
  "id": "<string>",
  "name": "<string>",
  "clusterId": "<string>",
  "clusterName": "<string>",
  "imageUrl": "<string>",
  "imageAuthId": "<string>",
  "command": "<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

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

Query Parameters

instanceId
string
required
ID of the instance being queried.

Response

id
string
required
Instance ID.
name
string
required
Instance name.
clusterId
string
required
Cluster ID.
clusterName
string
required
Name of the cluster.
imageUrl
string
required
Container image URL.
imageAuthId
string
required
Image registry authentication information.
command
string
required
Container startup command.
cpuNum
string
required
Number of CPU cores allocated to the instance.
memory
string
required
Memory size allocated to the instance, in GB.
gpuNum
string
required
Number of GPU cards allocated to the instance.
status
string
required
Instance status. 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
statusError
object
Error information when instance creation fails or the instance is unavailable.
network
object
VPC network information for the instance.
portMappings
object[]
required
Instance port mapping information.
volumeMounts
object[]
Storage configuration for the instance.
node
object[]
Node information.
jobs
object[]
Tasks currently running on the instance.
envs
object[]
Instance environment variable information.
connectComponentSSH
object
Instance SSH connection information.
connectComponentWebTerminal
object
Instance WebSSH connection information.
connectComponentJupyter
object
Jupyter connection information for the instance (if available).
connectComponentLog
object
Instance log connection information (HTTP Stream).
kind
string
Instance type.
billingMode
string
required
Billing mode for the instance. Values:
  • onDemand: Pay-as-you-go billing.
  • monthly: Subscription (monthly or yearly) billing.
  • spot: Spot instance billing.
endTime
string
Expiration time for subscription instances. For pay-as-you-go instances, returns -1.
freeStorageSize
integer
Free system disk size (GB).
keepDataDay
integer
Number of days data is retained after the instance is shut down.