Token Computation and Billing Guide for the AI Large Model, which understands Token Calculations for the AI Large Model

    Read guidance: Below is a directory where readers can jump-start and read. If you are interested in Token ' s calculations and charges, then 4-7 is worth reading。

    Writing objectives:More than 7,000 words are written by hand, which is long, and it is suggested that reading is not complete and can be saved first. Why do you have to write with your bare handsI WANT TO SIMPLIFY THE INFORMATION TO THOSE WHO WANT TO UNDERSTAND AI, NOT JUST THE PROFESSIONALSHowever, by reference to other books, it is inevitable that professional terms are inadvertently revealed。

catalogs

1. Purpose of writing (see if you want, not if you want)

2. Key messages (important, need to see)

3. Opening of the session (corresponding to the colours, mainly the structure of subsequent narratives)

4. Token ' s billing formula

5. Under what circumstances is Token Consumable

6. How does the number of Tokens count? (e.g. how does the text count?) What about pictures, audio, video

7. How to reduce Token consumption

I. The purpose of writing

As technology evolves, Token ' s costs will certainly become lower and some artificial intelligence applications will continue to be free of charge, but the vast majority will be charged gradually. In particular, vertical AI applications such as programming, law, medical, educational, academic, design etc. If free, there would be quantitative limits, speed limits, functional castration, and even privacy compromises. So many of us are most likely to face the prospect of paying for AI in exchange for efficiency in the future, so it is important to know what the AI measure unit Token is accounting for, what the principles are and how they are。

Key message: what is Token

I'm going to make a brief presentation in this section. If you want to know what Token is, read my last articleWhat's Token

III. Opening:

First, we want to be clear that Token is the “currency unit” of the large model API, and that almost all mainstream AI services use a billing model based on Token consumption, and, of course, as technology evolves, some manufacturers have introduced other billing methods, such as time or number of missions. In essence, however, they account for costs through consumption projections for Token. When you give AI a mission, we have to make every token's consumption meaningful, which requires that we reduce token's consumption in the context of a mission. In other words, to increase Token ' s utilization. To make rational use of Token and to increase its utilization, we need to know four things:

First: Token's billing formula

Second: Under what circumstances there is token consumption

Third: How does Token count and what is the unit price? (For example: how does the text count?) What about pictures, audio, video

Fourth: How to reduce Token consumption

Let's start with the first thing: Token's billing formula

Cost = Enter Token number x Enter unit price + Output Token number x Output unit price + other special Token costs

Remember not to consider a formula as a cost = (Input Token + Output Token Quantity) x Token unit price. Because when big models are billed, the “asymmetrical billing” method is used, which simply means that the unit price of entering Token, exporting Token and other special Toke is different。

Note: Other special Tokens that appear in the formula refer to additional Token consumption generated by processing non-pure text contents. In other words, these elements cannot be measured directly by the number of Tokens in the text and require pre-processing or special coding, and are therefore costed separately. For example, you upload pictures, videos, audio or documents, you generate codes, pictures, videos, or online searches. We'll talk about it later。

V. THE SECOND THING WE'RE LOOKING AT: WHAT COURTS ARE GOING TOKEN CONDUCT

There's gotta be a little partner who'll ask, "When we're using the AI application, what happens when we consume Token?" Token consumption is generally generated in four cases。

    1. Remarkable consumption: in my conversation

This part is the most understandable part of the conversation between you and the big AI models (e.g. Deepseek, Gemini, ChatGPT, etc.)。

Enter: Every sentence you send to AI, every command, which we call the Prompt tip, is consumedtoken.

Output: Every sentence, code or summary that AI gives you in response will consume token。

This consumption is better understood because we can see. And the consumption here is positive, for example: you've got A.I. write you a 5,000-word novel that consumes more token than a 3,000-word novel。

Remember, the more you consume, the more you spend, the more many of the little partners think I'm going to have no cost now, that's what I'm talking about. As AI deepens, it needs to be used vertically (e.g., high-quality video generation, audio synthesis, programming, law, medicine, etc.), at which point the consumption of token will clearly affect your load。

    2. Invisible consumption: snowball in context

This is the easiest to ignore token consumption when ordinary users use AI. There's one thing you need to know here is that the big model itself is unremembered, but many of the little partners say, "I feel memory!" So give me the following example

Token Computation and Billing Guide for the AI Large Model, which understands Token Calculations for the AI Large Model

