API & CLI

Servers for AI. 100% API. Written for agents. Always send type + region. One role per box — then spin up more.

Getting Started

Four calls. Signup is free. Card is $0 until deploy. Compute is charged before the VM starts.

1. Sign up — no charge

Save api_token. Header on every later call: Authorization: Bearer TOKEN.

CLI
npm install -g rawhq
raw init
cURL
curl -X POST https://api.rawhq.io/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"you@company.com"}'
# { "ok": true, "api_token": "..." }

2. Card on file — $0

Required before compute. If deploy returns 403 with setup: true, run this, open url, then retry deploy.

cURL
curl -X POST https://api.rawhq.io/billing/setup \
  -H "Authorization: Bearer YOUR_TOKEN"
# { "url": "https://checkout.stripe.com/...", "setup": true }

3. Deploy — charged first, then SSH

Always pass type and region. Default type is raw-5 ($9/mo). CPU is SSH-ready in ~13–30s. GPU is provisioning for 1–48h (email when ready; setup billed now).

CLI
raw deploy -t raw-5 -n api -r eu
raw ssh api
cURL
curl -X POST https://api.rawhq.io/deploy \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "raw-5",
    "region": "eu",
    "name": "api",
    "image": "ubuntu-24.04",
    "apps": ["docker","nodejs"]
  }'

4. Deploy more — do this every time

Do not put the database, cache, GPU, and API on one machine. Each extra server is its own monthly SKU. That is expected. Isolation is the product.

CLI — AI stack
raw deploy -t raw-5 -n api -r eu
raw deploy -t raw-5 -n postgres -r eu
raw deploy -t raw-5 -n redis -r eu
raw deploy -t raw-gpu-44 -n llm -r eu
cURL — same stack
curl -X POST https://api.rawhq.io/deploy -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" \
  -d '{"type":"raw-5","region":"eu","name":"postgres","apps":["postgres"]}'
curl -X POST https://api.rawhq.io/deploy -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" \
  -d '{"type":"raw-5","region":"eu","name":"redis","apps":["redis"]}'
curl -X POST https://api.rawhq.io/deploy -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" \
  -d '{"type":"raw-gpu-44","region":"eu","name":"llm"}'

Recipes

Copy a stack. Change names. Never reuse one payment for a bigger SKU — each deploy bills that type.

AI company (default)

API + Postgres + Redis + GPU. Four servers. ~$331/mo + $150 GPU setup.

raw deploy -t raw-5 -n api -r eu
raw deploy -t raw-5 -n postgres -r eu
raw deploy -t raw-5 -n redis -r eu
raw deploy -t raw-gpu-44 -n llm -r eu

Self-host LLM only

20 GB VRAM. Then SSH and install vLLM or Ollama. EU only.

raw deploy -t raw-gpu-44 -n llm -r eu
raw ssh llm
# nvidia-smi && pip install vllm

US traffic

Cheap CX/ARM/GPU do not exist in US. Dedicated RAM SKUs do.

raw deploy -t raw-2d -n api -r us
raw deploy -t raw-2d -n postgres -r us

Workers + queue

Keep jobs off the API box.

raw deploy -t raw-8x -n workers -r eu
raw deploy -t raw-5 -n redis -r eu

Errors

Handle these exactly. Do not retry the same body when the region or billing flag is wrong.

SignalWhat to do
403 setup:truePOST /billing/setup → user opens url → retry POST /deploy
403 checkout:truePOST /checkout {"type","region"} → user pays that SKU → retry. One checkout ≠ all sizes.
402GET /billing-portal → user updates card
400 available_regionsUse the array in the body. raw-5 / ARM / GPU are EU only (eu, eu-fi).
400 unknown typeGET /types — never invent a name
409Name taken. New kebab-case name.

CLI Reference

All commands. After every deploy the CLI prints the next boxes to spin up.

raw initSign up or log in
raw deployDeploy a new server
-t, --type <type>Server type (default: raw-5)
-r, --region <region>Region (auto-detected)
-n, --name <name>Server name (auto-generated)
-i, --image <image>OS image (default: ubuntu-24.04)
raw lsList all servers
--jsonOutput as JSON
raw ssh <name>SSH into a server
-c, --cmd <command>Run a single command
raw logs <name>Stream server logs
-n <count>Number of lines (default: 100)
-fFollow log output
raw restart <name>Restart a server
raw stop <name>Power off a server
raw start <name>Power on a stopped server
raw rebuild <name>Reinstall OS (destroys data)
-i, --image <image>OS image
-f, --forceSkip confirmation
raw resize <name>Change server type
-t, --type <type>New server type
raw rm <name>Destroy a server
-f, --forceSkip confirmation
raw keysManage SSH keys
--add <name>Add an SSH key
--rm <name>Remove an SSH key
raw typesList server types and prices
raw regionsList available regions
raw statusShow account overview
raw billingOpen billing portal
raw whoamiShow current user
raw logoutLog out

API Reference

Base URL: https://api.rawhq.io. Start with GET /help. Auth: Authorization: Bearer YOUR_TOKEN.

