﻿# OpenRouter predicted outputs: reuse known response content

OpenRouter prediction supplies known candidate output content on supported routes; distinguish it from assistant prefill and input caching, then verify the edited artifact.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-openrouter-prediction-prefix/
Language: en

A request can contain information about the answer it expects to regenerate. OpenRouter’s Chat Completions schema exposes prediction content for supported routes. This is useful to understand through a localized editing task: much of an existing artifact is already known, while the requested change affects only part of it.

## Known output is different from an instruction

Imagine regenerating a short configuration document after renaming a field. The user instruction explains the desired change. The previous document supplies candidate output content that may remain largely unchanged. In the API reference, prediction is a separate request property with content, rather than a replacement for the instruction. The developer still needs to specify what should change. Without that task description, a known artifact is merely text; it does not independently define the intended correction or its acceptance criteria.

## Prediction is not limited to an answer prefix

An assistant prefill establishes the beginning of a continuation in conversation context. Prediction instead supplies content expected in the generated output. Describing it only as a prefix would obscure the use case where an existing artifact contains a localized change away from its beginning. The request schema documents the property, while support depends on the selected model and provider. A common API field should not be interpreted as proof that every route implements the same optimization behavior.

## Measure the complete editing outcome

For the rename example, compare the regenerated document with the intended result. The unchanged sections should remain acceptable and the renamed field should be correct. Then measure the relevant request timing if latency is the question being investigated. Supplying a prediction does not establish a universal speedup or pricing reduction by itself. This is an engineering evaluation: input similarity, route support and the size of the actual change can affect whether the mechanism is useful for the application’s particular workload.

## Keep input caching and prediction separate

Prompt caching concerns reusable input processing, while a prediction describes anticipated output. The same editing workflow can raise both questions, but the evidence for one does not establish the other. Preserve request fields and observed usage or timing separately when comparing variants. The provider-selection documentation explains why route capabilities matter. A useful implementation therefore treats known-output reuse as a supported-route feature and verifies the resulting artifact, instead of assuming that the presence of repeated text means an input cache or output prediction was necessarily used.

## Primary sources

- [OpenRouter request parameters](https://openrouter.ai/docs/api-reference/parameters).

- [OpenRouter API reference](https://openrouter.ai/docs/api-reference/overview).

- [OpenRouter provider selection](https://openrouter.ai/docs/guides/routing/provider-selection).

Related context: [Provider routing](/journal/openrouter-provider-routing/); [Tool-calling integration](/journal/openrouter-tool-calling/).
