> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/dsx-air/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/dsx-air/_mcp/server.

# air_sdk.endpoints.checkpoints

## Classes

| Name                                                                         | Description                                                   |
| ---------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [`Checkpoint`](#air_sdkendpointscheckpointscheckpoint)                       | Checkpoint model representing a snapshot of a simulation run. |
| [`CheckpointEndpointAPI`](#air_sdkendpointscheckpointscheckpointendpointapi) | Endpoint API for managing simulation checkpoints.             |

## Module Contents

```python
class air_sdk.endpoints.checkpoints.Checkpoint
```

**Bases**: `air_sdk.air_model.AirModel`

Checkpoint model representing a snapshot of a simulation run.

Checkpoints are created when a simulation is shut down (stored). They
capture the state of all nodes at that point in time and can be used
to restore the simulation to that state later.

```python
id: str
```

Unique identifier for the checkpoint

```python
name: str
```

A customizable name for the checkpoint

```python
favorite: bool
```

Whether the checkpoint is favored over others when Air
determines which checkpoints should be automatically deleted

```python
created: datetime.datetime
```

Timestamp when the checkpoint was created

```python
modified: datetime.datetime
```

Timestamp when the checkpoint was last modified

```python
run: str
```

UUID of the run during which the checkpoint was created

```python
state: Literal[PENDING, COMPLETE, DELETED]
```

Current state of the checkpoint (PENDING, COMPLETE, or DELETED)

```python
get_model_api() -> type[CheckpointEndpointAPI]
```

```python
update(
    *,
    name: str = ...,
    favorite: bool = ...,
    **kwargs: Any
) -> None
```

Update the checkpoint's properties.

**Parameters:**

* `name` – A new name for the checkpoint
* `favorite` – Whether the checkpoint should be protected from automatic deletion
* `**kwargs` – Additional fields for future API compatibility

**Example:**

```python
>>> checkpoint.update(name='Before upgrade', favorite=True)
```

```python
delete() -> None
```

Delete this checkpoint.

Only checkpoints in the `COMPLETE` state may be deleted. Deletion
updates the state to `DELETED` and removes the stored snapshots.

**Example:**

```python
>>> checkpoint.delete()
```

```python
class air_sdk.endpoints.checkpoints.CheckpointEndpointAPI
```

**Bases**: `air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.checkpoints.Checkpoint]`

Endpoint API for managing simulation checkpoints.

Provides methods for listing, retrieving, updating, and deleting
checkpoints. Checkpoints cannot be created directly; they are
created automatically when a simulation is shut down.

```python
API_PATH: str
```

```python
model: type[Checkpoint]
```

```python
list(
    *,
    simulation: str | PrimaryKey = ...,
    run: str | PrimaryKey = ...,
    state: Literal[PENDING, COMPLETE, DELETED] = ...,
    favorite: bool = ...,
    limit: int = ...,
    offset: int = ...,
    ordering: str = ...,
    search: str = ...,
    **kwargs: Any
) -> Iterator[Checkpoint]
```

List checkpoints.

When accessed via `simulation.checkpoints.list()`, results are
automatically filtered to that simulation. When accessed via
`api.checkpoints.list()`, all visible checkpoints are returned
unless filtered.

**Parameters:**

* `simulation` – Filter by simulation UUID
* `run` – Filter by run UUID
* `state` – Filter by checkpoint state
* `favorite` – Filter by favorite status
* `limit` – Number of results to return per page
* `offset` – Initial index from which to return results
* `ordering` – Order by field (prefix with "-" for descending). Options: created, modified, name, run, state, favorite
* `search` – Search by name or state
* `**kwargs` – Additional filter parameters

**Returns:**

Iterator of Checkpoint instances

**Example:**

```python
>>> for cp in api.checkpoints.list(
...     simulation='sim-id', state='COMPLETE'
... ):
...     print(cp.name)
```

```python
get(
    pk: PrimaryKey,
    **kwargs: Any
) -> Checkpoint
```

Retrieve a specific checkpoint.

**Parameters:**

* `pk` – Checkpoint UUID
* `**kwargs` – Additional query parameters

**Returns:**

Checkpoint instance

**Example:**

```python
>>> checkpoint = api.checkpoints.get('checkpoint-uuid')
>>> print(checkpoint.name, checkpoint.state)
```

```python
patch(
    pk: PrimaryKey,
    *,
    name: str = ...,
    favorite: bool = ...,
    **kwargs: Any
) -> Checkpoint
```

Update individual fields of a checkpoint.

Only `name` and `favorite` can be modified.

**Parameters:**

* `pk` – Checkpoint UUID
* `name` – A new name for the checkpoint
* `favorite` – Whether the checkpoint should be protected from automatic deletion
* `**kwargs` – Additional fields for future API compatibility

**Returns:**

Updated Checkpoint instance

**Example:**

```python
>>> checkpoint = api.checkpoints.patch(  # fmt: skip
...     'checkpoint-uuid', name='Pre-upgrade snapshot'
... )
```

```python
delete(
    pk: PrimaryKey,
    **kwargs: Any
) -> None
```

Delete a checkpoint.

Only checkpoints in the `COMPLETE` state may be deleted. Deletion
updates the state to `DELETED` and removes the stored snapshots.

**Parameters:**

* `pk` – Checkpoint UUID
* `**kwargs` – Additional parameters

**Example:**

```python
>>> api.checkpoints.delete('checkpoint-uuid')
```

```python
update(
    *,
    checkpoint: Checkpoint | PrimaryKey,
    name: str = ...,
    favorite: bool = ...,
    **kwargs: Any
) -> Checkpoint
```

Update individual fields of a checkpoint.

Only `name` and `favorite` can be modified.

**Parameters:**

* `checkpoint` – Checkpoint instance or checkpoint UUID
* `name` – A new name for the checkpoint
* `favorite` – Whether the checkpoint should be protected from automatic deletion
* `**kwargs` – Additional fields for future API compatibility

**Returns:**

Updated Checkpoint instance

**Example:**

```python
>>> cp = api.checkpoints.get('checkpoint-uuid')
>>> api.checkpoints.update(checkpoint=cp, name='Renamed', favorite=True)
```