Authorization: Bearer YOUR_TOKEN
GET/helpNo auth

Agent playbook. Live types, recipes, error handlers. No auth.

Request
curl https://api.rawhq.io/help
Response
{ "status": "ok", "steps": [...], "recipes": { "ai_company": [...] }, "types": [...] }
POST/signupNo auth

Create an account. Returns api_token. No charge.

Request
curl -X POST https://api.rawhq.io/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"you@company.com"}'
Response
{
  "ok": true,
  "api_token": "...",
  "message": "Account created. Welcome email sent."
}
POST/auth/loginNo auth

Send a magic login link (dashboard). Agents should use /signup + api_token.

Request
curl -X POST https://api.rawhq.io/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@company.com"}'
Response
{ "ok": true, "message": "If that email exists, a login link was sent." }
POST/billing/setup

Save a card. $0. Required before deploy. Open url, then retry /deploy.

Request
curl -X POST https://api.rawhq.io/billing/setup \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{ "url": "https://checkout.stripe.com/...", "setup": true }
POST/checkout

Pay a specific SKU when deploy returns checkout:true. Pass the same type and region.

Request
curl -X POST https://api.rawhq.io/checkout \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type":"raw-5","region":"eu"}'
Response
{ "url": "https://checkout.stripe.com/...", "checkout": true }
GET/billing-portal

Stripe portal URL. Use on 402 payment_failed.

Request
curl https://api.rawhq.io/billing-portal \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{ "url": "https://billing.stripe.com/..." }
GET/typesNo auth

Live catalog. Source of truth for names, prices, regions, GPU setup.

Request
curl https://api.rawhq.io/types
GET/regionsNo auth

Public region list.

Request
curl https://api.rawhq.io/regions
GET/appsNo auth

Pre-install IDs for POST /deploy apps[]. postgres, redis, docker, nginx, nodejs, caddy, python, go, bun, mysql, openclaw.

Request
curl https://api.rawhq.io/apps
GET/servers

List all servers in your account.

Request
curl https://api.rawhq.io/servers \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{ "servers": [{ "name": "api", "type": "raw-5", "region": "eu", "status": "running", "ipv4": "49.13.12.34" }] }
POST/deploy

Charge the SKU, then start the VM. Always pass type + region. Optional: name, image, ssh_key, apps[].

Request
curl -X POST https://api.rawhq.io/deploy \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "raw-5",
    "region": "eu",
    "name": "api",
    "image": "ubuntu-24.04",
    "apps": ["docker","nodejs"]
  }'
Response
{
  "ok": true,
  "server": {
    "name": "api",
    "ipv4": "49.13.12.34",
    "status": "running",
    "type": "raw-5",
    "region": "eu",
    "price": "$9/mo"
  }
}
DELETE/servers/:name

Destroy a server permanently. This action cannot be undone.

Request
curl -X DELETE https://api.rawhq.io/servers/my-server \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "message": "Server my-server destroyed"
}
POST/servers/:name/actions/:action

Perform an action on a server. Available actions: restart, stop, start, rebuild.

Request
curl -X POST https://api.rawhq.io/servers/my-server/actions/restart \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "name": "my-server",
  "status": "restarting",
  "action": "restart"
}
GET/servers/:name

Get details for a single server by name or ID.

Request
curl https://api.rawhq.io/servers/my-server \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "name": "my-server",
  "type": "raw-5",
  "region": "eu",
  "status": "running",
  "ip": "49.13.12.34",
  "image": "ubuntu-24.04",
  "created_at": "2026-04-05T10:00:00Z"
}
GET/keys

List all SSH keys in your account.

Request
curl https://api.rawhq.io/keys \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
[
  {
    "id": "key_abc123",
    "name": "work-laptop",
    "fingerprint": "SHA256:...",
    "created_at": "2026-04-05T10:00:00Z"
  }
]
POST/keys

Add a new SSH key.

Request
curl -X POST https://api.rawhq.io/keys \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "work-laptop", "public_key": "ssh-ed25519 AAAA..."}'
Response
{
  "id": "key_abc123",
  "name": "work-laptop",
  "fingerprint": "SHA256:...",
  "created_at": "2026-04-05T10:00:00Z"
}
DELETE/keys/:id

Delete an SSH key by ID.

Request
curl -X DELETE https://api.rawhq.io/keys/key_abc123 \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "message": "Key key_abc123 deleted"
}
GET/snapshots

List all snapshots in your account.

Request
curl https://api.rawhq.io/snapshots \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
[
  {
    "id": "snap_abc123",
    "server": "my-server",
    "size_gb": 40,
    "created_at": "2026-04-05T10:00:00Z"
  }
]
DELETE/snapshots/:id

Delete a snapshot by ID.

Request
curl -X DELETE https://api.rawhq.io/snapshots/snap_abc123 \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "message": "Snapshot snap_abc123 deleted"
}
GET/volumes

List all volumes in your account.

