{
  "@context": "https://schema.org",
  "@type": "TechArticle",
  "name": "Compute API reference | Edge Docs",
  "headline": "Compute API reference | Edge Docs",
  "description": "Create and manage VMs, SSH keys, security groups, snapshots, backups, private networks and startup scripts over the Edge REST API.",
  "url": "https://edge.network/docs/api/compute",
  "image": "https://edge.network/og/docs__api__compute.png",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Edge Network",
    "url": "https://edge.network",
    "logo": "https://edge.network/favicon.svg"
  },
  "isPartOf": {
    "@type": "WebSite",
    "name": "Edge Network",
    "url": "https://edge.network"
  },
  "breadcrumb": {
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://edge.network"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Docs",
        "item": "https://edge.network/docs"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Api",
        "item": "https://edge.network/docs/api"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "Compute",
        "item": "https://edge.network/docs/api/compute"
      }
    ]
  },
  "section": "documentation/api",
  "articleBody": "Docs CDN Deployments, domains, caching, purging and on-the-fly image optimisation. Getting started \n Deployments \n Domains & SSL \n Compute Virtual machines in seconds: networking, firewalls, backups and SSH keys. Getting started \n Creating VMs \n Managing VMs \n DNS Zones, records, geo-routing, backups and development domains. Getting started \n Zone management \n DNS records \n Storage S3-compatible buckets, access keys, presigned URLs and multipart uploads. Getting started \n Buckets \n Access keys \n Shield Privacy-first bot protection: widget modes, siteverify and verified agents. Getting started \n Widget modes \n JavaScript API \n Assist AI answers from your own content: widget, ingestion and the API. Getting started \n Widget & embedding \n Content ingestion \n Pulse Uptime monitoring from several locations: checks, incidents, alerts and status pages. Getting started \n Check types \n Locations & intervals \n REST API Manage every Edge resource over HTTPS with API keys. Authentication \n Errors \n Versioning \n Compute \n CDN \n DNS \n CLI One binary for macOS, Linux and Windows to script every product. Installation \n Authentication \n Compute commands \n CDN commands \n DNS commands \n Storage commands \n Dev tooling Command palette and keyboard shortcuts across the console. Command palette \n Agent tooling Let AI agents deploy and manage infrastructure: discovery, MCP and access codes. Start with the overview MCP server \n MCP tool reference \n Connect your tool \n Framework wrappers \n Self-signup \n Access codes \n Discovery endpoint \n Deploy a static site \n Deploy an app \n Projects \n Bot protection \n AI answers \n Uptime monitoring \n Account & support Teams, security, audit logs, alerts, billing tools and support. Start with the overview Teams \n Referral programme \n Cost Advisor \n Security \n Two-factor auth \n Audit log \n Alerts \n Support tickets \n Search the docs ⌘K Console Products\n\n CDN Compute DNS Storage Shield Assist Pulse Developer tools\n\n REST API Overview Authentication Errors Versioning Compute CDN DNS Storage Shield Pulse CLI Dev tooling Agents\n\n Agent tooling Account\n\n Account & support All endpoints require authentication .\n\n Create a VM Copy Anchor Link \n\n Terminal Copy Text curl -X POST https://edge.network/api/compute/vms \\ \n -H \" Authorization: Bearer ek_live_... \" \\ \n -H \" Content-Type: application/json \" \\ \n -d &#x27; { \n \"name\": \"web-01\", \n \"region\": \"london\", \n \"osTemplate\": \"ubuntu-24.04\", \n \"vcpu\": 2, \n \"ram\": 4, \n \"disk\": 80, \n \"sshKeyIds\": [\"key_abc123\"], \n \"setupScript\": \"#!/bin/bash\\napt update\" \n } &#x27; Field Required Description name Yes 1–64 characters: letters, digits and hyphens region Yes Region id from GET /api/compute/regions osTemplate Yes Template id from GET /api/compute/os-templates vcpu / ram / disk Yes vCPUs (1–128), RAM in GB (1–512), disk in GB (10–10000) sshKeyIds No SSH key ids to attach at first boot securityGroupIds No Security group ids to attach password No Root password (min 8 chars). Omit to have one generated and returned once. setupScript No Bash script to run on first boot. See Startup scripts for the library. Returns 201 :\n\n JSON Copy Text { \n \" vm \": { \n \" id \": \" vm_xyz789 \", \n \" name \": \" web-01 \", \n \" status \": \" provisioning \", \n \" region \": \" london \", \n \" vcpu \": 2 , \n \" ram \": 4 , \n \" disk \": 80 , \n \" os \": { \" name \": \" Ubuntu 24.04 \" }, \n \" network \": { \" publicIp \": \" pending \" }, \n \" createdAt \": \" 2026-07-31T15:04:05Z \" \n }, \n \" generatedPassword \": \" ... \" \n } VMs Copy Anchor Link \n\n Endpoint Description GET /api/compute/vms List VMs. Returns { vms } GET /api/compute/vms/:id Get a VM. Returns { vm } PATCH /api/compute/vms/:id Rename. Body: { \"name\": \"...\" } DELETE /api/compute/vms/:id Destroy the VM POST /api/compute/vms/:id/start | stop | restart | reset Power actions. Each returns the updated { vm } POST /api/compute/vms/:id/suspend | resume Suspend / resume POST /api/compute/vms/:id/resize Change specs. Body: { vcpu?, ram?, disk? } POST /api/compute/vms/:id/reinstall Reinstall the OS. Body: { osId } POST /api/compute/vms/:id/password Change the root password POST /api/compute/vms/:id/hostname Change the hostname Stats, metrics and console Copy Anchor Link \n\n Endpoint Description GET /api/compute/vms/:id/stats Live CPU / RAM / disk / network usage GET /api/compute/vms/:id/metrics?period=24h Metric history. period is 1h , 6h , 24h or 7d POST /api/compute/vms/:id/console Create a VNC console session (returns session token + password) GET /api/compute/vms/:id/events Recent lifecycle events for one VM GET /api/compute/vms/:id/bandwidth?month=2026-07 Monthly bandwidth usage SSH keys and security groups Copy Anchor Link \n\n Endpoint Description GET | POST /api/compute/ssh-keys List keys / add a key. Body: { name, publicKey } DELETE /api/compute/ssh-keys/:id Remove a key GET | POST | DELETE /api/compute/vms/:id/ssh-keys/:keyId List / attach / detach keys on a VM GET | POST /api/compute/security-groups List / create groups. Body: { name, description?, rules? } GET | PATCH | DELETE /api/compute/security-groups/:id Get / update / delete a group GET | POST /api/compute/security-groups/:id/rules List / add rules. Body: { direction, protocol, portRange?, source, description? } PATCH | DELETE /api/compute/security-groups/:sgId/rules/:ruleId Update / remove a rule GET | POST | DELETE /api/compute/vms/:id/security-groups/:sgId List / attach / detach groups on a VM Snapshots and backups Copy Anchor Link \n\n Endpoint Description GET | POST /api/compute/vms/:id/snapshots List / create snapshots. Body: { name } POST /api/compute/vms/:id/snapshots/:snapshotId/restore Restore a snapshot DELETE /api/compute/vms/:id/snapshots/:snapshotId Delete a snapshot GET | POST /api/compute/vms/:id/backups List / create full backups POST /api/compute/vms/:id/backups/:backupId/restore Restore a backup DELETE /api/compute/vms/:id/backups/:backupId Delete a backup GET | POST | DELETE /api/compute/vms/:id/backup-schedule Get / set / clear the schedule. Body: { frequency, time, retention } IPs and private networks Copy Anchor Link \n\n Endpoint Description GET | POST /api/compute/vms/:id/ips List / add extra public IPs DELETE /api/compute/vms/:id/ips/:ipId Remove an extra IP GET | POST /api/compute/networks List / create private networks. Body: { name, region } DELETE /api/compute/networks/:id Delete a private network GET | POST /api/compute/vms/:id/networks List / attach networks. Body: { networkId } DELETE /api/compute/vms/:id/networks/:networkId Detach a network Startup scripts Copy Anchor Link \n\n Endpoint Description GET /api/compute/scripts Edge library scripts plus your custom scripts GET /api/compute/scripts/library Edge library scripts only GET /api/compute/scripts/:id Get one script with its content and parameters POST /api/compute/scripts Create a custom script. Body: { name, scriptContent, description?, category?, parameters? } PUT | DELETE /api/compute/scripts/:id Update / delete a custom script (library scripts are read-only) GET /api/compute/vms/:id/scripts Script execution history for a VM To run a script at VM creation, substitute its parameters into the content and pass the result as setupScript . The CLI and Agent API do this for you.\n\n Discovery and account Copy Anchor Link \n\n Endpoint Description GET /api/compute/regions Available deployment regions GET /api/compute/os-templates Available operating systems GET /api/compute/pricing Pay-as-you-go rates and prepaid balance GET /api/compute/usage Current resource usage against account limits GET /api/compute/events Recent compute events across the account Something unclear or out of date? Tell us , or read this page as Markdown .\n\n Versioning\n\n Previous\n\n CDN\n\n Next",
  "headings": [
    {
      "level": 1,
      "text": "Compute API"
    }
  ],
  "relatedLinks": [
    {
      "@type": "WebPage",
      "name": "Network",
      "url": "https://edge.network/network"
    },
    {
      "@type": "WebPage",
      "name": "Pricing",
      "url": "https://edge.network/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Docs",
      "url": "https://edge.network/docs"
    },
    {
      "@type": "WebPage",
      "name": "Sign in",
      "url": "https://edge.network/console/access"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/cdn/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Deployments",
      "url": "https://edge.network/docs/cdn/deployments"
    },
    {
      "@type": "WebPage",
      "name": "Domains &amp; SSL",
      "url": "https://edge.network/docs/cdn/domains"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/compute/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Creating VMs",
      "url": "https://edge.network/docs/compute/creating-vms"
    },
    {
      "@type": "WebPage",
      "name": "Managing VMs",
      "url": "https://edge.network/docs/compute/managing-vms"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/dns/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Zone management",
      "url": "https://edge.network/docs/dns/zones"
    },
    {
      "@type": "WebPage",
      "name": "DNS records",
      "url": "https://edge.network/docs/dns/records"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/storage/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Buckets",
      "url": "https://edge.network/docs/storage/buckets"
    },
    {
      "@type": "WebPage",
      "name": "Access keys",
      "url": "https://edge.network/docs/storage/access-keys"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/shield/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget modes",
      "url": "https://edge.network/docs/shield/widget-modes"
    },
    {
      "@type": "WebPage",
      "name": "JavaScript API",
      "url": "https://edge.network/docs/shield/js-api"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/assist/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Widget &amp; embedding",
      "url": "https://edge.network/docs/assist/widget"
    },
    {
      "@type": "WebPage",
      "name": "Content ingestion",
      "url": "https://edge.network/docs/assist/ingestion"
    },
    {
      "@type": "WebPage",
      "name": "Getting started",
      "url": "https://edge.network/docs/pulse/getting-started"
    },
    {
      "@type": "WebPage",
      "name": "Check types",
      "url": "https://edge.network/docs/pulse/check-types"
    },
    {
      "@type": "WebPage",
      "name": "Locations &amp; intervals",
      "url": "https://edge.network/docs/pulse/locations"
    },
    {
      "@type": "WebPage",
      "name": "Authentication",
      "url": "https://edge.network/docs/api/authentication"
    },
    {
      "@type": "WebPage",
      "name": "Errors",
      "url": "https://edge.network/docs/api/errors"
    },
    {
      "@type": "WebPage",
      "name": "Versioning",
      "url": "https://edge.network/docs/api/versioning"
    },
    {
      "@type": "WebPage",
      "name": "Compute",
      "url": "https://edge.network/docs/api/compute"
    },
    {
      "@type": "WebPage",
      "name": "CDN",
      "url": "https://edge.network/docs/api/cdn"
    }
  ],
  "alternateFormats": [
    {
      "@type": "MediaObject",
      "contentType": "text/html",
      "url": "https://edge.network/docs/api/compute",
      "name": "HTML version"
    }
  ],
  "dateModified": "2026-11-28T22:16:38.730Z"
}