InputTokenDetails: {
    audio?: undefined | number;
    cache_creation?: undefined | number;
    cache_read?: undefined | number;
    document?: undefined | number;
    image?: undefined | number;
    text?: undefined | number;
    video?: undefined | number;
}

Breakdown of input token counts.

Does not need to sum to full input token count. Does not need to have all keys.

Type declaration

  • Optionalaudio?: undefined | number

    Audio tokens.

  • Optionalcache_creation?: undefined | number

    Input tokens that were cached and there was a cache miss.

    Since there was a cache miss, the cache was created from these tokens.

  • Optionalcache_read?: undefined | number

    Input tokens that were cached and there was a cache hit.

    Since there was a cache hit, the tokens were read from the cache. More precisely, the model state given these tokens was read from the cache.

  • Optionaldocument?: undefined | number

    Document tokens. e.g. PDF

  • Optionalimage?: undefined | number

    Image (non-video) tokens.

  • Optionaltext?: undefined | number

    Text tokens. Does not need to be reported, but some models will do so.

  • Optionalvideo?: undefined | number

    Video tokens.