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()
curl "https://api.gpuniq.com/v1/instances/my?page=1&page_size=20" \
-H "X-API-Key: gpuniq_your_key"
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)
curl -X POST "https://api.gpuniq.com/v1/instances/456/start" \
-H "X-API-Key: gpuniq_your_key"
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
- Stop instances when not in use — billing pauses immediately
- Use longer pricing types for production workloads (20-40% savings)
- Attach volumes for persistent data instead of relying on instance storage
- Monitor SLA for critical workloads to track uptime
- Use verified providers for maximum reliability
Last updated Feb 22, 2026
Built with Documentation.AI