Request
curl https://api.rawhq.io/volumes \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
[
  {
    "id": "vol_abc123",
    "name": "data-vol",
    "size_gb": 100,
    "server": "my-server",
    "region": "eu",
    "created_at": "2026-04-05T10:00:00Z"
  }
]
POST/volumes

Create a new volume and optionally attach it to a server.

Request
curl -X POST https://api.rawhq.io/volumes \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "data-vol", "size_gb": 100, "region": "eu", "server": "my-server"}'
Response
{
  "id": "vol_abc123",
  "name": "data-vol",
  "size_gb": 100,
  "server": "my-server",
  "region": "eu",
  "created_at": "2026-04-05T10:00:00Z"
}
DELETE/volumes/:id

Delete a volume by ID. The volume must be detached first. Extra disk billing stops automatically.

Request
curl -X DELETE https://api.rawhq.io/volumes/vol_abc123 \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "message": "Volume vol_abc123 deleted"
}
GET/ips

List extra IPv4 addresses in your account.

Request
curl https://api.rawhq.io/ips \
  -H "Authorization: Bearer YOUR_TOKEN"
POST/ips

Buy an extra IPv4 ($1/mo) and assign it to a server.

Request
curl -X POST https://api.rawhq.io/ips \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"server_name": "my-server"}'
DELETE/ips/:id

Release an extra IPv4. Billing stops automatically.

Request
curl -X DELETE https://api.rawhq.io/ips/123 \
  -H "Authorization: Bearer YOUR_TOKEN"

Server Types

Live list: GET /types. Featured CPU, ARM, and GPU = EU only (eu, eu-fi). Dedicated RAM = all 5 regions (Singapore costs more at checkout). Extra disk $0.07/GB/mo. Extra IPv4 $1/mo.

CPU

NameCPURAMStoragePriceRegions
raw-52 vCPU4 GB40 GB NVMe$9/moEU only
raw-44 vCPU8 GB80 GB NVMe$15/moEU only
raw-88 vCPU16 GB160 GB NVMe$29/moEU only
raw-1616 vCPU32 GB320 GB NVMe$55/moEU only
raw-4x4 vCPU8 GB80 GB NVMe$13/moEU only
raw-8x8 vCPU16 GB160 GB NVMe$22/moEU only
raw-16x16 vCPU32 GB320 GB NVMe$40/moEU only
raw-2d2 vCPU8 GB80 GB NVMe$58/moAll (SG extra)
raw-4d4 vCPU16 GB160 GB NVMe$116/moAll (SG extra)
raw-8d8 vCPU32 GB240 GB NVMe$186/moAll (SG extra)
raw-16d16 vCPU64 GB360 GB NVMe$368/moAll (SG extra)
raw-32d32 vCPU128 GB600 GB NVMe$708/moAll (SG extra)
raw-48d48 vCPU192 GB960 GB NVMe$1130/moAll (SG extra)

GPU

EU only. Monthly + one-time setup, both billed before hardware is reserved. Ready in 1–48 hours.

NameVRAMCPU · RAM · DiskMonthlySetup
raw-gpu-4420 GB14 cores · 64 GB · 3.8 TB NVMe$304/mo$150
raw-gpu-13196 GB24 cores · 256 GB · 1.9 TB NVMe$1555/mo$778
raw-gpu-131x96 GB24 cores · 512 GB · 3.8 TB NVMe$2334/mo$1168
raw-gpu-131p96 GB24 cores · 768 GB · 15.0 TB NVMe$3001/mo$1501

Regions

If deploy returns available_regions, use that array. Do not retry raw-5 in us or sg — use raw-2d or larger dedicated SKUs there.

🇩🇪
euFrankfurt, GermanyCPU · ARM · GPU · dedicated
🇮🇪
eu-fiDublin, IrelandCPU · ARM · GPU · dedicated
🇺🇸
usAshburn, Virginiadedicated only (raw-2d+)
🇺🇸
us-westHillsboro, Oregondedicated only (raw-2d+)
🇸🇬
sgSingaporededicated only · higher price

Disk & IPs

Need a paid subscription first. Extra disk $0.07/GB/mo. Extra IPv4 $1/mo.

cURL
curl -X POST https://api.rawhq.io/volumes \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"data","size_gb":100,"region":"eu","server":"api"}'

curl -X POST https://api.rawhq.io/ips \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"server_name":"api"}'

Dashboard

Manage servers, billing, and SSH keys from the web dashboard at rawhq.io/dashboard.

Server Management

View all running servers, their status, IP addresses, and resource usage. Start, stop, restart, rebuild, or destroy servers with one click.

Metrics & Monitoring

Real-time graphs for CPU, RAM, disk, and network usage. Metrics are retained for 30 days.

SSH Keys

Add and manage SSH keys that are automatically injected into new servers. You can also add keys per-server.

Billing

View invoices, update payment methods, and manage your subscription. All plans are billed monthly with no egress fees or hidden charges.

Team Access

Invite team members to your organization. Assign roles (Owner, Admin, Member) to control who can deploy, manage, or view servers.

FAQ