Skip to content

Commit

Permalink
Minor Michael-suggested edits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Trent Fowler authored and Trent Fowler committed Feb 6, 2025
1 parent efdac31 commit 0f03e18
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can find up-to-date prices on our [dedicated pricing page](https://cohere.co

### What's the Difference Between "billed" Tokens and Generic Tokens?

In certain workflows you'll see an output like this:
When using the [Chat API endpoint](https://docs.cohere.com/reference/chat), the response will contain the total count of input and output tokens, as well as the count of billed tokens. Here's an example:

```json JSON
{
Expand All @@ -36,7 +36,7 @@ In certain workflows you'll see an output like this:
}
```

And it may not be obvious why there are separate input and output values under `billed_units`. As its name suggests, the _billed_ input and output tokens are the tokens that you're actually _billed_ for. The reason these values can be different from the overall `"tokens"` value is that there are situations in which Cohere adds tokens under the hood, and there are others in which a particular model has been trained to do so (i.e. when outputting special tokens). Since these are tokens *you don't have control over, you are not charged for them.*
The rerank and embed models have their own, slightly different versions, and it may not be obvious why there are separate input and output values under `billed_units`. As its name suggests, the _billed_ input and output tokens are the tokens that you're actually _billed_ for. The reason these values can be different from the overall `"tokens"` value is that there are situations in which Cohere adds tokens under the hood, and there are others in which a particular model has been trained to do so (i.e. when outputting special tokens). Since these are tokens *you don't have control over, you are not charged for them.*

## Trial Usage and Production Usage

Expand Down

0 comments on commit 0f03e18

Please sign in to comment.