---
title: "snapshot"
sidebar_label: "snapshot"
description: "Kotlin binding reference: snapshot."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[Modelverse](index.md)/[snapshot](snapshot.md)

# snapshot

[common]\
fun [snapshot](snapshot.md)(source: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), options: [LoadOptions](../LoadOptions/index.md) = LoadOptions(), listener: [DownloadListener](../DownloadListener/index.md)? = null): [Snapshot](../Snapshot/index.md)

Download, or find in the cache, the model files of [source](snapshot.md) (a hub repo id, a model-page URL, or a local directory, answered as it is) and say where they rest: the one resolve `clikart-cli fetch` runs. The checkpoint's planning verdict runs first, so an unservable checkpoint refuses before any weight byte moves; the files land in the hub cache ([LoadOptions.cacheDir](../LoadOptions/cacheDir.md), else the hub's own) under [options](snapshot.md)' hub knobs (the revision, the token, the offline switch), a GGUF repository's option through [LoadOptions.weights](../LoadOptions/weights.md) (several options and no pick refuse naming them); the family's companions fetch too, each named in the answer with its outcome. [listener](snapshot.md) hears each file's progress and may stop the download. A later load of [Snapshot.loadPath](../Snapshot/loadPath.md) with `offline = true` runs from the cache alone. Refuses with [ModelverseException](../ModelverseException/index.md) carrying the hub's own code name.