> ## Documentation Index
> Fetch the complete documentation index at: https://docs.subconscious.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Base vs. Marathon

> Every model is served in two variants. Compare context, billing, and usage fields.

We serve every model in two variants: **Base** and **Marathon**. Both are built for long agent runs. On tasks past 200k tokens, both finish faster and more accurately than standard inference, especially on coding, cybersecurity, and enterprise tasks.

The two variants differ in context window, in how input is billed, and in list price.

| | Base | Marathon |
| - | - | - |
| Example model ID | `subconscious/glm-5.3` | `subconscious/glm-5.3-marathon` |
| Context window | 1M tokens | 5M+ tokens |
| Long sessions | Compact your context before it reaches 1M tokens | No compaction needed |
| Billing | Every token you send | Only the tokens left after compression |
| Price | Discounted rates | Standard sticker pricing |
| Best for | A drop-in replacement in the harnesses and tools you already use | Ambitious long-horizon tasks |

## 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

| Model | Base | Marathon |
| - | - | - |
| DeepSeek V4.1 Flash 1017 | `subconscious/deepseek-v4.1-flash-1017` | `subconscious/deepseek-v4.1-flash-marathon` |
| Inkling 2 Small | `subconscious/inkling-2-small` | `subconscious/inkling-2-small-marathon` |
| GLM-5.3 | `subconscious/glm-5.3` | `subconscious/glm-5.3-marathon` |

See [Models](https://docs.subconscious.dev/models/overview.md) 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.

Cached input plus input always equals the length of the prompt you sent.

### 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.

On a long session, cached input plus input can be much smaller than the prompt you sent. That's why Marathon costs less on runs that grow for hours or days, even though its per-token rates are higher.

### 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: 120000` and `cached_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.

The Marathon numbers in this example are for illustration. The amount of compression depends on your session.

## Usage fields

Both variants return the same `usage` 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.

| What it counts | Chat Completions | Messages | Responses |
| - | - | - | - |
| Input tokens, including cached input | `prompt_tokens` | `input_tokens` + `cache_read_input_tokens` | `input_tokens` |
| Cached input tokens | `prompt_tokens_details.cached_tokens` | `cache_read_input_tokens` | `input_tokens_details.cached_tokens` |
| Output tokens | `completion_tokens` | `output_tokens` | `output_tokens` |
| Reasoning tokens, included in output | `completion_tokens_details.reasoning_tokens` | Not reported | `output_tokens_details.reasoning_tokens` |
| Total tokens | `total_tokens` | Not reported | `total_tokens` |

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](https://docs.subconscious.dev/features/streaming.md#usage-statistics).

## Switch between variants

Change the `model` 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](https://docs.subconscious.dev/features/rate-limits.md).

> [!NOTE]
>
> 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.