BUT LET'S BE AWARE THAT THIS IS NOT AI'S MEMORY, IT'S AI'S WRAPPING UP ALL YOUR CONVERSATIONS AND SENDING THEM BACK TO AI, AND IT'S NOT REALLY MEMORY. LET ME ELABORATE ON THE ABOVE FOR EXAMPLE, WHEN I ASKED AI FOR THE SECOND TIME: “WHAT'S MY NAME? WHAT DO I DO?” (FIGURE 3 ABOVE). AI ACTUALLY SENT 1 + 2 + 3 TO AI. IT IS NOT JUST A QUESTION OF FIGURE 3 ABOVE. SO, IT'S NOT WHAT AI REMEMBERS, IT'S THAT WE SEND MORE INFORMATION TO AI THROUGH THE PROGRAM。

Let me summarize this:

ONE: AI HAS NO MEMORY

SECOND: IN ORDER TO CREATE A FALSE IMAGE OF ITS MEMORY, AI WILL PACKAGE ALL PREVIOUS CONVERSATIONS AND RETRANSMIT THEM TO AI。

So, as the number of dialogue rounds increases, even if you ask only one word per round, the single consumption of Token increases linearly and even exponentially, as snowballs roll. Even if you ask a simple question, it'll cost thousands of Tokens. So, if we don't have to, in order to save Token, we need to start a new round of dialogue, just click on the "New Dialogue" icon in the top left corner of the chart, for example。

Token Computation and Billing Guide for the AI Large Model, which understands Token Calculations for the AI Large Model

3. Consumption of mental processes

Traditional models, like chatGPT 3.5 and previous versions, you ask questions, and it answers your questions. But with the spread of reasoning models such as Deekseep-R1 and OpenAI o1, Token’s billing logic has undergone a major structural change. Simply put, AI is going to pay for not just answering questions, but even for its thinking. We call token, which is consumed by the process of thinking, "The thought chain Token." Note: In many foreign AIs, the use of thinking models is limited, beyond which fees are charged, while fast-track models are largely free of charge. The figure below is Gemini's answer as to whether he's charging for it。

Token Computation and Billing Guide for the AI Large Model, which understands Token Calculations for the AI Large Model

It's hard to see what's happening here, but we often see a “thinking pattern” when we use the AI dialogue. The figure below is Gemini3's Quick Response Mode 1 and Think Mode 2 interface。

Token Computation and Billing Guide for the AI Large Model, which understands Token Calculations for the AI Large Model

the figure below is the switch between deepseek's fast-response mode 2 and thought mode 1, and the other products are similar, with a drop-down box (figure 3 below) at the bottom of the question box。

Token Computation and Billing Guide for the AI Large Model, which understands Token Calculations for the AI Large Model

NOW, I'M SURE YOU'RE THINKING ABOUT A QUESTION. IS THE THINKING PATTERN THINKING, AND OUR BIG IA MODEL DOESN'T THINK ABOUT IT IN A FAST-TRACK MODE? OF COURSE NOT, THE FAST-TRACK MODEL ACTUALLY HAS A NAME CALLED “QUICK-THINKING”, WHILE THE THINKING MODE HAS A RELATIVE NAME CALLED “SLOW-THINKING”。

Think fast, AI uses the logic of "predict the next Token." It's based on calculations and probabilities, and the process of thinking is more like human intuition. And slowly thinking about it, it introduces the chain of thought. The process involves self-correction, multi-pathic attempts, and logical validation. For example, when it's halfway to the wrong, it's gonna throw itself overboard. A final answer that it considers logical. It's more like we've been working on drafts, and we're finally giving answers. This process must be much more resource-consuming than fast thinking. The current AI product, if you answer questions under the “thinking mode”, will also show you the process of thinking, and I like it very much, and sometimes it is more productive than the answer. In the figure below, we can see clearly that the AI Large Model also gives us the process of thinking (figure 2 below)。

Token Computation and Billing Guide for the AI Large Model, which understands Token Calculations for the AI Large Model

Under the fast-track (i.e. fast-thinking) and the slow-thinking (i.e. slow-thinking) mode, their Token consumption is very different, slowly thinking about Token's consumption, sometimes five times ~10 times, or even 20 times. When we're using AI, let's not get used to "smuggling mosquitoes with cannons." Because it consumes not just time, but GPU resources。

Token, the thought chain, is usually charged at “output unit prices” (although some models offer advantages), but because it is a “invisible output”, users tend to unwittingly consume large amounts of high-value output Token。

    4. System presets and functional calls

Let's look at the System Prompt first and say that you haven't started anything, and Token's been consumed。

