# Consumption and Rate Limits

Each `grok` model has different rate limits. To check your team's rate limits, you can visit [xAI Console Models Page](https://console.x.ai/team/default/models).

------

## [Basic unit to calculate consumption — Tokens](https://docs.x.ai/docs/consumption-and-rate-limits#basic-unit-to-calculate-consumption--tokens)

Token is the base unit of prompt size for model inference and pricing purposes. It is consisted of one or more character(s)/symbol(s).

When a Grok model handles your request, an input prompt will be decomposed into a list of tokens through a tokenizer. The model will then make inference based on the prompt tokens, and generate completion tokens. After the inference is completed, the completion tokens will be aggregated into a completion response sent back to you.

You can use [Tokenizer](https://console.x.ai/team/default/tokenizer) on xAI Console to visualize tokens and count total token counts for a given text prompt.


![52986cffbc551aab630d51bd06354408_console-tokenizer.png](https://api.apidog.com/api/v1/projects/875787/resources/353371/image-preview)
### [Text tokens](https://docs.x.ai/docs/consumption-and-rate-limits#text-tokens)

Tokens can be either of a whole word, or smaller chunks of character combinations. The more common a word is, the more likely it would be a whole token.

For example, Flint is broken down into two tokens, while Michigan is a whole token.

![87d0716f4c0b0ed59b5c86079bc06f15_token1.png](https://api.apidog.com/api/v1/projects/875787/resources/353372/image-preview)


In another example, most words are tokens by themselves, but "drafter" is broken down into "dra" and "fter", and "postmaster" is broken down into "post" and "master".

![e8045965a2d02f3aa09f5de46f9000d5_token2.png](https://api.apidog.com/api/v1/projects/875787/resources/353373/image-preview)


For a given text/image/etc. prompt or completion sequence, different tokenizers may break it down into different lengths of lists.

Different Grok models may also share or use different tokenizers. Therefore, **the same prompt/completion sequence may not have the same amount of tokens across different models.**

The token count in a prompt/completion sequence should be approximately linear to the sequence length.

### [Image prompt tokens](https://docs.x.ai/docs/consumption-and-rate-limits#image-prompt-tokens)

Each image prompt will take between 256 to 1792 tokens, depending on the size of the image. The image + text token count must be less than the overall context window of the model.

### [Estimating consumption with tokenizer on xAI Console or through API](https://docs.x.ai/docs/consumption-and-rate-limits#estimating-consumption-with-tokenizer-on-xai-console-or-through-api)

The tokenizer page or API might display less token count than the actual token consumption. The inference endpoints would automatically add pre-defined tokens to help our system process the request.

On xAI Console, you can use the [tokenizer page](https://console.x.ai/team/default/tokenizer) to estimate how many tokens your text prompt will consume. For example, the following message would consume 5 tokens (the actual consumption may vary because of additional special tokens added by the system).

Message body:

`{
        role: "user",
        content:
            "How is the weather today?"
    }`

Tokenize result on Tokenizer page:

![468883ff041870500b951caa12c23df9_tokenizer.png](https://api.apidog.com/api/v1/projects/875787/resources/353374/image-preview)


You can also utilize the [Tokenize Text](https://docs.x.ai/docs/api-reference#tokenize-text) API endpoint to tokenize the text, and count the output token array length.


