What are tokens in AI models?

Tokens are the units a language model reads and writes: words, pieces of words, numbers or punctuation. Text models bill input and output tokens at separate rates per 1M tokens, while many media and search models bill per image, second, character, minute or request.

Concepts

How text becomes tokens

A language model does not read characters or words directly. A tokenizer first splits the text into pieces from a fixed vocabulary and maps each piece to a number, and the model reads and writes those numbers. Common words are usually a single token, while longer or rarer words split into several pieces. Spaces are usually attached to the word that follows them, and punctuation marks are often tokens of their own.

As an approximation, one token is about four characters of English text, or about three quarters of a word, so 1,000 words come to roughly 1,300 tokens. Code, numbers and many other languages use more tokens for the same amount of text. Each model family has its own tokenizer, so the same prompt can produce different counts on different models, and the usage object in every response reports the exact count the model used.

Models that accept images, audio or video convert those inputs into tokens as well, and some price those tokens at their own rate.

Input tokens and output tokens

Input tokens are everything you send: the system prompt, the conversation, tool definitions and any attached content. Output tokens are everything the model generates. On a reasoning model that includes the reasoning it writes before the answer, which is billed even when the model does not return its text.

Text models price the two separately, and output tokens usually cost more than input tokens. Two other rates can apply: cached input bills at a lower rate on models that support prompt caching, and some models charge a higher rate once the input passes a set length.

Each response reports what it used. Chat Completions returns prompt_tokens, completion_tokens and total_tokens, and cost_usd gives the amount charged for the request. To estimate input before you send it, POST /v1/messages/count_tokens returns a count and is not billed.

Why prices are quoted per 1M tokens

A single token costs very little, so text rates are quoted per 1M tokens to keep the numbers readable and easy to compare. To estimate the cost of a request, divide its input tokens by 1,000,000 and multiply by the input rate, do the same for the output tokens with the output rate, and add the two. For an application, multiply that figure by the number of requests you expect.

The machine-readable pricing object on GET /v1/models gives the same rates per single token, as strings, for code that calculates costs.

Models that bill in other units

Not every model bills by the token. The unit follows what the model produces or processes:

  • Image generation: per image.
  • Video generation: per second of video, or per video.
  • Speech and audio generation: by characters of input text, per second of audio, or by tokens.
  • Transcription: per minute or hour of audio, or by audio tokens.
  • Search and research: per search, request or task, sometimes with tokens on top.
  • 3D generation: per request.

The units in use across the catalog are listed on this page, and each model page shows its own. You can pay as you go, or choose a plan with weekly allowances, and those allowances use the same kinds of units: tokens for text models, seconds of video, images, minutes of transcription and characters of speech. See pricing and the models and pricing guide.

How models on EmpirioLabs AI are billed

The billing unit of each of the 206 models' main rate, from the live rate cards.

Billing unitModelsExamples
Per 1M tokens104GLM 5.3, GLM 5.3 Flash, GLM 5.2
Priced per second42Kling 3.0 Turbo, ACE-Step 1.5 XL, MiniMax Music 3
Priced per image18FLUX.2 Klein 4B, Qwen Image 3.0, Seedream 5.5
Priced per request16TRELLIS.2 4B, Exa Answer, Exa Search
Priced by characters of text11TTS 2, TTS 1.5 Mini, TTS 1.5 Max
Priced per minute or hour of audio10Whisper Large v3 Turbo, Deepgram Nova-3, OpenAI Whisper 1
Other units3DeepReasoning, GPTZero, LightOnOCR-3 4B
Priced per video2Pixverse v5, Pixverse v5.6

Frequently asked questions

How many words is 1M tokens?

In English, 1M tokens is roughly 750,000 words, using the approximation of about four characters per token. The exact count depends on the model's tokenizer and the language.

Do input and output tokens cost the same?

No. Text models price input and output tokens separately, and output tokens usually cost more. Each model lists both rates.

Do images and audio count as tokens?

On models that accept them as input, yes: images, audio and video are converted to tokens, and some models price those tokens at their own rate. Models that generate images, video or speech usually bill per image, second or character instead.

How can I see how many tokens a request used?

Every response includes a usage object with its input and output token counts. The dashboard usage logs and the Account Usage API record the same counts for each request.

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.