Glossary term
What is Tokens?
The small pieces of text a model reads and writes, and the unit it is billed in.
Definition
Tokens are the small pieces of text a language model reads and writes: a word, part of a word or a punctuation mark. In English, one token is about four characters on average. Requests are measured and billed in tokens, counted separately for the input you send and the output the model writes.
Why it matters
Tokens decide both what a request costs and whether it fits in the model's context window. Shorter prompts, cached prefixes and sensible output limits all lower the token count.
How it works on OceanToken
OceanToken bills language models per input, cached input and output tokens, at the price on each model's page. Every request's token counts and cost are in the console's Logs. See prices on the pricing page.