API
https://api.llamalink.net

API Reference

All requests require an API key (llk_…). No browser login or session token.

Base URL: https://api.llamalink.net
Protected routes: Authorization: Bearer <your_api_key>
POST with JSON body: Content-Type: application/json

Authentication

HEADER Authorization

Sent on every protected request (see sample below).

Request
{
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY",
    "Content-Type": "application/json"
  }
}

Virtual servers (VPS)

Provisioning: plans → payment method → OS template → POST /user/subscribe-vps (shop plan) or POST /user/custom-packages (custom hardware) → poll progress.

GET /user/payment

Saved cards — check before provisioning a server. Requires API key.

Request
{
  "method": "GET",
  "path": "/user/payment",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
[
  {
    "id": 3,
    "last4dig": "4242",
    "exp_month": 12,
    "exp_year": 2027,
    "brand": "visa"
  }
]
GET /platform/vps-plans

Available VPS shop plans (id is used as planId when provisioning). Includes custom-server pricing under custom. No API key.

Request
{
  "method": "GET",
  "path": "/platform/vps-plans"
}
200 Success
{
  "shopPurchasesEnabled": true,
  "items": [
    {
      "id": "spark",
      "name": "Llama Spark",
      "price": 54,
      "currency": "ILS",
      "cpuCores": 2,
      "ramGB": 2,
      "storageGB": 50
    }
  ],
  "custom": {
    "available": true,
    "endpoint": "/user/custom-packages",
    "pricing": {
      "currency": "ILS",
      "ramPerGB": 7,
      "cpuPerCore": { "xeonE5": 15.6, "xeonGold": 17 }
    }
  }
}
GET /platform/os-templates

OS list for provisioning. No API key.

Request
{
  "method": "GET",
  "path": "/platform/os-templates"
}
200 Success
{
  "items": [
    { "id": "ubuntu-22", "label": "Ubuntu 22.04", "enabled": true },
    { "id": "windows-2022", "label": "Windows Server 2022", "enabled": true }
  ]
}
POST /user/subscribe-vps

Provision a server from a shop plan (charges saved card). Call GET /platform/vps-plans first — use each plan id as planId.

Request
{
  "method": "POST",
  "path": "/user/subscribe-vps",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY",
    "Content-Type": "application/json",
    "x-provision-op-id": "my-unique-op-001"
  },
  "body": {
    "planId": "spark",
    "os": "ubuntu-22"
  }
}
201 Success
{
  "subscribed": true,
  "vpsId": 42,
  "message": "Server provisioned successfully."
}
POST /user/custom-packages

Provision a server with custom CPU, RAM, storage, and IPv4 (same as the panel “Build a server” flow). Charges saved card. estimatedPrice must match the server price calculation (max drift 0.02 ILS). Monthly price (ILS): (CPU per core × cores) + (7 × RAM GB) + (storage per GB × GB) + (4 × IPv4) — CPU: xeonE5 = 15.6, xeonGold = 17.0 per core; storage: SSD 1.5, HDD 1.2 per GB. Windows requires at least 32GB disk.

Request
{
  "method": "POST",
  "path": "/user/custom-packages",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY",
    "Content-Type": "application/json",
    "x-provision-op-id": "my-unique-op-002"
  },
  "body": {
    "name": "my-api-vps",
    "cpuType": "xeonE5",
    "cpuCores": 4,
    "ram": 8,
    "storageType": "ssd",
    "storageGB": 160,
    "ipv4": 1,
    "estimatedPrice": 362.4,
    "os": "ubuntu-22"
  }
}
201 Success
{
  "subscribed": true,
  "vpsId": 43,
  "message": "Server provisioned successfully."
}
GET /user/vps/provision-progress/:opId

Provisioning progress after setup.

Request
{
  "method": "GET",
  "path": "/user/vps/provision-progress/my-unique-op-001",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
{
  "status": "success",
  "percent": 100,
  "vpsId": 42,
  "message": "completed"
}
GET /user/vps

All servers on the account.

Request
{
  "method": "GET",
  "path": "/user/vps",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
[
  {
    "id": 42,
    "name": "production-web",
    "status": "running",
    "paymentStatus": "active",
    "disk": 40.5,
    "cpu_used": 12,
    "cpus_avail": 4,
    "memory": { "used": 1.2, "max": 4, "usage_percent": 30 },
    "uptime": 86400,
    "ip_addresses": ["203.0.113.50"]
  }
]
GET /user/vps/:id

Single server details.

Request
{
  "method": "GET",
  "path": "/user/vps/42",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
{
  "id": 42,
  "name": "production-web",
  "status": "running",
  "ip_addresses": ["203.0.113.50"],
  "memory": { "used": 1.2, "max": 4, "usage_percent": 30 },
  "cpu_used": 12,
  "uptime": 86400
}
GET /user/vps/start|stop|restart/:id

Paths: /user/vps/start/:id · stop · restart

Request
{
  "method": "GET",
  "path": "/user/vps/restart/42",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
{
  "message": "Action sent to server",
  "status": "running"
}
GET /user/vps/:id/metrics-history

CPU / memory history.

Request
{
  "method": "GET",
  "path": "/user/vps/42/metrics-history",
  "query": {
    "metric": "cpu",
    "range": "day"
  },
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
{
  "range": "day",
  "points": [
    { "time": 1716508800, "value": 24.5 },
    { "time": 1716512400, "value": 31.2 }
  ]
}

Websites

GET /user/websites

Hosting websites on the account.

Request
{
  "method": "GET",
  "path": "/user/websites",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
[
  {
    "id": "8f2a1c00-1111-2222-3333-444455556666",
    "domain": "example.com",
    "status": "active",
    "plan": "business",
    "diskUsedMb": 1200,
    "diskLimitMb": 10240
  }
]
GET /user/websites/info/:id

Details for one website.

Request
{
  "method": "GET",
  "path": "/user/websites/info/8f2a1c00-1111-2222-3333-444455556666",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
{
  "id": "8f2a1c00-1111-2222-3333-444455556666",
  "domain": "example.com",
  "status": "active",
  "phpVersion": "8.2",
  "ssl": true,
  "nameservers": ["ns1.llamalink.net", "ns2.llamalink.net"]
}
POST /user/websites/new

Create a site (requires saved payment method).

Request
{
  "method": "POST",
  "path": "/user/websites/new",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY",
    "Content-Type": "application/json"
  },
  "body": {
    "domain": "mysite.com",
    "planId": "business",
    "phpVersion": "8.2"
  }
}
201 Success
{
  "id": "9a3b2c10-aaaa-bbbb-cccc-dddddddddddd",
  "domain": "mysite.com",
  "status": "provisioning",
  "message": "Website is being provisioned"
}

Account & billing

GET /user/profile

Account profile (read-only).

Request
{
  "method": "GET",
  "path": "/user/profile",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
{
  "id": 7,
  "username": "client1",
  "email": "user@example.com",
  "realname": "Jane Doe",
  "phone": "+972501234567",
  "userpfp": "avatar-7.png",
  "role": "user"
}
GET /user/subscriptions

Active and pending subscriptions.

Request
{
  "method": "GET",
  "path": "/user/subscriptions",
  "headers": {
    "Authorization": "Bearer llk_YOUR_KEY"
  }
}
200 Success
[
  {
    "id": 101,
    "type": "vps",
    "name": "VPS Business",
    "status": "active",
    "renewalDate": "2026-06-01",
    "priceMonthly": 89
  }
]

HTTP status codes

CodeMeaning
200Success
201Created
401Missing Authorization header
402No valid payment method / charge failed
403Invalid or expired API key
404Not found
429Rate limited
500Server error