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

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

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[TtsLoadOptions](index.md)/[contextLength](contextLength.md)

# contextLength

[common]\
val [contextLength](contextLength.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 0

The context window in tokens: the longest prompt plus generated speech frames the model's key-value cache opens for. 0 is auto: the largest window that fits the device's free memory beside the weights, bounded by the checkpoint's own; a value names the window, clamped to the checkpoint's. A sentence needs about a thousand tokens; a smaller window is what lets a phone load the model.