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

# Start an asynchronous disk snapshot of a running Devbox.

> Start an asynchronous disk snapshot of a devbox with the specified name and metadata. The snapshot operation will continue in the background and can be monitored using the query endpoint.



## OpenAPI

````yaml /openapi-specs/stainless-processed-openapi.json post /v1/devboxes/{id}/snapshot_disk_async
openapi: 3.1.0
info:
  title: RunLoop API
  version: '0.1'
  description: >-
    The RunLoop API spec that allows you to host lambda functions and Devboxes
    to enable scaled long running ai workflows.
  contact:
    name: Runloop AI Support
    url: https://runloop.ai
    email: support@runloop.ai
servers:
  - url: https://api.runloop.ai
    description: Runloop API
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: Benchmark
  - name: Blueprint
  - name: Blueprint-Lifecycle
  - name: Blueprint-ObservabilityTools
  - name: Devbox
  - name: Devbox-FileTools
  - name: Devbox-Lifecycle
  - name: Devbox-NetworkTools
  - name: Devbox-ObservabilityTools
  - name: Devbox-PersistenceTools
  - name: Devbox-ShellTools
  - name: Scenario
  - name: ScenarioScorer
  - name: accounts
  - name: agents
  - name: apikeys
  - name: axons
  - name: executions
  - name: gateway-configs
  - name: mcp-configs
  - name: network-policies
  - name: objects
  - name: restricted_keys
  - name: secrets
  - name: streaming
paths:
  /v1/devboxes/{id}/snapshot_disk_async:
    post:
      tags:
        - Devbox
        - Devbox-PersistenceTools
      summary: Start an asynchronous disk snapshot of a running Devbox.
      description: >-
        Start an asynchronous disk snapshot of a devbox with the specified name
        and metadata. The snapshot operation will continue in the background and
        can be monitored using the query endpoint.
      operationId: createDiskSnapshotAsync
      parameters:
        - name: id
          in: path
          description: The Devbox ID.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevboxSnapshotRequest'
      responses:
        '200':
          description: Snapshot operation started successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevboxDiskSnapshotView'
        '404':
          description: Devbox not found.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Runloop from '@runloop/api-client';


            const client = new Runloop({
              bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
            });


            const devboxSnapshotView = await
            client.devboxes.snapshotDiskAsync('id');


            console.log(devboxSnapshotView.id);
        - lang: Python
          source: |-
            import os
            from runloop_api_client import Runloop

            client = Runloop(
                bearer_token=os.environ.get("RUNLOOP_API_KEY"),  # This is the default and can be omitted
            )
            devbox_snapshot_view = client.devboxes.snapshot_disk_async(
                id="id",
            )
            print(devbox_snapshot_view.id)
components:
  schemas:
    DevboxSnapshotRequest:
      type: object
      properties:
        name:
          description: (Optional) A user specified name to give the snapshot
          type:
            - string
            - 'null'
        metadata:
          additionalProperties:
            type: string
          description: (Optional) Metadata used to describe the snapshot
          type:
            - object
            - 'null'
        commit_message:
          description: >-
            (Optional) Commit message associated with the snapshot (max 1000
            characters)
          type:
            - string
            - 'null'
    DevboxDiskSnapshotView:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the snapshot.
        name:
          description: (Optional) The custom name of the snapshot.
          type:
            - string
            - 'null'
        create_time_ms:
          type: integer
          format: int64
          description: Creation time of the Snapshot (Unix timestamp milliseconds).
        metadata:
          type: object
          additionalProperties:
            type: string
          description: User defined metadata associated with the snapshot.
        source_devbox_id:
          type: string
          description: The source Devbox ID this snapshot was created from.
        source_blueprint_id:
          description: (Optional) The source Blueprint ID this snapshot was created from.
          type:
            - string
            - 'null'
        commit_message:
          description: (Optional) The commit message of the snapshot (max 1000 characters).
          type:
            - string
            - 'null'
        size_bytes:
          format: int64
          description: >-
            (Optional) The size of the snapshot in bytes, relative to the base
            blueprint.
          type:
            - integer
            - 'null'
      required:
        - id
        - create_time_ms
        - metadata
        - source_devbox_id
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````