---
id: accept-organization-invite
title: "Accept Organization Invite"
description: "Accept an organization invite."
sidebar_label: "Accept Organization Invite"
hide_title: true
hide_table_of_contents: true
api: eJyNVU1v2zAM/SsCTxvgNd2OvnXrYT10DfpxCoKAsRlbrS2pEt2tM/zfB8p2YiPp2lMUmh+Pj9RTCzmFzGvH2hpI4SLLyLFCo6wv0Oi/KB+UNi+a6QwSsI58tF3lkAJG983Ud9P7QgIOPdbE5AOkqxa05HfIJSRgsCZIge0TGUjA03OjPeWQsm8ogZCVVCOkLbDmSjyvYlJ1PwTwqxNrYK9NAV23lhzBWRMoSNi383P5yaxhMixHdK7SWUS4eAzSazsp47z0xbqP1vms9OVxwQSmLR9nyDwhU77BWHtnfS0nyJHpC+ta2BnT/+hd1QWfKvMRKDpsHPlgDVYz56CWo3kftbW2IjQS1s/g4P8Le1xHnf425DdzIDdiU6fhhKoppr538v+EX+Pyj3L00Lue5Kibrs9KCBtaG5BMGphTtT7kv5kOc1/Bbh8pY4Hqmm2ls00TyG9y5JMrQ4b1TpOfjeBgPUHARwcQy875fwhv0N8dmlpG0OJ5KZBPtOVtFQGQaWrhzvoixbzWwoGca6q35KdE3UrEeyOIad9g9zqmDKV2x4Akz1yN7posoxB2TaVuh+sdqwXKGq/5NerKz/v75XdCL9Sv1iIFjIVIzqxwEEQ1cWlFt5wNHBWKS0hhgU4vetkKizaKUrfopU22iPzLqGGNr8QfpMoI4k5UpN+CKZRBXuKl6037hktmF/vQZmfFc961jOxLyKyTjV9eqZ31qkaDhTaF0iYwmoxCooJBF0rLIVFbXVXaFIlCkyvZFxWIWZsinE2u0bX1rswq28S8kID01dc8P/t6dh5X3QauMUraINLDkzAlU12NGj9DPhHc9x+SgQumP7xwFeqoSZHfdpjLCtBpubT9ZCCBdHwwhuGsEyhlkukK2naLgR581XVifm7Iy3qsE3hBr3ErBKxayHWQcw7pDqtA/2ng0+2w0p/VW2gHI5pX4RKrRv5BAk/0un/cunWXQEmYx/Vsh28X43KNUUfPUzdd1+XN3b103Qgt7V7Lx7XajtvfnobUtr1HfD277hhh1/0Dz9y8gg==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Accept an organization invite.
---
---
id: add-organization-member
title: "Add Organization Member"
description: "Add a member to an organization."
sidebar_label: "Add Organization Member"
hide_title: true
hide_table_of_contents: true
api: eJytVktv4zYQ/ivCnFqAibM96uZ9AM0hjeE4J8MwxuJY5q5Ecklqs6mg/14MKdnSWt2maG8iOc9v5ptRC5J84ZQNymjIYSllhllN9YFcFkyGOjOuRK3+RJa4BQHGkouHewk5oJT7scQ+6YIAiw5rCuQ85NsWFJu3GE4gQGNNkINx5V5JEODoa6McSciDa0iAL05UI+QtBBUqFn0cucjuP4KA8Gr5wQendAldt0tmyIf3Rr6ybmF0IB34E62tVBG1F589Z9qOnFjHOQVFnk9Uo6r2KKUj78cxfOKHbNk/XEUgwBmWa4F0U0O+5fxylLXSjJor8x6anTibXLPGjKXGk2NoRt6fPbn5zMf4bVMQIxdLKR+i33VC52LAHD5TEaCbWuAKxAtvjfYJkt/u3v0HQKd5zKUQ4TnX99pC4QgDyT1G30fjav4CiYFugqojhL35D0k0W4Y5N28JRfm9JeeNxmoi7LPVcH3WOhhTEWpWSz19kf8D69nSmhd9VdtHvpstrgBfNeVY9onPcy1j5Vsxek6isxj90E2Rnjql4pPncwJTqEYtNybrdbsJsM2hUsU+NrnEMNsypIM6KnKTElxuZwB4awH+JbcGmVUMmiU/csgzaf1f9P8HQo/RTcz2J2XnaT0d7k9NUZD3x6bK1j29ozdPReNUeI1z+vfNZvWe0DH02x2P1YAlj/CJY88R1RROhpeANXGuxOmewwKtWhhX+kWbJny3SKnz0PTkvg0roXEViwM7GWJ44iGSmmAcST9dIufS1TnfUwg2psFzaH1ZAZ++Y237ikxH+oD0ULJJpc7tMR4J+mjYzhRO7oUbXxjLVFrdZ0fjsho1lkqXmdI+oC7Ii8xrtP5kghfZQVWV0qXIUMuMPWWeQlC69Lcjfj4YZ09FZZpoFwQwYsnn3e2727vIIeNDjXFW9tuUV/dkTT4Mm3gS9miMv2Xb9yAH+h4WtkIVZ10sXNvXewtoVWpxLnB+3upD0XcCTtwg+Rba9oCenl3VdXz9tSHHXbcT8A2dwgOnv21BKs/fEvIjVp5+ksEv654pv2Z/F2x/ifqVkcSq4RMI+EKvl3+QbtcJOBHK2PZt//gh+bnZsImL8tXy68SgsSwKsuGnsmPirB6fNiDg0P+x1EayjsMX7k18SYEamxiXt+muhQp12WDJsskmtz82XI32vJoGmhwGMrfzULRtktiYL6S77oxM4DMD03V/AQ6ddP0=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Add a member to an organization.
---
---
id: boot-image-image-image-id-boot-post
title: "Boot Image"
description: "Boot an instance from a specified image."
sidebar_label: "Boot Image"
hide_title: true
hide_table_of_contents: true
api: eJztWN1v2zYQ/1cOfNkGqE5a7GHwntKsQwMsTRA73UMSGLR0trhIpEae7LqG//fhSMmibDXJEAwDhr0EEX28748fbysydKlVFSmjxVi8N4ZAalDakdQpwsKaEiS4ClO1UJiBKuUSR/f6Xn8yhGPwNyq0C2NLBxJSU2Rg0ZG0BGYBlCOYCq0kpZfgNo6wBKkzyAw60IbudWXRoV0hSL0Bpd+UWBq7gcqaFJ0DY2FlCkmqQHAkCUcwzZUD5SBTiwVa1OT1vNd7tb34BNa5SnOvjbHoIDA+aRl7ZnsL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Ytbt524O2wM7bbQDE1j6h3u71viL/ZMbvdX4vj6gc=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Boot an instance from a specified image.
Note: Boot performs a cold restart of the operating system and does not
preserve any in-memory process or volatile state. This is different from
instance start, which restores memory/process state from a snapshot. Use
boot when you want to change the machine configuration (e.g., vCPU, memory,
or disk) by restarting into a new configuration; use instance start if you
need to restore memory and running processes.
---
---
id: boot-instance-snapshot-snapshot-id-boot-post
title: "Boot Instance"
description: "Boot an instance from a snapshot."
sidebar_label: "Boot Instance"
hide_title: true
hide_table_of_contents: true
api: eJztWEtv2zgQ/isEL20B1fEWe/ItTQvUQNMYsdMenMCgpbHFhiJVcuTUNfzfF0PqaalJu0GBPezNoofz/ObBOfAEXGxljtJoPuFvjUEmNJPaodAxsI01GRPMaZG71ODoVt/qTwZhwjxpDnZjbOaYYLFRCbPgUFhkZsMwBWZysAKl3jK3dwgZEzphCTi0Zu9u9c4ogVIBk/p1Bpmxe+ZQIIzYFJl0rHCwKRTbGEuM5Q9i1FbuZZwKvZV6e6t3F7ObiAUmETOWJdLdv2LrfaUS3ZUaDRMskZsNWNDIMhGnUgOLjd7IbUG6Gj261dMN25uCPQiNDI1nYSyU7L0RuTUxOBf0jUjTRq3gAvoEkYx4xEs3GD1N+ISvjcFVRbyqPLtqfslktfJEuXHII54LKzJAsI5PlgcuKVC5wJRHXIsM+IS3rvKIW/hWSAsJn6AtIOIuTiETfHLgKFER/bykZ1Oix33umaCVesuPx7vAAhy+Ncme7sVGI2iknyLPlYy9NWdfHYHm0BKQW7IVJTj6ohisnPwB/qLeX228AaU8qRG2YPkxqo90oRQn+ZWi76S7Z3PicIx4c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HZwRAwHDel7qvxsQadPzQ1kRxBVUrbfMULJxGvnGT42/L0L/jo1oj0eLhazJxn2o9tcYeEOkTiICytx7/1NjN+CsGD5ZHnnx0Wxpf1FjSJfeTLA1NBSpF51YMon/Ezk8qyaXs4OrTHqeEabEQIw2F21EfEzNj/zdbPSYk4YCqho61KCyydVOKrN9YWFDCEYXjcLkPffRZYrOJm7xs2ANO48uU6e+lWb7PSCcT37jP0MvjH9okpPsNcuNjkk7Hw29TU1E1pswyardGJUD3kuYmuplNTbyG+oCnrCVRW5/cC/NDZPY2UKz5dHnPwYZI5Hf43G4XnjMBM+GcsVk1/3TdujeUvZVkb/v0L8IyvEEqMI3/EsV0Lq1tsyJM2SXr28ebbwiE+67w+fOXcRTynXJkt+OKyFgxurjkc6/lYAoXl5F/GdsFKsCS1LD3r6nQx3uXboX16XNewV+5nKVSXSNB3vhCroi0ecXuvdPaYvyCmIxJeQQ0lxEYS9LstoxaHXRajChxvncQw5PkrbLkSzq/nC+ypsPsPGgVvxQN1SPARtjTfeFxd/duBK6G1BjWDCA08qJLSzaC1b6oKzrgrjYdgfh0OgWJh70Mdj7R6kb3LM8fgPUoQ79Q==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Boot an instance from a snapshot.
Note: Boot performs a cold restart of the operating system and destroys
volatile in-memory state. It is useful for resizing an instance (changing
vCPU, memory, or disk) by restarting into a different machine configuration.
If you want to restore memory and process state, use instance start instead.
---
---
id: branch-instance-instance-instance-id-branch-post
title: "Branch Instance"
description: "Branch an instance into multiple instances creating a new snapshot."
sidebar_label: "Branch Instance"
hide_title: true
hide_table_of_contents: true
api: eJztGdtu47byVwi+tAdQk+3iPP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XJ6Fl4jwADRPVzeJuEm6/k1vRcHcFp7seSsYl8muzUfALW4Bk6pECzobP/6EMLgraI2hM7ul+/09M3CjxeGAYP/cgsFRccPuRfLAgtvF4Z3nkYkOxXFV4Rnc/rFmQL7DD80RO8/lWSP++Dmk+n/Ic8aICSt3Kc8oTWoJV7dqYJXLtH3AeO+Z/RSqTaQwKbaosj9xUZbQ2pO4ab5eXy2W6IXwsuR3u1SzLbYjtvXSKqe8y0AH21PB5KbDejmjniYmCW6HkyG0z8r7WD/2eXvs9x5jqR5AHg69eSx+o2EOhz8BxhIDyA==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Branch an instance into multiple instances creating a new snapshot.
---
---
id: create-api-key-user-api-key-post
title: "Create Api Key"
description: "Create a new API key for the authenticated user."
sidebar_label: "Create Api Key"
hide_title: true
hide_table_of_contents: true
api: eJydU8Fu2zAM/RWBZ7XJdvQt22VBMSxY01MQBIzM2GocSZXoroahfx9oJ27SYpedIiuP5Ht8Tz2UlEy0ga13UMD3SMikUDn6oxarpTpSpw4+Kq5JYcs1ObYGmUrVJor3oMEHiijlyxIKMEODHQa7O1K3E9D0EXxi0BApBe8SJSh6+Dqfy4/xjsmxHDGERkZY72bPSVj1kExNJ5RTiDKP7Vg9TivlyJYbmhSUoIG7IBfWMVUUIWuwN8jlFShxtK4SzJG6a9ADdf9A7UKkg337AFar8fZTTRbhL62NQncjVMZZN730pGirPyharJYP1P0+7+69v98/k2HIMuDWy8fWGErp0DZqKhNUItNGyx0Umx5+rNerb4SRIhSbbZaxWCVhKO4/UJeEyom49mLv2cKAXEMBMwx2JhbL4W5Ukyi+UkxD8zY2ggJpe5n6KFaO7l3PPnssivbj1aSwZg4DcesOXpC3Mp8SxbtkfKBySKyk9YQOK+sqZV1idIaSVslhSLXnpNXeNo11lVboxhyrRMzWVUkCfdn7Tx9DbRrfDn1Bg+gaZ87vv9zPJQeyjxMOGXV4endLLYJVY3Zu2F4l/X/e2nkjTG88Cw1aJxyGLfdnTzaAwYIGqQANF1+2GmqxrthA3+8x0VNscpbrl5aiRGGr4RWjxb1o32yzhpqwHGLRj48CFsZQEPtfsWmFx6enmq+zsvr1uBYKrfDqL9wnd/eX1E1/oeuumvf9iFj7I7mcz8+lAJZvyNuc81/+j5zf
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Create a new API key for the authenticated user.
---
---
id: create-organization-invite
title: "Create Organization Invite"
description: "Create an invite to an organization."
sidebar_label: "Create Organization Invite"
hide_title: true
hide_table_of_contents: true
api: eJytVk1v4zYQ/SvCnFqAibM96pbsBqgPRYIkezIMYyyOZW4kkktS2biC/nsxpCzTsZPdor1Z5Hy+mffoHiT5yikblNFQwmdHGKhAXSj9ogIVwfCHcTVq9Tey1SUIMJZc/JhLKKGKTqvcaJXcQYBFhy0Fch7KRQ+Ks1gMWxCgsSUowbh6pSQIcPS9U44klMF1JMBXW2oRyh6CCg2b3mUpivkXEBB2li98cErXMAzLFIZ8uDFyx76V0YF04J9obaOq6D375rnhPktiHbcVFHn+ohZVk+e+jQcnGUWyXKGUjrw/8Siux4szns6wXQ+kuxbKBSNRomyVZohdXbbUrsnBUkwhH9jjtOscu0UKmzmloc7jRB4SOIcYZv2NqgDDcRAeQDzw1mifEPnj6tN/wHNciJNzrCqygeQKU0i9u9vETdkY1/IZSAx0EVR7pnHR70901zQwZE1fj3GL68BQpx3dZzkf+wiu6Pi/TpterXLkf6WE22T6TglK5nnP0UCMcMvVerfqPLnVG590W9zsiq+e3FkqxRXMCC3/FREPy/3x6grwAUPncxpY0pIvxbQcIEBS1ShNSSdezDPJfMUfU5CfMSPKzNu23s50LH2qLEuTtz3fK9wbIgkI5pl03vpTPPhpcVPAaP4ugRMlzzP4WM0fu6oi7zddU0xubOWp6pwKu8izP5+e7m8IHTkoF8tIIaxZrI+6jTC0FLaGFd+aKCFRx0uYoVUz42o/65OWD7PUC2Ppyb3sxb9zDZtHnu5reGS9SFKQVzIKCfe3TkdTv9sQbGyDJefhIPa3r9jaUVCTeO+RPmHt4SJtaaa8kTsbw1GOwWSiXPjKWJaG+3mxMa5oUWOtdF0o7QPqirwovEbrtyZ4UaxV0yhdiwK1LJiGhacQlK79ZUb2v4yz26oxXYwLAhivlPPq8tPlFZfEgLcYl2p8NceX+piI+w06qjyT7F9930ekA72GmW0wwRKn149DXwBalcjEUy6nR3w/+aWALW9JuYC+X6Onr64ZBj7+3pHj1VsKeEGncM0oLHqQyvNvCeUGG08fdPHbw0ib34v3ih0PUe8YUGw6/gIBz7Q7/OUYloOALaGMu9+Pl59TnosnDnFwPnns+PVJHumt+dA2Z8/93eMTCFiPf1BaI9nH4Q/eR/yRCjU20a7s01kPDeq6w5ptU0zmAHY8jekZnLiy3jO6Pw9F3yeLKE3DMCGTtGdYDsPwD1Uadsc=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Create an invite to an organization.
---
---
id: create-organization
title: "Create Organization"
description: "Create a new organization."
sidebar_label: "Create Organization"
hide_title: true
hide_table_of_contents: true
api: eJylVcFu2zAM/RWBZzVpd/St3Qashy1Bk56CIGBsxlZrS6okN80M//tAy0nsNigK7GRLfiIfHx/lBjLyqVM2KKMhge+OMJBAoWkvjMtRq7/I3yYgwVhy3eI+gwTSDroZgkCCo5eafLgz2QGSBlKjA+nAr2htqdION33ynK0BnxZUIb9Zx9GDIs8rjRXxM6hQEiTwh9cSwsHyygendA6tBF/W+RC34PUHXBtpKUcZJKsYfC1Ph2LNs0EdD7GIcySzfaI0QDsOFVxN3Ya3RvvI/Nv1zX/UHTXNNtid3BlX8RtkGOgqqKjBiHUmbsMlYVQ2lOX+x0WM31hy3mgsR2Av5sft06mtMSWh5mNf7Y3Za3KbMZEZ74nLdL7WSwm1zb6q0WOEXtTonSlUBn1pPZNBAWOpBs6Zjb1/wSzj6VrUaUre7+pSPPSm6Yh4SmunwgGSVQO/lsv5HaEjB8lq3XI6zD1zHKbzzKOiUBieRWs6t1oMBSQwRaumxuWeayH3Ss53kWtX8lfgmMeUC3ZiNN8wcW/RrvVx61ReEYLtWLOZH87j/vMNK1vSeXyPUh9bO7Se3hkGjuV59OSufGost2x+L3bGiQo15krnQmkfUKfkpfAarS9M8FJsVVkqnUuBOhO1Jyc8haB07icDH/w2zhZpaeouLkhgSWLO68nN5JopsYQV6gH9/i581+QR5cGgf3519toFegtTW6LqJqnrR9N3bQVoFbuO+7aWUHBLkxU0zRY9PbqybXn7pSbHPllLeEWncMsFrtathIIw6zzTwDMdmFCkdrXk3Awva+bw4T5q5fHEbZqSDZ9ih66bzxZLkLDt7/rKZHzG4Z7/A7iHBLqfRrRr0sS9BkrUeY05Y2NMNhPWLEJzum+OptseJ+H0CfVhwLBpImJpnkm3Lci+lMBraNdt2/4DvIZacQ==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Create a new organization.
---
---
id: create-secret-user-secret-post
title: "Create Secret"
description: "Create a new secret or update an existing one for the authenticated user."
sidebar_label: "Create Secret"
hide_title: true
hide_table_of_contents: true
api: eJytVktv2zgQ/ivEnNXYDdqLbm23wAZo2iBx9mIYxlgaS2wkkiWpJIag/74YUpIlO91su3uThsOP8/jm0UJOLrPSeKkVpPDJEnoSKBQ9CUeZJS+0FY3Jg1gJepbOS1UIrUjstRW+JIGNL0l5maGnXDSO7AUkoA1ZZNyrHFLIAvI2Ym5ZZ/g22nlIwNKPhpz/qPMDpC1kWnlSnj/RmIqxpVaL747tbMFlJdXIX/SMtanIQbpuT7y5PogPN1figQ7BVHr2ZBVWwpF9lBlBAjV5zNFHIPUorVZ1eBWM1XmTBaAuAYU1QQr1YYtGbh/oAAk8YtWwsHcj/G5LsgTdJuH7hqyXbNiJXS2gOnzbB4NrfP5CqvAlpG+Xy2UC/mACqLdSFdAl7SBRTVUFZC99xYI/Jpjd3BXMc8lyrG5mZpyCj1jXw+XRAL37Tpk/+j4z9fL9+wRqqUbTj0hfWfvcjSFa7U+u/RWOz+51kRfSUg7pOpoyYE1CEWl7FxJxG3l07skczNuGgsAZrVwMz+Vy+UvUm+c4MjwPcZ7ZlR9tkcpTQZYD8lNK/DYD5Oztq/ylNPwWS3LaY1NxQH6RMq+RIvaVmdn3veg8ZCdckKzTEyIb4zwgTqIUafEyH+b94q7JMnJu31TitucFW/nu8vI/0CInj7LiL+mpducKlc5mp/+CCWNMNpOEfNHRoqOnaC0eQtZdMY3xNTmHxYsZiYKj6mdrtRUrlr5WnOxHfKrX3MzKW+bBugD4EmeOpA7xOnViovHnanXzKuB5do9XRLzDKo6yxkp/CPFm4I+Eliyk602oNCx4sPQccuxSTb7UPNH6uWWQWxks0MgFj7WFG/jGY4ZsHEyNrVgplO/w5h0zJnJg+nJPJXZmF0Wjc6X3JpjNpLs9DszPcQaeTZohVbO6P46z8XQcZSMPpNrrc7h7R/aNy7ShPExWnqo1Kix4I5DKeVQZuUQ4hcaV2rtE7GRVSVUkAlVcDYQjzxuE4x1hZKS2pswq3QRctoisi28uL95eLNkkjneNodZ6+/ttZSzwk5Y6Fuz/utb0qfD07BemQhlab0hv23NhDWgk9yIXctfzYZNAyYxJ19C2O3R0b6uuY/GPhiwTcMOJsBJ3HJI1l3ZJmAcytsA7Rwqfoktv+oIc8nbWj7hXxBsfsoyM/0fdKalvvt2tIIFdv4XVOuc7Fp94Q8MnSCFsdnw7EDfIWqhQFQ23lBQiJpOU4zeZJyOZd0OJjUeopgtV20aNlX4g1XWQ9K54/uee13V/A7NhroU=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Create a new secret or update an existing one for the authenticated user.
---
---
id: create-snapshot-snapshot-post
title: "Create Snapshot"
description: "Create a snapshot from an image."
sidebar_label: "Create Snapshot"
hide_title: true
hide_table_of_contents: true
api: eJzNWN1v2zYQ/1cIvvRFdtxgwwa9tW6BBVjWIE764gbBWTpLrCVSJSnHruH/fThSH5StpOkGDHuTqON9/O7ud6QOPEWTaFFZoSSP+VwjWGTAjITK5MqytVYlA8lECRlOv8gvctF8Mgw0skoJaSdCTqwokSWqEmiYWjNgupZSyIwJaSzIBJnNwbIEJFshqw2mzCqWeIMSnzo5M+URVxVqIKeuUh5zL/XYOtU/VMpYHnGN32o09r1K9zw+8ERJi9LSI1RVIRKn6eKroRgP3CQ5lkBPuIOyKtDweHngqTCbRyO+I49/m80i7iJ+FGS/VLrKt+WkFFKUUPCIl1gqvefx28vf6cVCCpZUHskZSIVEYx6THJMN2SFsVG15/GvE7b5CHndLx4hvk6o2PH57fIh4pSl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fgGVuAgaw6DeovaXsloXJOHGb2tyQQXjSyA03FQSxbLyS11subWV85pq7ra/LH7097/wqtUmKXrpPtjJ/MNroDv/Pn8PjDidwEdmu0E9MYmqMGXvbq7c6CxBQhaePU3UkYyJ2EoUhZBZxECmdM/RzKAlSjHhkeKaLk5JoWqnl0ec8Pc2Z9O30xl5RzkrwXWshLI/YLHFMyM2aPz/z3+FFnXc2YuqACEpNFdkh6YclxwqQVXYhvUQ8ZzqNV7yw4GO5/e6OB5p+VuNlPzlQ8S3oAWsCMwlUUuOkLpmOPAN7v2lgaCYNITgLmHUo6d8SFzld7xLEqzsi7JhS918WtzxiK+aXyClSmmPhieidnjiMXd/VWi36xy3duAFyKwmSou510ldAjUB0ZFm102rtsW7TyD3gYeHg5e4UxuUxyOPmlAsvRPnHo9/AyMbX98=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Create a snapshot from an image.
Snapshots are point-in-time copies of a running instance that can be used to create new instances.
---
---
id: create-snapshot-token-snapshot-snapshot-id-token-post
title: "Create Snapshot Token"
description: "Generate a stateless token for sharing a snapshot."
sidebar_label: "Create Snapshot Token"
hide_title: true
hide_table_of_contents: true
api: eJylVd9v2zYQ/leIe2oBLnazIhj01nXDFmBDgybti2EEZ+lssZVIlqSCGIL+9+FI/aDjdEXbJ8vS3fH7vrv72ENFvnTKBmU0FPAXaXIYSKDwAQM15L0I5jNpsTdO+Bqd0gf+qtH62oQLkGAs5yijrysooHSEge6ngPuYvfxdnlR1P360xgeQYNFhS4Gch2LTg2JAFkMNEjS2BAVkuSDB0ZdOOaqgCK4jCb6sqUUoeggqNBx/O8aLa44PRxuLBOYAwyD7J+zvIlF6tCrxEUoLT6XRlRcvKtpj1wTxStSmcy9BJoBfOnLHBWFMJn+v9AnAPTb+BOFYDYpfr9Zr+XM4WnxUbddC8dvVay7WKp3+X63lLMWfCZi41osSSgc6kINh2DJYb4325Bne5XrNP6XRgXTgR7S2UWWEs/rkGWaf0bGOhyColJ2JkDXjfxFIiKOQx0cVnmtbputmTJP5mduF9ds4jNMYxIrvR55LZbP7RGWAgUufNuK2K0vyft81Yk4bJLy+vPwJdSoKqBp+UoFafx7QmPLkK+rju31ciSdSyP5Mx+2wkP/HJEQLU3QOj8yg9Ydc6n/JezzQudjTi6yLzhkn7vjtt1rDPNJRY2TWmI/YqCqiiwXPm7GE/pH0ekoii/j77u7mmwXPu7ukiJTDIZ7KzqlwjHpz4d8JHTkoNlvekoAHdqfZWTyTainUhr1vNrJQQwErtGo1Wdaqz8xrWE1j68k9TIbXuYazgM+ZYNzyEKWxyMGM08X8dunVzLcOwUYmSu9Nmrec9AdP7hdfGkuVeHNzHW29RY0H9nWlfUBdkpezwXspdqpplD5IgboSnScnPIWg9MGz+88zZJyty8Z0sS5IYF7pzPXFq4s1t5T1aTFux+iXaUHFbNTT0p+Azlbtx26oUZpAj2FlG1SawUS5+7FZG0CruB9jFkgoTm+b1LGthJqbXGyg73fo6YNrhoFfp4uA+1gpj7sms/2vkvlOo3+Wxmc6Pr13HrDpODBO0gM6xXC+E9qL9+MmvxRfO3naR33Mz5wQ5epFW6oJq7hI/RjxpizJhiz3zEWHfLlu3t3egQTsuF+z883jv5v2tH8eWN+niKj5MMw4U1+H7TAM/wFbZh9I
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Generate a stateless token for sharing a snapshot.
---
---
id: decline-organization-invite
title: "Decline Organization Invite"
description: "Decline an organization invite."
sidebar_label: "Decline Organization Invite"
hide_title: true
hide_table_of_contents: true
api: eJyNk01v2zAMhv+KwNMGqE037OTbPg7LYWvRpqcgGBibsYU6kirSxTJB/32gP4oU3YadbNMUyffhqwwNcZ1cFBc8VPCF6t55MuhNSC169wv1j3H+yQldgoUQKY2xdQMVNFP+j/PkH1MyWIiY8EhCiaHaZnDaIaJ0YMHjkaACCQ/kwUKix8ElaqCSNJAFrjs6IlQZxEmvmeuxqNnMB+QUNcqSnG+hlJ3W4Bg8E+ux91cf9PFS3d1Q18R8GHpzOyebC/M9mM/BC3mBUiww1UNychpH/rrZ3HwiTJSg2u60i2CrauD6TDHDzsKRpAvKJAaWUbx0UMEKo1tNRHiVR71lNWMD7ZaeFj5D6vUAaJtlijsFMUk6nyVPhBTBfgo9I+lE4ijE+UN4zeCeKV1wHSI15uPN2hxCMkf02DrfGudZ0NfE1rDHyF0Qtmbv+t751hr0jRmYkmEScb5lNcSyoG8hxa7uwzDWBQuqa+p5dfnu8gqKHdEc0etUswEWw53jNOvFQC9Gz1DPa/ofn840hH7KKvbovPYfCed5NVvA6EA5jcsBC9Vix2U/OwudbrPaQs57ZLpPfSkafhwoqUV2Fp4wOdwrg22GxrG+N1AdsGf6h4Q3t7Pn35q/jTsH0Z8UJ/aDfoGFBzo9352yK2feu7m+24AFHFRgXgo8W2S/WDn/uXbOU8Z4y0p53aqU36mMcE0=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Decline an organization invite.
---
---
id: delete-api-key-user-api-key-api-key-id-delete
title: "Delete Api Key"
description: "Delete an API key."
sidebar_label: "Delete Api Key"
hide_title: true
hide_table_of_contents: true
api: eJyFVMFu2zAM/RWBpw1Qm67oybcODbCiHVa02S5BECg2Y6u1JVWiixmG/32g7NhO022nyMoj+R71yBYyDKnXjrQ1kMANlkgolBHXD7fiBZtzkGAdesWA2wwSyCJkq5zevmCzrQP68WM86Gy77YEgwSmvKiT0AZJ1C5oLOUUFSDCqQkhgCgMJHl9r7TGDhHyNEkJaYKUgaYE0lQy/dlrcYSNuGU6N47tAXpscum7DGYKzJmDgoMuLK/451vlUpymGsK9L8TiAoZNwdXnJ2NQaQkN8VM6VOo3qF8+BY9sZIee5N6T7ShmS0iWfNGEVTgGlTY/+Vab5sY89eSdCjjfaEOboodt0ctR/b3tGk3rlvWpYQRXyeae+Ywgqx9M2HS4m6NJ768WKb0+bOn+VddTRlxqQm4nbL1XqLLKLCadcdveMKcFMxk3fr/ciZohvq9XDfxNywPHrTiGij2FIwLT2mprYb078FZVHD8l6w54hlbM9gX1/h01gTRVSYSfPRytTAQkslNMLdj4fzl6wWbSThTvgYv7t4PfalxwCXOVA4okt1JtiTmXwFqvb9Vej2oLIRR3a7O2poX8G9GchtQ6zOLp760WljMq1yYU2gZRJMUgRjHKhsBSk2Omy1CaXQplMsBgRkEibPPDQjw6y3hVpaeuYFySwrr7mxfmX8wt+UGcDVSrOxjDQwx4ZBhXePdBswj7eOINmwt+0cKXShqvEPrbDE6x5Z4AE5g0ShmcACclsl2wkFDYQo9t2pwL+9GXX8fVrjZ6dsJHwprxWO9a6biHTgc8ZJHtVBvwH70+Pw0B8Fn8jfLC1YV5vqqz5CyQw0aOdF4e7QJVFO7YD4DpN0dEs9GQXdXOP3izvl6sl96LmBo0bZDTS7uD39mNmbdsjVvYFTdeNRIm/mWPX/QHUGRk+
sidebar_class_name: "delete api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Delete an API key.
---
---
id: delete-secret-user-secret-secret-name-delete
title: "Delete Secret"
description: "Delete a secret by name."
sidebar_label: "Delete Secret"
hide_title: true
hide_table_of_contents: true
api: eJyFVMFu2zAM/RWBpw3Qmq7oybcODbAC3Va06S5BEDA2Y6t1JFWiiwWG/32g7CRu0nUnK8oj+d7Tk1ooKObBeDbOQgbXVBOTQhUpD8RqtVUWN3QGGpyngAK7KSCDIgGXPWzZRAq79e4rdctljwMNHgNuiClEyOYtGJnmkSvQIEjIYFQHGgK9NCZQARmHhjTEvKINQtYCG64F/9BT/NnjeetTEw7GltB1C2kRvbORolRdnF/K563chybPKcZ1U6v7AQydhsuLC8HmzjJZliV6X5s8yZ88RaltR4x8EHPY9JMKYjS1rAzTJp4Cape/+Rft9tc6uXIkQu93jGUqKUC36PTegFvXMzqoxxBwKwo2sRxb9YNixPIdm3YbB+g0BBfUTHZPTR0fyzzp6EcNyMWB22+sTZHYpYaHXm71RDnDSMZ179exiBHi+2x299+GUvD2dA8lqq8RSKS8CYa3yW9p/I0wUIBsvpDMMJYS0CFcUSRtiCt3yHzKMleQwQS9mUj0J310J+0owh3IrPC6C3wTaikBGbLj8CAJ6jMxZjJES8St+q292IrZJxnGrt1pnh8jhS8xd54KdXV3o9YuqA1aLI0tlbGR0eYUtYoWfawcR61Wpq6NLbVCWygRoyIxG1tGufT7ALngq7x2TeoLGkRXP/P87OvZuZynd5E3mK7GcKOH16T3Eo6OZ3S/Pnp2BuFMf3jiazRWRiUz2+Ec5oDegAYhn0wfpmXjB2WhoXKRBd22K4z0GOquk+2XhoKkYaHhFYPBlQiet1CYKOsCsjXWkT5g/+l+uBSf1b8I76Jtt+Id1o38Ag3PtD16+dINrwiLlMl2QFzlOXke1Z48SN04qdfT2+lsChqwEYf2z8g+Tqtd6Nv3qbVtj5i5Z7Jdt2fK8ls4dt1fOpIgyQ==
sidebar_class_name: "delete api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Delete a secret by name.
---
---
id: delete-snapshot-snapshot-snapshot-id-delete
title: "Delete Snapshot"
description: "Delete a snapshot by ID."
sidebar_label: "Delete Snapshot"
hide_title: true
hide_table_of_contents: true
api: eJyFVMtu2zAQ/BVhTy3AxmmQk24pbKAGUjRInF4MI1hLa4mJRDLkKqgh6N+L1Tt2m55M0bOPGc5uDSmFxGvH2hqIYUkFMUUYBYMu5Jaj/TFaLy9AgXXkUWDrFGJIW+DTAJsO00mnT08dDBQ49FgSkw8Qb2vQUswh56DAYEkQwywOFHh6rbSnFGL2FSkISU4lQlwDay4E/zB0uBY8H12bhL02GTTNTlIEZ02gIFFXl9fy857tQ5UkFMKhKqL7HgyNguurK8Em1jAZliM6V+ikZb94DhJbzzpyXrRh3VVKiVEXctJMZTgHFDZ59y+a489Dq8oJCTXeaMOUkYdm16hRgFvbdTSxR+/xKAzKkM2l+kEhYEbnMg0XE3TlvfXRRm7PRZ0/y7bl0ZXqkbupt19Y6LTtrk045bL7Z0oYZjSWnV6nJGaI75vN3X8TSsD7151Coi5GIIGSyms+tnpL4m+EnjzE2514hjETg47mCkKqJM7tZPrWzZxDDAt0ejH4dlHPHNyAlPJvg98rXwgepMbQwoMYqLPEvJHeWcJt312NXHNm17LQ5mDP7fwYyH8JiXWURjd36+hgfVSiwUybLNImMJqEghpnO6hor4tCm0xFaNKoCuSjQMzaZEFGfvSP9S5PClu1eUGB8OpqXl58vbiU53Q2cIntZPQD3e+SQUo4eZ/ZgH20dnrqTL954QrURoq1ctb9M2wBnRa9p0LxfJnsFOQ2sADreo+BHn3RNHL9WpEXJ+wUvKHXuBe22xpSHeScQnzAItAHjX+67wfic/SvXgdbm6MIh0UlX6DghY4nW6+d7pwwbf1Y94ibJCHHs9izZdTMPbpc3a42K1CAlYgzrpDRS/vB8PXfW6vrDrGxL2SaZuyU5Vt6bJo/Tr0gOg==
sidebar_class_name: "delete api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Delete a snapshot by ID.
---
---
id: exec-instance-instance-id-exec-post
title: "Exec"
description: "Execute a shell command inside a VM via SSH (AsyncSSH backend)."
sidebar_label: "Exec"
hide_title: true
hide_table_of_contents: true
api: eJytVlFv2zgM/is6Pm2A1nTFPfmt6xVogQ0rmmz3EASBIjO2VlnyJLlLYPi/HyjZjt10Gw53bwpNUeTHjx/TQo5eOlUHZQ1kcHtA2QRkgvkStWbSVpUwOVPGq5zMXz+xZyXYcnnH3lz7o5F02gn5hCZ/ewEcbI1OULT7HDLAA8qtMj4II3F7Oql8u43fausDcKiFExUGdB6ydQuKcqlFKIGDERVCBpOrwMHh90Y5zCELrkEOXpZYCchaCCpo8r/v/dk9+YdjTUYfnDIFdN0mhUAfPtj8SPekNQFNoKOoa61kLGLxzRMu7eQBPIiq1pgS7fGBbA0oSwsc7lBry9nf1un8D9jQS7UjUIKiO5MrLaiAVbS9SI+PVdz0zmMFwjlxhK6bQrAeY274Wf3U0cdU6imK3X1DGaCbxyEoo8HX1viU7dXl5b9CZ14rHlTYSpvjtDO3BxXYDRnHfJQJWKCjyn3I0bmp/zJZzpoYfW0TXviS5bzhc7z84OaH2KdMf4phQuV1EOdTtGykRO/3jWbjtY7Dn1dX/wHLHINQekabuYO2cvZVmOPnfWTpS+DaM9w3E859tCmjM9JxqHwxRfsTei8KfK01yTBpunPWsRVZf9ccqiM91XtOOvJVaJXH7GLA82acXP9KeL0yOYPH3Wr18NuA5909XWHpDrl4lI1T4RjxpsAfUDh0kK2jBARRkGCMjPJUVIWhtKSSowiGEjJYiFotBrlbtBPh6xakmURbdM+DVjZO0yWgZ4YslsShxIppLj25qLxdMo3lliHUsRCi4eNJGm+T2s2Eaz10jlijzN4mek4x+uLRvfPS1piz64d7treOVcKIQpmCDRV5zrwRtS9t8JztlNbKFJzRvmk8OuYxBGUKT2tlpJx1dSm1bWJc4EA4pDcvL95fXBIDCM5KxGHql8dtgm2W42QQ/4e118MY8BAWtRbKUCKxNW3f1zWIWgEfFxlwyOZLLTZ3w6EkOmRraNud8PjF6a4j8/cGHfFrw+FZOCV2BMi6hVx5OueQ7YX2+Isy3zz2Y/aW/SzlYVjMkbAVuqFfwOEJjy+WcNSMEkUeWd72HjfpsXf9pA8RzoSORCjduJYS6/BL3+msPHxeroDDrl/bVVwu4MQP+lcgfqRsbSw+8j/aWtDCFA1pVQYpJnFdNNSYUQ3HmdgNs9u+jkfbJo+VfULTdSM8gX4TMF33Dx7VM/Q=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Execute a shell command inside a VM via SSH (AsyncSSH backend).
---
---
id: exec-sse-instance-instance-id-exec-sse-post
title: "Exec Sse"
description: "Exec Sse"
sidebar_label: "Exec Sse"
hide_title: true
hide_table_of_contents: true
api: eJyVVU2P2zgM/StenrqAZpId7Mm3tjtAB9iig0m6e4iDgLEZW60tqZI8TWD4vy8of8SOB1j0JtMkRT4+PjWgDVn0UqunDGKgM6UH5+gglfOoUjpcTzI7HMb/RjsPAgxarMiTdRDvGpAKYjDoCxCgsCKIYRIOA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
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Exec Sse
---
---
id: expose-http-service-instance-instance-id-http-post
title: "Expose Http Service"
description: "Expose an HTTP service on an instance."
sidebar_label: "Expose Http Service"
hide_title: true
hide_table_of_contents: true
api: eJytWF9v2zYQ/yoEsYd2UBK3W4fNL0OaBmiApglip30wMoOWzhYbiVTJkx3X8HcfjqRsylKTDNmbdT7e398d77jhGdjUyAqlVnzIzx8qbYEJxT6Ox9fMglnKFJhWRJLKolApHPOE6wqMoEMXGR9ycMemOWI1DWemDfd0/0tmU89TaYs84ZUwogQEY/lwsuGSLKgE5jzhSpTAhzw6yhNu4HstDWR8iKaGhNs0h1Lw4YajxIL4LwI/uyB+XFdEtGikWvDt9s6LAIvvdbamc6lWCArpp6iqQqbOp5NvlqKxiRTAgyirAryhwbgVzMgJbZAP/xwMBiS/MhQZlMS54aLGfFrqDNyHWl/N3XlQdcmHE660Ap5wUcnpPaz5XbLz4yNiNfKBPK0xvyQRHX+STUNRdVFwUp/BXNQFEsnLbqeXZIHC4CYjy9hcG4Y5tBLOt00GNrwUD59ALTDnw98HCS+laj7fUAYRwZDofybi6Mfg6K+7V+HH0fTu14b2+u9f+N65zyS5602IpNMoS4rQH+/e/fbOqfTfb/Yyrol3J0MqhAUYvt3GIJl4H4LgKLoe5VGMbzwq9gL17BukyLdtgYQ6R7CVVtan+O1g8J+A1AZIakAgid5D+CyQus4lXLY4+zCe8BJQZAKdMpFlkuwQxXVLbedQGya3FgyrjF7KDDLWCNwhpSnKKKWXjdJOBBOuAFfa3JOmjv9xx3AEiVDaLl+rkDog/7/qaYf55yL1CTQmvDZFzHdrip629HPMegGRH01/i/zpC3nsNhs14d0xCmPE2uFJUfWKYiqrdod6utPs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IJ3lCWxpNxfuuMmw/9riE3CU8J2wMJ3yzmQkLt6bYbon8vQYaTyd3CV8KI8WMwjBxwzH9zvq7cuzNq5tQc6/Zz0xuKkfRNLcURU1fPOG0XbYfp1wDyUFkDvKbwHHmlR2Fsm8kdLoedSR/4jRNocJHeePCub4ajXnCZ+E5K4DTiBV1d7Hy1mrnvCsGR9vwQqhFTY1ryL1MAj7BO3oc2BXIrCnkTX88NhvPMdb3oLbbXXiQvikw2+2/1c0AHw==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Expose an HTTP service on an instance.
---
---
id: get-active-organization
title: "Get Active Organization"
description: "Return the effective organization for this request. For API-key authentication this is the API key's org scope (api_keys.organization_id). For Clerk/web sessions this reflects the user's persisted active organization (users.active_organization_id) after canonicalization."
sidebar_label: "Get Active Organization"
hide_title: true
hide_table_of_contents: true
api: eJztVcGO2zYQ/RViLkkBrb3t0bdtmqZ7aHeR3T0ZhkFTI4kxTXI5o01dQf9eDCU7kmMU+YCeTJGPM2+G7407KJFMspFt8LCCz8ht8oobVFhVaNi+oQqp1t7+owWjqpAUN5ZUwtcWiRfq95DU3eP9zR6PSrfcoGdrBnAGWsrx7h7v1R6P70jiKTIhonqvo93u8UiLaY6tLX8awn5wmPbLr7hThEQ2eDrlrhwaHgK3hOkdqYiJLDGWSl+h/V5QtBiOtpfZlK4YkzLaB2+NduPRAgoIEVP+uC9hBTXy9koMKCAhxeAJCVYd/HJ7Kz8meEbPstQxurEryy8kve6ATIMHLauYJA3b4fYsstz1x4cKVutLnEmoGcutzhmqkA6yglIz3rA9IBTAlh3CCj4MUHXHsnmMskecrK+hL8CWEuCEvf/tKoa20uHgtZuBST2ets+3diE41F6ueX3AKf4vPfC6DB++ekzbOZEH2VPX6ZBr6yn2Sb6v4NpY/miPXgbo1R718sCvrU1YwmotDRtLG5lMCpi3avMt/sNcMGOGsPuChqEvutOOb52DfiNNmct0roXLUi/vX08s7ZRqTmd3Wcz/TU3w8zHx1BqDRFXr1OdR9zkqoWmT5WMm+Mfz8+OvqBMmWK03mZCuSdo3TUfSogNyE0Z/QQFRcwMrWOpolyHVtBwsJ83G9IaJcvw2OQHlUk+Jn8RSgzum6UevZW0OW+ciG+aYuVtfBUHOK30hTDd5WJV5gsn4O2iva+trZT2x9gapUOR1pCYwFWpnnbO+LpT2ZR5OipDZ+poWE7X9GVJsjAttjgsFSF1DztvFz4tbEW8MxAedZ8DgI/iErIYnUxdvNqM9GT3/j/TvRvr48ox/8zI6bfOgymrqRumtQUcL2YAEBYzy2xTQBGI57rqdJnxJru9l+7XFJKLfFPCmk9U7eeK1WLhBXWYDdLDHYzacwSgif9OuFRrf/TP0U0N8+vgsBFphdXb4WcO7k73OR9ofJ7G7bkA8hz36vodiJMHyLTOm7/8FoIjLTg==
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Return the effective organization for this request. For API-key authentication this is the API key's org scope (api_keys.organization_id). For Clerk/web sessions this reflects the user's persisted active organization (users.active_organization_id) after canonicalization.
---
---
id: get-instance-instance-instance-id-get
title: "Get Instance"
description: "Get an instance by ID."
sidebar_label: "Get Instance"
hide_title: true
hide_table_of_contents: true
api: eJylV01v2zgQ/SsET7uANskWe/It2xaNgaYJYqc9GIFAS2OLtUSy5Mipa/i/L4aUbMpikwVyisUM57355Myel+AKKw1KrfiEfwJkQjGpHApVAFvu2PTD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Eg8r3ThTo3jdRZy/wIVx8nShUZnw7OjBk800ojSBzuRHgms0QA5a71hq7ZmD92wTP775927N8zKJaCQ9QtDYq2LwX//xzhzrMGnyLefdWCUGJgat46ngVtwTqyTI2I4OIl+pM7P5nT62txAdgSoTjKKwldRy9Kz8wpfGv4+BH+dGxGPh/P5/asKx9E9XWHhDok4KForcef9TYr/BWHB8sniyY+LYk0L2jGLfOdpACvdrXv+LcGKT/ilMPKyr5TLfbS+HSh1wW77Zc9P1/zSd8wef0bZE/IhZtGllS+ncHQ01LeUg5+GV3rc3mgZ+ssV2kDJru+nvrs1Qom1VOtjQbvsOG65jC1lXUu1zphQJWtpmep740U8GmlrqqLWrdfLM052Bcyri78vrsKi4bARviy6bZYW6Gk8I0dco9L6/aLdWY3wEy9NLaSK9pQQgQVtUDSxnmAm8RL9lPFK07C+4Pv9Ujh4tPXhQMc/WqCZcfGU8a2wUizJ0IWfWOl3mW6VMe0/HrpC+JP9jmufzopGrK2oW/riGaeVb7jt+6quQJQ+D/edxHVRgMHo7qgJHeLc/PRxTjtli1W0OR9zaNln+T7Na78PEnO9AXU4HGkifRPBw+E/i5bjGQ==
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Get an instance by ID.
---
---
id: get-instance-metrics-instance-instance-id-metrics-get
title: "Get Instance Metrics"
description: "Get a point-in-time CPU and memory usage report for an instance."
sidebar_label: "Get Instance Metrics"
hide_title: true
hide_table_of_contents: true
api: eJytVU2P2zYQ/SvEnFqAu94uetItSYN0gaZZJHYvhmGMpbHERCIZchSsIei/F0N9WF5vkwLtyTI5M3xv3uOwg4JiHoxn4yxk8I5YofLOWL4x9oZNQ+rN40ahLVRDjQsn1UYsSQXyLrA6uqDQKmMjo83pFjQ4TwGl3EMBGZTE+2l33xAHk8fzwvnLFPt5uyQGDR4DNsQUImTbDozA88gVaLDYEGSwSAYNgb62JlABGYeWNMS8ogYh64AN1xL/MMarB4nnk5fFyMHYEvp+JyWidzZSlKz7uzv5yZ1lsiyf6H1t8sRt9TlKv7rFKT4IczZDdu7bferU3lPIxwITkDe+VZvUxsdxc4Zj2+ZAAXp9we7fktAwiDQefTjxgGZKfj9IOJz9Ou3ONYxlKoejJyFE/sjY+H1rzdPeonWX1VKYWk9hamPNk/pTwl4q6w6fKb9oxIdh5VqMpZzbKVE/U/y6xy/y/z6fnb5q7cjr4+iGM7wRRy/4Lu/NpzbPKcZjW6s5rdfw6/39f/BQQYymli/D1MTrgNrlF7toTx+O6bY890V3JceuPxP/ww2IzkwxBDwlK8TyUvIonX3JecPCOfRtCC6otaz+SF/hMRw1Ri5E+QtrUyR0qeC1GOfQ34Z+PSexiPh9vX78YcFrdc8pasiRkEh5GwyfUr+l8GvCQAGy7U5mCWMpg2s2VRRSDXHlxrGYRhxXkMEKvVlN1l51C5P3q9G6IOeFb9MwbEMteSAHTTg+iYsGXyzRjPYSgodhaSZcMftExdijGwy3ZL2JFG5i7jwV6tXjQ5r1DVosjS3niR+1ihZ9rBxHrQ6mro0tdXov2khBRWI2tozyMswmcsFXee3aVBc0CK/hzLvbX27vRFPvIjeYrsc47eVpmoff+7ktF5gXV+3/eMrGPjE98crXaKwgS73vRu22gN4sBhNoyC6H1CTgTkPlIktK1x0w0ibUfS/LX1sK4qKdhm8YDB6kSdsOChPlu4DsiHWk71D96eN4mX5W/4R6uhL2JP3GupV/oOELnZ69pGkyVIRF8nI3RrzKc/K8yL0aZP3S3+/erkEDttKjefbM/jtMN6V7GVfXDRFr94Vs388wWf4LwL7/GxAWBe0=
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Get a point-in-time CPU and memory usage report for an instance.
---
---
id: get-organization
title: "Get Organization"
description: "Get details of a specific organization."
sidebar_label: "Get Organization"
hide_title: true
hide_table_of_contents: true
api: eJyVVE1v2zAM/SsCTxugNtmOvnUf2HrYWvTjFAQBYzO2WkdSRbpbZ/i/D7Sd1GmzYTvZoh7JR+qRLRTEeXJRXPCQwRcSU5Cgq9mEjUHDkXK3cbkJqUTvfqECT8FCiJT6w3kBGZQkqykCLERMuCWhxJAtWnAaPqJUYMHjliCDkMqVK8BCoofGJSogk9SQBc4r2iJkLYiTWqEXk9jm/BNYkKeoFyzJ+RK6bqlhOAbPxOr5fj7XTx68kBf9xRhrl/chZnes5baTTDFpReIG7zwRChUr7D03IW31DwoUOhG3JSUwUvs4QM2ZvGZlwRXTMo4xt+B4FSlx8FgfgNlc7sx7r3UINaFXt6GLz/jvOPB6GT788JRWh0Qu1Ha0kRa4bsop9lrPR3BNLP61R7cD9GiPuun7L6AXhB9K4SHzvoDDVi3tUXk8ZwjrO8oFOk1xKPPrJs+JedPU5moUTU+EKW+Sk6desV9vbi4/ECZKkC2WKjDBUsV8kI6Vx5akCuMc9NKXCjKYYXSzkEqetYPUO62J0uNuJppUKww09i71tSpyEOGUwCjVXgKDaV9mJRJ79s5vgiIPa71lSiech6j9vzw3m5DMFj2WzpfGeRb0ObE17DFyFYStWbu6dr60Bn1hGqZkmEScL/l08qjfQopVXoemjwsWtK4h5/z03elcNRIDyxb7URuHXjfMi+c64DsZ2f/YRmMrhH7KLNbo+gHp29uOr7EAjE7FlEoGC9m4fJYWqsCi9227RqbbVHedmh8aSiqEpYVHTA7XWvSihcKx/heQbbBm+gv9N1ejrt+aP1EcjeiftH9YN3oCC/f09Lwgu2VnoSIseiW24+VZnlOUidur/dZNlfnl8w1YwEZ70e63yU5K653O2+OU2nZA3IR78l23Zyh6VoJd9xtWXyMH
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Get details of a specific organization.
---
---
id: get-snapshot-snapshot-snapshot-id-get
title: "Get Snapshot"
description: "Get a snapshot by ID."
sidebar_label: "Get Snapshot"
hide_title: true
hide_table_of_contents: true
api: eJylVktv4zYQ/isEL9sCapIGPfm2m11sAzTYIE5yMQxjLI0lrimSISknXkH/vRjqxVhKUqAnU+N5fDPzDYc1z9ClVhgvtOIL/h09A+YUGFdoz7ZHdv31jCdcG7RAOtcZX/Ac/abXGQ/jSWSbTY6eJ9yAhRI9WscXq5oLimHAFzzhCkrkCx4Z8YRbfKqExYwvvK0w4S4tsAS+qLkXXpL+ssd2Tfr+aIITb4XKedOsyYUzWjl0ZHV5cUE/qVYelacjGCNFGnI5/+ko6TqKYixl6kVrnVoET2DqkzI9KPHCvCjReSgN0zv2XKBivsCxds/gWO8gGeBfjZIWulAec7S8SXgmcnQtSHX8sQsVO0kwGSSqkpJTvifIHFpmrD6IDDPWeiR8r6B15ThjDw53lWQ7bVkKaSFUzsSJroc9OgZMapWHlJnXXV5nUV5fW+xNwsV8vZ4qZCJD5cVOoA0h4zgJk2I/fm5eXl5eIvdzzU54iR4y8KFzkGWCooG8fdXDidF79eodTuBFUG76oAMgvf2Jaci9O7WMo1byyEGGO6jkRBij+RHsGflNGMhnODr2qdf+FIFoFedqYnHnpkwWJeS4aVsz1JRk82MUD+JqNF4nkzG8o3AzlXAG0ymMTLj9xolfOKXIUvzCCVGFYiXmsD16dK/I5vaMDGbHqMRS2+M0wk2QxzGK94K06rMRDqmp3DTA49XtA7vSlfKTIJHfx2A8dXtS9EOnVvYwxtpFbbhDpyub4pLKPdcGD34O6jLIT+vNE46qKim8QZURFwgUZBR/B0KGiytDib79LxxxlhhthI+5RR7Ha9L1Vq5NKLB5xvs012Yy2ssqTdE5uuDuup1AJfnr8vJ/rIQMPQgZRspjOTNpUqev/v0PV/lAgXUzZvqPbhGNmYK1cAwEd3k8xzfoHOQ4dxm0glH1m7XasnuSftQYyqMN1WlGXXgEKbKALjicI94wqm29TpOINP6+v7/90OG0u6MJa21IxWFaWeGPod7k+AuCRcsXqzWtSg85vUMGFgVqlegL3b1qwovFF3zBz8GI834uzuvoldIQO9Ee+jdNZSXph13cx18Se1o+xCg6WlFi21Y0JFp4b0IKQu30zAJ1aP9wqTaYsc+312E/laAgDytbOQ8qRZcMk+wSthVSCpUnDFTGKlpzDj3NrYv39o22pkilroJfnnDKq415cfbn2QX10mjnSwhj0T3a6Jm4fGOJRaP15nOyS9rjiz83EoSiMKGQddeAFQcjqNJjlEX8VFwnvNC0YVe8rrfg8MHKpiHxU4V0+6/WCT+AFbClPFdh99A544sdSIfvoP7trpuD39lbWHs2K7oZDyAr+uIJ3+Px5E0bhrpAyAIN607jc5qi8ZHt5A5qYmp+/3bPEw4VVWa4NgYKbXuS1/O46rrVuNd7VE0zwPT0TQCb5l/VNiVE
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Get a snapshot by ID.
---
---
id: get-ssh-key-instance-instance-id-ssh-key-get
title: "Get Ssh Key"
description: "Get the SSH key pair for an instance."
sidebar_label: "Get Ssh Key"
hide_title: true
hide_table_of_contents: true
api: eJylVU2P2zYQ/SvEnBpAXW8XPemWokGySIMsYqcXwzDG0lhiViYZzmhbQ9B/L4aSZTl2mgI9mR7N15t5fOygJC6iDWK9gxzekhipySyX78wzHU1AG83eR4POWMeCrqA7yMAHiqgxjyXkUJFsmevtMx23J6/t+WTL7fS5IoEMAkY8kFBkyNcdWC0dUGrIwOGBIIdZMGQQ6WtrI5WQS2wpAy5qOiDkHYiVRv0fR3/zqP5yDGpkidZV0PcbTcHBOybWqIf7e/0pvBNyokcMobFFgrT4wjqLblYlRAUsdojGoiDmrfhncvMeXie7WSX7VRMZ+N0XKmQszDJHOY4HMihpj23znY+nSh+HTDdqBGT+y8dy3tfTyXbLP9oXFEr55yGD2bwfyl5FtbvGFldByXo7pp8vcX1R9iLdDEF2OehNdrXsJdcXxcYB91rtktfLNqXat435NBJBcfz68PA/eFCSoG30ZIUOfO3Q+OLiK7rjx31i/LcTnSzWCVUUod/0Z7x/+KGjM1KMEY+K4MDVfAUfiBkrurWzwXB2fROjj2al1h9tS3EMpUbP2S7+xMaWqbuU8HoZZ9ffh3l9C2Lm8W61evphwuvtnkPMEKMuTEUbrRzTvDXxb4SRIuTrjeqBYKXiM3GJFdSBpPajoiUqSg05LDDYxek2LrqZNPUL5nox8JYpvpwErY2NxoEWOvWxVBYNvJh3M9JLAe4G0wS4FgkJinV7PxBujvozU/yZCx+oNK+fHpNMH9BhZV01iTVnhh0Grr1wZna2aayrMoOuNC1TNEwi1lV8N1OXDz6Gumh8m/JCBoprqHl/98vdfVIAz3LAdD1GxdanY8n1eP0vWp3dsP/8wowzEPpbFqFB67Rqmms37mUNGCxkk05CBvnls8GsL4quZ5NB7VVy19B1O2T6HJu+V/PXlqJyZJPBC0aLOx3BuoPSsp5LyPfYMP0Lop8+jVfllfle3yfCOx3NCzat/htbu3zr0r2vCcvE1G700JclyCz2Sqb6OXvfvlmperY6pUlZJnbtTvegu91X1w0e6R3r+6nNQYb7Td/3/wBVg9Eg
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Get the SSH key pair for an instance.
---
---
id: get-user-service-quota-user-service-quota-get
title: "Get User Service Quota"
description: "Return the user's quotas grouped by service, then quota_type."
sidebar_label: "Get User Service Quota"
hide_title: true
hide_table_of_contents: true
api: eJylVMlu20AM/ZUBL71MY7dH3dKiSA10SeKkF8MwxhIjTSLNTIZUUEPQvxfU4kix20tPkijy8T1uDWRIabSBrXeQwC1yHZ3iAlVNGN+Req49G1J59HXATO0PijC+2BS1eLn+/44PAS9Agw8YjWCtMkggR94JzG4I2fXOZ0w5MmiISME7QoKkgY/LpTxS7xgdy6sJobRpB794JOHbAKUFVkbeQpTkbPvoAb57t4wVnbr0yv7hUNrK8u7FlDXKJ1suERL4Jmb1qzNrEOWQgHWMOUZodY+7S302i7oRq/os1mMQcbQul5iaMDvNdE+Y/TVRK/V6rm3EDJLNNKueMZ+Bb/Wc0Iqx+lnzK7zfP2LKQmnmR68eJkZzEIexgzabcl73VrXKzukcY5yp8FzUD7GfxL2ROkn8BlGPTZ3oHKCPcv+ldT1OzVu15xnM8twTxmmu22GYT/MJ2nzt1nWaItFDXapjWNuVK62j5QMkmwa+3t1df0ITMUKy2baS2uQkdG6Ooivkwg+rBxqC4QISWJhgF7J1i4H4oivTUD2M1OHXsRRfEOQx8VrWq9+Gafph70TUvjcdRRbMoeNu3YMXz7lSqdJ7Sr3cksvrlXrwUVXGmdy6XFlHbFyKpBU5E6jwTFrtbVlal2tlXNZdJUXIbF1OcnHG8n/3MRRp6esOFzSIrj7n8uLDxVLaHDxxZbq70Q8gXCEroaTGAbwZCjNjPblC/30hhzIx/uZFKI113fpL6ZuhXRswwfZrG18HfJxt6XLhicWvafaG8D6WbSvm5xqjjMpWw4uJ1uylMJttq6FAk3Vj08ATHiCByzTFIBMy3JzT29pOp+nqyx1oMLXQa0YJx87vx6E8/jLuMMFumt7jzj+ha1vQAwmWb2i3bdv+AXqURDI=
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Return the user's quotas grouped by service, then quota_type.
---
---
id: get-user-service-usage-user-service-usage-get
title: "Get User Service Usage"
description: "Bucketed service resource usage for the current user, grouped by service then resource_type."
sidebar_label: "Get User Service Usage"
hide_title: true
hide_table_of_contents: true
api: eJztVt9v2zYQ/leIe9oANXazPemt2bLOwLoFtbOXJAho6iyxkUmVPHkzBP3vxVGULEWGO7Sve5JE3Y/v7r67YwMZeuV0RdoaSOGmVi9ImAmP7qAVCofe1k6hqL3MUeysE1SgULVzaEjUHl0icmfrCjOxPQ56VKAZlJ/pWOHVo3k0v1knUKpC/BAFk6nQj/xNtTNevL1eim2A44U9YOfX4ecaPQPUhtAdZCn+0VSkj0aIN8KjsibzaZAvZcWYpCJ9wP5XCKD36IU2wWrnprOh0JBPBXrSe8mOlPXEguwwR9cJDInoVCEBW6GTnMVVBinkSM+cm+cY5nNI37mjPGhX0sk9EjoP6UMDmmvxuUZ3hASM3COk0AcMCXAWtMMM0p0sPSbgVYF7CWkDGe5kXRKk8FMBCZCmkpVXJ2VOM6TgyWmTQ9s+sT1fWePRs4Xr5ZIfyhpCQ/wqq6rUKgS3+OSZJ83IY+U4dNKddgwuvGvCvZ+LTAp+STBW/4JEqAW/9HH+Eg6GIGPNoE2gQqdt9owmG8vfhVNxa7JLSp6kozNq63B+TjHSbayzjkdz8XZc0Yep0wnwk90khv50KvG9R7fusn/PzLrpmRnd2e0nVMTgeo2bmN9BRDonjxDgjEo0DuJjPw42/GNOpmkkUzPJUNAR6oi4tzuDNEc9gXAOfN9fOpumvxtMq2wO+6TT9dpc608+/1q4I8evLCavST/PQKjZinB/KfZ1312voz6P5CI/Psamn/tja9O1sK6VQu93dSkGtTaBn6+vv2NUZEhSlxe6u7Rq8lea41+7MB9f16+Z9dTTKGt/2A7RGa7sfT4u9wf0nJpzDHndCbfOWfff2oDj6FxFyVFV/palzgK6YPBS8X/t8nWm9L3E75vN3VcNzqt7UhGdTttNsNppOoZ8s+EblA4dpA9PvDJI5ryqIFCJA9ojFTauvrDQqIAUFrLSC956i0jJRR0TzN/9uqtdybLAhnu/a2ZNx4Ox90gnDmjbHQ0BFkRVgK7NznYEG0fJ/H/jleVLwbu7Vdjge2lkrk0utPEkjUKfCG9k5QtLPhFbXZba5ImQJgtXHeGRSJvcX4126wfrqkKVtg52IQGOq/O5vHp7tQyLxHray9AOcZ2/RxIMSfQj5j4mZoJ61Fz/382++W4WCUL4Ly2qUmrDJQmkayJRH0BWGhLgnJ2GdziI/C6sJ5Zrmq30eO/KtuXj7pLGJM60l9tydCl7weP02naQZc04As8P0mmWDw2VQIEyC93VRL13SmFFI63ZaG3HXff+dgMJyJqDGabh0CHbvneHX9IcR7abppPY2Bc0bQs9eOJvHqZt+wVo6j45
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Bucketed service resource usage for the current user, grouped by service then resource_type.
For each (service, resource_type), returns 120 buckets over the requested interval with:
- seconds: overlapped active seconds for resources in the bucket
- cents: estimated cost in integer cents for the bucket
---
---
id: get-user-ssh-key-user-ssh-key-get
title: "Get User Ssh Key"
description: "Get the current user's SSH public key."
sidebar_label: "Get User Ssh Key"
hide_title: true
hide_table_of_contents: true
api: eJyNU8Fu2zAM/RWBl13UJtvRt24YmqIYUMzpKQgKWWFstY6kinQxw9C/D7SdzEEvO1mmpPce+Z4GOCDZ5CK74KGAe2TFDSrbpYSeVUeYvpAqy42KXdU6q96wvwUNIWIycunhAAXUyC9y9IWoeXnD/vqnRgYNCSkGT0hQDPBtvZaPDZ7RsyxNjK2zI+TqlUTMAGQbPBlZxSSE7KbbNqFhPMiSHbcIBfyYSxq4j1JwnrHGBFnDpFykLG88Tf08Yv/vEnFyvoacRe5755KQ7JYA+kK+1xeoZ8JUlpsrqFC9omXIgnU947KzFomOXat+zzMZGQltlxz3UOwG2Gy3T9/RJExQ7PZZyExNIka8eMSeRMAJuQmzAaAhGm6ggJWJbiUOrIiam0k1YfrARCN2l1o5BYJ6Ji1l1NN0l9SzB9JQNZUuDTbMcdTt/DHIyesuZSY3ZEPEg7p7elDHkNTJeFM7XyvniY23SFqRN5GawKRV5drW+Vor4w9j8hQhs/M1SeLOw/4VUmxsG7oRFzRIXxPn+vbr7Xp0PBCfzJghb0b1EmyRpEpqZs+v9C6y+P+PYJ4E4x9exdY4L9zjdIfZix2Y6ECDQIgLsx97DU0glv1hqAzhc2pzlvJ7h0kSsNfwYZIzlfS822cNDZrDmIYBxiTDnbUYxfYP03ai49MTysuI3P/cggbTiazhLP1ianXO2mXL+H6BPQzTiW14Q58z6FkEyz/kfc75L37kd48=
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Get the current user's SSH public key.
---
---
id: get-user-usage-user-usage-get
title: "Get User Usage"
description: "Returns usage metrics for the authenticated user over a specified lookback"
sidebar_label: "Get User Usage"
hide_title: true
hide_table_of_contents: true
api: eJztVt9v2zYQ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ULBCxdtneLdv1pEcf6c7pvDkp4P8rgr6716EgbVCEf8+Mjhf1yjBoqHgyi7713HqZyevgU7FdG4mhNdZKjcsSFInoXAV8iwrs2X0do0Ev8Mp3efBfwsLqDCrQ6IhIoa7zhdcy3AP9E6Mmr9O5eXjrGXF5Y1dL3PlEVceG6Fzq+w1yoVJ1jbc7lkT5vusQG8qv+dW58KTJKAHt7t8KWtv5jqx2NJJB5e7QLrGCuo8vGLlxLrHF0QvizkLmaNFzdXLeLGlrMjc2hb5qQQN80IYG5KUtj8wTQdstyIGZj8zAZrQIfna+LrHRNxFWJkrhamxeTN5OLOA5d4ApjG3TbxwdiEJegb/w9b0fN9P9G//9G/9/c6Lu+ZfqDz+sSjZVOibNg082NO4W1UYkSWsefbsgULrDcbjZzDPTFl9utHLcLvkwUbQLOy9FCv6T1/sofuaNSFYfOCr0R+TjVElUQ6jjiNp3eVZZRzSOtg/dtOx59H95PVaKkM0c72W5czfsBurtCux5hbzatxNQtyW63qnee5b+8aNvtn7jleUc=
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Returns usage metrics for the authenticated user over a specified lookback
interval, divided into 120 sequential time buckets.
Query Parameters:
- interval (str, optional): Total lookback window to aggregate usage over.
Default is `"3h"`.
Interval format: an integer value followed by a single unit character.
The unit is case-insensitive. Valid units are:
- `m` for minutes (e.g., `"1m"`, `"30m"`)
- `h` for hours (e.g., `"3h"`)
- `d` for days (e.g., `"1d"`, `"7d"`, `"30d"`)
A valid interval is therefore a positive integer immediately followed by
one of `m`, `h`, or `d` (no spaces), such as `"30m"`, `"3h"`, or `"7d"`.
Any other format or unit will be rejected.
---
---
id: hide-http-service-instance-instance-id-http-service-name-delete
title: "Hide Http Service"
description: "Hide an HTTP service on an instance."
sidebar_label: "Hide Http Service"
hide_title: true
hide_table_of_contents: true
api: eJy9WE1v2zgQ/SsET7uANs4We/It2wZIgKYJYqc9GIFAS2OLtUSy5Mipa/i/L4aUbMpi0wIB9hSJHs6bjzejmex5Ca6w0qDUik/5jSyBCcVu5vMH5sBuZQFMKzqSyqFQBVzwjGsDVtCV25JPeSVLyCtEk3c38l42Pz3JMg8yRyElGsjzEmpA4Bk3wooGEKzj08WeSzLHCKx4xkmST3mki2fcwrdWWij5FG0LGXdFBY3g0z1HiTXJ33by7JbkcWfo0KGVas0PhyyJERv3WyCzLkifwoVzlGfS4YxWDhxde3d5SX8KrRAU0qMwppaFj+bkq6Ms7CMYYynWKMPtwoJAsuaE/747OkJLhbAGyw8ZlwPJVBQy3gCKUqAHE2UpyQ5RPwxgR5eGpHlyYJmxeitLKFmvkK20ZVjBkTiE3ply14MeDdLLr1Ag6VaAL9puCGnkf0wyfyARGjeWEy1WeaNLoJcSVqKtkU+50oqsANU2fLroX4WR+QZ2/Plk3w2i6RJ71WJ1R5oSsQucOUU4zYGMG20xlnug91TCWlvHck+2ThE3YuWCd0Q1QSUpiPzoKyDyJxXy2G0268N7FBTWip3nk0KwStS5ND7Kane/8sV67vHxRLV1zQ8Di4IKdmu8K+eWfjplP2Fo9xQKyGHUE3gW5TnBuPtwM5EcC6sEg2Qj1r7RxAVEZ8lmknGnhHGVxrMrs+74Jy1okMlYRXYyIJHORzI5ER5noBi7Ukq3yZ380RVDXLkz+QOYXvky7eGZVKyBtVjuMJCgA/8g3YbRhSRzG2i03Y0R7vx5jFG9BhLEkwjbwrRuDPD5/cMTe69bhSOQSO9nf3ms9iwF206s6c04xS5KwyM43doCZhTuVBpQYG9qT0kDqgyk7rvP6cSCKHf+C9g638md2Hay1mqbYsAsQCSIiFiPgzSXDTDUrJZbYA4QpVq7UYO+YLcrpjSSRDb4hb3IuvY/wXcjrZ8BhiRDrHNRBLi4M/TeOtSmdzHl0LXXexU0jN0aN5Shg+EiuYhiA+ylAjV0INjtugjl4TUXmOxjJ9b9CvdJye8MZQMORWOIgWNoH7sAGDFyjjULTrMr7M1yUGhVujcaNci2VKzT+toHmayZdeDnRREblsjcfP4xVQQvYgN5YMPQui+UIK3eRsOXTokoCnBuTMcO3U+cg0JcidrBecC+VIAVWIqZVzzA1N00HKCimHlH7hWjr+YpAkutaxAqCkHuXPV2G2azm5+bMHNVwoLE55Uu3Ktxvs5S7r9AxXGydKHR2fDZUYNPNNKI0ic7QY8E1miAnLXesVVbs8duWKb4/fPu3Rtm5RJQyPqVIbHWxeDX3xhnjjX4HMX2ow4WJQamxq3jaeAOnBPr5IgYDk6i19T52ZxOfzU3kB8BqpOMsvBZ1LL01nmFrw1/H0K8zp2Ix8P5/OGXCsfZPV1h4Q6JOChaK3Hn402K/wVhwfLp4tmPi2JNa+CRRb7zNICVpoUz2hmx4lM+EUZO+mKZ7KM98TChDjDZx2vdgRgNdttvmn7o5hPfSHuzZkSqQJPYuI5tvsrC0dF/32kOfkhe6XHXox3pL1doAyW7erj1Ta8RSqylWh/r3GXHKcxlbCnrWqp1xoQqWUs7Vt8yL+KJSVtTFbVuvV6ecfIrYF5e/H1xGfYPh43w1dKtuX7Pj8d9fpa1qOx+958CXSAQvuPE1EKqaKMJiVrQrkWz7ak3TIdLfRV66XSwhj9nvNI07S/4fr8UDp5sfTjQ8bcWaOhcPGd8K6wUSwrJwo+89Fyme23s2x+PXSX9yX7mQl8Pima0rahbeuMZp51x+E8J6hT/I/QgSL4lVSBKX0T7TuSqKMBgdHnUQQ9xYX24/ng9v6aduMUq2vyPZF/2VbpP27bfB4m53oA6HI6mIr2TjYfDf3m8WCs=
sidebar_class_name: "delete api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Hide an HTTP service on an instance.
---
---
id: list-api-keys-user-api-key-get
title: "List Api Keys"
description: "List all active API keys for the authenticated user."
sidebar_label: "List Api Keys"
hide_title: true
hide_table_of_contents: true
api: eJydVE1v2zAM/SsGz27S7Zhb94EtaIcGa3oKgoBxGFutIqkiHdQw/N8HyonnNDvtZJnix+Pjo1rYERfRBDHewQweDEuG1mZYiDlSdreYZ6/UcLb3MZOKMqylIiemQKFdVjPFCeTgA0XUFPMdzMAalg0Gs9HIjfqc/zYlCeQQiYN3TAyzFj7f3uqn8E7IiR4xBKsFjHfTF1ZcLXBR0QH1FKJWE9NH71CS1Qgd+Pq6iKRA9ShGLMEMvp5MOUgT1GCcUEkRuhzMhed85MQSjSvVR9sIkfbmfex7T0226K3/iLHIokSk9Oiaxz3MVu01gMHkamuhW+dD/gdkyZ41Q9cpgW+1iZpupZgvQOVD06Pwu8X8npq/0Pz2hQpRaGePb0rkcI8xYqPXJ8d+QCyn6UIOO9pjbUeGc6LHPuKKhQ+w0+CuED6ccl2i1NhLnT7VRUHM+9pmv09iShWYijoaaRK9P5fLxRfCSBFmq3ViE0vW4irre2pYARxIKq+y7bUZUCqYwRSDmap09XDzmrhjikeKnHLX0apXmtG56JNqtNfduPRJvNrQtjcNDVYiIeE2bu+TnC+6fGaKN1z4QLu0ibqEB3RYGldmxrGgK4jzjB0Grrxwnm2NtcaVeYauX8+MScS4kiejGf3yMVSF9XXKCzloX33N28mnya1OPniWA6blc5jQp8fhLpieug8jGW3w/74iJ1KE3mUaLBqnMBLR7WksK8BgIAeNgBzOo1nnUHkV5wradotMz9F2nZrfaooqhnUOR4wGt9r+at3lUBHukjBaXR4VYFFQUAUc0dZpBz4+Q91YLT++LxVBrbCGtR3muz3LbrhC14xyt23vsfSv5Lqu32DtXf+hW3dd9wd6zObD
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List all active API keys for the authenticated user.
---
---
id: list-images-image-get
title: "List Images"
description: "List available images for creating snapshots."
sidebar_label: "List Images"
hide_title: true
hide_table_of_contents: true
api: eJyVVU1z2zgM/SscXHphk+wefevudtrMdLedJj15PBlYgiXUFMUQVGJXo/++A0q25diXniSBIB4ePp56KEmKyCFx62EBX1iSwRdkh2tHhhusSMymjaaIhIl9ZcRjkLpNcgMW2kAR9e59CQtwLOlpvDM+nipKYCGShNYLCSx6+PPuTh9F6xP5pK8YguMih7n9KZpHD1LU1KC+haggicfbJaZs5USNXB7nLKnMnmfEfnjemcQNScImmHZjXmvyJtVk1igTU/OKYg4hLCROjmABf58s+6AG9okqijDYc5Qe0O+/bmCx7A+ukiL7CgZ7tPjOORhWb67CP6cvze48sVkyM7+Mz7J9Ev5Fl5Qf+BddhjLszXqfSOYxWbZG3a9S5OvlfO7IcEk+8YYp5hk5R7LG8Vbfq6fdbreb4d3PanksEHhsrrD4D5srLGbB1OFauHb9k4o0jZok5TTdLGmDnTu3zCG/5ptGI1qD7hX3Yt5l13cz3NHrEnnQeX/uOOoYLrV6Fk4z5cdsT21bzcpyYDYGnAgMsz7p8B/PMUbcX2eqi3hGdDL8Zu552d4m+GUKdZ7k8HYX4KErChLZdM58n/Y/AwgVXeS0z1vy+fHx21+EkSIslivdioSVKHbGEkVvKNWtyssoJgFTDQu4xcC3h/4JxReKkkN20elxXrED1oOqyagQc8RJZpTHejQdedUphZwu+017Zf6F4nsp2kCl+fDtPk9/gx4rVUj2ktAXJPYkltas2Tn2lTXoS9MJRSOUVFGzkB5K/G8bQ124tstxwYLyGjHvbv64udN+h1ZSg1lvxp0ZZXuq2IUmHZX2t9V9qkWiXboNDjkrTq5vP7VhCRgY7LRIKwt1qwO4hL7XZf0R3TCo+bmjqB1fWXjByAqfG26hJixz93vY0h4W8KEoKGijX9B1ec7f/h6G+VB8+vgIFrDTbI4ae+zm+jBbxyP0+1nsvh89Htst+WEAOyWR9BuG1TAM/wPBaW+h
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List available images for creating snapshots.
---
---
id: list-instances-instance-get
title: "List Instances"
description: "List instances."
sidebar_label: "List Instances"
hide_title: true
hide_table_of_contents: true
api: eJylWEtv2zgQ/isEz1onW+zJt2y32AZImqB2ugfDMBhpbLGhSJYcOXEN//fFkHpQlprsIqdEw+HMN0/O+MgL8LmTFqXRfM5vpEcmtUehc/AznnFjwQk6vS74nCvpcdOdd/9tdoA841Y4UQGC83y+Op6JrgBFIVCsZrPZmv2owR1Yf4FtjWNbqRCc1LseAs84vIjKKuDz44k+rDIF8Dm6GjIuSXKQxTOuRQWJIp5xBz9q6aDg861QHjLu8xIqwedHLopCEjKh7h3ZiBI80fFgSYhHwsFPWUswj98hRyJ4PBAaXgDYu4a6Jl3eGu2jlA+Xl/QnNxpBY9BnrZJ58OTFd08eOSZo7ABDQD8/colQ+fFx7kAgGXXkKDFg+diQOrhSI+zAEV454LxOmHojO5/9H88M4/vgwTHrzF4WULBWYIgrltBFlLQ3UG77QI2crAGfjXsiTSP7S0S78eD2Mo+EX/hJ1FhuqpAtlIxbUSvkc66NJhSg64rPV+2nsHLzBAe+7vF9RrSLqOaqxvKWJE34LqZd7+Ev9D3BZ43DlO+evqcCVjuV8j04NRZ3SpN7FTE0KqKAxI7rxvWJPVMuT81mi9a9HaNwThxCPmkEp4XaSBu8rA9321Dv5xZ3FF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Sm6e0VrHY3RrcPXGS8NNZMVPx4fhYcHp04nIscfEeardcb3wknxSEatqHJKEEWI9ZHTgkhjRg6WYroXqg7Jd17opzT+f39a0n5ZY5ls0V3UHttM6o6EPiSyj8fIsTRPoE8nnjUgkL6ptE+nfwFuFB0g
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List instances.
---
---
id: list-instances-paginated-instance-list-get
title: "List Instances Paginated"
description: "List instances (paginated)."
sidebar_label: "List Instances Paginated"
hide_title: true
hide_table_of_contents: true
api: eJylWEtv2zgQ/isETy2gJmmxe/Et2xbbAH0YtdM9BIHBSGOLjUSq5MiJ1/B/XwxJSZTFOFn0lIgezjePb8gZ7nkBNjeyQakVn/HP0iKTyqJQOVj2qhEbqQRC8fqMZ1w3YARJXhV8xitpcdXLrnrRfm3lJDaAPOONMKIGBGP57GZ/hDoXG2Cqre/AsFdv39wJC8VrnnFJP/5qwex4xpWogc94IzbAM27gVysNFHy2FpWFjNu8hFrwGelei7ZCPnubvRCnlkrWbe12oMQKgizPOO4a+pIKYQOGHw7ZsfFfvT69ZhKhtqwBw4KRKfsrWUt8oQN/Xhx7cAKsFo/BiYuLi7RPnwP2807VgKIQKG7Ozs5umXOBDSlka23YWlYIRqrNwBeecXgUdUNg+wN9NJUugM/QtJAORwd0OiKiKCRZJqq5IRKiBEvrwRGLZAc/9J7pu5+QIy1Y3DnXC4DmW1i9JSzbaGW9lncXF/Qn1wpBocNrmkrmjurnPy1FZB9Z04xsKIVdKXh0+7pAfxKWfaW13qI7rSsQikyiDY2B7fGGOa2lNgzxne25y/vUitwA1V6s831YmuY743IkeRUJDbHsU/N/EjCm0bUlfhq9lQUUrFPo6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KxkLdG4s7FmxT/BcKA4bObW9eLiw29z0Tld+vmwFLTg0/3koMln/Fz0cjzjsnn9NJD9AWz7Z543MTCz90t1MEuiDSeBjF4YJM7ovxS7587pg9uwljr6ZVBA+Ybm+sGCnY5v3I3Ri0UVUH0LpH1LazN2J2sKqk2GROqYC0NqN19cxa3m9o0ZV7p1unlGSe/PObF2duzCz+8WayFq4bwmuGez/rgsbgaR3ZH1fXMk1sIA8IjnjeVkCoaBn0mbmhM5Vk82rhs3Ga81DQJ3fD9np66rk11ONCyf4Jxz3DSirsqenJ50sqnns6S9tHM3L/UbUXVkogr6JcDnnjpOoHZva4NoLf0YSShOpZnvARROMrvw6bLPIcm3jU57w5xGfz9cUlvAy2W0QtIz9u7rqD6n4TaRbr3ey+x1PegDgfeWY70TSfc4fAfQ8NmVQ==
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List instances (paginated).
---
---
id: list-organization-invites
title: "List Organization Invites"
description: "List all pending invites for an organization."
sidebar_label: "List Organization Invites"
hide_title: true
hide_table_of_contents: true
api: eJyVVU1v2zgQ/SvEnLYAG2f3qFvaBrsBumiRuCfDMGhxLLGhSJYcBfUK+u+LoT4sx27Rnmxxvt4M5z12oDGV0QQy3kEBH00ioawVAZ02rhLGvRjCJA4+CuWEj5Vy5j/F7jcgwQeM+eNBQwHWJNotXXZjOEgIKqoGCWOCYtOB4WpBUQ0SnGoQCvCx2hkNEiJ+a01EDQXFFiWkssZGQdEBGbLs+mlRQzx8AAl0DGxIFI2roO+3nCYF7xImjvzr9pZ/Su8IHfFfFYI1ZU6x+pq4+25RKURujcwQrRXlU0PYpEuzKksMhHqnhszu+OmQuzz42PAZJ8C3ZBq8hCq76cS11gIjn9q8G/OKO4JeQhlRnapczz1Gvh9cOfCyIGCjjN0prSOmtJzrPRvE3Wi4Fvk9mIjpVyDcD64/gGD0su61K5QwLI/e7Y+7NmHcvYoZrOLdUXxJGK+ugYTzbdS/tUQSomfPU8gjf1/xS6SozZNE1zZQbGDkD8h5OUCCxtIah8OOv/hn1LC47achyeUuLxmxgUyR1229vtMR+oxsUWbZ9jDDU0m//4pl3rXJ+wNv/mxXMapjNntSdlf6duDS5L3mY/E+H89BxhFWGC8a0WPqRaqfwmRtuoTKWc817KktS0zp0FrxOEpArp2wbKOhY2bmP+v153eoIkYoNttMOlWxNJ0VzoNrkGrP8lYhZSGjGgpYqWBWPlZp1Q3C1a9OYpcwvkxK10bL7pnYE4Qn1plBO5ZARgHi9vbD0dxuTRRyF8YdfJaks56ZAW9T6QNz/vNDlutGOVUNGp5IuRKTFMmpkGpPSYq9sda4SgrltGB+iYRExlXpZsHif30MdWl9m/OCBO5rqHl78+fNLS9D8IkalQV0lPL8jJzza57NGfCFIv/22zNOhvA7rYJVxjGWPO1uvKQNqGAGtnDlYn5hppvaSqh9Ivbsur1K+CXavufjby1G3pSthBcVjdrzNDYdaJP4v4bioGzCn7Tzx+O462/Ej8BOrHJHHqyyLX+BhGc8nt7DfttLqFHpvKrdaByehkXYxXPWL1f37/s1S1HLU5nfm3nH9hMRuuuQum7wWPtndH0/IyT+ZoB9/z9AG9ae
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List all pending invites for an organization.
---
---
id: list-organization-members
title: "List Organization Members"
description: "List all members of an organization."
sidebar_label: "List Organization Members"
hide_title: true
hide_table_of_contents: true
api: eJyNVU1v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XVfyPb9GSHLWgD2/b+I8QVF
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List all members of an organization.
---
---
id: list-organizations
title: "List Organizations"
description: "List all organizations the authenticated user is a member of."
sidebar_label: "List Organizations"
hide_title: true
hide_table_of_contents: true
api: eJylVd9v4zYM/lcEPvvabo95u90NW4HdWlzTpyIIGJuxdSdLOpHulhn+3wfKTmo3KVZgL4lMkR8//lQPFXGZbBQbPKzgD8ti0DkTUo3e/oMqZyMNGeykIS+2RKHKdEzJWDZoWmp3lEzYX0EBIVLKNrcVrMBZlu0CCQpIxDF4JoZVDz/f3OhfGbyQFz1ijE592OCvv7GS6oHLhlrUU0zqQexoXaFkqRVq+fzaVvorVhzBCm4/QwFyiHpmSdbXMBQwZ3eOUCbSaLeYqe1DavWkfumD2JYUcYL/NKqaj3LJzXuoWN5GShw8uoUym/uj+GS1C8ERejXz2NJc/08ceZ1F+pentF0SuVOZuUyHXVfPdR/0+4JeF6v35uhxVL2Yo0E740dnE1WwetKETaFNTGYBLFO1ecG/mxfz5CHsvlEpSjV2O2fLrfbu9tg7r1tGW3xvKS1K8CK9kID3FiC7Xeb/kd9I//AS1H0mrZqflfKFsFJwmQD5rtXchVSvsGqt5kDP44TOE/VVLf6rBBn2jex+yZDc2HiJ0NFiSRhTwkO+DoJuW4ZunPij9lrF5lMWn4ysF6opnZGrJugZ1BtUdaWdk1S85ep76MqSmPedM1+nFZW9MpVdsnKA1VMPv6/X978QJu2Pp82gLrFmJXS3WHObAlqSJugWrEn9R5QGVnCN0V6HVOsmZErPlDgDd8npLSjk0eODrr2xL+d+p32Y18AoOkXXiMRM2vp9yBtyEaI20QcuQ9QZvL81+5BMix5r62tjPQv6krgw7DFyE4QLs7POWV8XBv209JlErK/5ajbYX0KKTelCl3GhAI1r9Hlz9dPVTR6+wNJiXrLjxIyPzd2r52HBePYy/O+naUqR0N9yHR3avDxz2vupOE+A0Y4zkyvYBBaV9v0OmR6TGwYV/+goaTdsCnjGZHGnKXjaDAU0hFXujB6+0wFW8LEsKWr1n9F1eQZev27DvFN++3UNBWg0eS6mVX+s8e7Yd6cr9IcZdt+PGuvwnfwwQDGREP2GYTMMw79IO7Wt
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List all organizations the authenticated user is a member of.
---
---
id: list-secrets-user-secret-get
title: "List Secrets"
description: "List all secrets for the authenticated user. Does not include secret values."
sidebar_label: "List Secrets"
hide_title: true
hide_table_of_contents: true
api: eJytVcGO2zYQ/RVizqq9XfSkW9oEyQKbZtH19mIYi7E0tpjQJEOOFjEE/XsxFCXL9iJpkZ4Ejag3b948znRQU6yC9qydhRLudWSFxqhIVSCOaueC4oYUttyQZV0hU63aSGGh3jqKyjpW2lamrSn/pF7QtBQXUIDzFFCg72oowejIzxn4WSDyy/OeGArwGPBATCFCue4uiB2IsUbG9WKx2KivLYWjOv2QaO60YQra7kfyUAB9w4M3BGXXy4s3riYoObRUgBbchAQFWDzQLA0UEOhrqwPVUO7QRCogVg0dEMoOsK618ELzEKRE1hQlzkcvIJGFBfTFGHDbz1SxBCIfhQ3URP5Tjm4kV/TOxgHl9uZGHpWzTJZTPu+NKK+dXX6Ookc3Y+PPOCT2ZQea6RCvP1eBpIOJrebE5Y8cmuhqy7SnIHzPmtAB2uOnXerOZalTxLbGpJpG+LcziL4AfZb7bpb2JNvUhf+idU07bA0PrR7xP576edWLoeUnLn/K+ytsWl9fSvaUQ9eS9XPjrKXanKiYpD8hzlR6TJZ9jeak41kZGAIe5XM+OBgmcr5mMNNjDIxA2XdXlV5QT7JdMbzPWOcs+0urwGNbVRTjrjXqr2xuYfvb7e3PeJsYtfmOu42rzr7+C79OndvMtL53A6NX9D7E/dwJHylG3L/qmyFwOvouBBfUSqI/0l7qGFLlk7M+/I1G14ldAvyuZQa9LouYnfiwWj38EPC6u6df1PCPHIlUtUHzMektwL8TBgpQrjdpHuBeBnv2UZSSDsSNk80wLgBuoIQler2U9bCM46WIFF7GvdAGI4fSjBlTPophBgvME2cnSS3bITTV1jD7xFrbnRu8NS/wKVL4JVbOU63ePNyl/XJAi3tZL9pGRltRLFS06GPjOBZqq43Rdl8otMOCVJGYtd2nTTj5xQXfVMa1CRcKkLqGnDeLXxc30j7vIh8w3YS8ltJafpy22sVUnm7T/72+s1ZM33jpDeo0wJP+XW7WGtBrmWgxiZsbtimgcTKL1tB1W4z0FEzfS3hYt+V6U8ALBo1bEWUtV68hrJNZOvhCRyjhTVWRl+YnPuLey0nRzy30/t0KCpA6Z9th6vp2tOL0Ce1xht11w4mV+0K276HIJFjeZTb0/T9wCiUU
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List all secrets for the authenticated user. Does not include secret values.
---
---
id: list-snapshots-paginated-snapshot-list-get
title: "List Snapshots Paginated"
description: "List snapshots (paginated)."
sidebar_label: "List Snapshots Paginated"
hide_title: true
hide_table_of_contents: true
api: eJylV0tv2zgQ/isEL20B1XGK3Ytv3bbYBmhao0l6MQxjLI1lNhTJklRqr6H/vhjqRVuK3e6eEo2H883jm+HwwDN0qRXGC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xTX0jVCS/iKNrsiR6Gk1nrc77jAV1WDK3ZVpis7RrP/aXPsU4h9v3vyPWz9DD0KeuT6lTo9+/YVbrUvkMiroJ117NFLPwuVxcW7RuaPN4HQt6lU/WKstuyfpJY5SHDVUoxmV5BtIkQXvgsFzvHxf5+s0iEjj4/39/KLBYXX7I6w+QyoO09IKvw/5JsN/IVi0fLZYhhcJ5PT8iZplGe7Trab3VPtQ8ls+41dgxFXL5Ct6SBF90T61L6jSSlIL20gLe0ekqWkQgzdsCttdLeri23pvgudCbfTICuHQvnapNpixt/ObcEMXoKgLciaU86BSdEm/iSdsLaQUKk8YqIyVdNE79DS5XLy53GprtqnUZbDLE05x1ZjTyfVkGtZP7XwBoRuapT28Trvksbgbj/yOuuvCi7ZJg8edvzISRNh7Q2oPTSUWHIzgSbw+hGosE77VtG0s+OFAL7oHK6uKxPVLg2qUCQdrGb0sHnEfP3SfQJYEH5pxoPxsSM89J0eDqSGb+fcfAc+8/s5gti/OHnRJH1YQamiJhG8RstAfh+bQ2zRFE58aDMcq7pm/P9zzhENJlermWUfyddt93U+g9pHtw6HWuNePqKqKt557+qZxWFX/AmOc4B0=
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List snapshots (paginated).
---
---
id: list-snapshots-snapshot-get
title: "List Snapshots"
description: "List snapshots."
sidebar_label: "List Snapshots"
hide_title: true
hide_table_of_contents: true
api: eJylV01v4zgM/SuCLnPxpt1iT7nNdge7BVpM0bS9BEXB2IytiSypkpwmY/i/Lyh/KbHR7mBPdSiKfCQfKbbmGbrUCuOFVnzJb4XzzCkwrtDeLXjCtUELdHqT8SWXwvnX4Xz4es3R84QbsFCiR+v4cl1zQ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b8LLWYKCPCwTynlQKbpkXDQTthFSCpUnDFTGKnqAHXqaKC7eKO60NUUqdRXs8oRTXK3Py8Xvi0uqntHOlxAaodtJwz6/ipbaE7RRO81s/l3AHg/+wkgQilyEJNZdutccjKAs9wl/SXihaZiseV1vwOGTlU1D4nZXpjJkwsFGRrvxDo/xPwZ7kBX5DXXagxWkHaiQ8AIhC7you1tf0xRNfGsyFJqYK39/e+QJh4rAD308VHjTs244AnWMbNd1q/God6iahvfQPf2mMdA0/wJxKJZr
sidebar_class_name: "get api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
List snapshots.
---
---
id: morphcloud-api
title: "Morphcloud API"
description: "User-scoped API for managing instances, snapshots, billing, and user settings."
sidebar_label: Introduction
sidebar_position: 0
hide_title: true
custom_edit_url: null
---
import ApiLogo from "@theme/ApiLogo";
import Heading from "@theme/Heading";
import SchemaTabs from "@theme/SchemaTabs";
import TabItem from "@theme/TabItem";
import Export from "@theme/ApiExplorer/Export";
User-scoped API for managing instances, snapshots, billing, and user settings.
|
Security Scheme Type:
|
http
|
|
HTTP Authorization Scheme:
|
bearer
|
---
---
id: pause-instance-instance-instance-id-pause-post
title: "Pause Instance"
description: "Pause an instance."
sidebar_label: "Pause Instance"
hide_title: true
hide_table_of_contents: true
api: eJy1WN1v2zYQ/1cIPm2AFmfFnvyWtQUaoGmM2OkegsBgpLPFRiJZ8uTUNfy/D0fqg7KYZEO2J1vU8e5333c68AJcbqVBqRWf84VoHDChmFQOhcrhjGdcG7CCCC4LPueGSNbd++FPdFSs14HKaIc840ZYUQOCdXx+d+BSeTZY8owrUQOf8+guz7iF7420UPA52gYy7vISasHnB44SK6K/bOnZJdHj3tChQyvVlh+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GxoO2rUopFGlM7ZifBIyJoMkMvGK7ZpKnbTDstkvz/evXvDrFwAClm9MCRWOh+9/QfjTJ+D95FtP+uAKDEw1W4bTwNX4JzYJkfEcDCQfqTKz1Z0+trcQHoEUS1l5IWvopKFR+cZvjT8fQj2OlUiHg9Xq8WrDKfeHa6wcIdIHOSNlbj39ibGf4KwYPn87t6Pi2JLO20fRb7y1ICl9qtyt/5iyed8JoycdakyO0Qr73EW+g2Js7tuTfZDNp/5wtnBWFIQhbCIwbTR5bMqHPX6+spy9EPxRk+rHO1Ev7lcGyjYxeLSF7laKLGlVbKD6LJ+6nIZe5BVJdU2Y0IVrKGdqiuR8W55pa0p80o3ni/POOkVZJ6f/X52HvYNh7Xw2dHu0eH7w2U8LEdooxxLf6lodUb4gTNTCamiZSV44Y7WKL/E9yLm448PfesvyXvzO344PAgHt7Y6Huk4bP7koEI68VBFm/6zYP/b7T2lJC2Go88QO1E1RObDZyesJKj/EvYvN236/sqek9slodrHMjs8sWV9LSpBFD57Di3FRZ6DifFOSucxzqjF9XJFq3CDZbTw9zH/0CXnIQ3scAgUK/0I6njscSI9E8Lj8W/NlJMx
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Pause an instance.
---
---
id: pull-snapshot-snapshot-pull-post
title: "Pull Snapshot"
description: "Pull a snapshot using a sharing token."
sidebar_label: "Pull Snapshot"
hide_title: true
hide_table_of_contents: true
api: eJylV0tv4zgM/iuCLrMLeNpusafcZjoDbIEtGjRtL0VQMDYTayJLqiS3yRj+7wtKfiV2X9ibTfPxkfwo0RXP0KVWGC+04jM+L6VkwJwC43LtWemE2pAgB0tPXm9RnfCEa4MWyOgy4zNuSikfW6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ZbizClCwCde4ch5Uii7pptslbCWkFGqTMFAZK+nqc+hplt3wLr/S1uSp1GXwyxNOOceYZyd/nZxRf6lYBYRRafbPsKMvXrnZBvP28WW+KZHHnT81EoSiwKHsVdOlBw5GUF/6sKFTy4Tn1M3ZA6+qFTi8s7KuSRyX5rDqCwcrOViTXwX8x00zF3+y15f2Kaxb3A9+DJ5BlqQTRn8UPep2S3yvvKQXK0g78DjhOUIWSF01VhcR6tdmsFvb0blGgaPFtzRF49/UHY7G/HpxyxO+avb+QmdkY+GFjmh4IZz070XWgfxBVnEJalPS0TTj0ScRHUrqXHf4dQOxake1+wRqP0BYVVEj/BbVNT8sb72s6/o/gzXpAg==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Pull a snapshot using a sharing token.
---
---
id: reboot-instance-instance-instance-id-reboot-post
title: "Reboot Instance"
description: "Restart an instance. Optionally reconfigure resources and settings."
sidebar_label: "Reboot Instance"
hide_title: true
hide_table_of_contents: true
api: eJzlWEtv2zgQ/isEL20BNckWe/ItTQs0QNsEsdMe0sCgpbHFhiJZcmTXa/i/L4aUZMpS02aLBRbYm0UP5/34ODtegM+dtCiN5hN+Ax6FQyY0k9qj0DmcsKvwr1BqyxzkRi/lqnbAHHhTuxw8E7pgHhClXvmTL/qLvlwywRx8q8EjW5hiy6Rn1pm1LKDIGJbQsWcbqRSz4JbGVUyw3KiCOVgYg2wjsfyiibq2hUAoEpnP1xfXtz5jFVTGbTNWSP/AvPwLXvTUYZtSKmDWgQe3lnr1RUv0bCkV+K1HqE54xo0FJ8jGy4JPeBQ+bxU8/EiOivm8IbPGI8+4FU5UgOA8n9ztuCRnWoElz7gWFfAJTy7z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ezebXTeiEp8FQ640o6l58MDCGAVCJy6Ye1/+vg7T6bsfqzD15YgGI+OVLlzpYbyOQh4mUN4hSx8bnYtjR/dGNBJEaYM9kh4jsgYAcloHw5a1YjcNWCb//fnq1W9g5QJQSPUISFQm7/37C3Cmq8H7xLfvTdRoBDBVfpWigQ/gvViNQsR4cCB9S52fzej0Z7iB7IiiGsr0bSOULIJ2geFj4O9N9NexESk8nM2uf8pwGN3DFRbvEImHvHYSt8HfxPg1CAeOT+7uA1wUK9pudFkUOk8FWBpam3SLECz5hJ8KK0/bUjndJcuP/WncnFAKg1u3G5OAsvlp6JytHlPKopgXqTZNeoWyikedwaG1kCmUiDeHBcnb76KyCo6Q19kBIp31Hl1HC4B2UPamwVmHfs4CCl+aYVulR9hLnxsLBTu/vgxdtRJarKRedY3EZx3M8xlbSKWkXmVhi1XTI67brKWQzDhb5srUgS/POPkxyjw7+ePkLD5wPFYilGOzgrqJa7XLFJ4n6iZV/T9dBDZZhPAdT60SUifvv5jYd/QypZfAwYeT481eyO77jJdUEZM7vtsthIdbp/Z7Ov5WA2Xc3X3G18JJsaCI3oXEpN/F+CxKg/P8puk0L9iPlG77hSYMuxaqpi+ecXpT93eRoW2WIIpQ6LuG4iIKe9k0u5bDoNdTH443zvMcLD5Km7aL66vpjGd80Wwv416AO7EhF4pN1NYE40MDCGc7roRe1dSuJzzypGKnzUKyEumawqJtX7txf+x2kWJmHkDv9517kL7JMfv939EdA9s=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Restart an instance. Optionally reconfigure resources and settings.
If a request body is provided, the instance will perform a cold reboot with
the updated resources (vCPUs, memory, disk size) and settings while preserving
its filesystem.
---
---
id: redeem-promo-code-user-promo-code-redeem-post
title: "Redeem Promo Code"
description: "Redeem a promo code. Applies to the active organization and is single-use."
sidebar_label: "Redeem Promo Code"
hide_title: true
hide_table_of_contents: true
api: eJytVlFv2zYQ/ivEPStxFuxJb+kWbAFWJEjcvRiGcRbPMluJVHlUWk/Qfx+OlCU59toC3ZNF8u5433ffHd2BJi68aYJxFnJ4Jk1UK1SNd7VThdN0re6apjLEKjgV9qSwCOaVlPMlWvMPiqdCq5VhxcaWFV21TNeQgWvIx+MHDTn4GHoTA28k8KZl8vP10cJxgAw8fW6JwzunD5B3UDgbyAb5RMmniJEXH1ny7oCLPdUoX42Xe4MhTm6a5DeYUBHk8JusMwiHRlYcvLEl9H26znjSkK+S0zobnRIrT5Kp+D+nzKYwbvuRigD9aZzgW4ob3DjLKZ3bm5ufAeNJm8Cb0qMNpDd10fIJuHSu/kjn6r2cj1kaG6gkD30GtNtRrOImGPLzEPfHE7WUkzOmMpjXfWP03PlxLokHfcl7Vu5T38iuEnr/w1MyTcg3ZDVvMNFnD487yFfdOcpxy7ZVBf2sngItkaTurWZ1F04vIH0x9JjLj0QmfSarU+znTGaXC3xWrm8pM2ntsjRPW/2lLQpi3rWVGt36DH69vf0JhWoKaCr5MoFqPjeoXHFy+gMkjxVd9xPwv1zKaEKK3uNBENRczoX1npixvND0x42Z+L13Xi1l93sjQnCkqwbLWVH+xsromF0MeF6MyfT3xNdbEDOLP5fLp+8GPK/u5KKSj5gwFa034RD5lsDvCL30/2odRYwlC7apFVlg1RT2Tib4MJgbDHvIYYGNWcgIX0RdX4muF2mEg1zlX8lzvKn1ldjHRjmm8CICSpKYJzIoS7Bt09aIdR9CE1GIBp+nx+H+K9ZNRdOwnxXY2J1Lspxz84HJX3HhGtLq7ulB7ZxXNVosjS2VsRzQFsSZYosN713gTG1NVRlbZvGhE9CKKQRjS5aHbpSa882+qFwb40IGQkG68+b6l+ubOAAdhxpjE1mspx5WE+vwppizbvx/H+iB2UBfw6Kp0FhJMFarG6q8AmwMZCCQYZjesdLxgY61XmewF2HkK+i6LTJ98FXfy/bnlrxobZ3BK3qDWyFpJV28J9RRdx18okN8liPAq6H3XrFqYzu8HT0yFpLHXVFQE75pO9fu0+PLEjLYDv8m6qQUj18ECH6BHOIfFvGOoox7HVRoy1amRw4ppggQW6FmnE+jULfHbhqP0B5mGXZdsli6T2T7HrIBSpC1jLe+/xeouk+4
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Redeem a promo code. Applies to the active organization and is single-use.
---
---
id: remove-organization-member
title: "Remove Organization Member"
description: "Remove a member from an organization."
sidebar_label: "Remove Organization Member"
hide_title: true
hide_table_of_contents: true
api: eJy9k01v2zAMhv+KwNMGqE037OTbthZYgXUr2vQUBIFiM7ZQW1JJuVgm6L8P9EeWYN3Q006JaJIv+ZBMUCGXZEO03kEBd9j5Z1RGddhtkdSOfKeMU55q4+xPI27noMEHpOFxXUEBNERtjp02YwLQEAyZDiMSQ7FKYEUmmNiABmc6hAI81RtbgQbCp94SVlBE6lEDlw12BooE0cZWXL8fSajrS9AQ90E+cCTrashZvyjRM9JrNR4Y6eXcawnn4B0jS8T7iw/yc4rwvi9LZN71rbqbnNWZ+ubVZ+8iuig1AmPZk437AcmX5fL2ExpCgmK1FpVoaqF10i7DWkOHsfGCvMIWIw54YwMFLEywC081L9KIMy/GCfAiTc1nEF16nifRUyuBIIJzPfdCY2zuuKo0YhIY29F0gNPEGIaWrNv5P2kIzDMufcBKfby9VjtPqjPO1NbVyjqOxpXIWrEzgRsfWautbVvraq2Mq5TUrhhjtK5m2bx5SjeeQlO2vh/yggbpa9S8OH93fgFZQ/AcO+OkqmkPpv0+WaObeVNPKk9QTvN6/VVMSCL+iIvQGuukiAFzmua0AhOs3A/VDBqKw+pPwxLbvKtrDY3nKEEpbQ3jA7U5i/mpR5LVWWt4NmTNVoisElSW5X8Fxc60jP/o6M3ddAZv1d/qnozG7QWuaXt5gYZH3P++WTm3/6g6o8nrfHQLl1dfr5ZXoMH0wjjNSQ6rup2PK72cP6XRY+kf0eV8kIvyFrGcfwFWNMHy
sidebar_class_name: "delete api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Remove a member from an organization.
---
---
id: resume-instance-instance-instance-id-resume-post
title: "Resume Instance"
description: "Resume a paused instance."
sidebar_label: "Resume Instance"
hide_title: true
hide_table_of_contents: true
api: eJylWE1v2zgQ/SsET7uANs4We/ItmxaogaYJYqc9GIFAS2OLtUSy5Mipa/i/L4aUbMpi0wVyikQP57351EwOvARXWGlQasWn/BFc2wATzIjWQcmkcihUAVc849qAFSQ3K/mUWy+Z9wLnh+iozPNOzGiHPONGWNEAgnV8ujxwSZBGYMUzrkQDfMqjyzzjFr630kLJp2hbyLgrKmgEnx44SqxJftbJsxnJ497QoUMr1YYfj8+kwhmtHDi69e76mv4UWiEopEdhTC0Lb9bkmyMfHCIUY8lolOF2YUEgkTnD33ZHJ2ipEDZg+THjciCZ4pfxBlCUAj2YKEtJPET9MIAdXRqG7MmBZcbqnSyhZL1CttaWYQWnCBJ6R+WuBz0R0qtvUCDpVoAv2m4JaWR/hWhyB3Yni3AgERo3lhMtVnmjS6CXEtairZFPudKKWIBqGz5d9q/CyHwLe/585vcR0cwDzE2L1R1pSvguZMzZw5/pPSFntMVY7oHeUwFrbR3LPdk6kVJxUi4Dhw4iKIjs6HMzsifl8thsNu/dexIU1oq9zyeFY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3qrJXN/DOdoQfODG1kCraWkI4lrRP0fx6RppertQ+Js8ZryiO0yU/HFbCwZOtj0c6/t4CjZLL54zvhJViRXYv/SBLz2W6g8Ym/PHY1cef7Fek+yxXNHntRN3SG884bYLDfwL4Yq9AlD49D53ETVGAwejuqDcd45R9uJ8vaNdssYo26lNOrfrsP6SJHQ5BYqG3oI7HE0+kd2J4PP4HOS/zmA==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Resume a paused instance.
---
---
id: revoke-organization-invite
title: "Revoke Organization Invite"
description: "Revoke an organization invite."
sidebar_label: "Revoke Organization Invite"
hide_title: true
hide_table_of_contents: true
api: eJy9k01v2zAMhv+KwNMGqE027OTbthZYgH0UbXoKgoCxGVuII6miHCwT9N8H2k6aYN3Q0062KIov+ZBMUBGXwfhonIUC7mnvtqTQKhdqtOYXyoUydm8iXYMG5yn0tlkFBYTefXXuuxp8QYPHgDuKFBiKRQIj8T3GBjRY3BEU4EK9MhVoCPTUmUAVFDF0pIHLhnYIRYJoYiuuP87Tmd2AhnjwcsExGFtDzvpFiSGb16rMeu+X4y8lAHtnmVjevJ9+kM8lv4euLIl507XqfnRWV+q7U5+djWSj5AlMZRdMPPRYvsznd58IAwUoFktRiVgLsYuSGZYadhQbJ9gramlEHBsoYILeTFyoeZIGpHky1M2TdAKQQZTD/tiPLrTyFETymNGDEBnKO88rDagEx3ownfA0Mfq+KGM37k8ej0zhikvnqVIf72Zq44LaocXa2FoZyxFtSawVW/TcuMharU3bGltrhbZSHVNQTDEaW7PM37FT31zwTdm6ro8LGqSuQXN6/e56ClmDdxx3aCWrcRrG8b4cpuO8XmSeoBw79oqlGFlE+hknvkVjRb3nm8YWLQC9kfUJNYOG4jT5Y5/E9jyqSw2N4yjPUloj02NocxbzU0dB5mapYY/B4FpgLBJUhuW/gmKDLdM/inlzP27BW/W3zEcj2oNwxbaTE2jY0uF5aWXf/qPqM5y8zGercHP79XZ+CxqwE87pGOY0p+vjbqWXFVIaPOZuSzbnk2CUs4jl/BsE1sHa
sidebar_class_name: "delete api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Revoke an organization invite.
---
---
id: rotate-ssh-key-instance-instance-id-ssh-key-post
title: "Rotate Ssh Key"
description: "Rotate the SSH key pair for an instance."
sidebar_label: "Rotate Ssh Key"
hide_title: true
hide_table_of_contents: true
api: eJylVU2P2zgM/SsCTy3gncwO9uRbiy7QQbeYwSTtJQgCxmZsdRxJFeXZDQz/94Ky48hNukXRUxSaX498euqgJC68dkFbAzk82YCBVKhJLZfv1TMdlUPt1d56hUZpwwFNQTeQgXXkUcLuS8jBx8Atc719puP25Lg9n3S5nT47ywEycOjxQIE8Q77uQEsHDkMNGRg8EOSQREMGnr622lMJefAtZcBFTQeEvIOgQyP+96O/uhf/cHRi5OC1qaDvN5KCnTVMLFF3t7fyU1gTyAQ5onONLiKsxReWkXRJFecFdNBDNBYFMW+DfSaT9vAm2tUq2i+ayMDuvlARxsIcUpTjfCCDkvbYNj/4eKr0MGS6UsMh87/Wl2lfjyfbNX+vX2R/kj8NGczqw1D2IqrdNbq4CIrW6zF9usT1rOwsXYIgmw96k10se8n1rNg44F6qzem9bGOqfduop5EIguOvu7vf4EFJAXUjJx3owJcOjS1mX9EcH/aR8d9PdLJoE6giD/2mP+P9xw4dnZGi93gUBAeu0hV8JGas6NrOBsPZ9W/vrVcrsf5sW4JjKDV6Jrv4jI0uY3cx4eUyzq7vhnl9DyLxeL9aPf404eV2zyFqiBEXpqL1OhzjvCXxW0JPHvL1RvQgYCXiM3GJBdSBQm1F1SadCjXksECnF6fruOgSbeoXzPViIC6TfzkpWusbiQOpdGpkKTQaiJG2M/JLEO4G04S4DsFFLNrs7cC4FPYnJv8HF9ZRqd483ketPqDBSptqUmzOFBt0XNvAmdrpptGmyhSaUrVMXjGFoE3FN4m8fLTe1UVj25gXMhBcQ83bmz9vbqMEWA4HjPdjlOzxCVlyPUrArNvklv3KYzNOItB/YeEa1EZqx+l243bWgE5DNsklZJDPXw9meVhkSZsMatlsvoau2yHTJ9/0vZi/tuSFKpsMXtBr3Mkg1h2UmuVcQr7Hhul/QL16Gm/Ma/Wjvk+8NzKdF2xa+Te2Nn/y4vWvCctI2G70kAfGhST2Qq36lMSPD8uVqGgrY5oUZiLZ7nQfuuuNdd3gEd+zvp/6HOS43/R9/w1yPtfO
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Rotate the SSH key pair for an instance.
---
---
id: set-active-organization
title: "Set Active Organization"
description: "Set the user's persisted active organization (web/Clerk session UX). This does not change the org scope of existing API keys; API keys remain scoped to api_keys.organization_id."
sidebar_label: "Set Active Organization"
hide_title: true
hide_table_of_contents: true
api: eJzVVU1v4zYQ/SvEXNoCip32qJ6y2wLNoU0QO0ABwzDG0ljiRiK5HCqJK/i/F0PKjiwbRQ972Rs5fJyPxzfDHkriwmsXtDWQw4KCCjWpjsn/wMqRZ82BSoVF0K+krK/Q6H9Q4OrHN9rOPzfkXxQTs5ie//5pppa1ZlVaYmVsUEWNpqLo1fpKcWEdKbtT9K45aFOpu8d79UJ7/vW0Up5a1CZhSxWsQqc3cjIbJ7DR5QwysI583N+XkANT2KRkN2MsZODpa0ccPtlyD3kPhTWBTJAlOtfoIuLmX1iI6IGLmlqUlfMSIWhi2U0SEFPQoSHI4WFMzv1vkEHYOzng4LWp4HBISWhPJeSrC1fr7ORqQeEuFjH2+ZQK+PBrt1+oCHA4dxx8R9HAzhpOWf9ye/uNao53zf5hB/lqiis8YaBygzHCzvpWVlBioJugW4KPAj8nqLoLlzRlcM7rNSoz0LwReVqDzRmY1ePRfLq1tbYhNHLNYEtj/F+Y8pq6t2+G/PSBxXb1ZTPgpqvG2IXsr+A6V/5fjp4T9CpHEynpEobShkxGBZxTNRLZw3l/TESV9UeL6ZoGDmsh5VL8H1qYljq9fz2w0CnVHM8uZX9d75O51RUFMe+6Rj0Nuo9emYrO67CPCf6xXD5+IvTkIV+tY0JYsdA3DsdCUUuhtjJOnI0N5zDUkMMcnZ5bX/E8jRhhm/wreY4BOt8IKNZ6jLyQnkrtMY4/NFsUZzKdqqxDcDF5acunj6H1+zu2rqGrQ2jcF2ZnBXNO0DOTvxnmqYzZnfWqRYOVTGBtOKApiDPFBh3XNnCmtrpptKkyhaaMH4JiCjKxeTYS6Z/Wu7pobBf9QgbCRop5O/t5dispCYktxtGR2i/+M+ml1eSpz9IeTazv8msaXjTQe5i7BnWcQFEl/SCpFaDTEDuLIYNBVusMahFevoK+3yLTs28OBzF/7ciLmtcZvKLXuJVHWElv1oRlVHYPL7SXEZuou1lKEgJvOknmYvBLp6Ybd0VBLvwndtwbjw+LJWSwHT7U1pZyx+ObfLb4BjnE3zk1Vd4nWw8NmqrDSrDJp2gdO2HjNDJOPbE99uvpCM1+lGHfJ8TSvpA5HCAbSgmyl6F1OPwLNOsVIw==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Set the user's persisted active organization (web/Clerk session UX). This does not change the org scope of existing API keys; API keys remain scoped to api_keys.organization_id.
---
---
id: set-instance-metadata-instance-instance-id-metadata-post
title: "Set Instance Metadata"
description: "Set metadata for an instance."
sidebar_label: "Set Instance Metadata"
hide_title: true
hide_table_of_contents: true
api: eJylWEtv2zgQ/isET7uAmmSLPfmWTQs0QNMEsdMejMCgpbHFRiJZcpTENfzfF0PqQVls0iI3aTSc+ebJGe15AS630qDUis/4HJDVgKIQKNhGWyYUk8qhUDmc8IxrA1YQ72XBZ9wBrrqvq+7YQBmeZLEavhvtkGfcCCtqQLCOz5Z7Lkm9EVjyjCtRA5/x6DjPuIUfjbRQ8BnaBjLu8hJqwWd7jhIr4r9s+dkl8ePOENGhlWrLD4f7IAIc/qeLHZ3LtUJQSI/CmErm3rLT745csY8UiKKQ9ElUN5Y8gBKcVzxWkfVIrlpbBxh6/R1y5IfD4dgST3BGKxeEvj87+yNwZgQptyCQRA9uuWhJPRapELZgCbAccab8lvEucH/kiXFa3TmwzFj9KAsoxgmGJfQZxn/HgxlXgE/aPpCmif0lolk5sI8yDwSJULspn2iwXNW6AHopYCOaCvmMK60IBaim5rNl9yqMXD3Ajt8P+D4hmnlQc95geUWSEr4LmTx4+Au9J/iMthjz3dB7KmCNrWK+O1slUj1OsWXA0KoIAiI7upqJ7Em5PDabzTv39ozCWrHz+aQQrBLVShrvZbW73vjyPra4p6imqvhhhCiIYJfGm3KM9MsQ/QTQ9ikUkMOoi/AsinMi467DyURwLGwSGSRrsfWtKS4goiXbT8adEsaVGo+OzFtyummNIxmLyAYAiXDeEuSEe5yBfGpKId3DysmfbTGMLgT5E5je+DLt1DOpWA1bsd5hSIJW+QfpHhgdSGZuDbW2u6mGK0+PdZQvKQnsSQ2PuWncVMHXi5s7dqEbhRMlkdyv/vBU7FEIHlu2uoMx+C4Kwy043dg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Ohx69yC9k2MOh/8BLlNlkQ==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Set metadata for an instance.
---
---
id: set-snapshot-metadata-snapshot-snapshot-id-metadata-post
title: "Set Snapshot Metadata"
description: "Set metadata for a snapshot."
sidebar_label: "Set Snapshot Metadata"
hide_title: true
hide_table_of_contents: true
api: eJylVktv4zYQ/isEL9sC2jgNevJtN12gARokiJNcDMMYS2OJa4pkSCqxV9B/L4bUy7aa7KI3aTjv+eZR8wxdaoXxQis+5wv0rEQPGXhgW20ZMKfAuEL7C55wbdACsd5kfM4d+nX3uu6kBsrwJbL18G608zzhBiyU6NE6Pl/WXJB1A77gCVdQIqkfxHnCLb5UwmLG595WmHCXFlgCn9fcCy+Jf9Hysxvi9wcTlHgrVM6bZhVVoPNfdXYguVQrj8rTJxgjRRoim313lIl6ZACyTNATyHtLGfACXTB8bCLpPbltYx3c0JvvmHreNM1pJIHgjFYuKr26vPwl58yRS6lF8KS6PinskxJ75kWJzkNpmN6ytwIV8wX2BWZv4FinYAjmeqDEWITymKOlgDORo4tOqsPdNlTyNCs9RVVScqrDiWcOLTNWv4oMMxY1kn9HrrXpuGBPDreVDNBMIS2Eypk44fWwQ8eASa3yEDLzuo3rYhTXX9H3JuFiOl8vFTKRofJiK9AGk2M7CZNiN/yu9/v9fqR+CoQJ77rgl2D1Xr6OmnXsHv8ZOCbdV0QclZKPFGS4hUqeEcfe3AV5RnoTBvINDo596rg/jZyIjFM5sbh150gWJeS4jqXpc0q06fYet9VyEF4lZ+PhgcxNZMIZTM/dyITbrZ34gecQWYgfeAZUoViJOWwOHt0R2NyOkcBkG5VYans4t3Ab6GMbxXtGIvukhdfUVO7cwPP1/RO71pXyZ0ZGep+D8Lnak6S/tmxl58aQu1EZHtDpyqa4oHRPlcGDn3J1Eein+eYJR1WVZN6gyggL5BRkZH8LQobBlaFEH9/CJ04CI1r4GFukcRiTrpNyMaCA5gnt07vgJMYqTdE5GnAP7U6glPx5dfU/VkKGHoQMLeWxnOg0qdOj158Y5T0EVqOt94+OHg2RgrVwCAB3+biPb9E5yHFqGETCwPrNWm3ZI1E/KgzFEU21nKMqPIMUWfAuKJwCXt+qMV+nQYw4/n58vP9Q4Xl1BxEWZYjFYVpZ4Q8h36T4K4JFy+fLFa1KDzndRz2KArRK9IWmA6w/pXzB53wGRsy6xpjVo/OpmZXDCnBoX7urq7KSBMNW7jxZEI4iMsb+tACjEDeR1IdceG9CMATFh+HI+raH0lDGalqyaqsn1qxD+9ml2mDGvtzfhC1WgoI8LHblPKgUXdL3u0vYRkgpVJ4wUBmraBk69NTdbrzdb7U1RSp1FfTyhFPM0eblxR8Xl1RxSl8JoXnak5PO3/6MHK3NI6dHnfjRvdwmyOPez4wEochsSHrdVm3JwQiqyjAm5seHb1+6VcILKvh8yet6Aw6frGwaIr9USOtjuUr4K1gBG0rBMiwv+s74fAvS4Ttx/PbQNtLv7L/c7tpB0Wh9BVnRH0/4Dg8nx3qYCgVCFnBctxzX0djntpc7DWejjMZMlPiSpmj8u7zjbri/WzzyhG/a877UGclYeKOpDG/RWx2CD+gOtJpLUHlF02jOo05CMlRUnH7e9YjfdN1ZT+ejriPHo96hapo+PZ7+KTFN8y8bDqet
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Set metadata for a snapshot.
---
---
id: snapshot-instance-instance-instance-id-snapshot-post
title: "Snapshot Instance"
description: "Create a snapshot from an instance."
sidebar_label: "Snapshot Instance"
hide_title: true
hide_table_of_contents: true
api: eJylV0tv2zgQ/isEL90F1CRb7Mm3Ni2wATZIECe9BEEwFscSG4pUSCqxK+i/L4bUg7bUtMXe7NFwnt83HLZcoMutrL00mq/4uUXwyIA5DbUrjWdbayoGmkntPOgcT3jGTY0W6MSF4Cs+qD4OKtOPRCQeH0fF2jjPM16DhQo9WsdX9y2XFEANvuQZ11AhX/HkOM+4xedGWhR85W2DGXd5iRXwVcu99Ir0L3p9dkH6fl+T0HkrdcG7Lut9PDdo95MTIQsM8Uz2t6DcgQPQ+6ttiPLIaDZKdKMU7x6yMZjP0W5HMjKNzn8yYk/mcqM9ah8s17WSeajm6TdHTWgX/eIOqlphLFWFHgR4Uuky7vY672MmX7Wl/nhJugeqiTUQQpJLUNcH2sfZDQKz+Ya5fzPdy8HRGFHLBW6hUX5o2KC6ps+j7Y0xCkFTgyaNHipDQ29i/fjvBDSc6TqybNHVRruY5oezs99qw2FJ80ASERNM2XOn5Y55WaHzUNXMbNlriZr5Eic+vYJjg4Ep1vNJErOR2mOBlorZ4/M3UXgUmUPLamtepEDBokWK7yC0vhwn7M7htlFsayzLIS+lLpg80vXwhI4BU0YXIWXmTZ/XCZ9zIONyuV7PDTIpUHu5lWiDy9RPxpR8mv4+7na7XWJ+iebZIeR/Fehv1WswOAuPL8B/DtHhV0QctZInBkaOHArTaK7CeUZ2MwbqFfaOvRu03yVBRMWlmljcujmSZQVFGK7pDCXZDwZoMiLvp8MPc97ekLuFSrga83kYQrqnRye/4xwia/kdZ0CVmlVYwGbv0R2AzT0xOrBIoworY/dzD5dBnvoo33IS1Rc9vOR14+YOvp5f37Fz02g/c5LY/RoOz80eFf2lV6uGMKbaHYw+Zxqb45rKvdQGD34p1HWQH9ebZxx1U5H7GrUgLFBQIMj/FqQKg0ugQh+/hZ+4CIzo4efYIovTmHTDKRcTCmhesD7PtZtRe93kOTpHA+6mvxOoJH9/+PA/rgSBHqQKlPJYLTBNmfzg6y+M8hECD8nF+K+JEU2ZgrWwDwB3RcrjS3QOClwaBlEwqX6x1lh2S9KfNYbyiK56zaQLX0FJEaILBpeAN1I11us4iUTjn9vb658anHd3OsLiGVJxmDdW+n2oNxn+hGDR8tX9Q1gYoKC1atweA7Qq9KWh9XZcVn3JV/wUank6rKWnbbKgdqcJXxzal2Gvbayig+FWHiJZE44iMtJ4eoCFrSiKxpRL7+uQDEHxZlonv8S98GjVG3cwWrzo9tVbs3D/OrTvXW5qFOzj9UW43irQUIQbf6hGNg4Cl7GNVErqImOgBWvolnToifYuvfYvja3LXJkm2OUZp2JEn2cnf52cERSorhUEVvWL+MBiNjTi+CJM6PmLL5W+eB53/rRWIDV5Dg1p+47ec6glz8anBs/46vDZMbb1IeMlgWF1z9t2Aw7vrOo6EscXBTVbSAcblbwhnnCfvjFeQDUUUUDDC1hJ2ssnf5j6Hzc9If9kP0pxoJXepz6HaNL8wnQpEUTgQ9trnEdn7/uZMFiYjUQaV/HExzzH2r+pm7Lq+mp9yzO+6R9ElRF0xsIrTXd4jdGakHxgSZC1XIEuGppqKx5tEiOgoUaOc3NkzmZgebtcj7aNGrfmCXXXjeXx9J8K03X/AfFXOkM=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Create a snapshot from an instance.
---
---
id: start-instance-instance-post
title: "Start Instance"
description: "Start a new instance from a snapshot."
sidebar_label: "Start Instance"
hide_title: true
hide_table_of_contents: true
api: eJzNWE1v2zgQ/SsEL90FtEm22JNvaVqgAZomiJ32EAQGLY0tNhSpkiM7ruH/vhhSkimLTVMEC+zNooczjzNvPsgdL8DlVtYojeYTPkVhkQmmY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MLBG52exTKgk24hHmgQ1DdF8pQEa/joabVonIc3BuTMfW+pwGhkEiLoVycOywryVgCZZ85hUPbBrNPs5mN62pyGf+INeaUdc8eGBhjAKhIxfMnStfj2E6/fhzCFNXJhAk2ittuNbjeB2F3HegvJ8sXSh0NrQdPWjRSCNKF+wEPRK2RgPktPEHWzaK3bbDMvnvn7dvXzErF4BCqmeGRGXywb8vGGf6HHyIfPvJBESJgalyq3gauALnxCo5IoaFg+gHqvxsRqu/mhvoHMFUKxlF4YtQsvDovMLnhr/3wV/Hh4jHw9ns5pcKx9E9bGFhD4k4yBsrcev9TYrfgbBg+eT+wY+LYkU37Z5FvvJUgKWhB4b+IQFLPuGnopanUU2j+0H3uOAHan7qi2RnckqECRSIDbdM8hkUlvqz+SpCqIlzt4enhA/hTeDozn90Ge9a36C+n/lpemnG5ZEuU3+53NRQsPObS18dK6HFSupVXxBc1o9rLmMLqZTUq4wJXbCGLmNdbY0v3lfG1mWuTOP18oyTk4LNs5O/T87CRcVhJXxatS8x4QXoMp6yI7RRcr74raj1KcITntZKSB1dfEJE7+lKRiNwZ/Uh4yWFfHLPd7uFcHBn1X5Py+HdiCJdSCcWijIiVV5joH/ctsnzJ/sZHLoOHr9CrYVqSNJzaS2sJHOerxkvQRSevLt260Ww9lebwN3eUf2i2hJ2nOc51PisbJwCN9fTGc/4on3QCnddbsWG6rTYEE56lqPdnul+bceV0KuGStCEB53EarotR9f8nv2LLiX7v4TeRgh3uyAxM4+g93ve+Q3pm2rkfv8vAGIA3g==
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Start a new instance from a snapshot.
---
---
id: stop-instance-instance-instance-id-delete
title: "Stop Instance"
description: "Stop and delete an instance by ID."
sidebar_label: "Stop Instance"
hide_title: true
hide_table_of_contents: true
api: eJyNVMtu2zAQ/BViTy3AxmmQk24pEqAGUjRInF4MI1hLa4mJRDLkKqgh6N+L1cuK3dfJFD37mOHsNpBRTIPxbJyFBB7YeYU2UxmVxKTQKmMjo01JbfdqeX0GGpyngBKwzCCByM4/jaDDYXaVPT316UCDx4AVMYUIyboBI0U9cgEaLFYECcziQEOg19oEyiDhUJOGmBZUISQNsOFS8Muxv6Xgee+payoYm0PbbiRF9M5GihJ1cX4pP0es6zSlGHd1qe4HMLQaLi8uBJs6y2RZjuh9adKO++I5Smwz68gHUYZNXykjRlPKyTBV8RRQuvTdv2j333edKkck9HRjLFNOAdpNqycBbl3f0YE9hoB7YVDFfC7VN4oRczqVabw4QG9CcEGt5PZU1PmzrDsefakBuTn09gNLk3XddQkPudz2mVKGGY3rXq9jEjPE19Xq7p8JJeD96x5CVB8jkEhpHQzvO70l8RfCQAGS9UY8w5iLQSdzRSFVERdOLD9zMxeQwAK9WYy+XTQzB7cgpcLb6Pc6lIIHqTG28CAG6i0xb2RwlnDb9lcT14LZdyyM3blTOz9GCp9i6jxl6upuqXYuqAot5sbm0zhHraJFHwvHUautKUtjc93Nfh0pqEjMxuZRBn7yjwu+SEtXd3lBg/Dqa56ffT47l+f0LnKF3WQMA93tlFFIOHqd2Xj93/IZJGD6yQtforFStJO1GZ5jDegN6GmRgIZkvlQ2GgoXWYBNs8VIj6FsW7l+rSmIIzYa3jAY3ArrdQOZiXLOINlhGekvFD7cD4PxUf2p19Hedi8CYlnLF2h4of3R9uumvCDMOl82A+IqTcnzLPZkKbVzr17f3N6sbkAD1iLOtEomT21H4ze/b61pesTKvZBt26lTlm/psW1/ARyrJLQ=
sidebar_class_name: "delete api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Stop and delete an instance by ID.
---
---
id: update-instance-ttl-instance-instance-id-ttl-post
title: "Update Instance Ttl"
description: "Update the TTL (Time To Live) for an instance."
sidebar_label: "Update Instance Ttl"
hide_title: true
hide_table_of_contents: true
api: eJy1WE1v2zgQ/SsEL20BNckWe/ItTQs0QNIEsdIejMCgpbHFRiJZcmTHNfzfiyEli7LUtLvZvUnUcD7fDB+14zm4zEqDUis+4fcmFwgMC2BpesVep7IClmp2Jdfwhi21ZUIxqRwKlcEJT7g2YAVtvsz5hNd++7wVmCOW3Uv3JPO5/2S0Q55wI6yoAME6PpntuCRHjMCCJ1yJCviERzt5wi18r6WFnE/Q1pBwlxVQCT7ZcZRYkvxlI88uSR63hhYdWqlWfL9/CCrA4Xudb2lfphWCQnoUxpQy8yGdfnOUlF1kwFgKGCU4bw7LuchC6nZcqO3N0kcAqq74ZMYdauPjqx3wh4Ejya5dUXVZcvKrX41zr5uhZigegW0KUL40bToYPBlpwZ2wD7AUdYnOyxbAstpaUMiCd0xb9oqceUUla5OUYsmCBb5PfCwOMq1y1w+mcVEqhBXYP/D6M2w8eKRijcITglBWgrD+gxHOMdp87M20sb/fx0We9Xx76LYEsKbp1V2oZldqvfgGGfJ9XxGhxS84o5ULJXx3dvYCAGQWBJLqDnoXzVIyTByXPckxbCa8AhS5QG9M5LkkP0R528fd8aajJnZgmbF6LXPIWavQd2+Mnij5163RQQYTrgA32j6SpUH8BaKZO7BrmYUFiVC5oZyosZhXOgd6yQNWCUBakRdtuzSvwsj5I2zjSn9CNNNg5rzG4po0jeQuTIsuw5/pfUTOaIux3C29jxWstmUsd2/LkXHSx6oKNk1QSQqiONq5FMUzlvI4bDZt03sQFNaKrceTQrBKlHNpRnv2mUHTeRRUsEvjQzn29HNX/RFHm6fQQA6jSc2TqM4jiLsJO0eKY2E5giBZiZUf/3ED0droiE+4U8K4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9s0fathMPNoHoUd51kGBp+Vjdvm9maa8oQvmp9Q4X7MrdjQbBeb4K32wfte8Gs7Xgq1qmlsTXjQSbinG3b0a+DQH4u2jXfj+djtgkSqH0Ht94f0IL1TYvb7n69o7ss=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Update the TTL (Time To Live) for an instance.
---
---
id: update-instance-wake-on-instance-instance-id-wake-on-post
title: "Update Instance Wake On"
description: "Update the wake-on-request settings for an instance."
sidebar_label: "Update Instance Wake On"
hide_title: true
hide_table_of_contents: true
api: eJzFWEtv2zgQ/isET7uAEmeLPfmWpgUaoGmM2GkPRmDQ0thiI5EqOXLiGv7viyH1oCw2KTZY7M2ihzPfvD4OeeAZ2NTICqVWfMrvq0wgMMyBPYlHONPqzMCPGiwyC4hSbS3baMOEYlJZFCqFc55wXYERpOI641NeOyWrVmBFmlZa9Qv9L5mtur8rbZEnvBJGlIBgLJ8uD1wSrEpgzhOuRAl8yoPdPOGETxrI+BRNDQm3aQ6l4NMDR4kFyV838uya5HFf0aJFI9WWH48PXgVYfK+zPe1LtUJQSD9FVRUyda5NvlsK0SEwUBlyHCVY+mr9yBEr+s5gI+oC+XQjCgvJSaS/5YA5GIbaRdqFvHWMacU+LRYz1gAj1I0v30j2VrFPZKRzZq11AULxY9KhsDZ/O4j5/NMLGOY2j0A49oK+mkj8rlfixfX6O6TIjyQ+zKBbsJVW1of13cXFG5KSGhBIqvtyuGqWOixSIWzBUPTkQDJWLwkvAUUm0BkTWSYJhyhmA7OjTSdtZsGwyuidzCBjrULXWWEKgpjftEZHEUy4AnzS5pEsjfynYlxZMDuZ+gWJUNqxnKgxX5U6g0HRcKUVoQBVl3y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ZylTZWnha6dXp5wio23eXH+1/mFv7VYLIXrseaponlP6V4gGvrhJxkPWvbfPsE0IUZ4xklVCKmC25FP+5LubTQn9zwzHT6ltLl/SHhOBTNd8sNhLSzcm+J4pOUfNdDMunxI+E4YKdYUm6WbmOl3Fqfq0L0/7ppG/JP9CnXbTopGvJ0oavriCacr5/D1x7FKDiJzfXBoJK68sbOGC1oNIyokmvI7LtMUKnxRNuym2e18wRO+bt6L/LWZG/FElC+ePFrtnHft4dYOvBBqWxObTbnXSa1AF+/gxaBrmXXb3Yd4PA4HL7HQj6COxy48SN8UmOPxHxhU2+o=
sidebar_class_name: "post api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Update the wake-on-request settings for an instance.
---
---
id: update-member-role
title: "Update Member Role"
description: "Update a member's role in an organization."
sidebar_label: "Update Member Role"
hide_title: true
hide_table_of_contents: true
api: eJy9VkuP2zYQ/ivCXNoC3PW2R93yKNA9pDW83pNhGGNpLDGRSIZDZeMK+u/FkLItZ9XARYHcxNE8v5lvyB5K4sJrF7Q1kMOzKzFQhllL7Z78T5x521CmTYYms75Co/9G0b0HBdaRj4fHEnLooukuGe7EDBQ49NhSIM+Qb3rQEsNhqEGBwZYgB+urnS5BgafPnfZUQh58Rwq4qKlFyHsIOjSi+tckfvb4HhSEo5MfHLw2FQyDmg3RMflbYzwz+Xnf22ROHN7a8ig2hTWBTJBPdK7RRcxs8ZEFyn7i3HmBKmhiOUVo8h7IdC3kG0Egx7LVRiD1VZ4QhK06J7VKYL6qdlLPJrmdGKVWfojOxMEqJX/xY/cfqQgwXDsSYKKAnTWcMv7t4eF/1KvLKcBz2Ma6z6197aHwhIHKHcbYB+tb+QKp7y7oNmIzun+XVLM3YS7MLalo3jnybA02V8qcLU/is9Xe2obQiFmatYv+n9jO9EyBfTFpGqeDLbLZqVPATVdNdZ/kPKOX6HcTRmky5jH6Zqgia0wqhVPkcwHXUE0mb8rT1+OmwHX7Rhe7SMsSw+zIkAn6oMlfteAinQHg1gactsFNpL8UtYxJi+Z7SXmmrB/E6ym6id1cazdP6+vl/tQVBTEfuiZbjfSO0ZiKzutwjCv6j/V6+ZbQC/SbrWy9gJVs76vALBm1FGorq991Ie76UEMOC3R6YX3Fiz7t9mGRKudFP2I/yDSR/3K6FjrfiCFItFMyT7JN0jRMUxrXTCRfEp0Lr0NwsR5ZSKvLqv79K7YutSa1aNIZ4bs5WPn3zUXI5O+4sE54snzMDtZnLRqstKkybTigKYhVxgYd1zawyva6abSpVIamzKTSjCkEbSq+n5Dvg/WuLhrbRb+gQFBIMR/uf71/iASxHFqMi3C8wsZ7OfU7G+fmKuPJev5vt/iIXqCvYeEaTKDEjvRjSzeATqchZlCQn6/ssa8iO7Fqq6C2HMSo7/fI9OybYRDx5468jNhWwRf0GvcCx6aHUrN8l5AfsGH6Tlk/r0Za/JL9W96jEM1RkMWmkxMo+ETHy1tDngk/MOoJmmE7KKgJy0itfvz7LgW6W4uPi/WrC1aSThZvioJc+K7ulJzL5zUo2I9vltaWYuLxRZ5D+JIStS6RWigish4aNFWHlegml0Is7GQc+vPtdyLg/rQv+nko+j5prO0nMsNwRibIWXAZhn8AtrqVuQ==
sidebar_class_name: "put api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Update a member's role in an organization.
---
---
id: update-organization
title: "Update Organization"
description: "Update an organization's details."
sidebar_label: "Update Organization"
hide_title: true
hide_table_of_contents: true
api: eJylVcGO20YM/RWBl7bA7Hrbo25JWqB7aLPY9Z4Mw6AlWppEmpkMqWxcQf9eUCPZctYNFuhNwyGHj+R7VA8lcRFtEOsd5PAcShTK0GU+VujsP6gXP3FWkqBt+BYM+EBxNN+XkEM3RuyW7mAgYMSWhCJDvunB6tsBpQYDDluCHHysdrYEA5G+dDZSCbnEjgxwUVOLkPcgVhp1/bh4O7v/HQzIMegFS7SugmHYpmeI5b0vjxpbeCfkRD8xhMYWY/TqE2uZ/SJJiFqPWGI9JXDn1H/r+VU+A9x01dLvSc+vcZmTQ2rsspLHBPgc5fefqBAYNOyyKaOBg3ecUP52d/c/aiwioVC5wzHy4GOrX6D4bsSmeifUH5Jr9k6uNcGWyxZcG4wBy7tAkb3D5sKZs4fZfIrae98QOg176xz8i6O4uwTyUW1XefLWuZmJ1W/qUZrs9R5dTHIDI99dKoVT5lMBl63amqvsv06WSwk/dUVBzIeuyR4n0oxAmIouWjmOgvxzvX54TxgpQr7Zqn4EK9XqRTpWHC1J7VXpoZNR2VJDDisMduVjxas+KXnQmih+nSXfxUbdQN+eUz8pIxMJlwAmqo4USKZTmbVIGNErqR/PEv/jG7ahobNk55bPI15S0B28On636ZjiDRc+6Oge7rODj1mLDivrqsw6FnQFscnYYeDaC5tsb5vGuspk6MqsY4oZk4h11bgW53n95WOoi8Z347tgQFuSct7d/np7p5CCZ2nRLeBPi/e7YV9AXgj+TXt6aqHQN1mFBu0orHEs/TTFDWCwSsJYMRjIp528NVB7Fr3v+z0yPcdmGNT8paOoBNoa+IrR4l4r3vRQWtbvEvIDNkw/AP7z46SHX7L/gjgZ0R21edh0egIDn+l4/m8M28FATViODO6nyw8pz81anzgHv9qOg5kj3hUFBfmh71IDD89rMLCffjKtLzUk4ov+x/Al4fQhaSfvk62HBl3VYaW+6UllNHY6gv60/Gbm72dZ9tc70ffJY+0/kxuGU2NEz9qXYfgX59assA==
sidebar_class_name: "put api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Update an organization's details.
---
---
id: update-user-ssh-key-user-ssh-key-put
title: "Update User Ssh Key"
description: "Update the current user's SSH public key."
sidebar_label: "Update User Ssh Key"
hide_title: true
hide_table_of_contents: true
api: eJytVU1v2zgQ/SvEXPai2NmgJ93cDyBFdrFB7PRiGMFYmkhsZJLlUGkFQf99MaRiyXHRomhv0mg4fPPmzVMPJXHhtQvaGsjh3pUYSIWaVNF6Tyaolsn/xWq9vlau3Te6UE/ULSAD68ijnPtYQg5tPPkg2Q/M9cMTdacvrg2QgacvLXF4a8sO8h4KawKZII/oXKOLWHD5mQVND1zUdEB5om94cA0x5NseEg6pCjkw1xeeUa1Wq9VisYBhl4HzAi5oyT9N7yHo0BDkcJuauaEOMgidkxgHr00Fw5CAak8l5Nt5gV12LJC4Wq+vb6i7S21Nlez+MxUBhtNSwbcUA+ys4YTu6vLyl5g47a3whEFKT429G0NHLNoEqsjDkP1RKrLj5XNSmHyi5PtcnMpt3RYFMT+2jbobORGUb66ufoOSkgLqRp50oAOfJzS2OPmKpvvvMQrrVe9Zf0bhbph6/ccmRFOn6D120sGBqznB/xIzVnTO7ktgSv3gvfVqI9GfzUL6SFeNmbM5fMJGlxFdLHg+jCn1feLrdROzjOvN5vanBc+nOx1R6YykMBWt16GLfEvht4SePOTbnWxuwEp2HMRubqhj6elAobbiMclCHIYaclii00txmKU4QBIkk38mn0yi9Y1kRT94uXQtkkkimF89akm62afQsbs6BBdxi+ruJvP6kPzotb3MBqvNo01yPDFYJn/BhXVUqtXtR/VovTqgwUqbSmnDAU1BnCk26Li2gTO1102jTZUpNGV0Y8UUgjYViwsfJWa9q4vGtrEuZCBEpDsvF38vLuP2Ww4HjMtj8DB5mBJUas31aAEnkGd7+Eu/h5HAQN/C0jWojSCIQ+nHEW4BnYYMpIQMbxzjLoPacpDvfb9HpnvfDIOEv7TkRTi7DJ7Ra9xL51tZyZqwjCLqIc3hXcJ8MS7SMzZt1PZrH5EdTydWRUEu/DB3rsXb+w1ksB//YwdbyhGPX+Ufh18hh/iHlMNRbjHWQ4OmasUJckglRVrYChtHrzlKcP+yGcdPaLoZwL5PGRv7RGYYIBs7CfIuVjUM/wPv5rQ2
sidebar_class_name: "put api-method"
info_path: api-reference/morphcloud-api
custom_edit_url: null
---
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";
Update the current user's SSH public key.
---
---
title: CHANGELOG
slug: /changelog
description: Product and documentation updates for Morph Cloud.
---
# CHANGELOG
## 2024-11-19
- Initial beta release
---
---
id: mental-model
title: Mental Model
sidebar_label: Mental Model
description: Understand Morph Cloud’s core concepts—Devboxes and the underlying VM primitives—and how they fit together.
---
# Mental model: Devboxes (workspaces) → save/branch → share
Morph Cloud can be understood at two levels:
1) **Devboxes (recommended):** the user-facing object for building and sharing cloud development environments.
2) **Instances (primitives):** the underlying VM objects for power users who want fine-grained control over VMs and direct manipulation of snapshots/branches.
## Devboxes vs Instances
| If you want… | Start with… | Why |
|---|---|---|
| Day-to-day **development** (VSCode/Cursor, SSH, tmux agents) | **Devboxes** | Devboxes are designed to be programmable workspaces for humans and CLI agents. |
| Fast **prototyping** (preview a web app/API, then share it) | **Devboxes** | Expose an interactive preview URL and optionally disable auto-sleep to behave like a persistent VPS. |
| **Sharing & collaboration** inside an org | **Devboxes** | Share devboxes live via URL with your organization; create multiple orgs as needed. |
| RL environments, test-time scaling, or bespoke VM orchestration | **Instances** | Instances + snapshots are the lowest-level building blocks for advanced workflows. |
## Level 1 (recommended): Devboxes
Devboxes are persistent cloud workspaces that can be automated and shared.
1) **Templates**: reusable blueprints for dev environments (base snapshot + build steps + integrations).
2) **Devboxes**: running workspaces created from a template (or from a snapshot).
3) **Automation & interaction**: SSH, HTTP exposure (preview URLs), and tmux sessions for CLI agents.
4) **Save / branch / share**: checkpoint state into snapshots, create many parallel workspaces, and share via URLs within your organization.
### Common Devboxes flows
- **Develop:** template → devbox → VSCode/Cursor/SSH → tmux automation
- **Prototype:** devbox → expose-http → preview URL → iterate
- **Collaborate:** devbox → share URL (org) → teammates join
- **Parallel workspaces:** devbox → save snapshot → start many devboxes from the checkpoint
## Level 2 (primitives): images → snapshots → instances → branches
The primitives model is still important—it’s just not the default mental model for most users.
Morph Cloud primitives revolve around four concepts:
1) **Images**: reusable base OS filesystems (e.g. `morphvm-minimal`).
2) **Snapshots**: immutable, bootable copies of an image (or of a running instance).
3) **Instances**: running VMs started from a snapshot.
4) **Branches**: near-instant copies of an instance state that let you parallelize work.
## When to use what
- Use an **image** when you want a standard starting point.
- Create a **snapshot** when you want a reproducible environment you can boot repeatedly.
- Run an **instance** when you need a live VM to execute commands, SSH, or expose services.
- Create a **branch** when you want multiple parallel futures from the same state.
## Common flows
### “Boot and run”
image → snapshot → instance → exec/ssh/http
### “Checkpoint and fork”
instance → snapshot (checkpoint) → branch (parallel copies)
## Related docs
- Devboxes: [Getting started](/devboxes/getting-started)
- Primitives: [Images](/docs/documentation/images)
- Primitives: [Snapshots](/docs/documentation/snapshots)
- Primitives: [Branching](/docs/documentation/instances/branch)
---
---
id: agent-tokens
title: Agent tokens
description: Mint and use devbox-scoped agent tokens safely for self-managing agents running inside a Morph Devbox.
---
# Devbox agent tokens
Devbox agent tokens let an agent running inside a devbox manage that same devbox without holding a full account-wide `MORPH_API_KEY`.
Use an agent token when you want the agent to do narrow self-management tasks such as:
- reading the current devbox summary,
- exposing or hiding an HTTP service,
- saving a snapshot,
- reading or writing secrets when the token has the matching scope,
- writing notifications when you mint the explicit notifications scope.
Use a full `MORPH_API_KEY` instead when you need account-wide or multi-devbox access, or when you need workflows outside the usual self-management surface.
## What the token is scoped to
When you mint a devbox agent token through `POST /api/devboxes/{devbox_id}/agent-token`, the service binds it to:
- the authenticated user,
- a single `devbox_id`,
- the effective organization context,
- an explicit set of scopes,
- an optional `purpose` string for audit/debug context.
The mint endpoint only succeeds for a devbox that is already claimed and owned by the authenticated user. Later requests made with the token are rejected if you try to use that token against a different devbox id.
Tokens minted by this route are currently **non-expiring**. The request schema still accepts `ttl_seconds` for backwards compatibility, but the service does not currently encode an expiry for newly minted tokens and returns `expires_at: null`.
:::tip Base URL naming
This page uses `DEVBOX_SERVICE_BASE_URL` to make it obvious that you are talking directly to the devbox service.
If you already use `MORPH_DEVBOX_BASE_URL` elsewhere, point it to the same value and keep it consistent across your scripts.
:::
## Default and supported scopes
If you omit `scopes` when minting, the service currently grants this default self-management set:
- `devbox:summary:read`
- `devbox:http:write`
- `devbox:snapshot:write`
- `devbox:secrets:read`
- `devbox:secrets:write`
Additional supported scopes include:
- `devbox:notifications:write`
- `devbox:metadata:write` (reserved; not part of the normal default workflow)
Best practice: mint only the scopes you actually need, and inspect the returned `scopes` array instead of assuming every agent token has the same capabilities.
## Mint a least-privilege token
There is not currently a repository-backed SDK or CLI helper documented for minting this token, so the canonical workflow today is a raw HTTP request to the devbox service.
```bash
export MORPH_API_KEY=""
export DEVBOX_ID=""
export DEVBOX_SERVICE_BASE_URL="${DEVBOX_SERVICE_BASE_URL:-https://devbox.svc.cloud.morph.so}"
MINT_RESPONSE="$(curl -sS \
-H "Authorization: Bearer $MORPH_API_KEY" \
-H "Content-Type: application/json" \
-X POST "$DEVBOX_SERVICE_BASE_URL/api/devboxes/$DEVBOX_ID/agent-token" \
-d '{
"scopes": [
"devbox:summary:read",
"devbox:snapshot:write"
],
"purpose": "codex session: docs update"
}')"
export DEVBOX_AGENT_TOKEN="$(echo "$MINT_RESPONSE" | jq -r '.token')"
echo "$MINT_RESPONSE" | jq '{devbox_id, user_id, scopes, expires_at}'
```
The response includes the final granted scope list. For newly minted tokens, `expires_at` should currently be `null`.
## Use an already-injected `DEVBOX_AGENT_TOKEN`
Some agent environments inject a pre-scoped `DEVBOX_AGENT_TOKEN` for you. In that case, use it directly and assume it may be narrower than the service default scope set.
```bash
export DEVBOX_SERVICE_BASE_URL="${DEVBOX_SERVICE_BASE_URL:-https://devbox.svc.cloud.morph.so}"
: "${DEVBOX_ID:?missing DEVBOX_ID}"
: "${DEVBOX_AGENT_TOKEN:?missing DEVBOX_AGENT_TOKEN}"
curl -sS \
-H "Authorization: Bearer $DEVBOX_AGENT_TOKEN" \
"$DEVBOX_SERVICE_BASE_URL/api/devboxes/$DEVBOX_ID/summary" | jq
```
If the session tooling manages the token for you, prefer refreshing or restarting that session rather than replacing it ad hoc.
## Common self-management calls
```bash
# 1) Read the lightweight devbox summary
curl -sS \
-H "Authorization: Bearer $DEVBOX_AGENT_TOKEN" \
"$DEVBOX_SERVICE_BASE_URL/api/devboxes/$DEVBOX_ID/summary" | jq
# 2) Expose a local port as an HTTP service
curl -sS \
-X POST \
-H "Authorization: Bearer $DEVBOX_AGENT_TOKEN" \
-H "Content-Type: application/json" \
"$DEVBOX_SERVICE_BASE_URL/api/devboxes/$DEVBOX_ID/http" \
-d '{"name":"app","port":3000}' | jq '.networking.http_services'
# 3) Hide that HTTP service again
curl -sS \
-X DELETE \
-H "Authorization: Bearer $DEVBOX_AGENT_TOKEN" \
"$DEVBOX_SERVICE_BASE_URL/api/devboxes/$DEVBOX_ID/http/app" | jq '.networking.http_services'
# 4) Save a snapshot before a risky change
curl -sS \
-X POST \
-H "Authorization: Bearer $DEVBOX_AGENT_TOKEN" \
-H "Content-Type: application/json" \
"$DEVBOX_SERVICE_BASE_URL/api/devboxes/$DEVBOX_ID/save" \
-d '{"name":"pre-change: dependency upgrade"}' | jq
```
:::warning HTTP exposure is currently public through this route
In `morphcloud-devbox-service`, `POST /api/devboxes/{devbox_id}/http` currently forces `auth_mode` to `none`.
That means exposing a port through this route creates a public URL. Only expose services you intentionally want reachable from the public internet.
:::
## Using secret scopes safely
If your token includes `devbox:secrets:read` or `devbox:secrets:write`, you can use the devbox service secret endpoints with the same bearer token.
Example: list secret metadata without printing secret values:
```bash
curl -sS \
-H "Authorization: Bearer $DEVBOX_AGENT_TOKEN" \
"$DEVBOX_SERVICE_BASE_URL/api/user-secrets" | jq '.data[] | {name, metadata}'
```
Actual secret-value reads and writes use the same auth model, but be careful not to print values into shell history, logs, chat, or CI output.
If a secret-backed call fails with `Agent token session not found (mint a new agent token)`, mint a fresh token with your user API key and retry. The service stores encrypted session data for agent-token secret resolution, and non-secret endpoints can continue to work even when that session state is unavailable.
## Best practices
- Mint one token per agent session or workflow, not one broad token that multiple tools share indefinitely.
- Set `purpose` every time you mint. A short string like `codex session: release docs` makes logs and debugging much easier.
- Request the smallest scope set that works. If you only need `summary` and `save`, do not also grant secrets or notifications.
- Keep the token in process memory or short-lived environment state. Do not commit it, paste it into tickets, or write it to shared files.
- Assume injected `DEVBOX_AGENT_TOKEN` values are intentionally constrained. Check your workflow against the actual granted scope set before widening credentials.
- There is no dedicated revoke endpoint documented here today, so treat narrow scopes and one-token-per-session hygiene as your primary containment strategy.
## Troubleshooting
**`401` or `403` with `Token expired`**
- Newly minted tokens from `POST /agent-token` are currently non-expiring.
- If you still see `Token expired`, you are probably using an environment-managed token provided by a higher-level session tool. Refresh or restart that session and retry.
**`401` with `Agent token session not found (mint a new agent token)`**
- This usually appears on secret-backed requests.
- Mint a fresh token with your user API key so the service can recreate the encrypted token-session record it uses to resolve your underlying user API key for secret operations.
**`403` with `Insufficient scope`**
- Remint the token with the exact missing scope instead of switching immediately to a full `MORPH_API_KEY`.
**`403` with `Token is scoped to a different devbox`**
- The token is bound to one devbox id. Use the matching `DEVBOX_ID`, or mint a new token for the correct devbox.
## When to use `MORPH_API_KEY` instead
Prefer `MORPH_API_KEY` when you need:
- account-wide or organization-wide operations,
- workflows that touch multiple devboxes,
- devbox create, delete, branch, or tmux automation flows that are outside the usual agent-token self-management surface,
- a broader control-plane surface than self-management,
- any automation where the agent token does not have the required scope,
- tasks where your environment provides only a narrowed injected `DEVBOX_AGENT_TOKEN`.
For general Devboxes setup and API usage, start with [Getting started](/devboxes/getting-started) and [Development](/devboxes/development). For low-level API details, see the [hosted devbox service docs](https://devbox.svc.cloud.morph.so/docs).
---
---
id: development
title: Development
description: Use Devboxes as cloud workspaces for VSCode/Cursor, SSH, and tmux-driven CLI agents.
---
# Devboxes for development
Devboxes are the best default for development on Morph Cloud:
- **VSCode/Cursor integration**: one-click connect from the Devboxes UI.
- **SSH when you want it**: treat your devbox like a real machine.
- **tmux integration for CLI agents**: automate interactive sessions while keeping a human in the loop.
- **“Infinitely many workspaces”**: use snapshots/branching to spin up parallel workspaces from a known-good state.
## Quick start: open a devbox in your editor
1. Create a devbox: https://cloud.morph.so/web/devboxes/new
2. Open it in VSCode or Cursor from the devbox actions menu.
3. Commit early and often inside the devbox (it’s a real VM).
## SSH workflow (CLI)
```bash
export MORPH_API_KEY="..."
# Start a devbox from a template (pick one you have access to)
morphcloud devbox template list
TEMPLATE_ID=""
DEVBOX_ID=$(
morphcloud devbox start "$TEMPLATE_ID" --name "dev" --json | jq -r '.id'
)
# Run commands via SSH
morphcloud devbox ssh "$DEVBOX_ID" uname -a
```
## Automate CLI agents with tmux (API)
Devboxes expose a tmux API that lets you programmatically:
- create sessions
- send keystrokes
- capture state
This is a good fit for running CLI agents (Codex, Claude Code, Gemini CLI) with human-in-the-loop supervision.
See the tmux quickstart in [Getting started](/devboxes/getting-started).
If the agent needs to manage the devbox from inside the devbox, prefer a scoped [agent token](/devboxes/agent-tokens) over exporting a full `MORPH_API_KEY` into the session.
## Parallel workspaces (snapshots + branching)
When you have a devbox in a “known-good” state (tooling installed, repo checked out, services running), checkpoint it. Then you can spin up parallel workspaces from that checkpoint for:
- separate feature branches
- code review / debugging sandboxes
- “one workspace per agent”
If you need direct control over snapshot primitives (and very high fan-out), use the primitives path:
- [Snapshots](/documentation/snapshots)
- [Instances (VM primitives)](/documentation/instances/basic-lifecycle)
---
---
id: getting-started
title: Getting started
description: Launch, manage, and automate Morph Devboxes via API or dashboard
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Getting started with Morph Devboxes
Morph Devboxes are the simplest way to code with AI in the cloud. Previously, working with agents like OpenAI Codex, Claude Code, or Gemini CLI in the cloud required you to use restrictive, opaque, and asynchronous web interfaces or otherwise set up a VPS and worry about sandboxing and provisioning different development environments. Devboxes on Morph Cloud, on the other hand, are all of the following:
- **Development:** VSCode/Cursor + tmux integration for CLI agents make iteration fast, and snapshots/branching let you keep “infinitely many” workspaces ready to go.
- **Prototyping:** expose an interactive preview of a web app or API, and optionally disable auto-sleep / TTL policies to behave like a persistent VPS.
- **Sharing & collaboration:** devboxes are shareable live via URL to anyone in your Morph Cloud organization, and you can create multiple organizations as needed.
- Programmable, shareable, and easily reproducible development environments. Devboxes are programmable: you can specify, create, interact with, and manage devboxes entirely over the Devbox API. Every devbox is [created](https://cloud.morph.so/web/devboxes/new) from a template that integrates with our [secrets manager](https://cloud.morph.so/web/secrets) and which can be shared with a short URL. You can also programmatically configure devboxes with [remote desktops](/examples/remote-desktop) for computer‑use, or arbitrary web applications for full‑stack development.
- Shared workspaces for CLI agents with easy human‑in‑the‑loop interaction. Devboxes expose a full tmux API, which lets you programmatically manage coding agents like OpenAI Codex or Claude Code. These fully persistent sessions remain interactive and can be easily accessed through the devbox [web interface](https://cloud.morph.so/web/devboxes), through SSH, or puppeteered through the Devbox API.
- Full virtual machines capable of running any configuration of containers: docker‑in‑docker, a local Kubernetes cluster, self‑hosted Supabase, etc. There is experimental support for Windows, OSX (x86), and nested virtualization as well.
- Serverless and elastic. Devboxes can branch to hundreds of parallel replicas or scale to zero after a period of inactivity, preserving all application and memory state.
- Full‑featured cloud development environments. Devboxes integrate with Git auth and include one‑click integrations for VSCode and Cursor that let you connect from your local editors with a single click.
Useful links:
- Devboxes dashboard: https://cloud.morph.so/web/devboxes
- Create a devbox: https://cloud.morph.so/web/devboxes/new (or `...?alias=`)
- Devboxes product page: https://cloud.morph.so/web/product/devboxes
- Devboxes docs: [Development](/devboxes/development), [Agent tokens](/devboxes/agent-tokens), [Prototyping](/devboxes/prototyping), [Sharing & collaboration](/devboxes/sharing-and-collaboration)
- OpenAPI docs: https://devbox.svc.cloud.morph.so/docs
- OpenAPI spec (JSON): https://devbox.svc.cloud.morph.so/openapi.json
## Prerequisites
- An API key from the Morph Cloud dashboard: https://cloud.morph.so
- Optionally set the base URL (defaults to the hosted service)
```bash
export MORPH_API_KEY=""
# Optional. Defaults to https://devbox.svc.cloud.morph.so
export MORPH_DEVBOX_BASE_URL=${MORPH_DEVBOX_BASE_URL:-"https://devbox.svc.cloud.morph.so"}
```
## Quickstart (recommended)
```bash
# 1) Start a devbox from a template
morphcloud devbox template list
TEMPLATE_ID=""
DEVBOX_ID=$(
morphcloud devbox start "$TEMPLATE_ID" --name "my-devbox" --json | jq -r '.id'
)
echo "Devbox: $DEVBOX_ID"
# 2) Run a command via SSH
morphcloud devbox ssh "$DEVBOX_ID" echo "Hello from a Morph Devbox!"
# 3) Prototype: expose a preview URL (example: port 3000)
morphcloud devbox ssh "$DEVBOX_ID" bash -lc "nohup python3 -m http.server 3000 >/tmp/http.log 2>&1 &"
morphcloud devbox expose-http "$DEVBOX_ID" --name app --port 3000
# 4) Pause / resume (serverless-style)
morphcloud devbox pause "$DEVBOX_ID"
morphcloud devbox resume "$DEVBOX_ID"
# 5) Clean up
morphcloud devbox delete "$DEVBOX_ID"
```
1. Sign in at https://cloud.morph.so
2. Open Devboxes: https://cloud.morph.so/web/devboxes
3. Create a devbox from a template (or a snapshot)
4. Click “Open in VSCode” or “Open in Cursor”
5. Use Live Preview to share an HTTP service URL with teammates in your org
## Advanced: Devboxes API with curl
The examples below mirror the Devboxes product workflow: create from a snapshot, expose a web app, automate work with tmux, and pause/resume elastically. All endpoints require a Bearer token in `Authorization`.
```bash
# 1) Create a devbox from a snapshot (frozen state)
SNAPSHOT_ID=""
CREATE_BODY='{"name":"my-devbox","metadata":{}}'
DEVBOX=$(curl -sS -H "Authorization: Bearer $MORPH_API_KEY" \
-H "Content-Type: application/json" \
-X POST "$MORPH_DEVBOX_BASE_URL/api/devboxes?snapshot_id=$SNAPSHOT_ID" \
-d "$CREATE_BODY")
DEVBOX_ID=$(echo "$DEVBOX" | jq -r '.id')
echo "Created devbox: $DEVBOX_ID"
# 2) Expose a local HTTP service from inside the devbox (e.g., port 3000)
curl -sS -H "Authorization: Bearer $MORPH_API_KEY" \
-H "Content-Type: application/json" \
-X POST "$MORPH_DEVBOX_BASE_URL/api/devboxes/$DEVBOX_ID/http" \
-d '{"name":"app","port":3000}' | jq '.networking.http_services'
# 3) Automate agents with tmux (create a session and send keys)
curl -sS -H "Authorization: Bearer $MORPH_API_KEY" \
-H "Content-Type: application/json" \
-X POST "$MORPH_DEVBOX_BASE_URL/api/devboxes/$DEVBOX_ID/tmux/sessions" \
-d '{"name":"work","detached":true}' | jq '.session'
curl -sS -H "Authorization: Bearer $MORPH_API_KEY" \
-H "Content-Type: application/json" \
-X POST "$MORPH_DEVBOX_BASE_URL/api/devboxes/$DEVBOX_ID/tmux/send-keys" \
-d '{"sequence":["git clone https://github.com/morph-labs/example-app","ENTER","cd example-app","ENTER","npm install","ENTER","npm run dev","ENTER"],"literal":true,"pause_ms":250}' | jq '.ok'
# 4) Pause / Resume elastically
curl -sS -H "Authorization: Bearer $MORPH_API_KEY" \
-X POST "$MORPH_DEVBOX_BASE_URL/api/devboxes/$DEVBOX_ID/pause" | jq '.status'
curl -sS -H "Authorization: Bearer $MORPH_API_KEY" \
-X POST "$MORPH_DEVBOX_BASE_URL/api/devboxes/$DEVBOX_ID/resume" | jq '.status'
# 5) Save a snapshot of current state (for sharing or instant restore)
curl -sS -H "Authorization: Bearer $MORPH_API_KEY" \
-H "Content-Type: application/json" \
-X POST "$MORPH_DEVBOX_BASE_URL/api/devboxes/$DEVBOX_ID/save" \
-d '{"name":"checkpoint-1"}' | jq
# 6) Clean up when done
curl -sS -H "Authorization: Bearer $MORPH_API_KEY" \
-X DELETE "$MORPH_DEVBOX_BASE_URL/api/devboxes/$DEVBOX_ID" | jq
```
Notes:
- `POST /api/devboxes?snapshot_id=...` creates a devbox from any valid snapshot.
- `POST /api/devboxes/{id}/http` returns the updated devbox with public service URLs in `networking.http_services`.
- Devboxes support wake-on-SSH/HTTP and TTL policies to auto-pause idle machines.
- tmux endpoints enable multi-pane, multi-agent workflows you can script via API.
- For least-privilege in-agent automation inside a running devbox, mint or use a scoped [agent token](/devboxes/agent-tokens) instead of handing the agent a broad `MORPH_API_KEY`.
- To quickly "open in VSCode" or Cursor, use the Devboxes [web interface](https://cloud.morph.so/web/devboxes) and click the VSCode/Cursor action for your devbox.
## Use the web dashboard
Prefer a graphical workflow?
1. Sign in at https://cloud.morph.so
2. Open the Devboxes section in the left navigation
3. Create a devbox from a snapshot or template
4. Click “Open in VSCode” or “Open in Cursor” for a one‑click SSH session
5. Use Live Preview to share HTTP services securely with teammates
6. Pause/resume or snapshot whenever you like
## API coverage
The Devboxes API provides endpoints for lifecycle, metadata, HTTP exposure, tmux automation, uploads, and templates. Highlights from the OpenAPI spec include:
- Core: List devboxes, get details and summaries
- Lifecycle: Create from snapshot, save (snapshot), branch, delete, pause, resume, reboot
- Actions: Update display name and metadata, expose/unexpose HTTP services
- Tmux: Install, list sessions, create/rename/kill sessions, send keys, capture snapshots
- Uploads: Authenticated file and image uploads into the devbox
- Templates: List/create/update/cache templates, stream build events, and share via short URLs
See the full OpenAPI docs at https://devbox.svc.cloud.morph.so/docs
---
---
id: how-devboxes-map-to-instances
title: How Devboxes map to VM primitives
description: Understand how Devboxes relate to instances, snapshots, and branching, and when to use the primitives directly.
---
# How Devboxes map to VM primitives
Devboxes are the primary user-facing object in Morph Cloud: they’re optimized for development, prototyping, and collaboration.
Under the hood, Devboxes are built on the same core primitives that power the rest of Morph Cloud:
- **Images**
- **Snapshots**
- **Instances**
- **Branches**
The key difference is that Devboxes package those primitives into a “workspace” product surface with additional capabilities (templates, sharing, tmux automation, and convenient preview URLs).
## When to use Devboxes vs Instances
Use **Devboxes** when your goal is:
- Development (VSCode/Cursor/SSH, tmux for CLI agents)
- Prototyping (preview URLs for apps/APIs)
- Sharing & collaboration (share live workspaces inside orgs)
Use **Instances** directly when you need:
- fine-grained VM lifecycle control,
- direct snapshot manipulation and orchestration,
- sophisticated fan-out patterns (e.g. RL environments, test-time scaling),
- custom infrastructure workflows.
## Learn the primitives
- [Mental model](/concepts/mental-model)
- [Snapshots](/documentation/snapshots)
- [Instances](/documentation/instances/basic-lifecycle)
- [Branching](/documentation/instances/branch)
---
---
id: prototyping
title: Prototyping
description: Expose interactive preview URLs for web apps and APIs, and optionally run a devbox like a persistent VPS.
---
# Devboxes for prototyping
Devboxes are ideal for prototyping because you can:
- run any stack (it’s a full VM),
- expose a live **preview URL** for a web app or API,
- optionally keep a devbox “always on” (persistent-VPS style) by disabling auto-sleep / TTL policies.
## Expose a preview URL (CLI)
This example starts a tiny web server on port `3000` and exposes it publicly.
```bash
export MORPH_API_KEY="..."
morphcloud devbox template list
TEMPLATE_ID=""
DEVBOX_ID=$(
morphcloud devbox start "$TEMPLATE_ID" --name "prototype" --json | jq -r '.id'
)
# Start a web server in the background
morphcloud devbox ssh "$DEVBOX_ID" bash -lc "nohup python3 -m http.server 3000 >/tmp/http.log 2>&1 &"
# Expose port 3000 as a public HTTP service URL
morphcloud devbox expose-http "$DEVBOX_ID" --name app --port 3000
```
## Expose a preview URL (dashboard)
1. Open your devbox: https://cloud.morph.so/web/devboxes
2. Start your app inside the devbox (e.g. `npm run dev`)
3. Use Live Preview / HTTP exposure to publish a shareable URL for your app/API.
## Persistent VPS mode (auto-sleep off)
Devboxes can auto-pause when idle (serverless-style) while preserving memory state for instant resume.
If you want a devbox to behave like a persistent VPS (always running), disable auto-sleep / TTL policies for the devbox in the dashboard (or configure policies via API, if applicable). Keep in mind that an always-on devbox will continue consuming compute resources.
---
---
id: sharing-and-collaboration
title: Sharing & collaboration
description: Share live devboxes via URL inside your organization, and use templates + orgs to collaborate at scale.
---
# Devboxes for sharing & collaboration
Devboxes are designed to be shared, reproducible workspaces:
- **Share live via URL** with anyone in your Morph Cloud organization.
- **Collaborate safely**: org membership is the boundary for sharing.
- **Scale collaboration patterns**: create multiple organizations as needed (e.g. per client, team, or project).
## Share a devbox (dashboard)
1. Open the Devboxes dashboard: https://cloud.morph.so/web/devboxes
2. Select a devbox
3. Use the Share / Copy link actions to share it with your organization
## Share an app preview (HTTP services)
For prototyping and demos, it’s often better to share a **preview URL** rather than full SSH access:
- Start your web app/API inside the devbox
- Expose it as an HTTP service
- Share the resulting URL with teammates
See [Prototyping](/devboxes/prototyping).
## Share a template (CLI)
Templates let you share a standardized starting point (tooling + configuration) so everyone can start from the same baseline.
```bash
export MORPH_API_KEY="..."
# List templates and pick one to share
morphcloud devbox template list
TEMPLATE_ID=""
# Publish a short alias
morphcloud devbox template share "$TEMPLATE_ID" --alias ""
# Teammates can start devboxes from shared templates in the dashboard:
# https://cloud.morph.so/web/devboxes/new?alias=
```
---
---
id: cli
title: CLI Command Reference
sidebar_label: CLI Reference
description: "Reference for Morph Cloud CLI commands to manage images, snapshots, instances, and common workflows."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## CLI Command Reference
For users who prefer command-line interaction, the Morph Cloud CLI provides a convenient way to manage resources.
### `morphcloud image`
Manages Morph images.
* **`morphcloud image list [--json]`**: Lists all available images.
* `--json`: Output in JSON format.
```bash
morphcloud image list
morphcloud image list --json
```
### `morphcloud snapshot`
Manages Morph snapshots.
* **`morphcloud snapshot list [--metadata KEY=VALUE ...] [--json]`**: Lists all snapshots.
* `--metadata KEY=VALUE`: Filters snapshots by metadata. You can provide multiple metadata filters.
* `--json`: Output in JSON format.
```bash
morphcloud snapshot list
morphcloud snapshot list --metadata environment=development --metadata region=us-west
morphcloud snapshot list --json
```
* **`morphcloud snapshot create --image-id IMAGE_ID --vcpus INT --memory INT --disk-size INT [--digest TEXT] [--json]`**: Creates a new snapshot.
* `--image-id IMAGE_ID`: ID of the base image (required).
* `--vcpus INT`: Number of vCPUs (required).
* `--memory INT`: Memory in MB (required).
* `--disk-size INT`: Disk size in MB (required).
* `--digest TEXT`: User-provided digest.
* `--json`: Output in JSON format.
```bash
morphcloud snapshot create --image-id img_your_image_id --vcpus 2 --memory 4096 --disk-size 50000
morphcloud snapshot create --image-id img_your_image_id --vcpus 2 --memory 4096 --disk-size 50000 --json
```
* **`morphcloud snapshot delete SNAPSHOT_ID`**: Deletes a snapshot.
```bash
morphcloud snapshot delete snapshot_your_snapshot_id
```
* **`morphcloud snapshot get SNAPSHOT_ID`**: Gets details of a snapshot.
```bash
morphcloud snapshot get snapshot_your_snapshot_id
```
* **`morphcloud snapshot set-metadata SNAPSHOT_ID KEY1=VALUE1 [KEY2=VALUE2 ...]`**: Sets metadata on a snapshot.
```bash
morphcloud snapshot set-metadata snapshot_your_snapshot_id environment=production purpose="data processing"
```
### `morphcloud instance`
Manages Morph instances.
* **`morphcloud instance list [--metadata KEY=VALUE ...] [--json]`**: Lists all instances.
* `--metadata KEY=VALUE`: Filters instances by metadata.
* `--json`: Output in JSON format.
```bash
morphcloud instance list
morphcloud instance list --metadata application=webapp
morphcloud instance list --json
```
* **`morphcloud instance start SNAPSHOT_ID [--ttl-seconds INT] [--ttl-action {stop|pause}] [--json]`**: Starts a new instance from a snapshot.
* `SNAPSHOT_ID`: ID of the snapshot to start from.
* `--ttl-seconds INT`: Time-to-live in seconds for the instance.
* `--ttl-action {stop|pause}`: Action when TTL expires.
* `--json`: Output in JSON format.
```bash
morphcloud instance start snapshot_your_snapshot_id
morphcloud instance start snapshot_your_snapshot_id --ttl-seconds 3600 --ttl-action stop
morphcloud instance start snapshot_your_snapshot_id --json
```
* **`morphcloud instance stop INSTANCE_ID`**: Stops an instance.
```bash
morphcloud instance stop instance_your_instance_id
```
* **`morphcloud instance pause INSTANCE_ID`**: Pauses an instance.
```bash
morphcloud instance pause instance_your_instance_id
```
* **`morphcloud instance resume INSTANCE_ID`**: Resumes a paused instance.
```bash
morphcloud instance resume instance_your_instance_id
```
* **`morphcloud instance get INSTANCE_ID`**: Gets details of an instance.
```bash
morphcloud instance get instance_your_instance_id
```
* **`morphcloud instance snapshot INSTANCE_ID [--json]`**: Creates a snapshot from an instance.
* `--json`: Output in JSON format.
```bash
morphcloud instance snapshot instance_your_instance_id
morphcloud instance snapshot instance_your_instance_id --json
```
* **`morphcloud instance branch INSTANCE_ID [--count INT]`**: Branches an instance into multiple clones.
* `--count INT`: Number of clones to create (default: 1).
```bash
morphcloud instance branch instance_your_instance_id --count 5
```
* **`morphcloud instance expose-http INSTANCE_ID NAME PORT [--auth-mode {none|api_key}]`**: Exposes an HTTP service.
* `INSTANCE_ID`: ID of the instance.
* `NAME`: Name of the service.
* `PORT`: Port to expose.
* `--auth-mode {none|api_key}`: Authentication mode (default: none).
```bash
morphcloud instance expose-http instance_your_instance_id my-service 8080
morphcloud instance expose-http instance_your_instance_id my-service 8080 --auth-mode none
morphcloud instance expose-http instance_your_instance_id secure-service 8081 --auth-mode api_key
```
* **`morphcloud instance hide-http INSTANCE_ID NAME`**: Hides an exposed HTTP service.
```bash
morphcloud instance hide-http instance_your_instance_id my-service
```
* **`morphcloud instance exec INSTANCE_ID COMMAND...`**: Executes a command on an instance.
```bash
morphcloud instance exec instance_your_instance_id uname -a
morphcloud instance exec instance_your_instance_id bash -c "ls -l /tmp && echo Hello"
```
* **`morphcloud instance set-metadata INSTANCE_ID KEY1=VALUE1 [KEY2=VALUE2 ...]`**: Sets metadata on an instance.
```bash
morphcloud instance set-metadata instance_your_instance_id environment=staging region=eu-central-1
```
* **`morphcloud instance ssh INSTANCE_ID [--rm] [--snapshot] [COMMAND...]`**: Starts an SSH session to an instance.
* `--rm`: Remove the instance after exiting SSH.
* `--snapshot`: Create a snapshot before exiting SSH.
* `COMMAND...`: Optional command to execute non-interactively.
```bash
morphcloud instance ssh instance_your_instance_id
morphcloud instance ssh instance_your_instance_id --rm
morphcloud instance ssh instance_your_instance_id --snapshot
morphcloud instance ssh instance_your_instance_id "ls -l /app" # Run command non-interactively
```
* **`morphcloud instance port-forward INSTANCE_ID REMOTE_PORT [LOCAL_PORT]`**: Forwards a port from an instance to your local machine.
* `REMOTE_PORT`: Remote port on the instance.
* `LOCAL_PORT`: Local port on your machine (optional, defaults to `REMOTE_PORT`).
```bash
morphcloud instance port-forward instance_your_instance_id 8080
morphcloud instance port-forward instance_your_instance_id 8080 9000 # Local port 9000 to remote 8080
```
* **`morphcloud instance copy SOURCE DESTINATION [-r]`**: Copies files to or from a Morph instance.
* `SOURCE`: Source path (local path or `instance_id:/remote/path`).
* `DESTINATION`: Destination path (local path or `instance_id:/remote/path`).
* `-r`, `--recursive`: Copy directories recursively.
```bash
morphcloud instance copy morphvm_1234:/etc/config.json ./config.json
morphcloud instance copy ./local/file.txt morphvm_1234:/remote/path/
morphcloud instance copy -r ./local/dir morphvm_1234:/remote/dir/
```
* **`morphcloud instance chat INSTANCE_ID [INSTRUCTIONS...]`**: Starts an interactive chat session with an instance (if LLM agent is integrated).
```bash
morphcloud instance chat instance_your_instance_id
morphcloud instance chat instance_your_instance_id "Explain the file system layout"
```
---
---
id: command-execution
title: Command Execution
sidebar_label: Command Execution
description: "Execute commands on a Morph Cloud instance via the SDK or CLI and capture stdout, stderr, and exit codes."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Command Execution
:::note Exec wakes paused instances through `wake_on_ssh`
Command execution uses the SSH access path under the hood. If an instance may be paused, enable [Wake-on-Request](/documentation/instances/wake-on) with `wake_on_ssh` (or `--wake-on-ssh` in the CLI) and SDK, CLI, and REST exec calls will resume the instance automatically before the command runs.
:::
### Execute Commands on an Instance
You can execute commands directly within a running instance.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
result = instance.exec(command="uname -a")
print(f"Exit Code: {result.exit_code}")
print(f"Stdout:\n{result.stdout}")
print(f"Stderr:\n{result.stderr}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function executeCommand() {
const instanceId = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instanceId });
const result = await instance.exec("uname -a");
console.log(`Exit Code: ${result.exitCode}`);
console.log(`Stdout:\n${result.stdout}`);
console.log(`Stderr:\n${result.stderr}`);
}
executeCommand();
```
```bash
morphcloud instance exec instance_your_instance_id uname -a
# For commands with spaces or multiple arguments
morphcloud instance exec instance_your_instance_id bash -c "ls -la /tmp && echo 'Hello World'"
```
### Wait Until Instance Ready
When starting an instance, it might take some time to become fully ready. You can use the `wait_until_ready()` method to ensure your instance is in the `READY` state before proceeding with further operations.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
instance = client.instances.start(snapshot_id=snapshot_id)
instance.wait_until_ready()
print(f"Instance '{instance.id}' is now ready.")
# Proceed with operations that require a ready instance, e.g., executing commands, exposing services.
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function startAndWaitInstance() {
const snapshotId = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
const instance = await client.instances.start({ snapshotId });
await instance.waitUntilReady();
console.log(`Instance '${instance.id}' is now ready.`);
// Proceed with operations that require a ready instance, e.g., executing commands, exposing services.
}
startAndWaitInstance();
```
### Set Instance Metadata
Similar to snapshots, you can set metadata on instances for organization and tagging.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
instance.set_metadata({"environment": "production", "region": "us-east-1"})
print(f"Instance '{instance_id}' metadata updated: {instance.metadata}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function setInstanceMetadata() {
const instanceId = "instance_your_instance_id"; // Replace with a valid instance ID
await client.POST(`/instance/${instanceId}/metadata`, {}, {
environment: "production",
region: "us-east-1"
});
const updated = await client.instances.get({ instanceId });
console.log(`Instance '${instanceId}' metadata updated: ${JSON.stringify(updated.metadata)}`);
}
setInstanceMetadata();
```
---
---
id: file-management
title: File Management
sidebar_label: File Management
description: "Upload, download, and sync files between your machine and a Morph Cloud instance using the sync API."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## File Management
### Upload and Download Files (Sync)
You can upload files to a running instance and download files from it using the sync API.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Upload a local file to the instance
instance.upload(source_path="/local/path/to/file.txt", target_path="/remote/path/on/instance/file.txt")
# Download a file from the instance to your local machine
instance.download(source_path="/remote/path/on/instance/file.txt", target_path="/local/path/to/download.txt")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function syncFiles() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Upload a local file to the instance
await instance.upload({
sourcePath: "/local/path/to/file.txt",
targetPath: "/remote/path/on/instance/file.txt"
});
// Download a file from the instance to your local machine
await instance.download({
sourcePath: "/remote/path/on/instance/file.txt",
targetPath: "/local/path/to/download.txt"
});
}
syncFiles();
```
```bash
# Upload a file to the instance
morphcloud instance upload instance_your_instance_id /local/path/to/file.txt /remote/path/on/instance/file.txt
# Download a file from the instance
morphcloud instance download instance_your_instance_id /remote/path/on/instance/file.txt /local/path/to/download.txt
```
### Multi-File Transfer
For transferring multiple files, use the directory sync operations.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Upload a directory to the instance (recursive by default)
instance.upload_dir(source_path="/local/directory", target_path="/remote/directory")
# Download a directory from the instance (recursive by default)
instance.download_dir(source_path="/remote/directory", target_path="/local/download_dir")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function syncDirectories() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Upload a directory to the instance (recursive by default)
await instance.uploadDir({
sourcePath: "/local/directory",
targetPath: "/remote/directory"
});
// Download a directory from the instance (recursive by default)
await instance.downloadDir({
sourcePath: "/remote/directory",
targetPath: "/local/download_dir"
});
}
syncDirectories();
```
```bash
# Upload a directory to the instance
morphcloud instance upload-dir instance_your_instance_id /local/directory /remote/directory
# Download a directory from the instance
morphcloud instance download-dir instance_your_instance_id /remote/directory /local/download_dir
# Use the --recursive=false flag to disable recursive transfers
morphcloud instance upload-dir instance_your_instance_id --recursive=false /local/directory /remote/directory
```
---
---
id: http-services
title: HTTP Services
sidebar_label: HTTP Services
description: "Expose HTTP services running in a Morph Cloud instance to a public URL, with authentication modes and access control."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## HTTP Services
### Expose HTTP Services
You can expose HTTP services running inside your instance to the outside world using the expose API. Services can be exposed with different authentication modes for access control.
#### Basic Service Exposure
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Expose a service running on port 8080 inside the instance with API Key Authentication
service_info = instance.expose_http_service(
name="my-web-app",
port=8080
)
print(f"Service URL: {service_info.url}")
print(f"Service Name: {service_info.name}")
print(f"Internal Port: {service_info.port}")
print(f"Auth Mode: {service_info.auth_mode}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function exposeService() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Expose a service running on port 8080 inside the instance (no authentication)
const serviceInfo = await instance.exposeHttpService("my-web-app", 8080);
console.log(`Service URL: ${serviceInfo.url}`);
console.log(`Service Name: ${serviceInfo.name}`);
console.log(`Internal Port: ${serviceInfo.port}`);
console.log(`Auth Mode: ${serviceInfo.auth_mode}`);
}
exposeService();
```
```bash
# Expose a service running on port 8080 inside the instance (no authentication)
morphcloud instance expose-http instance_your_instance_id my-web-app 8080
# Expose with specific authentication mode
morphcloud instance expose-http instance_your_instance_id my-web-app 8080 --auth-mode none
```
#### Exposing Services with API Key Authentication
For secure services, you can require API key authentication:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Expose a service with API key authentication required
secure_service = instance.expose_http_service(
name="secure-api",
port=3000,
auth_mode="api_key"
)
print(f"Secure Service URL: {secure_service.url}")
print(f"Auth Mode: {secure_service.auth_mode}")
print("Note: API key required for access")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function exposeSecureService() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Expose a service with API key authentication required
const secureService = await instance.exposeHttpService("secure-api", 3000, "api_key");
console.log(`Secure Service URL: ${secureService.url}`);
console.log(`Auth Mode: ${secureService.auth_mode}`);
console.log("Note: API key required for access");
}
exposeSecureService();
```
```bash
# Expose a service with API key authentication
morphcloud instance expose-http instance_your_instance_id secure-api 3000 --auth-mode api_key
```
## Authentication Modes
HTTP services support two authentication modes to control access:
### None Authentication (Default)
- **Public Access**: No authentication required
- **Use Cases**: Public websites, demo applications, development servers
- **Security**: Services are publicly accessible via the provided URL
### API Key Authentication
- **Protected Access**: Requires valid API key in request headers
- **Use Cases**: Private APIs, secured services, production applications
- **Security**: Only requests with valid API keys can access the service
### Using API Key Authentication
When a service is exposed with `api_key` authentication mode, clients must include your API key in requests:
```bash
# Access a service with API key authentication
curl -H "Authorization: Bearer YOUR_API_KEY" https://your-service-url.morphcloud.com
```
```python
import requests
# Access a service with API key authentication
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get("https://your-service-url.morphcloud.com", headers=headers)
print(response.text)
```
```typescript
// Access a service with API key authentication
const response = await fetch("https://your-service-url.morphcloud.com", {
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
});
const data = await response.text();
console.log(data);
```
### Service Authentication Management
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
def manage_service_security():
"""Example of managing HTTP service authentication"""
instance_id = "instance_your_instance_id"
instance = client.instances.get(instance_id=instance_id)
# Expose different services with different security levels
# 1. Public development server (no auth)
dev_service = instance.expose_http_service(
name="dev-server",
port=3000,
auth_mode="none"
)
print(f"Development server: {dev_service.url} (Public)")
# 2. Secure API endpoint (API key required)
api_service = instance.expose_http_service(
name="api-v1",
port=8080,
auth_mode="api_key"
)
print(f"API endpoint: {api_service.url} (API Key Required)")
# 3. Admin interface (API key required)
admin_service = instance.expose_http_service(
name="admin-panel",
port=9000,
auth_mode="api_key"
)
print(f"Admin panel: {admin_service.url} (API Key Required)")
manage_service_security()
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function manageServiceSecurity() {
const instance_id = "instance_your_instance_id";
const instance = await client.instances.get({ instance_id: instance_id });
// Expose different services with different security levels
// 1. Public development server (no auth)
const devService = await instance.exposeHttpService("dev-server", 3000);
console.log(`Development server: ${devService.url} (Public)`);
// 2. Secure API endpoint (API key required)
const apiService = await instance.exposeHttpService("api-v1", 8080, "api_key");
console.log(`API endpoint: ${apiService.url} (API Key Required)`);
// 3. Admin interface (API key required)
const adminService = await instance.exposeHttpService("admin-panel", 9000, "api_key");
console.log(`Admin panel: ${adminService.url} (API Key Required)`);
}
manageServiceSecurity();
```
### Security Best Practices
#### When to Use API Key Authentication
✅ **Recommended for:**
- Production APIs
- Admin interfaces
- Internal services
- Services handling sensitive data
- Services with rate limiting needs
#### When to Use No Authentication
✅ **Suitable for:**
- Public websites
- Demo applications
- Development/testing environments
- Static content serving
- Public documentation sites
#### API Key Security Guidelines
- **Rotate Keys Regularly**: Change API keys periodically for security
- **Environment Variables**: Store API keys in environment variables, not code
- **Principle of Least Privilege**: Use API keys with minimal required permissions
- **Monitor Usage**: Track API key usage for suspicious activity
- **Secure Transmission**: Always use HTTPS when transmitting API keys
### Service Management Examples
```python
def audit_service_security():
"""Audit all exposed services for security compliance"""
instances = client.instances.list()
for instance in instances:
if instance.status == "ready":
print(f"\n=== Instance: {instance.id} ===")
# Get all HTTP services for this instance
if hasattr(instance.networking, 'http_services'):
services = instance.networking.http_services
for service in services:
security_status = "🔒 SECURE" if service.auth_mode == "api_key" else "🌐 PUBLIC"
print(f"{security_status} {service.name} (port {service.port})")
print(f" URL: {service.url}")
print(f" Auth: {service.auth_mode}")
# Security recommendations
if service.auth_mode == "none":
print(" ⚠️ Consider adding API key auth for production")
print()
audit_service_security()
```
### Hide HTTP Services
When you no longer need a service to be exposed, you can hide it.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Hide a previously exposed service
instance.hide_http_service(name="my-web-app")
print("Service has been hidden.")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function hideService() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Hide a previously exposed service
await instance.hideHttpService({
name: "my-web-app"
});
console.log("Service has been hidden.");
}
hideService();
```
```bash
# Hide a previously exposed service
morphcloud instance hide-http instance_your_instance_id my-web-app
```
### List Exposed HTTP Services
You can get a list of all currently exposed HTTP services for an instance.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Get all exposed HTTP services
services = instance.get_http_services()
for service in services:
print(f"Service Name: {service.name}")
print(f"URL: {service.url}")
print(f"Internal Port: {service.port}")
print("---")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function listServices() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Get all exposed HTTP services
const services = await instance.getHttpServices();
services.forEach(service => {
console.log(`Service Name: ${service.name}`);
console.log(`URL: ${service.url}`);
console.log(`Internal Port: ${service.port}`);
console.log("---");
});
}
listServices();
```
```bash
# List all exposed HTTP services for an instance
morphcloud instance list-http instance_your_instance_id
```
---
---
id: images
title: Managing Images
sidebar_label: Images
description: "List Morph Cloud base images and use them to create snapshots and start instances."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Images
### List Images
You can list all available base images provided by Morph Cloud.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
images = client.images.list()
for image in images:
print(f"ID: {image.id}, Name: {image.name}, Description: {image.description}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function listImages() {
const images = await client.images.list();
images.forEach(image => {
console.log(`ID: ${image.id}, Name: ${image.name}, Description: ${image.description}`);
});
}
listImages();
```
```bash
morphcloud image list
# For JSON output
morphcloud image list --json
```
This will output a list of available images with details like their ID, name, and description.
---
---
id: index
title: Documentation
sidebar_label: Overview
description: "Start here for Morph Cloud documentation: setup, snapshots, instances, SSH access, HTTP services, and the API reference."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Morph Cloud Documentation
Welcome to the Morph Cloud documentation. This guide will help you get started with Morph Cloud and learn how to use its features.
## Overview
Morph Cloud is a platform that allows you to create, manage, and deploy cloud instances quickly and efficiently. The platform provides a simple API to manage instances, snapshots, and files, as well as expose HTTP services.
## Key Features
- **Instance Management**: Create, start, stop, and delete instances.
- **Snapshots**: Create and manage snapshots for easy replication and backup.
- **File Management**: Upload and download files to and from instances.
- **Command Execution**: Run commands on instances remotely.
- **HTTP Service Exposure**: Expose and manage HTTP services running on instances.
- **SSH Access**: Connect to instances using SSH.
## Getting Started
To get started with Morph Cloud, you'll need to:
1. Install the Morph Cloud CLI or SDK
2. Authenticate with your Morph Cloud account
3. Create your first instance
```bash
# Install the Morph Cloud CLI
pip install morphcloud-cli
# Login to your account
morph login
# Create an instance from an image
morphcloud instance start --image ubuntu:22.04
```
```python
# Install the Python SDK
# pip install morphcloud
from morphcloud.api import MorphCloudClient
# Initialize the client
client = MorphCloudClient()
# Create an instance from an image
instance = client.instances.start(image="ubuntu:22.04")
print(f"Instance ID: {instance.id}")
```
```typescript
// Install the TypeScript SDK
// npm install morphcloud-sdk
import { MorphCloudClient } from 'morphcloud';
// Initialize the client
const client = new MorphCloudClient();
async function createInstance() {
// Create an instance from an image
const instance = await client.instances.start({ image: "ubuntu:22.04" });
console.log(`Instance ID: ${instance.id}`);
}
createInstance();
```
## Next Steps
After getting started, explore the following sections to learn more about Morph Cloud:
- [CLI Reference](cli) - Learn how to use the Morph Cloud CLI
- [Instance Management](instances) - Manage cloud instances
- [Snapshots](snapshots) - Create and manage snapshots
- [File Management](file-management) - Upload and download files
- [Command Execution](command-execution) - Run commands on instances
- [HTTP Services](http-services) - Expose HTTP services
- [SSH Access](ssh-access) - Connect to instances via SSH
---
---
id: basic-lifecycle
title: Basic Operations (start, save, stop)
sidebar_label: Basic Operations
description: "Learn the Morph Cloud instance lifecycle: start instances from snapshots, save state, stop, and manage basic operations."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# What's an Instance?
:::tip Looking for a cloud dev environment?
If your goal is a **workspace** (VSCode/Cursor, tmux agents, easy preview URLs), start with **Devboxes**: [Getting started](/devboxes/getting-started).
Instances are the underlying VM primitive for power users who want direct control over VMs and snapshots.
:::
Every virtual machine (VM) running in Morph Cloud is an instance. Each instance runs from a saved snapshot. This guide covers the basic lifecycle operations for instances, including starting, stopping, and saving them.
## Start an Instance
To launch a new instance, you need a Snapshot ID. The instance will be created based on the specified snapshot.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_abc123" # Replace with a valid snapshot ID
instance = client.instances.start(snapshot_id=snapshot_id)
print(f"Instance started with ID: {instance.id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function startInstance() {
const snapshot_id = "snapshot_abc123"; // Replace with a valid snapshot ID
const instance = await client.instances.start({ snapshot_id: snapshot_id });
console.log(`Instance started with ID: ${instance.id}`);
}
startInstance();
```
```bash
# Start an instance from a snapshot
morphcloud instance start snapshot_abc123
```
## Get Instance Details
To get detailed information about a specific instance, use its ID.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
print(f"Instance ID: {instance.id}, Status: {instance.status}, Networking: {instance.networking}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function getInstanceDetails() {
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
console.log(`Instance ID: ${instance.id}, Status: ${instance.status}, Networking: ${JSON.stringify(instance.networking)}`);
}
getInstanceDetails();
```
```bash
# Get instance details
morphcloud instance get morphvm_abc123
```
## List Instances
You can retrieve a list of all instances in your Morph Cloud account.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# List all instances
instances = client.instances.list()
for instance in instances:
print(f"ID: {instance.id}, Status: {instance.status}, Snapshot ID: {instance.refs.snapshot_id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function listInstances() {
// List all instances
const instances = await client.instances.list();
instances.forEach(instance => {
console.log(`ID: ${instance.id}, Status: ${instance.status}, Snapshot ID: ${instance.refs.snapshot_id}`);
});
}
listInstances();
```
```bash
# List all instances
morphcloud instance list
```
## Save an Instance (Create Snapshot)
You can create a snapshot from a running instance, capturing its current state for future use or as a backup.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
new_snapshot = instance.snapshot()
print(f"Snapshot created from instance '{instance_id}' with ID: {new_snapshot.id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function createSnapshotFromInstance() {
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
const newSnapshot = await instance.snapshot();
console.log(`Snapshot created from instance '${instance_id}' with ID: ${newSnapshot.id}`);
}
createSnapshotFromInstance();
```
```bash
# Create a snapshot from an instance
morphcloud instance snapshot morphvm_abc123
```
## Stop an Instance
Stopping an instance terminates the virtual machine and releases the resources.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
instance.stop()
print(f"Instance '{instance_id}' stopped.")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function stopInstance() {
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
await instance.stop();
console.log(`Instance '${instance_id}' stopped.`);
}
stopInstance();
```
```bash
# Stop an instance
morphcloud instance stop morphvm_abc123
```
---
---
id: boot-from-snapshot
title: Boot Instance from Snapshot
sidebar_label: Boot from Snapshot
description: "Cold-boot a new VM from a snapshot’s disk image (without restoring memory) and resize vCPU, memory, or disk."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Boot Instance from Snapshot
Boot starts a brand-new VM from a snapshot's disk image (a cold boot). It restarts the operating system and does not preserve any in-memory process or other volatile state. Use boot when you want to change the machine configuration (vCPU, memory, disk) or create fresh instances from a snapshot. If you want to restore memory and running process state from a saved snapshot, use instance start instead.
## Boot Instance from Snapshot
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# Boot instance from snapshot with default settings
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
instance = client.instances.boot(snapshot_id=snapshot_id)
print(f"Instance ID: {instance.id}")
print(f"Instance Status: {instance.status}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function bootFromSnapshot() {
const snapshot_id = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
const instance = await client.instances.boot({ snapshot_id: snapshot_id });
console.log(`Instance ID: ${instance.id}`);
console.log(`Instance Status: ${instance.status}`);
}
bootFromSnapshot();
```
```bash
# Boot instance from snapshot
morphcloud snapshot boot snapshot_your_snapshot_id
```
## Boot with Custom Resource Specifications
You can override the snapshot's default resource specifications when booting:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
# Boot with custom resource specifications
instance = client.instances.boot(
snapshot_id=snapshot_id,
vcpus=4, # Override CPU cores
memory=4096, # Override memory (MB)
disk_size=20480, # Override disk size (MB)
)
print(f"Instance ID: {instance.id}")
print(f"vCPUs: {instance.spec.vcpus}")
print(f"Memory: {instance.spec.memory}MB")
print(f"Disk Size: {instance.spec.disk_size}MB")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function bootWithCustomSpecs() {
const snapshot_id = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
// Boot with custom resource specifications
const instance = await client.instances.boot({
snapshot_id: snapshot_id,
vcpus: 4, // Override CPU cores
memory: 4096, // Override memory (MB)
disk_size: 20480, // Override disk size (MB)
});
console.log(`Instance ID: ${instance.id}`);
console.log(`vCPUs: ${instance.spec.vcpus}`);
console.log(`Memory: ${instance.spec.memory}MB`);
console.log(`Disk Size: ${instance.spec.disk_size}MB`);
}
bootWithCustomSpecs();
```
```bash
# Boot with custom resource specifications
morphcloud snapshot boot snapshot_your_snapshot_id \
--vcpus 4 \
--memory 4096 \
--disk-size 20480
```
## Boot with Time-to-Live (TTL) Settings
Set automatic expiration for instances by configuring TTL settings:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
# Boot instance with TTL settings
instance = client.instances.boot(
snapshot_id=snapshot_id,
ttl_seconds=3600, # Instance expires in 1 hour
ttl_action="pause" # Pause instead of stop when TTL expires
)
print(f"Instance ID: {instance.id}")
print(f"TTL: 1 hour (will be paused when expired)")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function bootWithTTL() {
const snapshot_id = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
// Boot instance with TTL settings
const instance = await client.instances.boot({
snapshot_id: snapshot_id,
ttl_seconds: 3600, // Instance expires in 1 hour
ttl_action: "pause" // Pause instead of stop when TTL expires
});
console.log(`Instance ID: ${instance.id}`);
console.log("TTL: 1 hour (will be paused when expired)");
}
bootWithTTL();
```
```bash
# Boot instance with TTL settings
morphcloud snapshot boot snapshot_your_snapshot_id \
--ttl-seconds 3600 \
--ttl-action pause
```
## Best Practices
- **Verify snapshot exists** before attempting to boot
- **Set appropriate TTL** to avoid unexpected costs
- **Use custom resources** only when necessary
- **Monitor boot status** for mission-critical instances
:::note Files missing after boot?
If new files don’t show up after booting from a snapshot, run Linux `sync` inside the VM before creating the snapshot to flush pending writes:
```bash
# inside the VM (or via exec)
sudo sync
```
:::
Booting from snapshots provides a quick way to create instances with pre-configured disk state, ideal for scaling applications and resizing into different resources. For restoring active memory/process state, prefer instance start.
---
---
id: branch
title: Branch
sidebar_label: Branch
description: "Branch an instance to snapshot its state and launch multiple cloned instances for parallel work, testing, or training."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Branch
:::tip Parallel workspaces for development?
If you want “many workspaces” for development/prototyping/collaboration, consider **Devboxes** first: [Devboxes](/devboxes/getting-started).
Branching instances is the primitives path for power-user fan-out (e.g. RL environments, test-time scaling).
:::
Branching creates a snapshot of an instance and then launches a specified number of new instances from that snapshot. This is particularly useful for scenarios where you need multiple identical environments, like parallel testing, training multiple machine learning models, or preparing environments for a team.
## Creating Multiple Clones
Branching an instance creates multiple clone instances based on the current state of the original instance.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
snapshot, clones = instance.branch(count=3)
print(f"Snapshot created: {snapshot.id}")
print("Cloned instances:")
for clone in clones:
print(f" - {clone.id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function branchInstance() {
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Create 3 branches from original instance
const level1Result = await instance.branch(3);
// Optional: Create branches from one of the clones
if (level1Result.instances.length > 0) {
const level2Result = await level1Result.instances[0].branch(2);
console.log(`Created ${level2Result.instances.length} level 2 instances`);
}
}
branchInstance();
```
```bash
# Branch an instance to create 3 clones
morphcloud instance branch morphvm_abc123 --count 3
```
## Use Cases for Branching
Branching is particularly useful in the following scenarios:
1. **Parallelized Testing**: Create multiple identical environments to run different test suites in parallel.
2. **Machine Learning Training**: Branch a prepared environment to train multiple models with different parameters.
3. **Team Development**: Create identical environments for each team member from a pre-configured instance.
4. **A/B Deployment Testing**: Run the same application with different configurations to test performance or behavior.
5. **Batch Processing**: Process different data chunks in parallel with identical processing environments.
---
---
id: command-execution
title: Command Execution
sidebar_label: Command Execution
description: "Run single commands or command sequences on Morph Cloud instances from Python, TypeScript, or the CLI."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Command Execution
Morph Cloud provides robust capabilities for executing commands on your instances, whether you need to run a single command or a sequence of commands.
:::note Exec wakes paused instances through `wake_on_ssh`
Command execution uses the SSH access path under the hood. If an instance may be paused, enable [Wake-on-Request](./wake-on) with `wake_on_ssh` (or `--wake-on-ssh` in the CLI) and SDK, CLI, and REST exec calls will resume the instance automatically before the command runs.
:::
## Execute Commands on Instance
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
result = instance.exec(command="uname -a")
print(f"Exit Code: {result.exit_code}")
print(f"Stdout:\n{result.stdout}")
print(f"Stderr:\n{result.stderr}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function executeCommand() {
const instanceId = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instanceId });
const result = await instance.exec("uname -a");
console.log(`Exit Code: ${result.exitCode}`);
console.log(`Stdout:\n${result.stdout}`);
console.log(`Stderr:\n${result.stderr}`);
}
executeCommand();
```
```bash
# Execute a command on an instance
morphcloud instance exec morphvm_abc123 uname -a
# For commands with spaces or multiple arguments
morphcloud instance exec morphvm_abc123 bash -c "ls -la /tmp && echo 'Hello World'"
```
## Execute Multiple Commands
You can also run a sequence of commands in a single execution.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
commands = """
apt-get update
apt-get install -y nginx
systemctl enable nginx
systemctl start nginx
"""
result = instance.exec(command=commands)
print(f"Exit Code: {result.exit_code}")
print(f"Stdout:\n{result.stdout}")
print(f"Stderr:\n{result.stderr}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function executeMultipleCommands() {
const instanceId = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instanceId });
const commands = `
apt-get update
apt-get install -y nginx
systemctl enable nginx
systemctl start nginx
`;
const result = await instance.exec(commands);
console.log(`Exit Code: ${result.exitCode}`);
console.log(`Stdout:\n${result.stdout}`);
console.log(`Stderr:\n${result.stderr}`);
}
executeMultipleCommands();
```
```bash
# Execute multiple commands
morphcloud instance exec morphvm_abc123 bash -c "apt-get update && apt-get install -y nginx && systemctl enable nginx && systemctl start nginx"
```
## Handling Execution Results
Command execution results contain stdout, stderr, and an exit code that you can use to determine success or failure:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
result = instance.exec(command="ls /nonexistent")
if result.exit_code == 0:
print("Command succeeded")
print(f"Output: {result.stdout}")
else:
print("Command failed")
print(f"Error: {result.stderr}")
print(f"Exit code: {result.exit_code}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function handleExecutionResults() {
const instanceId = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instanceId });
const result = await instance.exec("ls /nonexistent");
if (result.exitCode === 0) {
console.log("Command succeeded");
console.log(`Output: ${result.stdout}`);
} else {
console.log("Command failed");
console.log(`Error: ${result.stderr}`);
console.log(`Exit code: ${result.exitCode}`);
}
}
handleExecutionResults();
```
---
---
id: creating-snapshot
title: Basic Operations
sidebar_label: Basic Operations
description: "Create memory+disk snapshots from running instances to capture state for fast restore, booting, and branching."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# What's a Snapshot?
:::tip Looking for workspaces, not primitives?
If you’re trying to create shareable development/prototyping environments, start with **Devboxes**: [Getting started](/devboxes/getting-started).
:::
Snapshots are immutable point-in-time copies of both memory and disk state. They serve as templates for starting instances. When you take a snapshot, it captures the complete state of a running instance, including all running processes and services.
## Create a New Snapshot
To create a new snapshot, specify the resource specifications like `vcpus`, `memory`, and `disk_size`. You can optionally include a `digest`. The API will use our default image `morphvm-minimal` automatically.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
new_snapshot = client.snapshots.create(
vcpus=2,
memory=4096, # MB
disk_size=50000, # MB
digest="digest" # Optional
)
print(f"Snapshot created with ID: {new_snapshot.id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function createSnapshot() {
const newSnapshot = await client.snapshots.create({
vcpus: 2,
memory: 4096, // MB
disk_size: 50000, // MB
digest: "digest", // Optional
});
console.log(`Snapshot created with ID: ${newSnapshot.id}`);
}
createSnapshot();
```
```bash
# Create a new snapshot
morphcloud snapshot create --vcpus 2 --memory 4096 --disk-size 50000 --digest digest
```
## List Snapshots
You can retrieve a list of all snapshots in your Morph Cloud account.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# List all snapshots
snapshots = client.snapshots.list()
for snapshot in snapshots:
print(f"ID: {snapshot.id}, Created At: {snapshot.created}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function listSnapshots() {
// List all snapshots
const snapshots = await client.snapshots.list();
snapshots.forEach(snapshot => {
console.log(`ID: ${snapshot.id}, Created At: ${snapshot.created}`);
});
}
listSnapshots();
```
```bash
# List all snapshots
morphcloud snapshot list
```
## Get Snapshot Details
To get detailed information about a specific snapshot, use its ID.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_abc123"
snapshot = client.snapshots.get(snapshot_id=snapshot_id)
print(f"Snapshot ID: {snapshot.id}")
print(f"Created At: {snapshot.created}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function getSnapshotDetails() {
const snapshot_id = "snapshot_abc123";
const snapshot = await client.snapshots.get({ snapshot_id: snapshot_id });
console.log(`Snapshot ID: ${snapshot.id}`);
console.log(`Created At: ${snapshot.created}`);
}
getSnapshotDetails();
```
```bash
# Get snapshot details
morphcloud snapshot get snapshot_abc123
```
## Delete a Snapshot
When you no longer need a snapshot, you can delete it.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_abc123"
client.snapshots.delete(snapshot_id=snapshot_id)
print(f"Snapshot {snapshot_id} has been deleted")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function deleteSnapshot() {
const snapshot_id = "snapshot_abc123";
await client.snapshots.delete({ snapshot_id: snapshot_id });
console.log(`Snapshot ${snapshot_id} has been deleted`);
}
deleteSnapshot();
```
```bash
# Delete a snapshot
morphcloud snapshot delete snapshot_abc123
```
---
---
id: file-management
title: File Transfer
sidebar_label: File Transfer
description: "Transfer files to and from Morph Cloud instances securely over SSH/SFTP, including uploading and downloading directories."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
SSH enables secure file transfers between your local machine and Morph instances using SFTP.
```python
from morphcloud.api import MorphCloudClient
import os, tempfile, shutil, stat
# Create test files
test_dir = tempfile.mkdtemp(prefix='test_')
download_directory = tempfile.mkdtemp(prefix='download_')
with open(f"{test_dir}/test.txt", 'w') as f:
f.write('Hello from MorphCloud!')
os.makedirs(f"{test_dir}/subdir")
with open(f"{test_dir}/subdir/nested.txt", 'w') as f:
f.write('Nested file content')
# Transfer files
client = MorphCloudClient()
instance = client.instances.get("morphvm_abc123")
def upload_dir(sftp, local_path, remote_path):
try: sftp.mkdir(remote_path)
except: pass
for item in os.listdir(local_path):
local_item = os.path.join(local_path, item)
remote_item = f"{remote_path}/{item}"
if os.path.isfile(local_item):
sftp.put(local_item, remote_item)
else:
upload_dir(sftp, local_item, remote_item)
def download_dir(sftp, remote_path, local_path):
os.makedirs(local_path, exist_ok=True)
for item in sftp.listdir_attr(remote_path):
remote_item = f"{remote_path}/{item.filename}"
local_item = os.path.join(local_path, item.filename)
if stat.S_ISREG(item.st_mode):
sftp.get(remote_item, local_item)
elif stat.S_ISDIR(item.st_mode):
download_dir(sftp, remote_item, local_item)
with instance.ssh() as ssh:
sftp = ssh._client.open_sftp()
try:
# Single file upload/download
sftp.put(f"{test_dir}/test.txt", "/tmp/test.txt")
sftp.get("/tmp/test.txt", f"{download_directory}/downloaded.txt")
# Directory upload/download
upload_dir(sftp, test_dir, "/tmp/upload_dir")
download_dir(sftp, "/tmp/upload_dir", f"{download_directory}/synced_dir")
finally:
sftp.close()
# Cleanup
shutil.rmtree(test_dir)
shutil.rmtree(download_directory)
```
```typescript
import { MorphCloudClient } from 'morphcloud';
import * as fs from 'fs/promises';
import * as path from 'path';
import * as os from 'os';
async function main() {
// Create test files
const testDir = await fs.mkdtemp(path.join(os.tmpdir(), 'test_'));
const downloadDirectory = await fs.mkdtemp(path.join(os.tmpdir(), 'download_'));
await fs.writeFile(path.join(testDir, 'test.txt'), 'Hello from MorphCloud!');
await fs.mkdir(path.join(testDir, 'subdir'));
await fs.writeFile(path.join(testDir, 'subdir', 'nested.txt'), 'Nested file content');
// Transfer files
const client = new MorphCloudClient();
const instance = await client.instances.get({ instance_id: "morphvm_abc123" });
const ssh = await instance.ssh();
const promisify = (fn: Function) => (...args: any[]) => new Promise((resolve, reject) =>
fn(...args, (err: any, result: any) => err ? reject(err) : resolve(result)));
async function uploadDir(sftp: any, localPath: string, remotePath: string) {
try { await promisify(sftp.mkdir.bind(sftp))(remotePath); } catch {}
const items = await fs.readdir(localPath, { withFileTypes: true });
for (const item of items) {
const localItem = path.join(localPath, item.name);
const remoteItem = `${remotePath}/${item.name}`;
if (item.isDirectory()) {
await uploadDir(sftp, localItem, remoteItem);
} else {
await promisify(sftp.fastPut.bind(sftp))(localItem, remoteItem);
}
}
}
async function downloadDir(sftp: any, remotePath: string, localPath: string) {
await fs.mkdir(localPath, { recursive: true });
const items = await promisify(sftp.readdir.bind(sftp))(remotePath);
for (const item of items) {
const remoteItem = `${remotePath}/${item.filename}`;
const localItem = path.join(localPath, item.filename);
if (item.attrs.mode & 0o040000) { // S_IFDIR
await downloadDir(sftp, remoteItem, localItem);
} else {
await promisify(sftp.fastGet.bind(sftp))(remoteItem, localItem);
}
}
}
try {
const sftp = await ssh.requestSFTP();
// Single file upload/download
await promisify(sftp.fastPut.bind(sftp))(path.join(testDir, 'test.txt'), '/tmp/test.txt');
await promisify(sftp.fastGet.bind(sftp))('/tmp/test.txt', path.join(downloadDirectory, 'downloaded.txt'));
// Directory upload/download
await uploadDir(sftp, testDir, '/tmp/upload_dir');
await downloadDir(sftp, '/tmp/upload_dir', path.join(downloadDirectory, 'synced_dir'));
} finally {
ssh.dispose();
}
// Cleanup
await fs.rm(testDir, { recursive: true });
await fs.rm(downloadDirectory, { recursive: true });
}
main().catch(console.error);
```
```bash
# Copy a single file to instance
morphcloud instance copy ./local/file.txt morphvm_abc123:/remote/path/file.txt
# Copy a single file from instance
morphcloud instance copy morphvm_abc123:/remote/path/file.txt ./local/file.txt
# Copy directory to instance recursively
morphcloud instance copy -r ./local/dir/ morphvm_abc123:/remote/dir/
# Copy directory from instance recursively
morphcloud instance copy -r morphvm_abc123:/remote/dir/ ./local/dir/
```
Notes:
- The CLI's `copy` command provides better progress indication and error handling than manual SFTP operations
- Both source and destination paths use the format `instance_id:/path` for remote paths
- When copying to an instance without specifying a full path, files go to the user's home directory
- The `-r` or `--recursive` flag is required for directory copies
---
---
id: http-services
title: HTTP Services
sidebar_label: HTTP Services
description: "Expose services running in your instance to the public internet as HTTP endpoints for web apps, APIs, and ports."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# HTTP Services
:::tip Prototyping an app or API?
If you want the fastest path to a shareable preview URL, start with **Devboxes**: [Prototyping](/devboxes/prototyping).
:::
Morph Cloud allows you to expose HTTP services running within your instances to the public internet. This makes it easy to share web applications, APIs, or any service running on an HTTP port.
> **Note:** When you create a snapshot from an instance with running HTTP services, those services will continue to run when new instances are started from that snapshot. This is because snapshots preserve both memory and disk state, including all running processes.
## Expose an HTTP Service
To make an HTTP service accessible publicly, you can use the `expose_http_service` method. You need to specify a service `name` and the `port` the service is listening on inside the instance.
```python
service_url = instance.expose_http_service(name="my-service", port=8080)
print(f"HTTP Service exposed at: {service_url}")
```
```typescript
const serviceUrl = await instance.exposeHttpService("my-service", 8080);
console.log(`HTTP Service exposed at: ${serviceUrl}`);
```
```bash
morphcloud instance expose-http morphvm_abc123 my-service 8080
```
## Secure HTTP Service with API Key Authentication
You can enable API key authentication for your exposed services for enhanced security.
```python
service_url = instance.expose_http_service(name="secure-service", port=8081, auth_mode="api_key")
```
```typescript
const serviceUrl = await instance.exposeHttpService("secure-service", 8081, "api_key");
```
```bash
morphcloud instance expose-http $INSTANCE_ID secure-service 8081 --auth-mode api_key
```
When `auth_mode="api_key"` is enabled, requests to the service URL must include the `Authorization: Bearer YOUR_MORPH_API_KEY` header:
```python
import requests
headers = {"Authorization": f"Bearer {client.api_key}"}
response = requests.get(service_url, headers=headers)
```
```typescript
const response = await axios.get(serviceUrl, {
headers: { Authorization: `Bearer ${client.api_key}` }
});
```
```bash
curl -H "Authorization: Bearer $API_KEY" https://your-service-url.morphcloud.io
```
## Hide an HTTP Service
To stop exposing an HTTP service, use the `hide_http_service` method.
```python
instance.hide_http_service(name="my-service")
```
```typescript
await instance.hideHttpService("my-service");
```
```bash
morphcloud instance hide-http morphvm_abc123 my-service
```
## List Exposed HTTP Services
You can view all currently exposed HTTP services for an instance through the `networking.http_services` property.
```python
# Access HTTP services through the networking property
for service in instance.networking.http_services:
print(f"Service Name: {service.name}")
print(f"URL: {service.url}")
print(f"Internal Port: {service.port}")
```
```typescript
// Access HTTP services through the networking property
instance.networking.http_services.forEach(service => {
console.log(`Service Name: ${service.name}`);
console.log(`URL: ${service.url}`);
console.log(`Internal Port: ${service.port}`);
});
```
```bash
# List instance details including HTTP services
morphcloud instance get morphvm_abc123
# For a table view of instances and their HTTP services
morphcloud instance list
```
The CLI commands will show HTTP services in the following formats:
- `morphcloud instance get` shows detailed JSON output including all HTTP services
- `morphcloud instance list` shows a table with a column for HTTP services in the format `name:port, name2:port2, for all active instances`
## Complete Example: Authenticated HTTP Service
Here's a complete example showing how to set up an HTTP server, expose it with authentication, and make authenticated requests.
```python
from morphcloud.api import MorphCloudClient
import time
import requests
from http.server import HTTPServer, BaseHTTPRequestHandler
# Start a simple HTTP server within the instance
client = MorphCloudClient()
instance_id = "morphvm_abc123"
instance = client.instances.get(instance_id=instance_id)
# Create a simple HTTP server script
server_script = """
from http.server import HTTPServer, BaseHTTPRequestHandler
class SimpleHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
self.wfile.write(b'Hello from Morph Cloud!')
server = HTTPServer(('0.0.0.0', 8081), SimpleHandler)
print('Server started on port 8081')
server.serve_forever()
"""
# Write the server script to the instance
instance.exec("mkdir -p /app")
instance.exec(f"cat > /app/server.py << 'EOF'\n{server_script}\nEOF")
# Install tmux and start the server in the background
instance.exec("apt-get update && apt-get install -y tmux python3 pip")
instance.exec("cd /app && tmux new-session -d -s server 'python3 server.py'")
time.sleep(5) # Give the server time to start
# Expose the HTTP service with API key authentication
service_url = instance.expose_http_service(name="secure-service", port=8081, auth_mode="api_key")
# Make an authenticated request to the service
headers = {"Authorization": f"Bearer {client.api_key}"}
response = requests.get(service_url, headers=headers)
print(f"Response: {response.status_code} {response.text}")
# Clean up when done
instance.hide_http_service(name="secure-service")
# Take a snapshot before stopping
snapshot = instance.snapshot()
# Stop the instance
# instance.stop()
# print("Instance stopped")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
import axios from 'axios';
async function runSecureHttpExample() {
const client = new MorphCloudClient();
const instance_id = "morphvm_abc123";
try {
// Get the instance
const instance = await client.instances.get({ instance_id });
// Create a simple HTTP server script
const serverScript = `
const http = require('http');
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello from Morph Cloud!');
});
server.listen(8081, '0.0.0.0', () => {
console.log('Server running on port 8081');
});`;
// Write the server script to the instance
await instance.exec("mkdir -p /app");
await instance.exec(`cat > /app/server.js << 'EOF'\n${serverScript}\nEOF`);
// Install tmux and start the server in the background
await instance.exec("apt-get update && apt-get install -y tmux nodejs npm");
await instance.exec("cd /app && tmux new-session -d -s server 'node server.js'");
// Give the server time to start
await new Promise(resolve => setTimeout(resolve, 5000));
// Expose the HTTP service with API key authentication
const serviceResult = await instance.exposeHttpService("secure-service", 8081, "api_key");
// Handle either string or object response format
const serviceUrl = typeof serviceResult === 'string'
? serviceResult
: serviceResult.url;
// Make an authenticated request to the service
const response = await axios.get(serviceUrl, {
headers: { Authorization: `Bearer ${client.api_key}` }
});
console.log(`Response: ${response.status} ${response.data}`);
// Clean up when done
await instance.hideHttpService("secure-service");
// Take a snapshot before stopping
const snapshot = await instance.snapshot();
// Stop the instance
// await instance.stop();
// console.log("Instance stopped");
} catch (error) {
console.error(`Error: ${error.message}`);
console.error('Full error:', error);
}
}
runSecureHttpExample();
```
```bash
# Set up your instance ID (replace with your actual instance ID)
INSTANCE_ID="morphvm_abc123"
# Create a directory for our server
morphcloud instance exec $INSTANCE_ID "mkdir -p /app"
# Create a simple HTTP server script
cat << 'EOF' > server.py
from http.server import HTTPServer, BaseHTTPRequestHandler
class SimpleHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
self.wfile.write(b'Hello from Morph Cloud!')
server = HTTPServer(('0.0.0.0', 8081), SimpleHandler)
print('Server started on port 8081')
server.serve_forever()
EOF
# Upload the server script to the instance
morphcloud instance upload $INSTANCE_ID server.py /app/server.py
# Start the server in the background
morphcloud instance exec $INSTANCE_ID "cd /app && python3 server.py &"
# Give the server time to start
sleep 2
# Expose the HTTP service with API key authentication
SERVICE_URL=$(morphcloud instance expose-http $INSTANCE_ID secure-service 8081 --auth-mode api_key)
echo "Service exposed at: $SERVICE_URL"
# Get your API key
API_KEY=$(morphcloud config get api_key)
# Make an authenticated request to the service
curl -H "Authorization: Bearer $API_KEY" $SERVICE_URL
# Clean up when done
morphcloud instance hide-http $INSTANCE_ID secure-service
echo "Service hidden"
```
---
---
id: metadata
title: Metadata
sidebar_label: Metadata
description: "Attach key-value metadata to snapshots and instances for organization, filtering, and automation via SDK or CLI."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Metadata
Morph Cloud allows you to attach metadata to both snapshots and instances after they've been created. Metadata is stored as key-value pairs and can be used for:
- Organization and categorization
- Filtering resources
- Storing application-specific information
- Tracking deployment environments
- And more
## Setting and Updating Metadata
### For Instances
You can add or update metadata for running instances at any time.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# Get an instance
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Set or update metadata
instance.set_metadata({
"environment": "production",
"region": "us-east-1",
"service": "web-frontend",
"team": "frontend"
})
print(f"Instance metadata updated: {instance.metadata}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function setInstanceMetadata() {
// Get an instance
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Set or update metadata
await instance.setMetadata({
environment: "production",
region: "us-east-1",
service: "web-frontend",
team: "frontend"
});
console.log(`Instance metadata updated: ${JSON.stringify(instance.metadata)}`);
}
setInstanceMetadata();
```
```bash
# Set metadata for an instance
morphcloud instance set-metadata morphvm_abc123 environment=production region=us-east-1 service=web-frontend team=frontend
```
### For Snapshots
You can add or update metadata for existing snapshots.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# Update metadata for an existing snapshot
snapshot_id = "snapshot_abc123" # Replace with a valid snapshot ID
snapshot = client.snapshots.get(snapshot_id=snapshot_id)
snapshot.set_metadata({
"environment": "production",
"version": "1.1.0"
})
print(f"Snapshot metadata: {snapshot.metadata}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function setSnapshotMetadata() {
const snapshot_id = "snapshot_abc123"; // Replace with a valid snapshot ID
const snapshot = await client.snapshots.get({ snapshot_id: snapshot_id });
await snapshot.setMetadata({
environment: "production",
version: "1.1.0"
});
console.log(`Snapshot metadata: ${JSON.stringify(snapshot.metadata)}`);
}
setSnapshotMetadata();
```
```bash
# Set metadata for a snapshot
morphcloud snapshot set-metadata snapshot_abc123 environment=production version=1.1.0
```
## Filtering Resources by Metadata
Metadata enables powerful filtering of both instances and snapshots.
### Filtering Instances
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# Find production instances
prod_instances = client.instances.list(metadata={"environment": "production"})
print(f"Found {len(prod_instances)} production instances")
# Find instances by team and service
team_instances = client.instances.list(metadata={"team": "frontend", "service": "web-frontend"})
print(f"Found {len(team_instances)} frontend web instances")
for instance in team_instances:
print(f"ID: {instance.id}, Status: {instance.status}, Metadata: {instance.metadata}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function filterInstancesByMetadata() {
// Find production instances
const prodInstances = await client.instances.list({
metadata: { environment: "production" }
});
console.log(`Found ${prodInstances.length} production instances`);
// Find instances by team and service
const teamInstances = await client.instances.list({
metadata: { team: "frontend", service: "web-frontend" }
});
console.log(`Found ${teamInstances.length} frontend web instances`);
teamInstances.forEach(instance => {
console.log(`ID: ${instance.id}, Status: ${instance.status}, Metadata: ${JSON.stringify(instance.metadata)}`);
});
}
filterInstancesByMetadata();
```
```bash
# List instances with specific metadata
morphcloud instance list --metadata environment=production
# List instances with multiple metadata filters
morphcloud instance list --metadata team=frontend service=web-frontend
```
### Filtering Snapshots
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# Get snapshots with specific metadata
dev_snapshots = client.snapshots.list(metadata={"environment": "development"})
print(f"Found {len(dev_snapshots)} development snapshots")
for snapshot in dev_snapshots:
print(f"ID: {snapshot.id}, Metadata: {snapshot.metadata}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function filterSnapshotsByMetadata() {
// Get snapshots with specific metadata
const devSnapshots = await client.snapshots.list({
metadata: { environment: "development" }
});
console.log(`Found ${devSnapshots.length} development snapshots`);
devSnapshots.forEach(snapshot => {
console.log(`ID: ${snapshot.id}, Metadata: ${JSON.stringify(snapshot.metadata)}`);
});
}
filterSnapshotsByMetadata();
```
```bash
# List snapshots with specific metadata
morphcloud snapshot list --metadata environment=development
```
## Best Practices for Metadata
Here are some recommended best practices for using metadata effectively:
1. **Use consistent keys**: Establish a convention for metadata key names and stick to it
2. **Keep values simple**: Use simple values for easier filtering
3. **Categorize with purpose**: Use metadata to categorize resources by environment, team, service, version, etc.
4. **Don't store secrets**: Avoid storing sensitive information in metadata
5. **Update lifecycle stages**: Use metadata to track the lifecycle stage of resources
## Common Metadata Use Cases
Here are some common use cases for metadata:
- **Environment tracking**: `environment=production`, `environment=staging`, `environment=development`
- **Version tracking**: `version=1.0.0`, `version=2.3.4`
- **Ownership**: `team=backend`, `owner=username`
- **Purpose**: `purpose=database`, `purpose=web-server`
- **Region or zone**: `region=us-east-1`, `zone=a`
- **Creation info**: `created-by=deployment-script`, `created-at=2023-01-15`
By effectively using metadata, you can better organize, search, and manage your Morph Cloud resources.
---
---
id: pause-resume
title: Pause / Resume
sidebar_label: Pause / Resume
description: "Pause and resume instances to reduce costs while preserving memory state and resuming exactly where you left off."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Pause / Resume
The pause and resume functionality allows you to temporarily suspend an instance while preserving its memory state, and later restart it exactly where it left off. This approach saves on compute costs compared to keeping an instance running while still preserving its state.
## When to Use Pause vs Stop
- **Pause**: Use when you need to preserve the running state of applications, the memory contents, and all processes. You'll only be charged for storage, not compute resources.
- **Stop**: Use when you're completely done with the instance and want to release all resources. You'll lose the running state, but you can always start a new instance from a snapshot.
## Pause an Instance
Pausing an instance suspends its execution while preserving the memory state. It's effectively the same as if you had snapshotted the instance.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
instance.pause()
print(f"Instance '{instance_id}' paused.")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function pauseInstance() {
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
await instance.pause();
console.log(`Instance '${instance_id}' paused.`);
}
pauseInstance();
```
```bash
# Pause an instance
morphcloud instance pause morphvm_abc123
```
## Resume an Instance
Resuming a paused instance restores it to its exact state at the time of pausing, with all processes and memory state intact.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
instance.resume()
print(f"Instance '{instance_id}' resumed.")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function resumeInstance() {
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
await instance.resume();
console.log(`Instance '${instance_id}' resumed.`);
}
resumeInstance();
```
```bash
# Resume a paused instance
morphcloud instance resume morphvm_abc123
```
## Cost Implications
When an instance is paused:
- We create a new snapshot and suspend the VM
- The VM stops consuming MCUs
- You only get charged for the snapshot taken
- Running processes/memory state preserved as usual
This makes pausing an economical way to temporarily suspend workloads that you'll need to resume later in the exact same state.
---
---
id: reboot
title: Rebooting Instances
sidebar_label: Reboot
description: "Reboot a Morph Cloud instance gracefully (or force reboot) and optionally resize CPU, memory, or disk."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Rebooting Instances
> Rebooting also supports resizing your instance (CPU, memory, disk) while preserving its filesystem and instance ID. For a product‑oriented guide and end‑to‑end examples, see the [Resizing Instances](/examples/resizing-instances) use case.
Rebooting an instance performs a graceful restart of the virtual machine, similar to restarting your computer. This is useful for applying system updates, clearing memory, or resolving temporary issues.
## When to Reboot an Instance
- **Apply system updates** that require a restart
- **Clear memory leaks** or resolve performance issues
- **Reset network configurations** that may have become corrupted
- **Recover from software hangs** without losing data
- **Apply configuration changes** that require a system restart
## Reboot an Instance
Restart a running instance gracefully:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Get the instance and reboot it
instance = client.instances.get(instance_id=instance_id)
instance.reboot()
print(f"Instance {instance_id} is rebooting...")
print(f"Current status: {instance.status}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function rebootInstance() {
const instance_id = "morphvm_abc123"; // Replace with your instance ID
// Get the instance and reboot it
const instance = await client.instances.get({ instance_id: instance_id });
await instance.reboot();
console.log(`Instance ${instance_id} is rebooting...`);
console.log(`Current status: ${instance.status}`);
}
rebootInstance();
```
```bash
# Reboot an instance
morphcloud instance reboot morphvm_abc123
```
## Force Reboot
Perform a hard reboot when a graceful reboot doesn't work:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Force reboot the instance
instance = client.instances.get(instance_id=instance_id)
instance.reboot(force=True)
print(f"Force rebooting instance {instance_id}...")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function forceRebootInstance() {
const instance_id = "morphvm_abc123"; // Replace with your instance ID
// Force reboot the instance
const instance = await client.instances.get({ instance_id: instance_id });
await instance.reboot({ force: true });
console.log(`Force rebooting instance ${instance_id}...`);
}
forceRebootInstance();
```
```bash
# Force reboot an instance
morphcloud instance reboot morphvm_abc123 --force
```
## Monitor Reboot Progress
Check the status during and after reboot:
```python
from morphcloud.api import MorphCloudClient
import time
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Reboot and monitor status
instance = client.instances.get(instance_id=instance_id)
instance.reboot()
print(f"Rebooting {instance_id}...")
# Monitor reboot progress
for i in range(12): # Check for up to 2 minutes
time.sleep(10)
instance = client.instances.get(instance_id=instance_id)
print(f"Status: {instance.status}")
if instance.status == "ready":
print("Reboot completed successfully!")
break
elif instance.status == "error":
print("Reboot failed!")
break
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function monitorReboot() {
const instance_id = "morphvm_abc123"; // Replace with your instance ID
// Reboot and monitor status
let instance = await client.instances.get({ instance_id: instance_id });
await instance.reboot();
console.log(`Rebooting ${instance_id}...`);
// Monitor reboot progress
for (let i = 0; i < 12; i++) { // Check for up to 2 minutes
await new Promise(resolve => setTimeout(resolve, 10000));
instance = await client.instances.get({ instance_id: instance_id });
console.log(`Status: ${instance.status}`);
if (instance.status === "ready") {
console.log("Reboot completed successfully!");
break;
} else if (instance.status === "error") {
console.log("Reboot failed!");
break;
}
}
}
monitorReboot();
```
```bash
# Reboot and wait for completion
morphcloud instance reboot morphvm_abc123 --wait
# Or monitor manually
morphcloud instance reboot morphvm_abc123
morphcloud instance get morphvm_abc123 --watch
```
## Best Practices
- **Create a snapshot** before rebooting if you've made important changes
- **Use graceful reboot first** - only force reboot if necessary
- **Monitor reboot progress** to ensure successful completion
- **Wait for "ready" status** before performing other operations
Rebooting helps maintain instance health and apply necessary system changes while preserving your data and configurations.
---
---
id: reverse-tunnel
title: Expose Localhost via MorphVM (Reverse SSH)
sidebar_label: Expose Localhost (Reverse SSH)
description: "Publish a local service by reverse-tunneling to a MorphVM with ssh -R and exposing the port as a public URL."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Expose Localhost via MorphVM (Reverse SSH)
Tunnel laptop localhost: to a MorphVM with ssh -R, then expose that VM port to get a public URL.
## How it works
```
[Your laptop] localhost:8000 -> (ssh -R) -> [MorphVM] 0.0.0.0:8000 -> Expose HTTP Service -> public URL
```
## Prerequisites
- A running instance (e.g., `morphvm_XXXX`)
- SSH key configured for your account
- A local app listening on a port (examples use `8000`)
## 1) Create the reverse tunnel (run on your laptop)
Use `ssh -R` to bind a port on your MorphVM that forwards to your laptop’s localhost:
```bash
ssh -N -R 0.0.0.0:8000:127.0.0.1:8000 morphvm_XXXX@ssh.cloud.morph.so
```
Optional resilient variant (reconnects automatically on flaky networks):
```bash
autossh -M 0 -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -N -R 0.0.0.0:8000:127.0.0.1:8000 morphvm_XXXX@ssh.cloud.morph.so
```
## 2) Publish that VM port as a URL
Expose the MorphVM port to the internet with an authenticated HTTP Service.
```bash
morphcloud instance expose-http morphvm_XXXX local-8000 8000 --auth-mode api_key
```
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance = client.instances.get("morphvm_XXXX")
svc = instance.expose_http_service(name="local-8000", port=8000, auth_mode="api_key")
print(svc.url)
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
const instance = await client.instances.get({ instance_id: "morphvm_XXXX" });
const svc = await instance.exposeHttpService("local-8000", 8000, "api_key");
console.log(svc.url);
```
Note: When `auth_mode=api_key`, call the URL with `Authorization: Bearer YOUR_API_KEY`.
## Tips
- TTL pause drops the tunnel; enable Wake-on-SSH or Wake-on-HTTP.
- Prefer `127.0.0.1` as the destination in `-R` for clarity and security.
- Use `api_key` auth for webhooks and dev previews.
## Troubleshooting
- 502 or timeout: ensure your `ssh -R` or `autossh` process is running.
- Port already in use: pick another remote port (e.g., `8001`).
- Paused VM: enable Wake-on-HTTP/SSH, then retry.
## See also
- [HTTP Services](./http-services)
- [TTL](./ttl)
- [Wake-on](./wake-on)
- [SSH](./ssh)
---
---
id: snapshot-setup
title: Snapshot Setup
sidebar_label: Snapshot Setup
description: "Build reusable, cached snapshots by running setup steps once and reusing the resulting environment across instances."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Custom Snapshot Setup
The SDK also allows us to set up a snapshot with specific instructions and configurations, which can be reused across different instances. Each setup step is also cached as a snapshot, meaning that redundant steps are skipped in subsequent runs. This is particularly useful for creating a consistent environment for running tasks or applications.
# Example: Docker and Nginx Setup
The example below installs Docker, configures a Docker network, runs two containerized services (a headless Chrome and an NGINX proxy), then creates a final snapshot. An instance is then started using the snapshot, and a browser service is exposed for running a task.
```python
#!/usr/bin/env python3
# Example: Custom Snapshot Setup with Morph Cloud
import os
import asyncio
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# Create a snapshot with resource requirements and an identifying digest.
snapshot = client.snapshots.create(
vcpus=1,
memory=4096,
disk_size=8192,
digest="chromebox-1-1",
)
# Chain setup steps; each step is cached.
snapshot = (
snapshot.setup("apt update -y")
.setup("apt install -y docker.io")
.setup("systemctl enable docker")
.setup("systemctl start docker")
.setup("docker network create morph-net")
.setup(
"docker run -d --network morph-net --name headless-chrome "
"zenika/alpine-chrome "
"--headless --no-sandbox --disable-gpu --disable-dev-shm-usage "
"--remote-debugging-port=9222 --remote-debugging-address=0.0.0.0"
)
.setup(
"""\
cat <<'EOF' > /tmp/default.conf
server {
listen 80;
location / {
proxy_pass http://headless-chrome:9222;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host localhost;
}
location /json/ {
proxy_pass http://headless-chrome:9222;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host localhost;
proxy_set_header Accept-Encoding "";
sub_filter_types application/json;
sub_filter_once off;
sub_filter "ws://localhost" "wss://$http_host";
}
}
EOF
"""
)
.setup(
"docker run -d --network morph-net --name chrome-proxy "
"-p 9222:80 "
"-v /tmp/default.conf:/etc/nginx/conf.d/default.conf:ro "
"nginx:alpine"
)
)
# Start an instance using the snapshot.
with client.instances.start(snapshot.id, ttl_seconds=3600) as instance:
url = instance.expose_http_service("browser", 9222)
print(f"Instance ID: {instance.id}")
print(f"Browser service URL: {url}")
browser = Browser(config=BrowserConfig(cdp_url=url))
try:
yield browser
finally:
pass
```
```typescript
#!/usr/bin/env ts-node
// Example: Custom Snapshot Setup with Morph Cloud
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
// Create a snapshot with resource requirements and a unique digest.
let snapshot = await client.snapshots.create({
vcpus: 1,
memory: 4096,
disk_size: 8192,
digest: "chromebox-1-1",
});
// Chain setup steps; each step is cached.
snapshot = await snapshot.setup("apt update -y");
snapshot = await snapshot.setup("apt install -y docker.io");
snapshot = await snapshot.setup("systemctl enable docker");
snapshot = await snapshot.setup("systemctl start docker");
snapshot = await snapshot.setup("docker network create morph-net");
snapshot = await snapshot.setup(
`docker run -d --network morph-net --name headless-chrome \
zenika/alpine-chrome \
--headless --no-sandbox --disable-gpu --disable-dev-shm-usage \
--remote-debugging-port=9222 --remote-debugging-address=0.0.0.0`
);
snapshot = await snapshot.setup(
`cat <<'EOF' > /tmp/default.conf
server {
listen 80;
location / {
proxy_pass http://headless-chrome:9222;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host localhost;
}
location /json/ {
proxy_pass http://headless-chrome:9222;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host localhost;
proxy_set_header Accept-Encoding "";
sub_filter_types application/json;
sub_filter_once off;
sub_filter "ws://localhost" "wss://$http_host";
}
}
EOF`
);
snapshot = await snapshot.setup(
`docker run -d --network morph-net --name chrome-proxy \
-p 9222:80 \
-v /tmp/default.conf:/etc/nginx/conf.d/default.conf:ro \
nginx:alpine`
);
// Start an instance using the snapshot.
const instance = await client.instances.start({ snapshot_id: snapshot.id });
```
# Explanation
- **Snapshot Creation:**
A snapshot is created with defined resources (vCPUs, memory, disk) and a digest identifier (`chromebox-1-1`).
- **Chained Setup:**
The `.setup()` method is chained to perform commands such as updating packages, installing Docker, and configuring services. Each step is cached so that subsequent runs skip steps that haven’t changed.
- **Instance Startup:**
An instance is started with the snapshot, and a browser service is exposed for use. The instance is automatically managed by the context manager.
---
---
id: ssh-keys
title: SSH Key Management
sidebar_label: SSH Keys
description: "Retrieve and rotate instance-specific SSH key pairs for secure access and automation via SDK or CLI."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# SSH Key Management
SSH keys provide secure access to your instances. Morph Cloud supports both user-level SSH keys (shared across instances) and instance-specific SSH keys for enhanced security.
## Get Instance SSH Key
Retrieve the SSH key for a specific instance:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Get instance and retrieve SSH key
instance = client.instances.get(instance_id)
ssh_key = instance.ssh_key()
print(f"Public Key:\n{ssh_key.public_key}")
print(f"Private Key:\n{ssh_key.private_key}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function getInstanceSshKey() {
const instance_id = "morphvm_abc123"; // Replace with your instance ID
// Get instance and retrieve SSH key
const instance = await client.instances.get({ instance_id: instance_id });
const sshKey = await instance.ssh_key();
console.log(`Public Key:\n${sshKey.publicKey}`);
console.log(`Private Key:\n${sshKey.privateKey}`);
}
getInstanceSshKey();
```
```bash
# Get SSH key for an instance
morphcloud instance ssh-key get morphvm_abc123
```
## Rotate Instance SSH Key
Generate a new SSH key pair for enhanced security:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Get instance and rotate SSH key
instance = client.instances.get(instance_id)
new_ssh_key = instance.ssh_key_rotate()
print(f"New Public Key:\n{new_ssh_key.public_key}")
print(f"New Private Key:\n{new_ssh_key.private_key}")
print("SSH key rotated successfully!")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function rotateInstanceSshKey() {
const instance_id = "morphvm_abc123"; // Replace with your instance ID
// Get instance and rotate SSH key
const instance = await client.instances.get({ instance_id: instance_id });
const newSshKey = await instance.ssh_key_rotate();
console.log(`New Public Key:\n${newSshKey.publicKey}`);
console.log(`New Private Key:\n${newSshKey.privateKey}`);
console.log("SSH key rotated successfully!");
}
rotateInstanceSshKey();
```
```bash
# Rotate SSH key for an instance
morphcloud instance ssh-key rotate morphvm_abc123
```
## Best Practices
- **Save private keys securely** with appropriate file permissions (600)
- **Rotate keys regularly** for enhanced security
- **Use instance-specific keys** for production environments
- **Keep private keys confidential** and never share them
- If you need to delegate SSH to a specific instance, prefer sharing an **instance-scoped access bundle** (not your API key): [Share SSH access (no API key)](/documentation/instances/ssh-sharing).
SSH key management ensures secure access to your Morph Cloud instances while maintaining flexibility and security.
---
---
id: ssh-sharing
title: Share SSH access (no API key)
sidebar_label: Share SSH access
description: "Share SSH access to an instance without sharing your API key using instance-scoped credentials and handoff bundles."
slug: /documentation/instances/ssh-sharing
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Share SSH access (no API key)
If you want someone else to SSH to a specific Morph instance, you do **not** need to share your Morph API key. Instead, use a **two-phase handoff**: a trusted operator mints **instance-scoped SSH credentials** once (using `MORPH_API_KEY`), then shares only an **instance-scoped access bundle** with the recipient.
## Two-phase handoff
1. **Phase 1 (trusted operator, API domain):** Use `MORPH_API_KEY` once to fetch the instance’s SSH credentials and write an access bundle file.
2. **Phase 2 (recipient, SSH domain):** Use only the access bundle to SSH to `ssh.cloud.morph.so`. **No Morph API key is needed**.
## What to share (and what not to share)
- **Share:** the **instance-scoped access bundle** for the specific instance.
- **Do not share:** `MORPH_API_KEY` or any org/user automation credentials used to mint bundles.
:::caution Security note
The access bundle contains a **private key** and a **password**. Treat it like a secret (equivalent to SSH credentials): don’t paste it into tickets or chat, don’t commit it, and store/share it only via approved secure channels.
:::
## Option A: Mint a bundle with the SDK (one-time API key use)
Write a bundle to disk with restrictive permissions (e.g., `0600`) and share only that file.
```python
import json
import os
import stat
from pathlib import Path
from morphcloud.api import MorphCloudClient
instance_id = "morphvm_abc123" # Replace with your instance ID
bundle_path = Path("./ssh-access-bundle.json")
client = MorphCloudClient(api_key=os.environ["MORPH_API_KEY"])
instance = client.instances.get(instance_id=instance_id)
ssh_key = instance.ssh_key() # one-time API call for instance-scoped credentials
bundle = {
"hostname": "ssh.cloud.morph.so",
"port": 22,
"username": instance_id,
"private_key": ssh_key.private_key,
"password": getattr(ssh_key, "password", None),
}
bundle_path.write_text(json.dumps(bundle, indent=2) + "\n")
bundle_path.chmod(stat.S_IRUSR | stat.S_IWUSR) # 0600
```
```typescript
import fs from "node:fs";
import { MorphCloudClient } from "morphcloud";
const instance_id = "morphvm_abc123"; // Replace with your instance ID
const bundlePath = "./ssh-access-bundle.json";
const client = new MorphCloudClient({ apiKey: process.env.MORPH_API_KEY! });
const instance = await client.instances.get({ instance_id });
const sshKey = await instance.ssh_key(); // one-time API call for instance-scoped credentials
const bundle = {
hostname: "ssh.cloud.morph.so",
port: 22,
username: instance_id,
private_key: sshKey.privateKey,
password: (sshKey as any).password ?? null,
};
fs.writeFileSync(bundlePath, JSON.stringify(bundle, null, 2) + "\n", { mode: 0o600 });
```
## Option B: Use the bundle to SSH (no API key)
Once you have an instance-scoped bundle file, you can connect through the Morph SSH gateway **without** `MORPH_API_KEY`.
The simplest approach is to treat the bundle as an input to a small script/tool (copy/paste the example below into your own tooling).
### Copy/paste Python example: exec via bundle (no API key)
This example reads `ssh-access-bundle.json` and runs a command via Paramiko. It does **not** call the Morph API.
```python
#!/usr/bin/env python3
import argparse
import json
import os
import stat
import tempfile
import paramiko
def main() -> None:
parser = argparse.ArgumentParser(description="Run a command using a Morph SSH access bundle (no API key required).")
parser.add_argument("--bundle", required=True, help="Path to ssh-access-bundle.json")
parser.add_argument("--cmd", required=True, help="Command to run on the instance")
args = parser.parse_args()
if os.environ.get("MORPH_API_KEY"):
raise SystemExit("MORPH_API_KEY should not be set for this step (bundle-only SSH).")
with open(args.bundle, "r", encoding="utf-8") as f:
bundle = json.load(f)
hostname = bundle["hostname"]
port = int(bundle.get("port", 22))
username = bundle["username"]
private_key = bundle["private_key"]
password = bundle.get("password") # may be null
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
with tempfile.TemporaryDirectory() as td:
key_path = os.path.join(td, "id_morph_instance")
with open(key_path, "w", encoding="utf-8") as kf:
kf.write(private_key)
os.chmod(key_path, stat.S_IRUSR | stat.S_IWUSR) # 0600
try:
pkey = paramiko.RSAKey.from_private_key_file(key_path, password=password)
client.connect(hostname=hostname, port=port, username=username, pkey=pkey, password=None, timeout=30)
except Exception:
# If key auth fails, fall back to password auth (bundle includes a password).
client.connect(hostname=hostname, port=port, username=username, pkey=None, password=password, timeout=30)
stdin, stdout, stderr = client.exec_command(args.cmd)
exit_code = stdout.channel.recv_exit_status()
out = stdout.read().decode("utf-8", errors="replace")
err = stderr.read().decode("utf-8", errors="replace")
if out:
print(out, end="" if out.endswith("\n") else "\n")
if err:
print(err, end="" if err.endswith("\n") else "\n")
raise SystemExit(exit_code)
if __name__ == "__main__":
main()
```
Example usage:
```bash
python3 -m pip install --upgrade morphcloud paramiko
env -u MORPH_API_KEY python3 ./ssh_bundle_exec.py \
--bundle ./ssh-access-bundle.json \
--cmd 'uname -a'
```
## Rotation / revocation
To end access (or if the bundle is ever exposed), rotate the instance SSH key and re-mint a new bundle for the next recipient.
- Rotate using the API/SDK (see [SSH Key Management](/documentation/instances/ssh-keys)).
- After rotation, the old bundle should no longer be considered valid; delete it wherever it may have been stored or shared.
## Safe sharing checklist
- Store and share the bundle only via a secrets manager or approved secure file sharing.
- Time-box access: rotate the instance SSH key when the engagement ends.
- Prefer passing the bundle as a file (not copy/paste); avoid tickets, logs, CI output, and chat.
## See also
- [SSH](/documentation/instances/ssh)
- [SSH Key Management](/documentation/instances/ssh-keys)
---
---
id: ssh
title: SSH
sidebar_label: SSH
description: "Connect to Morph Cloud instances over SSH for interactive shells, command execution, and file transfers."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# SSH
:::tip Want a workspace with one-click editor access?
If your primary goal is development (VSCode/Cursor + tmux agents), start with **Devboxes**: [Development](/devboxes/development).
:::
SSH (Secure Shell) provides secure access to your Morph Cloud instances for interactive sessions, command execution, and file transfers.
## Direct SSH Access
You can directly SSH into any MorphVM instance using standard SSH clients with your public key:
```bash
ssh @ssh.cloud.morph.so
```
This method works just like SSHing into any other VM. Your SSH public key must be registered with Morph Cloud first. This is the same as using the SDK or CLI methods described below, but gives you the flexibility of using your preferred SSH client directly.
## Share SSH access (no API key)
If you need to let someone SSH to a specific instance without giving them your Morph API key, see [Share SSH access (no API key)](/documentation/instances/ssh-sharing).
## SSH into Instance
You can establish an SSH connection to your running instance for interactive shell access or to execute scripts.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
instance.wait_until_ready() # Ensure instance is ready for SSH
with instance.ssh() as ssh_client:
# Run a command
result = ssh_client.run("ls -l /home")
print(f"Stdout:\n{result.stdout}")
# Start an interactive shell (for interactive sessions, not recommended in scripts)
# ssh_client.interactive_shell()
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function sshAccess() {
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
await instance.waitUntilReady(); // Ensure instance is ready for SSH
const sshClient = await instance.ssh();
try {
// Run a command
const result = await sshClient.execCommand("ls -l /home");
console.log(`Stdout:\n${result.stdout}`);
// For interactive shell in TypeScript, consider using a library that wraps NodeSSH to provide a more shell-like experience if needed for your application.
// NodeSSH's `interactiveShell` is primarily for basic interaction.
} finally {
sshClient.dispose(); // Important to close the SSH connection
}
}
sshAccess();
```
```bash
# SSH directly into the instance
morphcloud instance ssh morphvm_abc123
# Execute a command directly via SSH without interactive login
morphcloud instance ssh morphvm_acb123 "ls -la /tmp"
```
## Interactive vs Non-Interactive Sessions
SSH supports both interactive and non-interactive sessions:
### Interactive Sessions
Interactive sessions provide a full shell environment where you can run commands interactively.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
with instance.ssh() as ssh_client:
# Start an interactive shell
ssh_client.interactive_shell()
```
```bash
# Start an interactive SSH session
morphcloud instance ssh morphvm_abc123
```
### Non-Interactive Sessions
Non-interactive sessions are useful for running specific commands or scripts without user interaction.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
with instance.ssh() as ssh_client:
# Run a specific command
result = ssh_client.run("uname -a")
print(f"Stdout: {result.stdout}")
# Run a script with multiple commands
commands = [
"cd /tmp",
"mkdir -p test_dir",
"echo 'Hello World' > test_dir/hello.txt",
"cat test_dir/hello.txt"
]
result = ssh_client.run("; ".join(commands))
print(f"Script output: {result.stdout}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function sshCommands() {
const instance_id = "morphvm_abc123"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
const sshClient = await instance.ssh();
try {
// Run a specific command
const result = await sshClient.execCommand("uname -a");
console.log(`Stdout: ${result.stdout}`);
// Run a script with multiple commands
const commands = [
"cd /tmp",
"mkdir -p test_dir",
"echo 'Hello World' > test_dir/hello.txt",
"cat test_dir/hello.txt"
].join("; ");
const scriptResult = await sshClient.execCommand(commands);
console.log(`Script output: ${scriptResult.stdout}`);
} finally {
sshClient.dispose();
}
}
sshCommands();
```
```bash
# Run a specific command
morphcloud instance ssh morphvm_abc123 "uname -a"
# Run multiple commands
morphcloud instance ssh morphvm_abc123 "cd /tmp; mkdir -p test_dir; echo 'Hello World' > test_dir/hello.txt; cat test_dir/hello.txt"
```
## Port Forwarding
You can forward ports from your instance to your local machine:
```bash
# Forward remote port 8080 to local port 8080
morphcloud instance port-forward instance_your_instance_id 8080
# Forward remote port 8080 to local port 9000
morphcloud instance port-forward instance_your_instance_id 8080 9000
```
---
---
id: ttl
title: TTL (Time-to-Live)
sidebar_label: TTL
description: "Set time-to-live (TTL) policies to automatically pause or stop instances after a duration for cost and safety."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# TTL (Time-to-Live)
Time-to-Live (TTL) functionality allows you to specify a duration after which an instance will automatically shut down or pause. This is useful for cost management and to avoid leaving idle instances running.
## Start Instance with TTL
When starting an instance, you can specify a Time-To-Live (TTL) to set the duration in seconds before the instance expires. You can also define the action to take upon expiration using `ttl_action`, which can be either `stop` or `pause`.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
instance = client.instances.start(
snapshot_id=snapshot_id,
ttl_seconds=3600, # 1 hour
ttl_action="stop" # Can be 'stop' or 'pause'
)
print(f"Instance started with ID: {instance.id} and TTL configured for 1 hour.")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function startInstanceWithTTL() {
const snapshot_id = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
const instance = await client.instances.start({
snapshot_id: snapshot_id,
ttl_seconds: 3600, // 1 hour
ttl_action: "stop" // Can be 'stop' or 'pause'
});
console.log(`Instance started with ID: ${instance.id} and TTL configured for 1 hour.`);
}
startInstanceWithTTL();
```
```bash
# Start an instance with TTL
morphcloud instance start snapshot_your_snapshot_id --ttl-seconds 3600 --ttl-action stop
```
## TTL Actions
When configuring TTL, you can specify one of two actions to happen when the TTL expires:
1. **stop**: The instance will be completely shut down, and all resources will be released. This is the most cost-effective option as you will no longer be charged for the instance after it stops.
2. **pause**: The instance will be paused, preserving its memory state. This allows you to resume the instance later with all applications in the exact state they were in. You will still be charged for storage, but not for compute resources while the instance is paused.
## Setting TTL for Running Instances
You can set/update the TTL for an already running instance:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
# Set TTL for 2 more hours
instance = client.instances.get(instance_id=instance_id)
instance.set_ttl(
ttl_seconds=7200, # 2 hours
ttl_action="pause" # Can be 'stop' or 'pause'
)
print(f"TTL set for instance '{instance_id}'")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function setInstanceTTL() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
// Set TTL for 2 more hours
const instance = await client.instances.get({ instance_id: instance_id });
await instance.set_ttl({
ttl_seconds: 7200, // 2 hours
ttl_action: "pause" // Can be 'stop' or 'pause'
});
console.log(`TTL set for instance '${instance_id}'`);
}
setInstanceTTL();
```
```bash
# Update TTL for a running instance
morphcloud instance set-ttl instance_your_instance_id --ttl-seconds 7200 --ttl-action pause
```
## Checking Remaining TTL
You can check the remaining TTL for an instance:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
ttl_info = instance.get_ttl_info()
print(f"TTL expires at: {ttl_info.expires_at}")
print(f"TTL action: {ttl_info.action}")
print(f"Seconds remaining: {ttl_info.seconds_remaining}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function checkRemainingTTL() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
const ttlInfo = await instance.getTTLInfo();
console.log(`TTL expires at: ${ttlInfo.expiresAt}`);
console.log(`TTL action: ${ttlInfo.action}`);
console.log(`Seconds remaining: ${ttlInfo.secondsRemaining}`);
}
checkRemainingTTL();
```
```bash
# Check TTL information for an instance
morphcloud instance get-ttl instance_your_instance_id
```
## Best Practices for TTL
1. **Use TTL for temporary workloads**: Set appropriate TTLs for workloads that have a defined duration, like CI/CD jobs or development environments.
2. **Choose the right action**: Use `stop` for one-off tasks and `pause` for work that might need to be resumed later.
3. **Set realistic durations**: Avoid setting unnecessarily long TTLs; you can always extend them if needed.
4. **Monitor expiration**: Build processes to monitor TTL expirations and take action if needed.
---
---
id: wake-on
title: Wake-on-Request Configuration
sidebar_label: Wake-on-Request
description: "Use wake-on-request to automatically start instances when accessed via HTTP or SSH-backed workflows, including exec calls, for intermittent workloads."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Wake-on-Request Configuration
Wake-on-request is a cost-saving feature that allows instances to automatically start when accessed via HTTP or SSH-backed workflows. This includes direct SSH sessions as well as `exec` calls made through the SDK, CLI, or REST API. This is useful for development environments or applications with intermittent usage patterns.
## How Wake-on-Request Works
When wake-on-request is enabled:
1. **Paused State**: Your instance can be paused to save compute costs
2. **Automatic Wake**: When a request comes in through HTTP or an SSH-backed access path, the instance automatically resumes
3. **Seamless Access**: Users experience a brief delay while the instance wakes up
4. **Cost Savings**: You only pay for compute time when actively used
:::note Exec uses the SSH wake path
There is no separate `wake_on_exec` setting. If your workflow uses `instance.exec(...)`, `morphcloud instance exec`, or `POST /api/instance/{instance_id}/exec`, enable `wake_on_ssh` and the platform will resume a paused instance before running the command.
:::
## Configure Wake-on-Request Settings
Set up wake-on-request behavior for your instances:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Get the instance and enable both HTTP and SSH wake-on-request
instance = client.instances.get(instance_id)
instance.set_wake_on(
wake_on_http=True,
wake_on_ssh=True
)
print(f"Wake-on-request configured for {instance_id}")
print(f"Wake on HTTP: {instance.wake_on.wake_on_http}")
print(f"Wake on SSH: {instance.wake_on.wake_on_ssh}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function configureWakeOnRequest() {
const instanceId = "morphvm_abc123"; // Replace with your instance ID
// Update wake-on-request settings via the REST API
const updated = await client.POST(`/instance/${instanceId}/wake-on`, {}, {
wake_on_http: true,
wake_on_ssh: true
});
console.log(`Wake-on-request configured for ${instanceId}`);
console.log(`Wake on HTTP: ${updated.wake_on.wake_on_http}`);
console.log(`Wake on SSH: ${updated.wake_on.wake_on_ssh}`);
}
configureWakeOnRequest();
```
```bash
# Configure wake-on-request settings
morphcloud instance wake-on-config morphvm_abc123 --wake-on-http --wake-on-ssh
```
## Enable HTTP Wake-on-Request
Configure your instance to wake up when HTTP requests are made:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Enable wake-on-HTTP only
instance = client.instances.get(instance_id)
instance.set_wake_on(wake_on_http=True, wake_on_ssh=False)
# Expose a service for wake-on-HTTP to work
service = instance.expose_http_service("web", 8080)
print(f"HTTP wake-on-request enabled")
print(f"Service URL: {service.url}")
print("Instance will wake when this URL is accessed")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function enableHttpWakeOn() {
const instanceId = "morphvm_abc123"; // Replace with your instance ID
// Enable wake-on-HTTP only
await client.POST(`/instance/${instanceId}/wake-on`, {}, {
wake_on_http: true,
wake_on_ssh: false
});
// Expose a service for wake-on-HTTP to work
const instance = await client.instances.get({ instanceId });
const service = await instance.exposeHttpService("web", 8080);
console.log("HTTP wake-on-request enabled");
console.log(`Service URL: ${service.url}`);
console.log("Instance will wake when this URL is accessed");
}
enableHttpWakeOn();
```
```bash
# Enable HTTP wake-on-request and expose service
morphcloud instance wake-on-config morphvm_abc123 --wake-on-http
morphcloud instance expose morphvm_abc123 --service-name web --port 8080
```
## Enable SSH Wake-on-Request
Configure your instance to wake up when SSH-backed access is attempted, including direct SSH connections and `exec` calls from the SDK, CLI, or REST API:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Enable wake-on-SSH only
instance = client.instances.get(instance_id)
instance.set_wake_on(wake_on_http=False, wake_on_ssh=True)
print(f"SSH wake-on-request enabled for {instance_id}")
print("Instance will wake when an SSH connection or exec call is attempted")
print(f"SSH command: ssh ubuntu@{instance.ip_address}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function enableSshWakeOn() {
const instanceId = "morphvm_abc123"; // Replace with your instance ID
// Enable wake-on-SSH only
const updated = await client.POST(`/instance/${instanceId}/wake-on`, {}, {
wake_on_http: false,
wake_on_ssh: true
});
console.log(`SSH wake-on-request enabled for ${instanceId}`);
console.log(`Wake on SSH: ${updated.wake_on.wake_on_ssh}`);
console.log("Instance will wake when an SSH connection or exec call is attempted");
console.log("Use your normal SSH flow or any exec call to trigger the wake-up");
}
enableSshWakeOn();
```
```bash
# Enable SSH wake-on-request for SSH sessions and exec calls
morphcloud instance wake-on-config morphvm_abc123 --wake-on-ssh
```
## Check Wake-on-Request Status
View current wake-on-request configuration:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "morphvm_abc123" # Replace with your instance ID
# Get current wake-on-request settings
instance = client.instances.get(instance_id)
wake_config = instance.wake_on
print(f"Wake-on-request status for {instance_id}:")
print(f" Wake on HTTP: {wake_config.wake_on_http}")
print(f" Wake on SSH: {wake_config.wake_on_ssh}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function checkWakeOnStatus() {
const instanceId = "morphvm_abc123"; // Replace with your instance ID
// Get current wake-on-request settings
const instance = await client.GET(`/instance/${instanceId}`);
console.log(`Wake-on-request status for ${instanceId}:`);
console.log(` Wake on HTTP: ${instance.wake_on.wake_on_http}`);
console.log(` Wake on SSH: ${instance.wake_on.wake_on_ssh}`);
}
checkWakeOnStatus();
```
```bash
# Check wake-on-request status
morphcloud instance get morphvm_abc123 --show-wake-on
```
## Best Practices
- **Use for development environments** where cost optimization is important
- **Combine with [TTL settings](./ttl)** to automatically pause idle instances
- **Test wake-up times** to understand user experience impact
- **Monitor wake-on-request usage** to optimize settings
Wake-on-request helps balance cost efficiency with accessibility, making it ideal for intermittent workloads.
---
---
id: instances
title: Instance Management
sidebar_label: Instances
description: "Start and manage Morph Cloud instances from images or snapshots, retrieve details, and perform common lifecycle operations."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Instance Management
### Start an Instance
You can start a new instance from an image or a snapshot.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
# Start from an image
instance_from_image = client.instances.start(image="ubuntu:22.04")
print(f"Instance ID: {instance_from_image.id}")
# Start from a snapshot
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
instance_from_snapshot = client.instances.start(snapshot_id=snapshot_id)
print(f"Instance ID: {instance_from_snapshot.id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function startInstances() {
// Start from an image
const instanceFromImage = await client.instances.start({ image: "ubuntu:22.04" });
console.log(`Instance ID: ${instanceFromImage.id}`);
// Start from a snapshot
const snapshot_id = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
const instanceFromSnapshot = await client.instances.start({ snapshot_id: snapshot_id });
console.log(`Instance ID: ${instanceFromSnapshot.id}`);
}
startInstances();
```
```bash
# Start from an image
morphcloud instance start --image ubuntu:22.04
# Start from a snapshot
morphcloud instance start --snapshot snapshot_your_snapshot_id
```
### Get Instance Details
Retrieve details about a specific instance.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
print(f"Instance ID: {instance.id}")
print(f"Instance Status: {instance.status}")
print(f"Instance Creation Time: {instance.created}")
print(f"Instance Metadata: {instance.metadata}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function getInstanceDetails() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
console.log(`Instance ID: ${instance.id}`);
console.log(`Instance Status: ${instance.status}`);
console.log(`Instance Creation Time: ${instance.created}`);
console.log(`Instance Metadata: ${JSON.stringify(instance.metadata)}`);
}
getInstanceDetails();
```
```bash
# Get instance details
morphcloud instance get instance_your_instance_id
# Get details in JSON format
morphcloud instance get instance_your_instance_id --json
```
### List Instances
Get a list of all instances in your account.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instances = client.instances.list()
for instance in instances:
print(f"ID: {instance.id}, Status: {instance.status}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function listInstances() {
const instances = await client.instances.list();
instances.forEach(instance => {
console.log(`ID: ${instance.id}, Status: ${instance.status}`);
});
}
listInstances();
```
```bash
# List all instances
morphcloud instance list
# List instances with specific status
morphcloud instance list --status READY
```
### Stop an Instance
When you're done with an instance, you can stop it to free up resources.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
client.instances.stop(instance_id=instance_id)
print(f"Instance {instance_id} has been stopped")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function stopInstance() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
await client.instances.stop({ instance_id: instance_id });
console.log(`Instance ${instance_id} has been stopped`);
}
stopInstance();
```
```bash
# Stop an instance
morphcloud instance stop instance_your_instance_id
```
### Creating a Branch from an Instance
You can create a branch from a running instance, which creates a new instance with the same state.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Create a branch from the instance
branch_instance = instance.branch()
print(f"Branch Instance ID: {branch_instance.id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function branchInstance() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Create a branch from the instance
const branchInstance = await instance.branch();
console.log(`Branch Instance ID: ${branchInstance.id}`);
}
branchInstance();
```
```bash
# Create a branch from an instance
morphcloud instance branch instance_your_instance_id
```
---
---
id: overview
title: Documentation Overview
sidebar_label: Documentation Overview
description: "Overview of Morph Cloud documentation sections, with links to setup, snapshots, instances, and common workflows."
---
# Documentation Overview
This page provides an overview of the available documentation sections.
## Setup
Get started with morphcloud by:
- [Signing Up](/documentation/setup/signing-up) - Create your account
- [API Keys](/documentation/setup/api-keys) - Manage authentication
- [SSH Keys](/documentation/setup/ssh-keys) - Configure SSH access
## Devboxes (recommended)
Devboxes are programmable cloud development environments for humans and CLI agents:
- [Getting started](/devboxes/getting-started) - Create, automate, and share devboxes via API or dashboard
- [Development](/devboxes/development) - VSCode/Cursor + tmux automation for CLI agents
- [Prototyping](/devboxes/prototyping) - Preview URLs for web apps/APIs + persistent VPS mode
- [Sharing & collaboration](/devboxes/sharing-and-collaboration) - Share live devboxes via URL inside your org
## VM primitives (instances + snapshots)
Instances and snapshots are the underlying infrastructure primitives. They’re great for power users who want fine-grained VM control (e.g. RL environments, test-time scaling, bespoke orchestration).
### Snapshot Management
Learn what snapshots do and how to set them up:
- [Basic Operations](/documentation/instances/creating-snapshot) - Create, take, and delete snapshots
- [Snapshot Setup](/documentation/instances/snapshot-setup) - Advanced initial snapshot creation
### Instance Management
Learn what Morph Cloud instances are and how to use them:
- [Introduction](/documentation/instances/basic-lifecycle) - Create, start, and stop instances
- [Pause & Resume](/documentation/instances/pause-resume) - Temporarily stop instances
- [Branching](/documentation/instances/branch) - Create branches from instances
- [Metadata](/documentation/instances/metadata) - Work with instance metadata
- [SSH](/documentation/instances/ssh) - Connect via SSH
- [Command Execution](/documentation/instances/command-execution) - Run remote commands
- [File Management](/documentation/instances/file-management) - Upload and download files
- [HTTP Services](/documentation/instances/http-services) - Expose HTTP services
## Use Cases
Explore practical use cases for Morph Cloud:
- [Docker BuildKit Environment](/examples/docker-buildkit) - Launch optimized Docker environments with BuildKit
- [AI-Powered Development with Claude Code](/examples/claude-code) - Launch cloud development environments with Claude Code AI assistance
- [Remote Desktop Environment](/examples/remote-desktop) - Launch browser-based Linux desktop environments
---
---
id: api-keys
title: API Keys
sidebar_label: API Keys
description: "Create, rotate, and manage Morph Cloud API keys for authenticating SDK and CLI requests."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# API Keys
API keys are essential for authenticating your requests to the Morph Cloud API. You can manage your API keys within the Morph Cloud dashboard, generating new keys and invalidating existing ones as needed for security best practices.
## Authentication with API Keys
API keys are used for authenticating your requests to the Morph Cloud API.
There are two primary methods to authenticate the SDK:
1. **Environment Variable:** The recommended method for most scenarios is to set the `MORPH_API_KEY` environment variable.
```bash
export MORPH_API_KEY="your_api_key_here"
```
2. **Direct Initialization:** You can also pass your API key directly when creating a `MorphCloudClient` instance.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient(api_key="your_api_key_here")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient({ apiKey: "your_api_key_here" });
```
### Managing API Keys
You can manage your API keys through the Morph Cloud dashboard. This includes generating new keys, invalidating existing keys, and setting key permissions.
For security reasons, API key management is not available through the SDK and must be done through the dashboard interface.
---
---
id: hello-world
title: Hello World
sidebar_label: Hello World
description: "Create your first Morph Cloud instance and run a simple Hello World command end-to-end."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Hello World Example
This guide will walk you through creating your first Morph Cloud instance and running a simple "Hello World" command.
## Prerequisites
Before starting:
1. Make sure you've [installed the SDK](/docs/documentation/setup/installation-guide)
2. Set up your [API key](/docs/documentation/setup/api-keys)
## Create and Run a Hello World Instance
```python
from morphcloud.api import MorphCloudClient
# Initialize client
client = MorphCloudClient()
# 1. Create a new snapshot (or list existing ones)
new_snapshot = client.snapshots.create(
image_id="morphvm-minimal",
vcpus=1,
memory=1024, # MB
disk_size=10000 # MB
)
print(f"Created snapshot: {new_snapshot.id}")
# 2. Start an instance from the snapshot
instance = client.instances.start(snapshot_id=new_snapshot.id)
print(f"Started instance: {instance.id}")
# Wait for instance to be ready
instance.wait_until_ready()
# 3. Run a hello world command
result = instance.exec(command="echo 'Hello, Morph Cloud!'")
print(f"Command output: {result.stdout}")
# 4. Stop the instance when done
instance.stop()
print("Instance stopped")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
async function helloWorld() {
// Initialize client
const client = new MorphCloudClient();
// 1. Create a new snapshot (or list existing ones)
const newSnapshot = await client.snapshots.create({
imageId: "morphvm-minimal",
vcpus: 1,
memory: 1024, // MB
diskSize: 10000 // MB
});
console.log(`Created snapshot: ${newSnapshot.id}`);
// 2. Start an instance from the snapshot
const instance = await client.instances.start({ snapshotId: newSnapshot.id });
console.log(`Started instance: ${instance.id}`);
// Wait for instance to be ready
await instance.waitUntilReady();
// 3. Run a hello world command
const result = await instance.exec("echo 'Hello, Morph Cloud!'");
console.log(`Command output: ${result.stdout}`);
// 4. Stop the instance when done
await instance.stop();
console.log("Instance stopped");
}
helloWorld().catch(console.error);
```
```bash
# 1. Create a new snapshot
SNAPSHOT_ID=$(
morphcloud snapshot create --image-id morphvm-minimal --vcpus 1 --memory 1024 --disk-size 10000 --json \
| jq -r '.id'
)
# 2. Start an instance from the snapshot
INSTANCE_ID=$(morphcloud instance start "$SNAPSHOT_ID" --json | jq -r '.id')
# 3. Run a hello world command
morphcloud instance exec "$INSTANCE_ID" echo "Hello, Morph Cloud!"
# 4. Stop the instance when done
morphcloud instance stop "$INSTANCE_ID"
```
## Next Steps
Now that you've created your first Morph Cloud instance, you can:
- Learn about [instance lifecycle management](/docs/documentation/instances/basic-lifecycle)
- Explore [command execution](/docs/documentation/instances/command-execution)
- Set up [SSH access](/docs/documentation/instances/ssh) to your instances
- Configure [HTTP services](/docs/documentation/instances/http-services)
---
---
id: installation-guide
title: Installation Guide
sidebar_label: SDK Installation
description: "Install the Morph Cloud SDK (Python or TypeScript), configure MORPH_API_KEY, and verify your setup."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Installation Guide
Installing the Morph Cloud SDK is simple. Choose your preferred language below:
```bash
# requires python3.11 or newer
# create a new virtual environment
python -m venv .venv
# activate the new virtual environment
source .venv/bin/activate
# install morphcloud
pip install morphcloud
```
Make sure that you have obtained your [API key](/docs/documentation/setup/api-keys) and that it is set as the value of your `MORPH_API_KEY` environment variable.
Once installed, the CLI is automatically available in your environment:
```bash
morphcloud --help
```
To use the Python SDK in your code:
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
```
```bash
npm install morphcloud
```
Once installed, import the client to start using the SDK:
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
```
## SDK Installation
For more details about our SDKs, check out the official repositories:
- [Python SDK](https://github.com/morph-labs/morph-python-sdk)
- [TypeScript SDK](https://github.com/morph-labs/morph-typescript-sdk)
Don't forget to [configure your API key](/docs/documentation/setup/api-keys).
---
---
id: plans
title: Plans
sidebar_label: Plans
description: "Understand Morph Compute Units (MCUs), how usage is measured, and how plans map to compute resources."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Plans
## What is a Morph Compute Unit (MCU)?
At Morph Cloud, resource consumption is measured in Morph Compute Units (MCUs). One MCU represents any of the following resource combinations:
- 1 vCPU-hour + 4 GB RAM-hours + 16 GB disk-hours
- OR 5 TB snapshot-hours
This standardized unit makes it easy to understand and predict your resource usage.
## Developer Plan
Our Developer plan provides everything you need to get started with Morph Cloud:
- **Starting Credit Allocation**: 300 MCUs free
- **Resource Quota**:
- Up to 64 vCPU instances
- Up to 256 GB RAM
- Up to 1024 GB storage
- Deployment in seconds
## Example Usage
Persisting an 8vCPU MorphVM with a standard configuration:
- 8 vCPUs
- 8 GB RAM
- 8 GB disk
This configuration allows for significant development capacity within the free tier.
## Resource Parameters
When creating snapshots or instances, you specify these resource parameters:
- **vCPUs**: Number of virtual CPU cores
- **Memory**: RAM allocation in MB
- **Disk Size**: Storage space in MB
---
---
id: signing-up
title: Signing Up
sidebar_label: Signing Up
description: "Create a Morph Cloud account and get ready to use the dashboard, API keys, and SDK."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Signing Up
Getting started with Morph Cloud is simple and easy: just create an account at [https://cloud.morph.so](https://cloud.morph.so)
Once you have your invite, our $0/month Developer Plan provides 300 free compute hours per month [here](https://cloud.morph.so/web/subscribe) with pay-as-you-go pricing after that.
---
---
id: ssh-keys
title: SSH Keys
sidebar_label: SSH Keys
description: "Generate an SSH key and set it in the Morph Cloud dashboard to enable SSH access from macOS, Linux, or Windows."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# SSH Keys
## Managing Your SSH Key in Morph Cloud
### Accessing the SSH Keys Page
1. Log in to your Morph Cloud account
2. Navigate to the SSH Keys section in the left sidebar
3. You'll see your current SSH key displayed at the top of the page (if one has been set)
### Creating an SSH Key
#### Creating an SSH Key on macOS/Linux
1. Open Terminal
2. Run the following command (replace with your email):
```bash
ssh-keygen -t ed25519 -C "your_email@example.com"
```
3. When prompted to "Enter a file in which to save the key," press Enter to accept the default location
4. Set a secure passphrase when prompted (recommended)
5. Your new SSH key pair is now generated
To view your public key, run:
```bash
cat ~/.ssh/id_ed25519.pub
```
This will display your public key, which should begin with `ssh-ed25519` followed by a string of characters and your email.
#### Creating an SSH Key on Windows
1. Open Git Bash (install Git for Windows if you haven't already)
2. Run the following command (replace with your email):
```bash
ssh-keygen -t ed25519 -C "your_email@example.com"
```
3. When prompted to "Enter a file in which to save the key," press Enter to accept the default location
4. Set a secure passphrase when prompted (recommended)
5. Your new SSH key pair is now generated
To view your public key, run:
```bash
cat ~/.ssh/id_ed25519.pub
```
This will display your public key, which should begin with `ssh-ed25519` followed by a string of characters and your email.
### Setting Your SSH Key in Morph Cloud
1. Copy your entire public key (including `ssh-ed25519` at the beginning and your email at the end)
2. Go to the SSH Keys page at [https://cloud.morph.so/web/ssh](https://cloud.morph.so/web/ssh)
3. Paste your public key into the "New SSH Key" text box
4. Click the "Set SSH Key" button
5. Your new key will replace any previously set key and appear in the "Current SSH Key" section
## Important Notes
- Morph Cloud only supports one SSH key per account/org at a time
- Setting a new SSH key will replace your existing key
- If you change your SSH key, you'll need to update any systems or workflows that use the previous key
---
---
id: snapshots
title: Snapshot Management
sidebar_label: Snapshots
description: "Create, list, and manage snapshots to capture instance state and use snapshots as templates for new instances."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Snapshot Management
### Create a Snapshot from an Instance
You can create a snapshot from a running instance to save its current state.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Create a snapshot
snapshot = instance.snapshot()
print(f"Snapshot ID: {snapshot.id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function createSnapshot() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Create a snapshot
const snapshot = await instance.snapshot();
console.log(`Snapshot ID: ${snapshot.id}`);
}
createSnapshot();
```
```bash
# Create a snapshot from an instance
morphcloud instance snapshot instance_your_instance_id
```
### List Snapshots
You can get a list of all snapshots you've created.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshots = client.snapshots.list()
for snapshot in snapshots:
print(f"ID: {snapshot.id}, Created At: {snapshot.created}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function listSnapshots() {
const snapshots = await client.snapshots.list();
snapshots.forEach(snapshot => {
console.log(`ID: ${snapshot.id}, Created At: ${snapshot.created}`);
});
}
listSnapshots();
```
```bash
# List all snapshots
morphcloud snapshot list
```
### Get Snapshot Details
You can retrieve detailed information about a specific snapshot.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
snapshot = client.snapshots.get(snapshot_id=snapshot_id)
print(f"Snapshot ID: {snapshot.id}")
print(f"Created At: {snapshot.created}")
print(f"Metadata: {snapshot.metadata}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function getSnapshotDetails() {
const snapshot_id = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
const snapshot = await client.snapshots.get({ snapshot_id: snapshot_id });
console.log(`Snapshot ID: ${snapshot.id}`);
console.log(`Created At: ${snapshot.created}`);
console.log(`Metadata: ${JSON.stringify(snapshot.metadata)}`);
}
getSnapshotDetails();
```
```bash
# Get snapshot details
morphcloud snapshot get snapshot_your_snapshot_id
```
### Set Snapshot Metadata
You can add metadata to snapshots for organization and search purposes.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
snapshot = client.snapshots.get(snapshot_id=snapshot_id)
# Set metadata
snapshot.set_metadata({"environment": "production", "version": "1.0.0"})
print(f"Snapshot '{snapshot_id}' metadata updated: {snapshot.metadata}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function setSnapshotMetadata() {
const snapshot_id = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
const snapshot = await client.snapshots.get({ snapshot_id: snapshot_id });
// Set metadata
await snapshot.setMetadata({ environment: "production", version: "1.0.0" });
console.log(`Snapshot '${snapshot_id}' metadata updated: ${JSON.stringify(snapshot.metadata)}`);
}
setSnapshotMetadata();
```
```bash
# Set snapshot metadata
morphcloud snapshot set-metadata snapshot_your_snapshot_id --metadata '{"environment":"production","version":"1.0.0"}'
```
### Delete a Snapshot
When you no longer need a snapshot, you can delete it.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot_id = "snapshot_your_snapshot_id" # Replace with a valid snapshot ID
snapshot = client.snapshots.get(snapshot_id=snapshot_id)
snapshot.delete()
print(f"Snapshot {snapshot_id} has been deleted")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient();
async function deleteSnapshot() {
const snapshot_id = "snapshot_your_snapshot_id"; // Replace with a valid snapshot ID
const snapshot = await client.snapshots.get({ snapshot_id: snapshot_id });
await snapshot.delete();
console.log(`Snapshot ${snapshot_id} has been deleted`);
}
deleteSnapshot();
```
```bash
# Delete a snapshot
morphcloud snapshot delete snapshot_your_snapshot_id
```
---
---
id: ssh-access
title: SSH Access
sidebar_label: SSH Access
description: "Retrieve instance SSH keys, connect via the CLI or SSH, and rotate keys for secure access."
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## SSH Access
### Getting SSH Key
To connect to your instance via SSH, you first need to get the SSH key.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Get SSH key
ssh_key = instance.get_ssh_key()
print(f"SSH Key: {ssh_key}")
print(f"To connect: ssh -i /path/to/key root@{instance.id}.instance.morphcloud.io")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
import * as fs from 'fs';
const client = new MorphCloudClient();
async function getSSHKey() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Get SSH key
const sshKey = await instance.getSSHKey();
// Save key to file (optional)
fs.writeFileSync('/path/to/morph_key', sshKey, { mode: 0o600 });
console.log(`SSH Key saved to /path/to/morph_key`);
console.log(`To connect: ssh -i /path/to/morph_key root@${instance.id}.instance.morphcloud.io`);
}
getSSHKey();
```
```bash
# Get SSH key and save to a file
morphcloud instance ssh-key instance_your_instance_id > ~/.ssh/morph_key
chmod 600 ~/.ssh/morph_key
# Connect to the instance (the CLI can also do this for you directly)
ssh -i ~/.ssh/morph_key root@instance_your_instance_id.instance.morphcloud.io
```
### Direct SSH Access
The CLI provides a convenient command to directly SSH into your instance without manually managing keys.
```bash
# SSH directly into the instance
morphcloud instance ssh instance_your_instance_id
# Execute a command directly via SSH without interactive login
morphcloud instance ssh instance_your_instance_id -- ls -la /tmp
```
### Rotating SSH Keys
For security, you may want to rotate the SSH key for an instance.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
instance_id = "instance_your_instance_id" # Replace with a valid instance ID
instance = client.instances.get(instance_id=instance_id)
# Rotate the SSH key
new_ssh_key = instance.rotate_ssh_key()
print(f"New SSH Key: {new_ssh_key}")
```
```typescript
import { MorphCloudClient } from 'morphcloud'; // adjust import path if needed
const client = new MorphCloudClient();
async function rotateSSHKey() {
const instance_id = "instance_your_instance_id"; // Replace with a valid instance ID
const instance = await client.instances.get({ instance_id: instance_id });
// Rotate the SSH key
const newSSHKey = await instance.rotateSSHKey();
console.log(`New SSH Key generated for instance ${instance_id}`);
}
rotateSSHKey();
```
```bash
# Rotate the SSH key and save to a file
morphcloud instance rotate-ssh-key instance_your_instance_id > ~/.ssh/morph_key_new
chmod 600 ~/.ssh/morph_key_new
```
### Using SSH Config for Easy Access
You can set up your SSH config file for easier access to your instances.
```bash
# Example SSH config entry for Morph Cloud instances
cat << EOF >> ~/.ssh/config
Host *.instance.morphcloud.io
User root
IdentityFile ~/.ssh/morph_key
StrictHostKeyChecking no
EOF
# Now you can SSH directly using the instance ID
ssh instance_your_instance_id.instance.morphcloud.io
```
---
---
id: auto-scale-agent-workspaces
title: Auto-Scale-to-Zero Agent Workspaces
sidebar_label: Auto-Scale Agent Workspaces
description: Build auto-scale-to-zero agent workspaces using TTL and wake-on-request to pause idle instances and resume instantly on HTTP or SSH-backed access such as exec.
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Auto-Scale-to-Zero Agent Workspaces
This guide shows how to combine TTL (time-to-live) with wake-on-request to create agent workspaces that automatically pause ("scale to zero") after a period of inactivity and instantly rehydrate on the next HTTP request, `exec` call, or SSH attempt.
:::tip Devboxes vs instances
If your goal is a developer/agent **workspace** (VSCode/Cursor, tmux agents, easy preview URLs), start with **Devboxes**: [Getting started](/devboxes/getting-started).
This page focuses on **instance primitives** (fine-grained control), which is often the right choice for advanced fan-out workflows.
:::
## Overview
Auto-scaling agent workspaces behave like "serverless VMs":
- Zero compute charges while idle
- Instant resume on demand with preserved memory state
- Automatic pause after configurable inactivity period
- Seamless rehydration for users
## Configuration Components
### 1. TTL (Time-to-Live)
Configure how long an instance runs before taking action:
- **`ttl_seconds`**: Duration before the instance expires
- **`ttl_action`**: What the instance does when it expires, one of:
- `"pause"` - Pauses the instance with full memory state, allowing for instant resume.
- `"stop"` - Deletes the instance.
TTL can be set when starting an instance or updated on a running instance.
### 2. Wake-on-Request
Enable automatic resume when a paused instance receives:
- HTTP requests to an exposed service
- SSH-backed access, including direct SSH connection attempts and SDK, CLI, or REST `exec` calls
Both `wake_on_http` and `wake_on_ssh` can be configured independently. There is no separate wake-on-exec flag; `wake_on_ssh` covers exec-driven agent traffic.
:::tip
For wake-on-HTTP to work, you must expose a service from inside the instance (e.g., your agent's web server). The platform provides a public URL when you expose a service.
:::
## Implementation Recipe
### Step 1: Start with TTL
Start your agent workspace with a TTL window and pause action:
```python
from morphcloud.api import MorphCloudClient
import os
client = MorphCloudClient(api_key=os.getenv("MORPH_API_KEY"))
# Start instance with 15-minute TTL that pauses on expiry
instance = client.instances.start(
snapshot_id="snapshot_your_snapshot_id",
ttl_seconds=15 * 60, # 15 minutes
ttl_action="pause"
)
print(f"Instance started: {instance.id}")
```
```typescript
import { MorphCloudClient } from 'morphcloud';
const client = new MorphCloudClient({
apiKey: process.env.MORPH_API_KEY
});
async function startAgentWorkspace() {
// Start the instance, then configure a 15-minute TTL that pauses on expiry
const instance = await client.instances.start({
snapshotId: "snapshot_your_snapshot_id"
});
await client.POST(`/instance/${instance.id}/ttl`, {}, {
ttl_seconds: 15 * 60,
ttl_action: "pause"
});
console.log(`Instance started: ${instance.id}`);
return instance;
}
```
### Step 2: Expose HTTP Service
Expose your agent's HTTP service to get a public URL:
```python
# Expose agent service running on port 8080
service = instance.expose_http_service("agent", 8080)
print(f"Agent URL: {service.url}")
```
```typescript
// Expose agent service running on port 8080
const service = await instance.exposeHttpService("agent", 8080);
console.log(`Agent URL: ${service.url}`);
```
### Step 3: Enable Wake-on-Request
Configure automatic wake for both HTTP and SSH. `wake_on_ssh` also covers `exec`-driven agent interactions:
```python
# Enable wake-on for both HTTP and SSH
instance.set_wake_on(wake_on_http=True, wake_on_ssh=True)
```
```typescript
// Enable wake-on for both HTTP and SSH-backed exec traffic
await client.POST(`/instance/${instance.id}/wake-on`, {}, {
wake_on_http: true,
wake_on_ssh: true
});
```
### Step 4: Implement Sliding TTL (Optional)
Keep the instance warm during active use by refreshing TTL on each interaction:
```python
def touch_ttl(instance, seconds=15 * 60):
"""
Refresh TTL after handling user requests to keep session warm.
Instance only pauses after a period of inactivity.
"""
instance.set_ttl(ttl_seconds=seconds, ttl_action="pause")
# Example usage in your request handler:
def handle_request(request):
# Process the request...
result = process_agent_request(request)
# Refresh TTL to keep instance warm
touch_ttl(instance)
return result
```
```typescript
async function touchTTL(client: MorphCloudClient, instanceId: string, seconds = 15 * 60) {
/**
* Refresh TTL after handling user requests to keep session warm.
* Instance only pauses after a period of inactivity.
*/
await client.POST(`/instance/${instanceId}/ttl`, {}, {
ttl_seconds: seconds,
ttl_action: "pause"
});
}
// Example usage in your request handler:
async function handleRequest(request: Request) {
// Process the request...
const result = await processAgentRequest(request);
// Refresh TTL to keep instance warm
await touchTTL(client, instance.id);
return result;
}
```
## Complete Example
Here's a full implementation of an auto-scaling agent workspace:
```python
import os
from morphcloud.api import MorphCloudClient
class AutoScalingAgent:
def __init__(self, snapshot_id: str, ttl_minutes: int = 15):
self.client = MorphCloudClient(api_key=os.getenv("MORPH_API_KEY"))
self.snapshot_id = snapshot_id
self.ttl_seconds = ttl_minutes * 60
self.instance = None
def start(self):
"""Start the agent workspace with auto-scaling configuration."""
# 1. Start instance with TTL
self.instance = self.client.instances.start(
snapshot_id=self.snapshot_id,
ttl_seconds=self.ttl_seconds,
ttl_action="pause"
)
print(f"Instance started: {self.instance.id}")
# 2. Expose HTTP service (agent on port 8080)
service = self.instance.expose_http_service("agent", 8080)
print(f"Agent URL: {service.url}")
# 3. Enable wake-on-request
self.instance.set_wake_on(
wake_on_http=True,
wake_on_ssh=True
)
print("Wake-on-request enabled for HTTP and SSH-backed exec access")
return service.url
def refresh_ttl(self):
"""Refresh TTL to keep instance warm during activity."""
if self.instance:
self.instance.set_ttl(
ttl_seconds=self.ttl_seconds,
ttl_action="pause"
)
# Usage
agent = AutoScalingAgent("snapshot_your_snapshot_id", ttl_minutes=15)
agent_url = agent.start()
# In your request handler, refresh TTL on each interaction:
# agent.refresh_ttl()
```
```typescript
import { MorphCloudClient } from 'morphcloud';
class AutoScalingAgent {
private client: MorphCloudClient;
private snapshotId: string;
private ttlSeconds: number;
private instance?: Awaited>;
constructor(snapshotId: string, ttlMinutes: number = 15) {
this.client = new MorphCloudClient({
apiKey: process.env.MORPH_API_KEY
});
this.snapshotId = snapshotId;
this.ttlSeconds = ttlMinutes * 60;
}
async start(): Promise {
// 1. Start instance and configure TTL
this.instance = await this.client.instances.start({
snapshotId: this.snapshotId
});
await this.client.POST(`/instance/${this.instance.id}/ttl`, {}, {
ttl_seconds: this.ttlSeconds,
ttl_action: "pause"
});
console.log(`Instance started: ${this.instance.id}`);
// 2. Expose HTTP service (agent on port 8080)
const service = await this.instance.exposeHttpService("agent", 8080);
console.log(`Agent URL: ${service.url}`);
// 3. Enable wake-on-request
await this.client.POST(`/instance/${this.instance.id}/wake-on`, {}, {
wake_on_http: true,
wake_on_ssh: true
});
console.log("Wake-on-request enabled for HTTP and SSH-backed exec access");
return service.url;
}
async refreshTTL(): Promise {
if (this.instance) {
await this.client.POST(`/instance/${this.instance.id}/ttl`, {}, {
ttl_seconds: this.ttlSeconds,
ttl_action: "pause"
});
}
}
}
// Usage
const agent = new AutoScalingAgent("snapshot_your_snapshot_id", 15);
const agentUrl = await agent.start();
// In your request handler, refresh TTL on each interaction:
// await agent.refreshTTL();
```
## Best Practices
### Expose Services for Wake-on-HTTP
Wake-on-HTTP requires an exposed service. If no service is exposed, the platform has nothing to route requests to and cannot trigger a wake.
### Implement Sliding TTL for Activity-Based Scaling
Call the TTL update endpoint after each successful interaction to effectively pause the VM only after a period of inactivity rather than a fixed time window.
### Monitor Instance State
Keep track of your instance state to handle edge cases gracefully:
```python
# Check instance state before operations
instance = client.instances.get(instance_id)
if instance.status == "paused":
print("Instance is paused, and will wake on the next HTTP request, exec call, or SSH attempt if wake-on-request is enabled")
elif instance.status == "running":
print("Instance is active")
```
## API Reference
### Update TTL
- **Endpoint**: `POST /instance/:instance_id/ttl`
- **Purpose**: Update the TTL of a running instance
### Configure Wake-on-Request
- **Endpoint**: `POST /instance/:instance_id/wake-on`
- **Purpose**: Enable wake on HTTP plus SSH-backed access such as exec for a paused instance
### Instance Not Waking on Exec
- Check that `wake_on_ssh` is enabled
- Confirm your workflow is using `instance.exec(...)`, `morphcloud instance exec`, or the exec API rather than a separate custom transport
- If the instance is paused, retry after the wake-up delay that follows the first exec-triggered resume
### Expose HTTP Service
- **Endpoint**: `POST /instance/:instance_id/http`
- **Purpose**: Create a public URL for your agent service
## Troubleshooting
### Instance Not Waking on HTTP Request
- Verify that you've exposed an HTTP service using `expose_http_service()`
- Check that `wake_on_http` is enabled
- Ensure the service inside the instance is running on the exposed port
### Instance Pausing Too Quickly
- Increase the `ttl_seconds` value
- Implement sliding TTL to refresh on each user interaction
### High Latency on First Request After Pause
- This is normal for the first request that triggers a wake
- Consider keeping instances warm during peak hours with longer TTL values
With this setup, your agent workspaces behave like serverless infrastructure: zero compute costs while idle, with instant resume on demand.
---
---
title: AI-Powered Development with Claude Code
description: Launch cloud development environments with Claude Code AI assistance
---
# AI-Powered Development with Claude Code on Morph Cloud
**tl;dr** Launch cloud development environments with Claude Code AI assistance. Use **Devboxes** for the fastest path to a shareable, persistent workspace—or use **instances/snapshots** if you need VM primitives.

## Prerequisites
### Install the Morph Cloud SDK
To get started, install the Morph Python SDK:
```bash
uv pip install morphcloud
```
### Set your API key
```bash
export MORPH_API_KEY='your-key-here'
```
You can generate an API key in the [Morph Cloud console](https://cloud.morph.so/).
## Recommended: Claude Code in a Devbox (workspace)
Devboxes are the best default for Claude Code because they're designed for development:
- one-click VSCode/Cursor access
- SSH when you need it
- tmux integration for CLI agents (and human-in-the-loop workflows)
If Claude Code needs to self-manage the current devbox through `morphcloud-devbox-service`, use a least-privilege [agent token](/devboxes/agent-tokens) instead of handing the session a broad `MORPH_API_KEY`.
### Quick start (dashboard)
1. Create a devbox: https://cloud.morph.so/web/devboxes/new
2. Open it in VSCode/Cursor (or SSH into it)
3. Install Claude Code in the devbox and start a tmux session for your agent
4. Share the devbox or preview URLs with your team inside your organization
### Quick start (CLI)
```bash
export MORPH_API_KEY="..."
morphcloud devbox template list
TEMPLATE_ID=""
DEVBOX_ID=$(
morphcloud devbox start "$TEMPLATE_ID" --name "claude-dev" --json | jq -r '.id'
)
# Install claude-code and dev tooling inside the devbox
morphcloud devbox ssh "$DEVBOX_ID" bash -lc "sudo apt update && sudo apt install -y git gh nodejs npm tmux"
morphcloud devbox ssh "$DEVBOX_ID" bash -lc "npm install -g @anthropic-ai/claude-code"
```
## Power users: VM primitives (instances + snapshots)
Here's the complete setup script for Claude Code development:
```python
# claude_dev_setup.py
from morphcloud.api import MorphCloudClient
def setup_claude_dev_environment():
client = MorphCloudClient()
# Create a new instance
instance = client.instances.start()
print(f"Instance started: {instance.id}")
# Install Claude Code CLI
instance.exec("curl -fsSL https://claude.ai/install.sh | sh")
instance.exec("npm install -g @anthropic-ai/claude-code")
# Install development tools
instance.exec("sudo apt update")
instance.exec("sudo apt install -y git gh nodejs npm python3 python3-pip tmux")
# Configure Git and GitHub CLI
instance.exec("git config --global init.defaultBranch main")
# Set up workspace directory
instance.exec("mkdir -p /workspace")
instance.exec("cd /workspace")
# Configure Claude Code with API key
instance.exec("echo 'export ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY' >> ~/.bashrc")
# Create tmux session for Claude
instance.exec("tmux new-session -d -s claude-session")
# Create snapshot
snapshot = instance.snapshot()
print(f"Snapshot created: {snapshot.id}")
return snapshot.id
if __name__ == "__main__":
snapshot_id = setup_claude_dev_environment()
print(f"Setup complete! Use snapshot ID: {snapshot_id}")
```
## Installation
```bash
# Install dependencies
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.local/bin/env
uv venv && source .venv/bin/activate
uv pip install morphcloud
# Set your API keys
export MORPH_API_KEY='your-key-here'
export ANTHROPIC_API_KEY='your-claude-key-here'
# Run the setup script
uv run python claude_dev_setup.py
```
The setup script will:
1. Create or reuse a base MorphVM snapshot
2. Launch a new instance
3. Install and configure Claude Code CLI
4. Set up development tools (Git, GitHub CLI, Node.js, Python)
5. Configure persistent tmux sessions
6. Expose the environment via SSH
Once the initial setup is complete, launching new Claude Code instances takes just seconds, enabling:
- Instant AI-powered development environments
- Perfect state preservation via Morph Cloud snapshots
- Isolated development sessions for different projects
---
---
id: configurable-reboot
title: Scale Up/Down With Configurable Reboot
sidebar_label: Configurable Reboot
description: Change an instance’s CPU, memory, and disk size via configurable reboot while preserving disk contents, instance ID, and URLs.
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Scale Up/Down With Configurable Reboot
Configurable reboot lets you change an instance's CPU, memory, and disk size while preserving its filesystem. Under the hood, Morph snapshots the current state and cold‑boots with the new machine configuration, keeping your on‑disk changes (e.g., package installs) intact.
## TL;DR
- Reboot with new resources, keep the same instance ID and disk contents.
- Great for “burst to build, shrink to serve” workflows.
- Combine with systemd for automatic tasks at boot.
## CLI Examples
Scale up to a larger build machine, then scale down for serving.
```bash
# Scale UP for builds (16 vCPU, 32 GiB RAM, 64 GiB disk)
morphcloud instance reboot inst_123 \
--vcpus 16 --memory 32768 --disk-size 65536 \
-m role=build -m stage=compile
# ... run your build inside the instance ...
# Scale DOWN for deployment (1 vCPU, 2 GiB RAM, 64 GiB disk)
morphcloud instance reboot inst_123 \
--vcpus 1 --memory 2048 --disk-size 65536 \
-m role=serve -m stage=run
```
Optional TTL to avoid lingering on large specs:
```bash
# Keep big machine for 30 minutes, then pause
morphcloud instance reboot inst_123 \
--vcpus 16 --memory 32768 --disk-size 65536 \
--ttl-seconds 1800 --ttl-action pause
```
:::tip
Disk size is specified in MiB. Keep disk size consistent (e.g., `65536`) across reboots if you don’t need to change storage.
:::
## Python SDK Example
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
inst = client.instances.get("inst_123")
# Burst to build
inst.reboot(vcpus=16, memory=32_768, disk_size=65_536, metadata={"role": "build"})
# ... run build steps via SSH/exec ...
# Shrink to serve
inst.reboot(vcpus=1, memory=2_048, disk_size=65_536, metadata={"role": "serve"})
```
## Use With systemd
Run setup/build tasks automatically on boot with a one‑shot `systemd` service.
```ini title="/etc/systemd/system/app-boot.service"
[Unit]
Description=App build/deploy tasks at boot
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=root
WorkingDirectory=/root/app
ExecStart=/usr/local/bin/app-bootstrap.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
```
Enable and test:
```bash
chmod +x /usr/local/bin/app-bootstrap.sh
systemctl enable app-boot.service
systemctl start app-boot.service # run now
# After each configurable reboot, systemd runs it again at boot
```
:::tip Script outline
- Detect role via instance metadata or env (e.g., `role=build` vs `role=serve`).
- For build role: pull deps, compile artifacts, populate cache.
- For serve role: run migrations, start supervisor, health checks.
:::
## Recommended Workflow
1) Start small (e.g., 1 vCPU / 2 GiB / 64 GiB).
2) When you need to build:
```bash
morphcloud instance reboot inst_123 \
--vcpus 16 --memory 32768 --disk-size 65536 \
-m role=build
```
3) Your `app-boot.service` performs build steps at boot (cache warmup, compile, container image build, etc.).
4) After build completes, shrink back down:
```bash
morphcloud instance reboot inst_123 \
--vcpus 1 --memory 2048 --disk-size 65536 \
-m role=serve
```
5) Optionally combine with TTL and wake‑on for cost control:
```bash
# Auto-pause while idle and instantly resume on HTTP/SSH
morphcloud instance set-wake-on inst_123 --wake-on-http --wake-on-ssh
morphcloud instance set-ttl inst_123 --ttl-seconds 900 --ttl-action pause
```
## Notes & Guarantees
- Filesystem is preserved: reboot snapshots the current state before restarting with new resources.
- Instance ID remains the same; URLs and service bindings continue to work.
- Resource/billing accounting updates to reflect the new spec after reboot.
---
---
title: Docker BuildKit Environment
description: Launch optimized Docker environments with BuildKit
---
# Docker BuildKit on Morph Cloud
**tl;dr** Launch optimized Docker environments with BuildKit enabled on Morph Cloud. Use **Devboxes** for developer-friendly prototyping and shareable previews, or use **instances/snapshots** for VM primitives.

## Prerequisites
### Install the Morph Cloud SDK
To get started, install the Morph Python SDK:
```bash
uv pip install morphcloud
```
### Set your API key
```bash
export MORPH_API_KEY='your-key-here'
```
You can generate an API key in the [Morph Cloud console](https://cloud.morph.so/).
## Quick Start
Launch optimized Docker environments with BuildKit enabled for faster, more efficient container builds. Perfect for CI/CD pipelines and development workflows.
:::tip Devboxes for prototyping
If you’re iterating on an app/service and want a quick shareable URL, start with [Devboxes](/devboxes/prototyping) and treat BuildKit as tooling inside your devbox.
:::
**[📁 Complete Docker BuildKit Example](https://github.com/morph-labs/morphcloud-examples-public/blob/main/docker-buildkit/docker-buildkit_setup.py)**
The example includes:
- Docker installation with BuildKit configuration
- Multi-stage Dockerfile with parallel builds
- Health check and web server setup
- Service exposure and URL management
- Snapshot creation for reusable environments
## Getting Started
```bash
# Install dependencies
uv pip install morphcloud
# Set your API key
export MORPH_API_KEY='your-key-here'
# Clone and run the complete example
git clone https://github.com/morph-labs/morphcloud-examples-public.git
cd morphcloud-examples-public/docker-buildkit
python docker-buildkit_setup.py
```
Once setup is complete, you can launch new instances instantly from the created snapshot for parallel build testing and isolated Docker environments.
---
---
title: Remote Desktop Environment
description: Launch browser-based Linux desktop environments
---
# Browser-Based Remote Desktop on Morph Cloud
**tl;dr** Launch full Linux desktop environments in your browser. For the fastest path to a shareable desktop preview, use **Devboxes** (workspaces); for low-level control, use **instances/snapshots** primitives.

## Prerequisites
### Install the Morph Cloud SDK
To get started, install the Morph Python SDK:
```bash
uv pip install morphcloud
```
### Set your API key
```bash
export MORPH_API_KEY='your-key-here'
```
You can generate an API key in the [Morph Cloud console](https://cloud.morph.so/).
## Quick Start
Launch full Linux desktop environments accessible through your web browser. Perfect for development, testing, and remote work scenarios.
:::tip Recommended: Devboxes for prototyping + sharing
Devboxes make it easy to expose and share an interactive preview URL. See [Devboxes → Prototyping](/devboxes/prototyping).
:::
**[📁 Complete Remote Desktop Example](https://github.com/morph-labs/morphcloud-examples-public/blob/main/remote-desktop/remote-desktop_setup.py)**
The example includes:
- Full XFCE desktop environment setup
- VNC server configuration
- noVNC web interface for browser access
- Service exposure and URL management
- Snapshot creation for reusable desktop environments
## Getting Started
```bash
# Install dependencies
uv pip install morphcloud
# Set your API key
export MORPH_API_KEY='your-key-here'
# Clone and run the complete example
git clone https://github.com/morph-labs/morphcloud-examples-public.git
cd morphcloud-examples-public/remote-desktop
python remote-desktop_setup.py
```
Once setup is complete, you can launch new desktop instances instantly from the created snapshot for parallel testing and isolated desktop environments.
---
---
id: resizing-instances
title: Resizing Instances
sidebar_label: Resizing Instances
description: Resize Morph Cloud instances by rebooting with new CPU, memory, and disk while keeping the same instance ID, filesystem, and URLs.
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Resizing Instances
Resizing lets you change an instance's CPU, memory, and disk size while preserving its filesystem and identity. Use a big machine to compile and test quickly, then resize down to a smaller footprint for serving—without baking new images or swapping instance IDs.
Under the hood, Morph preserves your on‑disk changes and restarts with the new resources. URLs, exposed services, and the instance ID stay the same.
## Typical Workflow: Burst to Build, Shrink to Serve
1) Scale up for builds and CI workloads
```bash
morphcloud instance reboot inst_123 \
--vcpus 16 --memory 32768 --disk-size 65536 \
-m role=build -m stage=compile
```
2) Run your build and validation tasks (via SSH or `morphcloud instance exec`).
3) Scale down for deployment
```bash
morphcloud instance reboot inst_123 \
--vcpus 1 --memory 2048 --disk-size 65536 \
-m role=serve -m stage=run
```
:::tip Cost control
Add a TTL while scaled up so large machines don't linger.
```bash
morphcloud instance reboot inst_123 \
--vcpus 16 --memory 32768 --disk-size 65536 \
--ttl-seconds 1800 --ttl-action pause
```
:::
## Use With systemd
Trigger setup or build steps automatically at boot using a one‑shot `systemd` service.
```ini title="/etc/systemd/system/app-boot.service"
[Unit]
Description=App build/deploy tasks at boot
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=root
WorkingDirectory=/root/app
ExecStart=/usr/local/bin/app-bootstrap.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
```
Enable and test:
```bash
chmod +x /usr/local/bin/app-bootstrap.sh
systemctl enable app-boot.service
systemctl start app-boot.service # run now
# After each resize (via reboot), systemd runs it again at boot
```
:::tip Script outline
- Detect the desired role via instance metadata (e.g., `role=build` vs `role=serve`).
- For build role: pull deps, compile artifacts, populate cache.
- For serve role: apply migrations, warm caches, start your supervisor.
:::
## SDK Example (Python)
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
inst = client.instances.get("inst_123")
# Burst to build
inst.reboot(vcpus=16, memory=32_768, disk_size=65_536, metadata={"role": "build"})
# ... run build steps via SSH/exec ...
# Shrink to serve
inst.reboot(vcpus=1, memory=2_048, disk_size=65_536, metadata={"role": "serve"})
```
## Guarantees
- Filesystem is preserved across the resize.
- Instance ID and URLs remain stable; exposed services continue to work.
- Resource/billing accounting updates to the new spec immediately after the resize.
---
---
id: snapshot-build-caching
title: Layered Snapshot Builds with Infinibranch
sidebar_label: Snapshot Build Caching
description: Use Snapshot.build() and Infinibranch snapshots as a layered build cache—like Docker layers—to speed up rebuilds and enable fast rollbacks.
---
# Layered Snapshot Builds with Infinibranch
`Snapshot.build(...)` from the `morphcloud.api` module lets you treat Morph Cloud snapshots like Docker layers. You describe a sequence of effects—shell commands or Python callables—and Morph Cloud snapshots the machine after each step. The SDK automatically reuses the longest cached prefix (via Infinibranch snapshots), which means subsequent runs skip straight to the first new step.
This guide walks through two caching-heavy workflows:
- Pulling a remote version number at runtime to decide whether a cache should be reused or expanded.
- Spawning multiple branch-specific snapshots that share a long common prefix so you can roll back experiments instantly.
## Prerequisites
- Install the SDK: `pip install morphcloud`
- Set the `MORPH_API_KEY` environment variable.
- Have a "builder" snapshot ID you want to extend—typically a base OS image or an application bootstrap snapshot.
## Understand `Snapshot.build`
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
base = client.snapshots.get("snapshot_base_id")
recipe = [
"apt-get update && apt-get install -y curl jq", # shell command step
lambda inst: inst.exec(["bash", "-lc", "mkdir -p /opt/app"]), # python callable step
]
final_snapshot = base.build(recipe)
print(final_snapshot.id)
```
Each entry in `recipe` becomes a layer:
- Strings run as foreground shell commands (`instance.exec` behind the scenes).
- Callables receive the running `Instance` object so you can use Python for richer logic (file uploads, API calls, conditional behavior).
When you rerun `base.build(recipe)` the SDK checks, step by step, for existing snapshots with the same digest. Matching layers are skipped and the cached snapshot at the end of the prefix becomes the new starting point.
:::tip
Treat your step list like a Dockerfile. Put the most stable layers first, and reserve the last steps for volatile configuration so the expensive work stays cached.
:::
## Use case A — Cache Busting with Remote Version Numbers
Imagine a CLI bundle published at `https://releases.example.com/mycli/latest.json`. The JSON looks like `{ "version": "1.24.0", "tarball": "https://.../mycli-1.24.0.tar.gz" }`. You want a snapshot that always contains the newest CLI, but only rebuilds when the version changes.
```python
import os
import requests
from morphcloud.api import MorphCloudClient
client = MorphCloudClient(api_key=os.environ["MORPH_API_KEY"])
builder = client.snapshots.get("snapshot_builder_id")
release = requests.get(
"https://releases.example.com/mycli/latest.json", timeout=5
).json()
version = release["version"]
tarball_url = release["tarball"]
steps = [
"apt-get update && apt-get install -y curl tar", # stays cached for months
lambda inst: inst.exec("mkdir -p /opt/mycli"),
# The command embeds the resolved version: if the version changes, so does the digest.
f"curl -fsSL {tarball_url} -o /opt/mycli/mycli-{version}.tar.gz",
f"tar -xzf /opt/mycli/mycli-{version}.tar.gz -C /opt/mycli",
f"ln -sfn /opt/mycli/mycli-{version} /usr/local/bin/mycli",
]
snapshot = builder.build(steps)
print(f"Snapshot {snapshot.id} now carries mycli {version}")
```
### Why this works
- The remote version is resolved before you build. Including the `version` string inside the command means the step digest changes whenever a new release ships.
- If `version` is unchanged, the digest matches a cached snapshot and the build skips the download and extraction entirely.
- When the version bumps, only the download and extraction steps rerun; everything before them (OS updates, directory scaffolding) remains cached.
### Optional: Guard rails with callable steps
You can wrap the version download in a callable to add validation or fallback logic using the same `Instance.exec` API that backs normal shell steps:
```python
from functools import partial
def ensure_supported_release(inst, version: str):
resp = inst.exec([
"bash",
"-lc",
f"grep -q '{version}' /opt/mycli/compat-matrix.txt || exit 42",
])
if resp.exit_code == 42:
raise RuntimeError(f"{version} is not yet approved for production")
steps.insert(2, partial(ensure_supported_release, version=version))
```
If the callable raises an exception, `Snapshot.build` stops the instance and surfaces the traceback, so failed builds behave just like a broken Docker layer.
## Use case B — Branch Rollbacks with Shared Prefixes
Suppose your product lets teams live-edit a "vibe coding" workspace. You keep a golden base snapshot with build tools, and on demand you branch into customer-specific variants (e.g., `main`, `feature/darker-theme`, `rollback/v1.3`). The majority of the setup is identical—only the final `git checkout` and configuration diverge.
```python
COMMON_STEPS = [
"apt-get update && apt-get install -y git nodejs", # heavy work cached once
"mkdir -p /var/vibe",
"git clone https://github.com/example/vibe-app.git /var/vibe/src",
"cd /var/vibe/src && npm ci",
]
BRANCH_STEP = "cd /var/vibe/src && git checkout {branch}"
CONFIG_STEP = "cd /var/vibe/src && npm run build"
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
seed = client.snapshots.get("snapshot_seed_id")
# Prime the cache (happens once) so the heavy dependency work is frozen.
base = seed.build(COMMON_STEPS)
branches = ["main", "feature/darker-theme", "rollback/v1.3"]
results = {}
for branch in branches:
steps = [
BRANCH_STEP.format(branch=branch),
CONFIG_STEP,
f"echo 'branch={branch}' > /var/vibe/.active-branch",
]
snap = base.build(steps)
results[branch] = snap.id
print(f"Prepared {branch} → snapshot {snap.id}")
```
### What happens under the hood
1. The first call to `seed.build(COMMON_STEPS)` produces a snapshot whose digest encodes every setup step. Subsequent builds recognize that digest and skip straight to the branch-specific commands.
2. Switching to `feature/darker-theme` only executes the `git checkout`, build artifacts, and branch marker. The clone, dependency install, and other heavy steps are reused instantly.
3. Rolling back to `main` later revives the cached snapshot tail for `BRANCH_STEP` + `CONFIG_STEP`, so the entire environment flips branches in seconds.
Because every branch snapshot inherits from the same cached prefix, you can explore ideas fearlessly—rollback just means pointing your deployment at a different snapshot ID. No long rebuilds, no duplication of the heavy setup work.
:::note
For large teams, store the branch → snapshot mapping in metadata (`snapshot.set_metadata`) so orchestration code can discover and reuse the right snapshot automatically.
:::
## Next steps
- Combine `Snapshot.build` with `Snapshot.tag("vibe-app:branch-name")` to label the latest artifact.
- Use the returned snapshot IDs to `instances.start` new replicas or pipe them into a deployment pipeline.
- Add branch-specific verification steps (unit tests, smoke checks) as final callables so cached layers only graduate when they pass.
Infinibranch snapshots give you Docker-like ergonomics across any Morph Cloud workflow: define layers once, share them everywhere, and let `Snapshot.build` keep the cache hot.
---
---
description: Answers to common Morph Cloud questions—instances vs snapshots, branching, pause vs stop, SSH, HTTP services, and SDK usage.
---
# Frequently Asked Questions
## Getting Started
### What is MorphCloud?
MorphCloud provides virtual machines (instances) that run from saved snapshots. Each instance is a VM that you can create, manage, and interact with programmatically.
See our [documentation overview](/docs/documentation/overview) and [basic instance operations](/docs/documentation/instances/basic-lifecycle) for more details.
### How do I get started?
1. [Sign up for an account](/docs/documentation/setup/signing-up) at cloud.morph.so
2. [Install the SDK](/docs/documentation/setup/installation-guide) (Python, TypeScript, or CLI)
3. [Set up your API key](/docs/documentation/setup/api-keys)
4. Try our [Hello World example](/docs/documentation/setup/hello-world)
### What's the difference between instances and snapshots?
- **Instances** are running virtual machines that execute from snapshots
- **Snapshots** are saved states that define the configuration (vcpus, memory, disk size) for creating instances
Learn more about [basic instance operations](/docs/documentation/instances/basic-lifecycle) and [creating snapshots](/docs/documentation/instances/creating-snapshot).
### Is there a free tier?
Yes! The Developer Plan provides 300 free compute hours per month with pay-as-you-go pricing after that.
See [signing up](/docs/documentation/setup/signing-up) for more details.
## Instance Management
### How do I create an instance?
You need a snapshot ID to start an instance. You can either create a new snapshot or use an existing one:
```python
# Create a snapshot first
snapshot = client.snapshots.create(vcpus=1, memory=1024, disk_size=10000)
# Start instance from snapshot
instance = client.instances.start(snapshot_id=snapshot.id)
```
See the [Hello World guide](/docs/documentation/setup/hello-world) for complete examples and [basic instance operations](/docs/documentation/instances/basic-lifecycle) for more details.
### What's the difference between pause and stop?
- **Pause**: Preserves memory state and running processes. You only pay for storage, not compute. Use when you want to resume exactly where you left off.
- **Stop**: Completely terminates the instance and releases all resources.
Learn more about [pause/resume functionality](/docs/documentation/instances/pause-resume).
### What is branching?
Branching creates a snapshot of an instance and launches multiple new instances from that snapshot. It's useful for parallel testing, training ML models, or creating identical environments for teams.
See the [branching documentation](/docs/documentation/instances/branch) for examples and [creating snapshots](/docs/documentation/instances/creating-snapshot) for snapshot basics.
## Technical Questions
### How do I run commands on my instance?
You can execute commands remotely using the exec functionality:
```python
result = instance.exec(command="echo 'Hello World'")
print(result.stdout)
```
See [command execution documentation](/docs/documentation/instances/command-execution).
### How do I connect via SSH?
MorphCloud provides SSH access to your instances. You'll need to configure SSH keys and connect using the provided connection details.
See the [SSH documentation](/docs/documentation/instances/ssh) for setup instructions and [SSH keys setup](/docs/documentation/setup/ssh-keys) for key configuration.
### How do I transfer files?
You can upload and download files to/from your instances using the file management API endpoints.
See the [file management documentation](/docs/documentation/instances/file-management).
### How do I expose web services?
Use the HTTP services feature to expose ports from your instance and get public URLs.
See the [HTTP services documentation](/docs/documentation/instances/http-services).
## SDK and API
### What programming languages are supported?
MorphCloud provides:
- Python SDK (requires Python 3.11+)
- TypeScript/JavaScript SDK
- CLI (available after installing Python SDK)
See the [installation guide](/docs/documentation/setup/installation-guide).
### How do I authenticate?
Set your API key as an environment variable:
```bash
export MORPH_API_KEY="your_api_key_here"
```
Or pass it directly when creating the client. See [API key documentation](/docs/documentation/setup/api-keys) and [installation guide](/docs/documentation/setup/installation-guide) for setup details.
### Where is the complete API reference?
Check the [REST API documentation](/docs/api-reference) for all available endpoints with interactive examples.
---
*Need more help? Check our [documentation](/docs/documentation/overview) or try the [Hello World example](/docs/documentation/setup/hello-world).*
---
---
sidebar_position: 1
slug: /
description: Start here for Morph Cloud docs—quick start, concepts, examples, and API reference for instances, snapshots, devboxes, SSH, and HTTP services.
---
# Morph Cloud
Welcome to the Morph Cloud documentation!
To get started, follow [First Success](/start-here/first-success) (5–10 minutes).
For the product mental model (Devboxes as workspaces; instances/snapshots as primitives), start at [Concepts](/concepts/mental-model).
For more information on how to use Morph Cloud, see the [API Reference](/api-reference).
---
---
id: first-success
title: First Success
sidebar_label: First Success
description: Get your first Morph Devbox running in 5–10 minutes (recommended), with an optional VM primitives path for power users.
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# First Success (5–10 minutes)
This guide gets you to a working **Morph Devbox** (recommended) and your first successful command run.
Devboxes are the best fit for:
- **Development:** VSCode/Cursor + tmux integration for CLI agents, plus fast branching for “many workspaces”
- **Prototyping:** expose an interactive preview URL for a web app or API; optionally disable auto-sleep to behave like a persistent VPS
- **Sharing & collaboration:** share a live devbox via URL inside your Morph Cloud organization
If you want finer-grained VM control and direct snapshot manipulation for advanced use cases (e.g. RL environments or test-time scaling), see the **Infrastructure primitives** flow below.
## 1) Install the SDK (or CLI)
Follow the [SDK Installation](/docs/documentation/setup/installation-guide) guide.
## 2) Set your API key
Follow [API Keys](/docs/documentation/setup/api-keys) and export `MORPH_API_KEY`.
## 3) Recommended: start a Devbox, run a command, expose a preview
This is the smallest “end-to-end” Devboxes flow: create a devbox, run a command, and expose an HTTP preview URL.
```bash
# 1) Pick a template and start a devbox
morphcloud devbox template list
TEMPLATE_ID=""
DEVBOX_ID=$(
morphcloud devbox start "$TEMPLATE_ID" --json | jq -r '.id'
)
echo "Devbox: $DEVBOX_ID"
# 2) Run a command in your devbox (via SSH)
morphcloud devbox ssh "$DEVBOX_ID" echo "Hello from a Morph Devbox!"
# 3) Start a tiny web server (in the background) and expose it publicly
morphcloud devbox ssh "$DEVBOX_ID" bash -lc "nohup python3 -m http.server 3000 >/tmp/http.log 2>&1 &"
morphcloud devbox expose-http "$DEVBOX_ID" --name app --port 3000
```
1. Create a devbox: https://cloud.morph.so/web/devboxes/new
2. Open it in VSCode or Cursor (one click in the Devboxes UI)
3. Start any local web server inside the devbox (e.g. `python3 -m http.server 3000`)
4. Use Live Preview / HTTP exposure to get a shareable URL
Tip: Share the devbox or its exposed URL with teammates **inside your organization**.
## 4) Advanced: infrastructure primitives (instances + snapshots)
This is the VM primitives path. It’s great for power users who want direct control over VMs and snapshots.
```python
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot = client.snapshots.create(
image_id="morphvm-minimal",
vcpus=1,
memory=1024,
disk_size=10000,
)
instance = client.instances.start(snapshot_id=snapshot.id)
instance.wait_until_ready()
result = instance.exec(command="echo 'Hello, Morph Cloud!'")
print(result.stdout)
instance.stop()
```
```typescript
import { MorphCloudClient } from 'morphcloud';
async function main() {
const client = new MorphCloudClient();
const snapshot = await client.snapshots.create({
imageId: "morphvm-minimal",
vcpus: 1,
memory: 1024,
diskSize: 10000,
});
const instance = await client.instances.start({ snapshotId: snapshot.id });
await instance.waitUntilReady();
const result = await instance.exec(\"echo 'Hello, Morph Cloud!'\");
console.log(result.stdout);
await instance.stop();
}
main().catch(console.error);
```
```bash
SNAPSHOT_ID=$(
morphcloud snapshot create --image-id morphvm-minimal --vcpus 1 --memory 1024 --disk-size 10000 --json \\
| jq -r '.id'
)
INSTANCE_ID=$(morphcloud instance start \"$SNAPSHOT_ID\" --json | jq -r '.id')
morphcloud instance exec \"$INSTANCE_ID\" echo \"Hello, Morph Cloud!\"
morphcloud instance stop \"$INSTANCE_ID\"
```
## Next steps
- Learn the model: [Concepts → Mental model](/docs/concepts/mental-model)
- Devboxes (recommended): [Getting started](/devboxes/getting-started)
- VM primitives: [Instance Management](/docs/documentation/instances/basic-lifecycle)