FIRST OF ALL, WHAT DO WE HAVE TO KNOW ABOUT THE PRESET OF THE BIG AI MODEL? IN ORDER FOR AI TO ACT LIKE A PROFESSIONAL (E.G. A PROFESSIONAL PHYSICS TEACHER, A SENIOR PROGRAMMER, ETC.) AND IN ORDER TO FOLLOW UP, IT IS POSSIBLE TO BE MORE RELEVANT TO THE PRACTICAL APPLICATION SCENE, AND TO THIS END A DESCRIPTION OF THE ROLE OF IDENTITY IS SENT TO THE LARGER AI MODEL. ACTUALLY, WE CAN SET THIS UP IN AI APPLICATIONS, AND MANY PEOPLE IGNORE IT. FIGURE 1 BELOW SETS THE PRESET BUTTON, AND FIGURE 2 BELOW ALLOWS YOU TO ENTER THE PRESET TEXT BOX AND SET THE CLICK SAVER. WHEN THERE IS A PRE-SET ANSWER TO A FOLLOW-UP QUESTION, AI WILL BE ON THE BASIS OF YOUR ROLE。

Token Computation and Billing Guide for the AI Large Model, which understands Token Calculations for the AI Large Model

A LOT OF LITTLE FRIENDS SAID I DIDN'T FIND A PRESET PLACE WHEN I WAS USING AI. THIS IS BECAUSE MANY OF THE AI PRODUCTS USE THE DYNAMIC AD HOC APPROACH, WHICH MEANS THAT THEY WILL ADJUST THE WAY AND FOCUS OF THE RESPONSE TO YOUR QUESTIONS IN EACH CONVERSATION AND TO WHAT KIND OF HELP YOU WANT。

Let's look at the "Function Call" consumption of Token, which is mainly for the purpose of making AI a stronger pass。

For example, you asked a question, “Query and summarize all authoritative papers on openclaw”. At this point, AI needs to be connected to do this, which triggers the call for the online search function. And for example, I asked AI to help me generate a code, which also requires a functional transfer (note that the code is still based on text token, which is part of the output, but the running code requires a code interpreter, which will result in significant resource consumption in order for the code to run complex calculations). There are, of course, many kinds of situations, and I will not list them all. At this point, our Token consumption will increase very much。

I will give you an example of a regular application of the “Online Checking and Summarizing” scenario, which provides an overview of Token consumption, as follows:

Part I: AI Thinking about “I need to network”, producing a thought about Token。

PART II: THE SYSTEM GOES ONLINE TO FIND THE RELEVANT INFORMATION AND FINDS A TOTAL OF 20,000 WORDS FOR THE PAPER, WHICH IS FED TO AI AS INPUT。

PART THREE: AI SENDS BACK TO YOU THE 2,000 WORDS THAT EVENTUALLY FORM THE SUMMARY TEXT。

If you look at this process, and just one question like this, does Token's consumption increase dramatically, and if you don't open a new round of dialogue and keep asking questions, then 20,000 words will go into the follow-up dialogue. Token's consumption will become more and more expensive, and these are costs。

Third thing: How does Token count? What's the unit price

First of all, we need to be clear that Token's calculations are very complex, and to make it easier for everyone to understand, I've divided the speaking scene into English, Chinese, and five kinds of pictures, audio, video。

    Token calculations in English

The token calculation in English is the simplest, and I said it in the last introductory article “Token What”, so let's just say it here。

The large model has a "core vocabulary" that contains about 30,000 to 100,000 Tokens, which contain common words in their entirety, as well as roots, prefixes, suffixes and even individual letters。

When a large model handles a sentence in English, there are usually two steps:

First split: usually split by spaces, points。

The second split: the second split is the split of a word, and the whole word that is recorded is not divided and exists as a Token. In long or complex English, large models are split by root and suffix and may be split into two or more Tokens. This means that a word in English normally corresponds to a Token, a long word, a complex word, which is split into two or more Tokens, and a Token is marked and space。

Let me give you an example:

Standard & Standard (1 Token)

Standardization > ization (2 Tokens)

Someone made a count of about 1,000 Token ≈ 750 words in English. We can use this to estimate our Token numbers。

Of particular note is the fact that big models are particularly sensitive to the case of English, and apple is a token, but APPLE may be broken down into three Tokens: A, PP, LE。

Special note: Token 's calculation is an introductory building block for understanding LLM charges。

    2. Calculation of Token in Chinese text

We have already spoken the English version of Token, but the Chinese language is different and more complex. As large models are initially based on English language material. The inclusion of Chinese is limited。

