> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x402layer.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Resize compute instance

> Resizes an active instance on its current provider. The route preserves the remaining prepaid dollar credit and recalculates expiry for the target hourly rate.

Resize an active Singularity Compute instance in place on its current provider.

Use this route when you want to move an instance to a larger compatible plan without provisioning a second machine.

## Behavior

* Requires compute management auth (`X-Auth-*` or `X-API-Key`)
* Does not create a new x402 or MPP payment challenge
* Preserves the remaining prepaid dollar credit and recalculates `expires_at` for the new hourly rate
* Keeps the instance on the same provider and same region

## Provider rules

* Vultr resizes are upgrade-only
* DigitalOcean disk growth is irreversible and requires `confirm_disk_resize: true`
* Expect downtime during the resize window

## Related endpoints

* `GET /compute/plans`
* `GET /compute/instances/{id}`
* `POST /compute/instances/{id}/extend`


## OpenAPI

````yaml POST /compute/instances/{id}/resize
openapi: 3.1.0
info:
  title: x402 Singularity Layer API
  description: >-
    OpenAPI-backed reference for marketplace discovery, payment routes,
    webhooks, wallet-first auth, agent endpoints, and ERC-8004 flows.
  version: 1.0.0
servers:
  - url: https://api.x402layer.cc
security: []
tags:
  - name: Marketplace
    description: Public discovery and listing lookup
  - name: Public Endpoints
    description: Public endpoint metadata and hosted checkout context
  - name: Public Payment Links
    description: Hosted public payment-link lookup
  - name: Payments
    description: Hosted x402 payment challenge routes
  - name: Receipts
    description: Signed receipt lookup and verification helpers
  - name: Ratings
    description: Public listing ratings and authenticated rating actions
  - name: Webhooks
    description: Seller webhook management API
  - name: Agent Auth
    description: Wallet-first challenge and verification routes
  - name: Agent Endpoints
    description: Create, read, top up, and delete agent endpoints
  - name: ERC-8004
    description: Agent registry and registration lifecycle routes
  - name: Marketplace Agents
    description: Public ERC-8004 marketplace discovery routes
  - name: Compute Catalog
    description: Compute plans, regions, and OS catalog
  - name: Compute Instances
    description: Provision, inspect, extend, and destroy compute instances
  - name: Compute API Keys
    description: API keys for compute agent access
  - name: Fundraiser Campaigns
    description: List, view, create, and edit fundraiser campaigns
  - name: Fundraiser Contributions
    description: Record and list campaign contributions
  - name: Fundraiser Comments
    description: Campaign comment threads
  - name: Fundraiser Media
    description: Campaign image uploads and OG images
  - name: Enterprise
    description: >-
      Enterprise partner configuration, endpoint listing, revenue stats, and
      transaction ledger
  - name: Staking
    description: Agentic $SGL staking
  - name: SGL Grid
    description: >-
      Decentralized, confidential, OpenAI-compatible inference served by
      attested TEE nodes.
  - name: Compute Credits
    description: Prepaid USDC credit balance shared across Machines and Grid.
paths:
  /compute/instances/{id}/resize:
    servers:
      - url: https://compute.x402layer.cc
    post:
      tags:
        - Compute Instances
      summary: Resize compute instance in place
      description: >-
        Resizes an active instance on its current provider. The route preserves
        the remaining prepaid dollar credit and recalculates expiry for the
        target hourly rate.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                plan:
                  type: string
                  description: >-
                    Target plan id from GET /compute/plans. DigitalOcean plans
                    use the do: prefix.
                confirm_disk_resize:
                  type: boolean
                  description: >-
                    Required when the target resize grows disk capacity,
                    especially for DigitalOcean where disk growth is
                    irreversible.
              required:
                - plan
      responses:
        '200':
          description: Resize started
        '400':
          description: Unsupported resize target or missing confirmation
        '409':
          description: Instance is not active or already has a resize in progress

````