# Learn: AI tokens and inference

Plain guides to AI tokens and inference: what a token is, how token prices work, what 1M tokens buys, speed, caching, batch and compatible APIs.

- [What is an AI token?](https://openscale.so/learn/what-is-an-ai-token): An AI token is the unit of text a language model reads and writes: a whole word, part of a word, a punctuation mark or a few bytes, depending on the model's tokenizer. Markdown: https://openscale.so/learn/what-is-an-ai-token.md
- [How LLM token pricing works: input, cached input and output](https://openscale.so/learn/llm-token-pricing): LLM token pricing is the rate an API charges per token processed, quoted in US dollars per 1M tokens, with separate prices for input tokens, cached input tokens and output tokens. Markdown: https://openscale.so/learn/llm-token-pricing.md
- [How much do 1M tokens cost, and what do they buy?](https://openscale.so/learn/how-much-does-1m-tokens-cost): 1M tokens is about 750,000 English words of text, and on open models like DeepSeek V4.1 Flash it costs between $0.003 (cached input) and $0.24 (output). Markdown: https://openscale.so/learn/how-much-does-1m-tokens-cost.md
- [Tokens per second and time to first token, explained](https://openscale.so/learn/tokens-per-second-and-time-to-first-token): Tokens per second (TPS) is how many output tokens a model generates each second once it starts writing, and time to first token (TTFT) is the wait between sending a request and receiving the first token. Markdown: https://openscale.so/learn/tokens-per-second-and-time-to-first-token.md
- [How prompt caching cuts coding agent costs](https://openscale.so/learn/prompt-caching-coding-agents): Prompt caching is when an inference provider keeps the processed form of a prompt prefix and reuses it for a later request that starts with the same tokens, billing those tokens at a lower cached input price. Markdown: https://openscale.so/learn/prompt-caching-coding-agents.md
- [Open vs closed models for coding agents](https://openscale.so/learn/open-vs-closed-models-for-coding-agents): An open model (open-weight model) is one whose trained weights are published for anyone to download and run, while a closed model is available only through its maker's API and products. Markdown: https://openscale.so/learn/open-vs-closed-models-for-coding-agents.md
- [Batch vs real-time inference](https://openscale.so/learn/batch-vs-real-time-inference): Real-time inference answers each API request as it arrives, in seconds, while batch inference takes a file of many requests and returns all the results within a set window, such as 24 hours. Markdown: https://openscale.so/learn/batch-vs-real-time-inference.md
- [OpenAI-compatible and Anthropic-compatible APIs, explained](https://openscale.so/learn/openai-and-anthropic-compatible-apis): An OpenAI-compatible or Anthropic-compatible API is one that accepts the same request and response format as OpenAI's or Anthropic's API, so tools built for those APIs work with another model by changing only the base URL, the API key and the model name. Markdown: https://openscale.so/learn/openai-and-anthropic-compatible-apis.md