This relates to the model ' s coding mechanism: a Han word usually occupies three bytes under UTF-8 codes (note: some special symbols account for two bytes and four bytes in isolated characters). If a remote word is not included in the syllable, it cannot be identified as a stand-alone unit, which would be forcibly decomposed into bytes. So, a single word could consume more token。

To make it easier for everyone to understand, I'm going to tell you what happened when the big model met a Chinese word

FIRST STEP: WHEN A LARGE MODEL MEETS A HAN WORD, FIRST IT IS CODED BY UTF-8 TO CONVERT A HAN WORD TO 3 BYTES (AS OPPOSED TO 4 BYTES)。

the second step is to find the word list of token, which, ideally, happens to be in the word sheet of the model, and at this point it's a token. it's not ideal that this is not recorded. the model can only retreat to a second, to match a combination of these three bytes。

step 3: this combination will be cut into two pieces, each of which will be recorded as one token, so that this is two tokens。

i thought you might have thought that if the big model had a lot of chinese words, there would be less token. there are many large models in the country that include some of the hf vocabulary in the vocabulary of the large model. for example, if the word "analytical intelligence" is included in the vocabulary of a large model. well, even if a.i. were four words, it would be considered a token。

note: if the chinese dots are not recorded in the big syllable, they also occupy two tokens

3. Token calculation of pictures

unlike the text, the model must first slice them and convert them to an equivalent token. we have discovered that the count logic of token here in the picture is not based on the number, but on the pixels of the image。

Models typically provide two models for the processing of images, namely, “low-resolution mode” and “high-resolution mode”。

Let's look at low-resolution patterns:

regardless of the size of the original figure and the resolution, the model will rapidly process it in a single smaller size (e.g. 512 x 512 pixels). and token's consumption is recorded as 85 tokens。

Here's how we look at high-resolution patterns:

This is the default and most common model, which keeps the details of the image as much as possible. The calculation process is divided into three complex steps:

    Step 1: Equal scaling

The model, in order to balance the calculation and clarity, will take a secondary sample of the large maps you send to the larger model: ensure that the short edge does not exceed 768 pixels and the long edge does not exceed 2048 pixels. To facilitate understanding, let me give an example:

If you upload a map of 1024 x 1024 pixels to the larger model, the larger model will scale it to 768 x 768 pixels。

    Step 2: Slice sample

This step is the key to costing. The model cuts the zoom image into a square of 512 x 512 pixels. Parts less than 512 pixels are also calculated on a complete block basis。

We take the first step, in which we have scaled it to 768 x 768 pixels. First look horizontal, 768 ÷ 512 ≈ 1.5, up, get 2. Again, vertically, the same is required for 768 ÷ 512 ≈ 1.5, uplifting, getting 2. The total = 2 x 2 = 4。

    step 3: calculating tokens

The final tokens consumption will be calculated on the basis of two parts, the first of which is the cut-off cost, each of which will consume 170 Tokens. The second is the base cost, which is fixed at 85 tokens base processing costs。

We're going to move on to the second step, and finally we're going to take care of the 1024 x 1024 images that we uploaded

total tokens = (4 pieces x 170 tokens) + 85 tokens。

    Let's do this:

how much tokens for square 150 x 150 pixels? 1 x 170 + 85 = 255 tokens

    One more hard fight:

how much tokens do you need for rectangular 1920 x 1080 pixels

First step, with a scaling of 1356 x 768 pixels

Step 2: Toggle 1356 ÷ 512 and toggle the integer at 3; 768 ÷ 512 and toggle the integer at 2 so the toggle is 3 x 2 = 6。

step 3: apply formula 6 x 170 + 85 = 1150 tokens。

Attention, this is just a tokens consumption, not your Chinese commands, caches, presets, etc. I'm sure you can also think of why a picture is just one side away from Token。

4. Token calculation of audio

the audio token calculation is different, and it's fun, because it's a continuous dissipation of analogue signals, which is converted into "time slices". doesn't sound hard, actually, simple. you send an audio to a large model, which, when you deal with it, will break it down into a tiny sound clip, typically 20 to 50 milliseconds, depending on the model. each model gives this slice a predefined number of tokens. for example: 20 milliseconds is 1 token, so a second-long audio consumes 50 tokens. however, milliseconds are too difficult to calculate, so now large models are converted to seconds and give consumers a clear idea of how much tokens are consumed in one second。

audio tokens formula: total tokens = audio length (sec) x predefined number of tokens per second

Token calculations for videos

video tokens is the most complex calculation, and it's the image + audio + time dimension folding up, which sounds hard to understand, and i give you a basically right formula:

