GPU Endpoints
Endpoints are under /v1/resource/gpu and require authentication. GPU features must be enabled on your account.
Base URL: https://api.gpcn.com/v1
See the API Reference → for examples in TypeScript, Python, Go, and C#.
Get GPU Inventory
GET /resource/gpu/inventory
Returns real-time GPU availability by series and data center.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
code |
string | Filter by series code |
datacenterId |
UUID | Filter by data center |
count |
integer | Filter by GPU count (1, 2, 4, 8) |
Response
{
"success": true,
"data": [
{
"seriesId": 3,
"seriesName": "NVIDIA A100",
"seriesCode": "a100",
"availability": [
{
"datacenterId": "dc-uuid",
"datacenterName": "US East 1",
"gpuCounts": {
"1": { "available": true },
"2": { "available": true },
"4": { "available": false },
"8": { "available": false }
}
}
]
}
]
}
Inventory responses are not cached. Each request reflects real-time availability.
curl https://api.gpcn.com/v1/resource/gpu/inventory \
-H "X-API-Key: gpcn_your_api_key_here"
GPU inventory changes in real time. Between checking availability and placing your order, another customer may claim the last available GPU. Always handle 409 Conflict responses gracefully.
List GPU VMs
GET /resource/gpu
Returns a paginated list of GPU virtual machines.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
integer | 1 |
Page number |
limit |
integer | 10 |
Items per page (max 100) |
sort |
string | createdAt:desc |
Sort field and direction |
search |
string | — | Search by name |
filter[teamId] |
integer | — | Filter by resource group |
Response
Paginated array of GPU VM list items with standard pagination meta.
Create GPU VM
POST /resource/gpu
Creates a GPU VM. Returns immediately with job tracking info.
Request Body
{
"name": "ml-training-node",
"datacenterId": "dc-uuid",
"seriesId": 3,
"gpuCount": 4,
"teamId": 5
}
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | VM name |
datacenterId |
UUID | Yes | Target data center |
seriesId |
integer | Yes | GPU series ID |
gpuCount |
integer | Yes | Number of GPUs (1, 2, 4, 8) |
teamId |
integer | No | Assign to a resource group |
imageName |
string | No | Specific image name |
imageId |
integer | No | Specific image ID |
curl -X POST https://api.gpcn.com/v1/resource/gpu \
-H "X-API-Key: gpcn_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "ml-training-01",
"datacenterId": "dc-uuid",
"seriesId": 1,
"gpuCount": 2,
"teamId": 5
}'
Response (202 Accepted)
Job tracking object. Poll for completion.
Error: 409 Conflict
Returned when the requested GPU configuration is no longer available. Check inventory and retry.
Get GPU VM Details
GET /resource/gpu/{id}
Returns detailed GPU VM information including real-time status from the provider.
Response
{
"success": true,
"data": {
"id": "gpu-vm-uuid",
"name": "ml-training-node",
"status": "Running",
"publicIp": "203.0.113.50",
"jupyterLabUrl": "https://203.0.113.50:8888",
"series": { "id": 3, "name": "NVIDIA A100", "code": "a100" },
"gpuCount": 4,
"datacenter": { "id": "dc-uuid", "name": "US East 1" },
"teamId": 5,
"createdAt": "2026-02-21T10:00:00Z"
}
}
Update GPU VM
PUT /resource/gpu/{id}
Update name or resource group assignment.
Request Body
{ "name": "new-name", "teamId": 5 }
Response (200 OK)
Delete GPU VM
DELETE /resource/gpu/{id}
Response (202 Accepted)
Job tracking object.
Start GPU VM
POST /resource/gpu/{id}/start
Response (200 OK)
May return 501 Not Implemented if the provider doesn't support this operation.
Stop GPU VM
POST /resource/gpu/{id}/stop
Response (200 OK)
Reset GPU VM
POST /resource/gpu/{id}/reset
Response (200 OK)
Get SSH Key
GET /resource/gpu/{id}/ssh-key
Download the SSH private key generated during VM creation.
Response
{
"success": true,
"data": {
"privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\n..."
}
}
Bulk Start
POST /resource/gpu/bulk/start
Request Body
{ "ids": ["gpu-uuid-1", "gpu-uuid-2"] }
1–50 IDs. Returns per-ID results with partial failure support.
Bulk Stop
POST /resource/gpu/bulk/stop
Same format as bulk start.
Bulk Reset
POST /resource/gpu/bulk/reset
Same format as bulk start.
Bulk Delete
POST /resource/gpu/bulk/delete
Request Body
{ "ids": ["gpu-uuid-1", "gpu-uuid-2"] }
1–50 IDs. Returns array of job tracking objects.
Workflow: Check Inventory and Create a GPU VM
GPU availability is limited and changes in real time. Here's the recommended pattern — check inventory first, then create:
# 1. Check what's available
curl -s https://api.gpcn.com/v1/resource/gpu/inventory \
-H "X-API-Key: gpcn_your_api_key_here" | jq '.data'
# 2. Create the GPU VM (use series and datacenter from inventory)
RESPONSE=$(curl -s -X POST https://api.gpcn.com/v1/resource/gpu \
-H "X-API-Key: gpcn_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"name": "ml-training-01", "datacenterId": "dc-uuid", "seriesId": 1, "gpuCount": 2}')
# 3. Poll the job (same pattern as standard VMs)
JOB_ID=$(echo $RESPONSE | jq -r '.data.jobId')
# See Async Operations for the full polling pattern
For the full polling pattern, see Async Operations.
Next Steps
- Create a GPU VM in the Portal → — step-by-step portal walkthrough
- Manage GPU VMs → — start, stop, SSH access from the dashboard
- Virtual Machine Endpoints → — standard (non-GPU) virtual machines
- Async Operations — job polling patterns
.png)