Anor CLI Documentation
GPU compute with SSH access. Buy time, get a shell.
Installation
pip install anorRequires Python 3.8+.
Authentication
Login with your browser (supports Google OAuth):
anor loginOr use email/password directly:
anor login --no-browser -e your@email.comYou can also use an API key:
anor login --api-key YOUR_API_KEYInstances API
The Instances API lets you create, manage, and terminate GPU instances programmatically. All endpoints require a Bearer token via the Authorization header.
Base URL: https://anorcloud.com/api/v1/instances
List Instances
Returns all running instances for your account.
curl -X GET "https://anorcloud.com/api/v1/instances" \
-H "Authorization: Bearer $ANOR_TOKEN"Create Instance (one-step)
Creates and launches an instance in a single request.
curl -X POST "https://anorcloud.com/api/v1/instances" \
-H "Authorization: Bearer $ANOR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"gpuType": "A100",
"gpuCount": 1,
"durationMinutes": 60,
"region": "us-east-1"
}'Two-Step Flow: Request then Launch
For more control, create a pending request first, then launch it later (e.g., to select a specific node).
Step 1: Request
curl -X POST "https://anorcloud.com/api/v1/instances/request" \
-H "Authorization: Bearer $ANOR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"gpuType": "H100", "durationMinutes": 120}'Step 2: Launch (use id from request response)
curl -X POST "https://anorcloud.com/api/v1/instances/<requestId>/launch" \
-H "Authorization: Bearer $ANOR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"region": "us-east-1"}'Get Instance
curl -X GET "https://anorcloud.com/api/v1/instances/<vmId>" \
-H "Authorization: Bearer $ANOR_TOKEN"Terminate Instance
curl -X DELETE "https://anorcloud.com/api/v1/instances/<vmId>" \
-H "Authorization: Bearer $ANOR_TOKEN"List Requests
List all instance requests (including pending ones).
curl -X GET "https://anorcloud.com/api/v1/instances/requests/list" \
-H "Authorization: Bearer $ANOR_TOKEN"Cancel Request
Cancel a pending request before it is launched.
curl -X DELETE "https://anorcloud.com/api/v1/instances/requests/<requestId>" \
-H "Authorization: Bearer $ANOR_TOKEN"Request Body Parameters
| Field | Type | Description |
|---|---|---|
gpuType | string | GPU type (e.g., A100, H100) |
gpuCount | number | Number of GPUs (default: 1) |
durationMinutes | number | Duration in minutes (required) |
region | string | Region to launch in (optional) |
nodeId | string | Specific node ID (optional, overrides region) |
memory | number | Memory in bytes (optional) |
storage | number | Storage in bytes (optional) |
Buy GPU Compute
Buy GPU time and get SSH access:
anor buy --gpu T4 --duration 3After purchase, you'll be prompted to SSH directly or view connection details.
Options
| Flag | Description |
|---|---|
--gpu, -g | GPU type: T4, A100, H100, etc. (required) |
--duration, -d | Duration in hours (required) |
--quantity, -q | Number of GPUs (default: 1) |
--market | Market order (default) - fills when available |
--limit | Limit order - expires if not filled by deadline |
--expires-at | Expiration for limit orders (YYYY-MM-DDTHH:MM) |
Examples
# Multiple GPUs
anor buy --gpu A100 --duration 24 --quantity 2# Limit order with expiration
anor buy --gpu H100 --duration 1 --limit --expires-at 2024-12-31T23:59Managing VMs
Check your active VMs:
anor statusSSH into your most recent VM:
anor sshSSH into a specific VM:
anor ssh <vm-id>Available GPUs
View available GPUs and current pricing:
anor gpus| GPU | Starting Price |
|---|---|
| T4 | $0.50/hr |
| L4 | $0.80/hr |
| A100 | $2.00/hr |
| H100 | $3.50/hr |
Prices vary based on availability. Run anor gpus for real-time pricing.
Other Commands
Check your balance:
anor balanceShow current user:
anor whoamiLogout:
anor logoutEnvironment Variables
| Variable | Description |
|---|---|
ANOR_API_URL | Override the API URL (default: https://anorcloud.com) |
ANOR_API_KEY | Use API key instead of stored credentials |