GLOWS SDK v1 exposes instance lifecycle, image submission, resource spec, network, and snapshot APIs under /sdk/v1.
Authentication uses an SDK token in the Authorization: Bearer <token> header. The server also accepts
an Authorization query parameter and copies it into the header before JWT validation.
Application errors are returned as JSON bodies with code and msg. Most application errors use HTTP
status 200; rate limiting can return HTTP 429 with a plain text body.
This contract describes the public SDK HTTP API surface.
Query an instance by request_id or meta_key.
request_id is the instanceID returned by create/list/query responses. The server accepts both
resource IDs such as ins-... and the legacy hash ID fallback. meta_key is the globally unique
custom key supplied as custom_meta_key during creation.
| request_id | string <= 64 characters Example: request_id=ins-boyqp4g8 Instance resource ID returned as |
| meta_key | string <= 64 characters Example: meta_key=order.123456 User-supplied globally unique |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object (VisibleInstance) |
{- "code": 0,
- "msg": "",
- "instance": {
- "instanceID": "ins-boyqp4g8",
- "category": "container",
- "status": "Running",
- "priceCent": 65,
- "hardware": {
- "gpuName": "NVIDIA GeForce RTX 4090",
- "cpuName": "Intel(R) Xeon(R) Platinum 8352V CPU @ 2.10GHz",
- "gpuNum": 1,
- "gpuRamMB": 24564,
- "cpuCoresNum": 10,
- "ramMB": 43008,
- "diskGB": 100
}, - "baseImage": {
- "imageID": "img-87p9kq26",
- "imageName": "Ubuntu20.04 CUDA12.2 Python3.9"
}, - "baseSnap": null,
- "sshCred": {
- "user": "root",
- "password": "example-password"
}, - "accesses": [
- {
- "protocol": "ssh",
- "listenPort": 22,
- "url": "ssh://access.example.com:15692"
},
], - "domain": 0,
- "createTime": {
- "seconds": 1726810944
}, - "cmd": "",
- "envs": "foo=bar",
- "remark": "this is from sdk",
- "metaKey": "order.123456",
- "sourceType": "SourceSDK",
- "netEndpointInfos": [
- {
- "netID": "net-od7pv75w",
- "cidr": "203.0.113.2/24",
- "mac": "02:00:01:00:00:02",
- "status": "Connected"
}
], - "regionName": "Region-01"
}
}Create a container or VM instance from an image or snapshot.
| from_image_id required | string <= 64 characters Base image resource ID. |
| gpu_name required | string <= 128 characters GPU model name. |
| custom_meta_key required | string <= 64 characters Globally unique custom key used for idempotent business lookup. |
| instance_category required | string (InstanceCategory) Default: "container" Enum: "container" "vm" |
| region_name required | string <= 128 characters Required region display/name value that maps to a platform domain. |
| remark | string <= 32 characters Human-readable remark. |
| cmd | string <= 512 characters Instance entry command. |
| envs | string <= 512 characters Environment variable string, for example |
| ports | string JSON string of |
| unit_qty | integer <int64> >= 0 Default: 1 Number of GPU/CPU resource units to request. |
object (CreateInstanceBaseResource) Base resource description converted directly into the base resource descriptor. | |
object (CreateInstanceExtraResource) Extra resource description. Extra resources do not have resource IDs or GPU fields. | |
| net_ids | Array of strings <= 1 items [ items <= 64 characters ] Private network IDs returned by |
| network_type | integer <int32> (NetworkType) Enum: 0 1 2 3 4 5 6 7 Numeric network type. In SDK network APIs, omitted or |
| public_ip_id | string <= 64 characters Public/NAT network resource ID. When present and valid, server forces |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object (VisibleInstance) |
{- "from_image_id": "img-87p9kq26",
- "custom_meta_key": "order.123456",
- "remark": "this is from sdk",
- "envs": "foo=bar",
- "gpu_name": "NVIDIA GeForce RTX 4090",
- "unit_qty": 2,
- "instance_category": "container",
- "region_name": "Region-01",
- "ports": "[{\"port\":7890,\"protocol\":2}]"
}{- "code": 0,
- "msg": "",
- "instance": {
- "instanceID": "ins-boyqp4g8",
- "category": "container",
- "status": "SchedQueued",
- "priceCent": 0,
- "hardware": {
- "gpuName": "NVIDIA GeForce RTX 4090",
- "cpuName": "",
- "gpuNum": 2,
- "gpuRamMB": 0,
- "cpuCoresNum": 0,
- "ramMB": 0,
- "diskGB": 0
}, - "baseImage": {
- "imageID": "img-87p9kq26",
- "imageName": "Ubuntu20.04 CUDA12.2 Python3.9"
}, - "baseSnap": null,
- "sshCred": {
- "user": "root",
- "password": "example-password"
}, - "accesses": [
- {
- "protocol": "ssh",
- "listenPort": 22,
- "url": ""
}, - {
- "protocol": "http",
- "listenPort": 7890,
- "url": ""
}
], - "domain": 0,
- "createTime": {
- "seconds": 1726810944
}, - "cmd": "",
- "envs": "foo=bar",
- "remark": "this is from sdk",
- "metaKey": "order.123456",
- "sourceType": "SourceSDK",
- "netEndpointInfos": null,
- "regionName": "Region-01"
}
}Cancel an instance by request_id or meta_key.
The server cancels only instances owned by the authenticated SDK user and created with SDK source
semantics. Invalid IDs, non-owned instances, and missing query parameters return ParamIllegal.
| request_id | string <= 64 characters Example: request_id=ins-boyqp4g8 Instance resource ID returned as |
| meta_key | string <= 64 characters Example: meta_key=order.123456 User-supplied globally unique |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
{- "code": 0,
- "msg": ""
}Return a sparse status-to-count map for the authenticated SDK user.
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object Sparse map from status name to instance count. |
{- "code": 0,
- "msg": "",
- "stats": {
- "Running": 1,
- "SchedQueued": 2
}
}List instances for the authenticated SDK user.
page and per_page are required by the server binding. per_page must be no greater than 20.
Passing an empty statuses list returns all statuses. Unknown status names are currently ignored
by the server.
| page required | integer <uint32> >= 1 Example: page=1 1-based page number. |
| per_page required | integer <uint32> [ 1 .. 20 ] Example: per_page=10 Page size. The current server rejects values greater than 20. |
| ascending | boolean Default: false Sort by creation time ascending when true; descending when false. |
| statuses | Array of strings (NodeStatusName) Items Enum: "InvalidNodeStatus" "Pending" "Running" "Exited" "Finished" "Rebooted" "Canceling" "Unavail" "Pausing" "Paused" "Resuming" "Snapshotted" "ExitSnapshotted" "Migrating" "Checkpointed" "SchedInit" "SchedQueued" "PriceChanged" Repeatable status filter, for example |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object (Pagination) | |
Array of objects (VisibleInstance) |
{- "code": 0,
- "msg": "",
- "pagination": {
- "total": 1,
- "numPages": 1,
- "page": 1,
- "perPage": 10
}, - "instances": [
- {
- "instanceID": "ins-boyqp4g8",
- "category": "container",
- "status": "Running",
- "priceCent": 65,
- "hardware": {
- "gpuName": "NVIDIA GeForce RTX 4090",
- "cpuName": "Intel(R) Xeon(R) Platinum 8352V CPU @ 2.10GHz",
- "gpuNum": 1,
- "gpuRamMB": 24564,
- "cpuCoresNum": 10,
- "ramMB": 43008,
- "diskGB": 100
}, - "baseImage": {
- "imageID": "img-87p9kq26",
- "imageName": "Ubuntu20.04 CUDA12.2 Python3.9"
}, - "baseSnap": null,
- "sshCred": {
- "user": "root",
- "password": "example-password"
}, - "accesses": [ ],
- "domain": 0,
- "createTime": {
- "seconds": 1726810944
}, - "cmd": "",
- "envs": "foo=bar",
- "remark": "this is from sdk",
- "metaKey": "order.123456",
- "sourceType": "SourceSDK",
- "netEndpointInfos": [ ],
- "regionName": "Region-01"
}
]
}Submit a single container registry image link for the authenticated SDK user.
The SDK surface only accepts image_link. The server creates a private user-owned image with
registry URL provider semantics and returns the encoded image resource ID.
| image_link required | string <= 512 characters Single registry image link. Whitespace is rejected. |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
| image_id | string Encoded image resource ID, for example |
| name | string Server-generated image name. |
{- "image_link": "registry.example.com/team/runtime:cuda12.2"
}{- "code": 0,
- "msg": "",
- "image_id": "img-87p9kq26",
- "name": "sdk-10001-1726810944000000000-runtime"
}Delete a private image owned by the authenticated SDK user.
The server accepts an encoded image resource ID such as img-..., verifies ownership, resolves the
backing image store, and then calls the image manager delete flow. Public images and images owned by
another user are rejected.
| image_id required | string <= 64 characters Encoded image resource ID, for example |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
{- "image_id": "img-87p9kq26"
}{- "code": 0,
- "msg": ""
}| page | integer <uint32> >= 0 Default: 1 Example: page=1 1-based page number. Omit or pass |
| per_page | integer <uint32> [ 0 .. 20 ] Default: 20 Example: per_page=10 Page size. Omit or pass |
| owned | boolean Default: false When true, only return images owned by the authenticated user. |
| keywords | string <= 100 characters |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object (Pagination) | |
Array of objects (SDKImageInfo) |
{- "code": 0,
- "msg": "",
- "pagination": {
- "total": 1,
- "numPages": 1,
- "page": 1,
- "perPage": 10
}, - "images": [
- {
- "image_id": "img-87p9kq26",
- "name": "sdk-10001-1726810944000000000-runtime",
- "status": 0,
- "create_time": 1726810944
}
]
}| machine_category required | integer <int32> (MachineCategory) Enum: 0 1 2 3 Machine resource category filter. |
| from_image_id required | string <= 64 characters Example: from_image_id=img-87p9kq26 Image resource ID used to list image-compatible specs. |
| page | integer <uint32> >= 0 Default: 1 Example: page=1 1-based page number. Omit or pass |
| per_page | integer <uint32> [ 0 .. 20 ] Default: 20 Example: per_page=10 Page size. Omit or pass |
| region_name | string <= 128 characters Example: region_name=Region-01 Optional region display/name value. When omitted, specs are listed across regions. |
| by_region | boolean Default: false Group response by region. In this mode pagination applies to regions. |
| instance_category | integer <int32> (SpecInstanceCategory) Enum: 0 1 Optional container/VM filter. Omit to avoid filtering by instance category. |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object (Pagination) | |
Array of objects (SpecInfo) Filled when | |
Array of objects (RegionSpecs) Filled when |
{- "code": 0,
- "msg": "",
- "pagination": {
- "total": 1,
- "numPages": 1,
- "page": 1,
- "perPage": 10
}, - "specs": [
- {
- "region_name": "Region-01",
- "machine_category": 0,
- "instance_categories": [
- 0,
- 1
], - "base_resource": {
- "resource_id": "cnR4NDA5MC0xZ3B1",
- "unit_qty": 1,
- "unit_spec": {
- "cpus": 10,
- "gpus": 1,
- "disk_gb": 100,
- "gpu_name": "NVIDIA GeForce RTX 4090",
- "cpu_name": "Intel(R) Xeon(R) Platinum 8352V CPU @ 2.10GHz",
- "ram_mb": 43008
}
}, - "extra_resources": [
- {
- "resource": {
- "cpus": 4
}, - "price": {
- "millicent_per_hour": 20000
}
}
], - "price": {
- "millicent_per_hour": 120000
}, - "avail": true,
- "max_available_units": 8
}
], - "regions": [ ]
}Create mesh networks, list mesh or owned NAT4 public-IP networks, and attach instances to mesh networks.
Create a user mesh network. network_type is an integer SDK-facing enum; omit it or pass 0 for
mesh creation. NAT4 creation is not exposed through the SDK HTTP API.
| name required | string <= 32 characters |
| region_name required | string <= 128 characters |
| network_type | integer <int32> (NetworkType) Enum: 0 1 2 3 4 5 6 7 Numeric network type. In SDK network APIs, omitted or |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
| network_id | string Encoded network resource ID, for example |
{- "network_type": 0,
- "name": "train-mesh",
- "region_name": "Region-01"
}{- "code": 0,
- "msg": "",
- "network_id": "net-od7pv75w"
}List user-owned networks. Omit network_type or pass 0 to list mesh networks. Pass 6
(NAT4) to list the user's purchased public IP networks.
This endpoint returns owned NAT4/public-IP networks, not the available EIP purchase pool.
| page | integer <uint32> >= 0 Default: 1 Example: page=1 1-based page number. Omit or pass |
| per_page | integer <uint32> [ 0 .. 20 ] Default: 20 Example: per_page=10 Page size. Omit or pass |
| network_type | integer <int32> (NetworkType) Enum: 0 1 2 3 4 5 6 7 Omit or pass 0 for mesh/UserVXLAN; pass 6 for NAT4 public IP networks. |
| domain | integer <int32> (Domain) Default: 0 Domain numeric value. Omit or pass 0 for the default domain. |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object (Pagination) | |
Array of objects (VisibleNetwork) |
{- "code": 0,
- "msg": "",
- "pagination": {
- "total": 1,
- "numPages": 1,
- "page": 1,
- "perPage": 5
}, - "networks": [
- {
- "netID": "net-od7pv75w",
- "name": "DefaultNet_DM0",
- "createTime": {
- "seconds": 1728287027
}, - "create_time": 1728287027,
- "clusterType": "Overlay",
- "domain": 0
}
]
}Attach one or more existing user-owned instances to a user-owned mesh network. Duplicate
instance_ids are ignored before quota checking. The current request accepts up to 10 instance IDs.
| network_id required | string <= 64 characters |
| instance_ids required | Array of strings [ 1 .. 10 ] items [ items <= 64 characters ] |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
| network_id | string |
| endpoint_ids | Array of strings |
{- "network_id": "net-od7pv75w",
- "instance_ids": [
- "ins-boyqp4g8",
- "ins-qgv8a2zk"
]
}{- "code": 0,
- "msg": "",
- "network_id": "net-od7pv75w",
- "endpoint_ids": [
- "ept-9avm2m3p"
]
}| network_id required | string <= 64 characters Example: network_id=net-od7pv75w |
| page | integer <uint32> >= 0 Default: 1 Example: page=1 1-based page number. Omit or pass |
| per_page | integer <uint32> [ 0 .. 20 ] Default: 20 Example: per_page=10 Page size. Omit or pass |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object (Pagination) | |
Array of objects (SDKNetworkEndpoint) |
{- "code": 0,
- "msg": "",
- "pagination": {
- "total": 1,
- "numPages": 1,
- "page": 1,
- "perPage": 10
}, - "endpoints": [
- {
- "endpoint_id": "ept-9avm2m3p",
- "network_id": "net-od7pv75w",
- "instance_id": "ins-boyqp4g8",
- "status": 2,
- "cidr": "203.0.113.2/24",
- "mac": "02:00:01:00:00:02",
- "create_time": 1728287027
}
]
}Create one or more snapshots of a running SDK-managed instance using server-configured SDK snapshot volumes.
| instance_id required | string <= 64 characters |
| name | string <= 32 characters |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
| snapshot_ids | Array of strings |
| instance_id | string |
| status | string Instance status name after snapshot creation; the current success response uses |
{- "instance_id": "ins-boyqp4g8",
- "name": "checkpoint-001"
}{- "code": 0,
- "msg": "",
- "snapshot_ids": [
- "snap-5mrq9a2w"
], - "instance_id": "ins-boyqp4g8",
- "status": "Pausing"
}| page | integer <uint32> >= 0 Default: 1 Example: page=1 1-based page number. Omit or pass |
| per_page | integer <uint32> [ 0 .. 20 ] Default: 20 Example: per_page=10 Page size. Omit or pass |
| status | Array of integers <int32> (SnapshotStatus) [ items <int32 > ] Items Enum: 0 1 2 3 4 5 6 7 Repeatable numeric snapshot status filter. Omit to use server default snapshot listing semantics. |
| code | integer <int32> (ErrCode) Enum: 0 1 6 7 10 17 20 88 89 114 133 164 174 192 198 199 206 208 215 SDK-relevant application error code. |
| msg | string |
object (Pagination) | |
Array of objects (SDKSnapshotInfo) |
{- "code": 0,
- "msg": "",
- "pagination": {
- "total": 1,
- "numPages": 1,
- "page": 1,
- "perPage": 10
}, - "snapshots": [
- {
- "snapshot_id": "snap-5mrq9a2w",
- "instance_id": "ins-boyqp4g8",
- "status": 3,
- "type": 1,
- "domain": 0,
- "create_time": 1728287027,
- "modify_time": 1728287080,
- "size_bytes": 1073741824,
- "vol_size_bytes": 10737418240
}
]
}Error codes used by the public SDK API:
| code | name | meaning |
|---|---|---|
| 0 | Success | Request succeeded. |
| 1 | InternalError | Server internal error. |
| 6 | ParamIllegal | Invalid parameter, missing required field, invalid resource ID, or ownership mismatch. |
| 7 | PermissionDenied | Permission denied. |
| 10 | MetaKeyExist | custom_meta_key already exists. |
| 17 | DiskQuotaExceeded | Disk quota exceeded. |
| 20 | IllegalStatus | Instance is not in a legal state for the requested operation. |
| 88 | OutOfNetCountLimit | Network count quota exceeded. |
| 89 | EndpointExist | Endpoint already exists. |
| 114 | TakingSnapNotAllowed | Taking snapshot is not allowed. |
| 133 | NetNameRepeat | Network name already exists. |
| 164 | OutOfNetEndpointCountLimit | Private network endpoint quota exceeded. |
| 174 | ImageAlreadyExists | Image already exists. |
| 192 | ImagePendingLimitExceeded | Image pending limit exceeded. |
| 198 | UserNodeQtyExceedQuota | User instance quota exceeded. |
| 199 | UserSnapQtyExceedQuota | User snapshot quota exceeded. |
| 206 | InvalidDomainInfo | region_name cannot be mapped to a valid domain. |
| 208 | RegionAccessDenied | The authenticated user has no access to the requested region. |
| 215 | NoResourceAvailable | No required resource is available. |