total tokens = (long x visual sampling rate x frame tokens)+ (long x audio tokens per second)

Let's start with the video section:

there's a lot of clippings, 30 frames or 60 frames per second, but models don't smoke 30 or 60 frames per second like players, and that's too scary to calculate. token consumes too much。

by default, only one frame can be drawn per second (note: more than one frame can be drawn, although model resources consume more and tokens consume more)。

this frame is also divided into high-resolution and low-resolution models, which (equivalent to a high-resolution map) are defined at approximately 260 tokens per frame, and around 65 tokens per frame。

the sound portion of the tokens is calculated in the same way as we said above, and the factory store gives you fixed tokens。

Fourth thing: How to reduce Token consumption

We also discuss the issue of reducing token consumption in four categories: text, pictures, audio and video。

Category I: Text modelled

While the text is relatively low, there are too many conversations and, when used, too many cumulative costs. A lot of small partners may say that I don't have much of a cost when I'm using in-country AI applications, because you're just using it for text conversations. If you're an independent developer, a deep user of AI angent, a business that needs to integrate AI, an AI provider, a fan, a researcher, etc. (e.g., many N people are playing lobster recently), then you're going to be very concerned about token consumption。

FIRST: DO NOT ASK QUESTIONS IN POLITE LANGUAGE, SUCH AS: PLEASE, THANK YOU ETC., OR IN EMOTIONAL LANGUAGE LIKE COMPLIMENTING IT. AI JUST NEEDS STRUCTURAL INSTRUCTIONS。

Second: Don't always talk in a dialogue box. When the topic is changed, a new dialogue is initiated in a timely manner。

Thirdly, the use of cache technology, of course, is primarily for developers。

Category II: Graphical mode

we've talked about how token is calculated, so we want to reduce the token consumption on pictures, and at the core of the optimization is to reduce the cut。

NUMBER ONE: IF ONE OF THE DRAWINGS WE JUST WANT AI TO READ A PART OF IT AND ANALYSE IT, THEN WE CAN CUT IT OUT。

Secondly, if it's a developer, then we can use the API as a low-detail model. And we've already talked about this, so whatever the picture is, it's probably just 85 tokens. It is particularly appropriate to identify what tasks are in the pictures。

third: pre-processing of the size of a picture allows for manual compression of the long edge of the picture to within 768 px in advance. this allows clarity to be preserved while touching the bottom line of the high-resolution mode, while avoiding additional cut-off costs due to excessive size。

Category III: Audio mode

What we have said before is that the sound is inherently time-based, so the core of the optimization is to shorten the physical length。

NUMBER ONE: MAKE SURE THE BLANKS ARE PRE-PROCESSED, AND AI IS BILLED AS LONG AS IT IS OPEN, EVEN IF IT HEARS NOTHING。

Second: In most of the scenes, the software that transliterates the text with the audio is then transmitted to AI. Text token costs are usually only 1/10 audio. Unless you need to get AI to hear if there's any strange emotions。

Third: Shorter and tighter audio streams can effectively reduce the pressure of treatment for simple lectures, lectures, etc。

Category IV: Video mode

First: With regard to the optimization of the video, we take into account the very simple sample, as we have said before, the default is usually a one-second frame, and we can address our mission, for example, if it is a video, a lecture, and so on, we can set up a frame every five seconds. The cost can be reduced by 70 percent。

Secondly, there is a way to make it less expensive: we don't send videos, but we do hand-shot images of key frames that we think are important, and send them to models in group form, so that even costs can be reduced by more than 90 per cent。

THIRD: IF AI NEEDS ONLY TO SUMMARIZE THE CONTENT OF THE MEETING, AND IF THERE IS A VIDEO OF THE MEETING, THEN WE CAN USE THE SOFTWARE FOR AUDIO SEPARATION, THEN WE CAN SUMMARIZE THE AUDIO TEXT, THEN THE TEXT。

as you can see, if you understand how to calculate tokens consumption under any model, you can think of ways to save tokens. therefore, the methods i have enumerated are not comprehensive, but rather wish to use them to achieve the objective of cross-cutting。

At the end of the sentence, because I am usually busy, I am updated and look at the sea。

statement:The content of the source of public various media platforms, if the inclusion of the content violates your rights and interests, please contact the mailbox, this site will be the first time to deal with.
Encyclopedia

What does Token mean? Tell me what Token is

2026-7-8 10:23:36

Information

The UK will launch the world's first road repair AI robot: 70% faster than humans and more cost-effective

2024-1-13 9:23:31

Search