GPU Node Deployments

Create, inspect, start, stop, and delete GPU Node deployments through API v1.

GPU Node deployment endpoints use a stable deployment ID for details, lifecycle operations, events, and logs.

Create a GPU Node

🚧

This request provisions billable capacity. Confirm the resource, region, container image, and current hourly price before continuing.

First select a resource from GPU Resources and a template from the GPU Node template endpoint.

The example uses jq to build the JSON request without altering the SSH public key. Install jq before running it.

export TEC_RESOURCE_ID="community_node-1"
export TEC_TEMPLATE_ID="dplt_..."
export TEC_CONTAINER_IMAGE="example/gpu:latest"
export TEC_SSH_PUBLIC_KEY="$(cat ~/.ssh/id_ed25519.pub)"

curl -sS \
  -X POST \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${TEC_API_KEY}" \
  --data-binary "$(jq -n \
    --arg name "apinode01" \
    --arg template "${TEC_TEMPLATE_ID}" \
    --arg resource "${TEC_RESOURCE_ID}" \
    --arg image "${TEC_CONTAINER_IMAGE}" \
    --arg ssh_key "${TEC_SSH_PUBLIC_KEY}" \
    '{
      name: $name,
      deployment_template_id: $template,
      resource_id: $resource,
      container_image: $image,
      ssh_public_key: $ssh_key,
      ssh_port: 22,
      max_price_per_hour_usd: 0.25
    }')" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/gpu-deployments"

A successful request returns 201 Created.

max_price_per_hour_usd is required for community resources. The request returns 409 Conflict if the current price is above the supplied ceiling.

Optional fields include name, display_name, region, http_port, and ssh_port. Names must contain 1-20 alphanumeric characters. Use a supported, single-line OpenSSH public key.

List and inspect GPU Nodes

curl -sS \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/gpu-deployments"

export TEC_DEPLOYMENT_ID="dpl_..."

curl -sS \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/gpu-deployments/${TEC_DEPLOYMENT_ID}"

Deployment responses include the information needed to manage a GPU Node, but do not return secrets such as SSH keys, environment variables, registry credentials, or passwords.

Stop and start

Stopping releases compute capacity but retains restartable configuration. Starting provisions billable capacity again.

curl -sS -X POST \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/gpu-deployments/${TEC_DEPLOYMENT_ID}/stop"

curl -sS -X POST \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/gpu-deployments/${TEC_DEPLOYMENT_ID}/start"

Starting an already running deployment or stopping an already stopped deployment returns 409 Conflict.

Events and logs

curl -sS \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/gpu-deployments/${TEC_DEPLOYMENT_ID}/events"

curl -sS \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/gpu-deployments/${TEC_DEPLOYMENT_ID}/logs"

Events and logs are available only while a GPU Node is running. Requests for a stopped GPU Node return 409 Conflict.

Delete

Deletion permanently removes the deployment configuration, whether the GPU Node is running or stopped.

curl -sS -X DELETE \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/gpu-deployments/${TEC_DEPLOYMENT_ID}"

Common responses

ConditionHTTP status
Invalid request field400 Bad Request
Insufficient balance402 Payment Required
Deployment not found in the project404 Not Found
Invalid lifecycle state or community price above the request ceiling409 Conflict

Did this page help you?