logo
GPU ComputeManaging Instances

Managing Instances

Create, monitor, and control your GPU instances — start, stop, delete, view logs, check SLA, and manage SSH keys.

Overview

All GPU deployment modes (Marketplace, Dex-Cloud, Burst) create instances. Once created, manage them through a unified interface.

List Instances

from gpuniq import GPUniq
client = GPUniq(api_key="gpuniq_your_key")

# Active instances
instances = client.instances.list(page=1, page_size=20)
for inst in instances["instances"]:
    print(f"Task {inst['task_id']}: {inst['status']}{inst['gpu_model']}")

# Archived (deleted) instances
archived = client.instances.list_archived()

Instance Details

Get full information about a specific instance:

details = client.instances.get(task_id=456)

Returns SSH connection details, hardware specs, billing info, and status.

Instance Lifecycle

Start

Resume a stopped instance:

client.instances.start(task_id=456)

Stop

Pause billing while preserving instance state:

client.instances.stop(task_id=456)

Delete

Permanently terminate the rental:

client.instances.delete(task_id=456)

Deleting an instance is irreversible. All data on the instance will be lost. Use Volumes for persistent data.

Rename

client.instances.rename(task_id=456, name="bert-finetuning-v2")

Connecting via SSH

After creating an instance, SSH credentials are available in the dashboard:

ssh root@<host> -p <port>
# Password shown in dashboard

SSH Key Authentication

For passwordless access, add SSH keys before creating the instance:

# Add key in settings
key = client.settings.create_ssh_key(
    key_name="my-laptop",
    public_key="ssh-ed25519 AAAA... user@laptop",
)

# Pass when creating the order
order = client.marketplace.create_order(
    agent_id=123,
    pricing_type="hour",
    ssh_key_ids=[key["id"]],
)

Manage Instance SSH Keys

# List keys attached to instance
keys = client.instances.ssh_keys(task_id=456)

# Attach / detach
client.instances.attach_ssh_key(task_id=456, ssh_key_id=1)
client.instances.detach_ssh_key(task_id=456, key_id=1)

Container Logs

View Docker container logs for your instance:

logs = client.instances.logs(task_id=456)

SLA Monitoring

Check uptime and availability data:

sla = client.instances.sla(task_id=456)

Returns 24-hour and 7-day uptime segments and percentages.

Pending Jobs

Track deployment jobs that haven't completed yet:

jobs = client.instances.list_pending_jobs()

# Cancel a pending job
client.instances.cancel_pending_job(job_id="abc-123")

Best Practices

  1. Stop instances when not in use — billing pauses immediately
  2. Use longer pricing types for production workloads (20-40% savings)
  3. Attach volumes for persistent data instead of relying on instance storage
  4. Monitor SLA for critical workloads to track uptime
  5. Use verified providers for maximum reliability