Marathon
Marathon is our novel serving format for open models. In Marathon mode, a model has a 5M+ token context window, and your agent never has to compact. We compress context during inference and only charge for the compressed tokens we process. If your agent sends 2M tokens and they compress to 300k, you pay for 300k tokens. Choose Marathon when:- Your agent runs for hours, or across hundreds of steps and millions of tokens.
- Compaction is dropping details your agent needs later.
- You want the lowest total cost on long sessions, not the lowest sticker rate.
Base
Base has the 1M token context window of a standard model, at a discounted price. It bills every token you send, so it works like any other provider. Choose Base when:- You’re adding Subconscious to an existing harness that already manages its own context.
- Your sessions stay under 1M tokens.
- You want the lowest per-token rate.
Model IDs
See Models for per-token rates.
Billing
Each request is billed in three parts: input tokens, cached input tokens, and output tokens. Cached input tokens bill at a lower rate than input tokens. The two variants count input differently.Base billing
Base bills the full prompt that you send.- Cached input: the part of your prompt that repeats context from earlier requests in the session. It bills at the cached input rate.
- Input: the rest of your prompt, which is new to the session. It bills at the input rate.
- Output: the tokens the model generates, including reasoning tokens. They bill at the output rate.
Marathon billing
Marathon bills the tokens the model actually processes. On long sessions, the runtime compresses your context before the model reads it. Tokens that compression removes are not billed.- Cached input: the processed tokens that the model reads from cache. They bill at the cached input rate.
- Input: the processed tokens that are not in cache. They bill at the input rate.
- Output: the tokens the model generates, including reasoning tokens. They bill at the output rate.
Example
A session sends a 120,000-token prompt. Earlier requests in the session already covered 100,000 of those tokens. The model generates 2,000 tokens.- GLM-5.3 reports
prompt_tokens: 120000andcached_tokens: 100000. You pay for 20,000 input tokens, 100,000 cached input tokens, and 2,000 output tokens. - GLM-5.3 Marathon reports the tokens left after compression. For example, if compression removes 40,000 tokens, it can report
prompt_tokens: 80000. You pay only for those 80,000 tokens, split into input and cached input, plus 2,000 output tokens.
Usage fields
Both variants return the sameusage fields in every API format. The values follow the billing rules above: on Base, input counts reflect the full prompt you sent, and on Marathon, they reflect the tokens processed after compression.
In the Messages format,
input_tokens excludes cached input, and cache_read_input_tokens is omitted when it’s zero. In Chat Completions, completion_tokens_details is omitted when the request has no reasoning tokens. For streaming, see Usage statistics.
Switch between variants
Change themodel value to switch. You can start a session on a Base model and move it to the Marathon variant of the same model as it nears 1M tokens. Each model ID has its own rate limits.
The Base and Marathon variants of a model run on the same Subconscious inference stack and share one cache. They’re two offerings of the same model weights, with different context rules and billing.