

# SampleTokenUsage
<a name="API_training_session_runtime_SampleTokenUsage"></a>

The token usage statistics for a sample generation.

## Contents
<a name="API_training_session_runtime_SampleTokenUsage_Contents"></a>

 ** decode **   <a name="sagemaker-Type-training_session_runtime_SampleTokenUsage-decode"></a>
The number of tokens generated (decode phase).  
Type: Integer  
Required: Yes

 ** prefill **   <a name="sagemaker-Type-training_session_runtime_SampleTokenUsage-prefill"></a>
The number of tokens in the input prompt (prefill phase).  
Type: Integer  
Required: Yes

## See Also
<a name="API_training_session_runtime_SampleTokenUsage_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/sagemakertrainingsessionruntime-2025-02-10/SampleTokenUsage) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/sagemakertrainingsessionruntime-2025-02-10/SampleTokenUsage) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/sagemakertrainingsessionruntime-2025-02-10/SampleTokenUsage) 