# Class Usage

java.lang.Object
com.codename1.ai.Usage

public final class Usage extends Object
Token accounting returned by the provider. Any field that the provider didn't return is `-1`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Usage(int promptTokens, int completionTokens, int totalTokens)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getCompletionTokens()`
  `int`
  `getPromptTokens()`
  `int`
  `getTotalTokens()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Usage

    public Usage(int promptTokens, int completionTokens, int totalTokens)

- ## Method Details

  - ### getPromptTokens

    public int getPromptTokens()

  - ### getCompletionTokens

    public int getCompletionTokens()

  - ### getTotalTokens

    public int getTotalTokens()