> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VastAI.take_snapshot

Take a container snapshot and push to a registry.

## Signature

```python theme={null}
VastAI.take_snapshot(
    instance_id: Any,
    container_registry: Optional[str] = 'docker.io',
    repo: Optional[str] = None,
    docker_login_user: Optional[str] = None,
    docker_login_pass: Optional[str] = None,
    pause: Optional[str] = 'true'
) -> dict
```

## Parameters

<ParamField path="instance_id" type="Any" required>
  instance\_id of the container instance to snapshot
</ParamField>

<ParamField path="container_registry" type="Optional[str]" default="docker.io">
  Container registry to push the snapshot to. Default will be docker.io
</ParamField>

<ParamField path="repo" type="Optional[str]">
  repo to push the snapshot to
</ParamField>

<ParamField path="docker_login_user" type="Optional[str]">
  Username for container registry with repo
</ParamField>

<ParamField path="docker_login_pass" type="Optional[str]">
  Password or token for container registry with repo
</ParamField>

<ParamField path="pause" type="Optional[str]" default="true">
  Pause container's processes being executed by the CPU to take snapshot (true/false). Default will be true
</ParamField>

## Returns

`dict`

## Example

```python theme={null}
from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.take_snapshot(instance_id="value")
print(result)
```
