# Mercury 2

Mercury 2 is a reasoning diffusion language model (dLLM). It combines parallel token refinement with tunable reasoning depth. See live metrics on this page for current throughput.

- **Model ID:** `inception/mercury-2`
- **Type:** chat
- **Providers:** inception
- **Context window:** 128,000
- **Maximum output tokens:** 128,000
- **Pricing:** $0.25/1M input tokens, $0.75/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/mercury-2

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'inception/mercury-2',
  prompt: 'Why is the sky blue?'
})
```

## About

Mercury 2 departs from the autoregressive strategy that defines most large language models (LLMs). Instead of producing one token at a time left to right, Mercury 2 operates on a diffusion principle. It starts with a rough draft of the full response and refines multiple tokens in parallel across a small number of steps. Mercury 2 generates faster than autoregressive approaches. Live metrics on this page show current rates.

Mercury 2 supports tunable reasoning depth. You adjust refinement steps up or down to trade latency for quality on each request. Native tool use and schema-aligned JSON output let you embed it in function-calling pipelines and structured extraction workflows without extra parsing layers.

With a context window of 128K tokens, OpenAI API compatibility, and pricing of $0.25 input / $0.75 output per million tokens, Mercury 2 fits production-scale agentic workloads where inference runs dozens of times per task. Teams building multi-step coding assistants, retrieval-augmented generation (RAG) pipelines, or real-time voice interfaces gain headroom to run more refinement iterations within a fixed latency budget.

## What to consider

Mercury 2's diffusion architecture generates tokens in parallel rather than sequentially. Latency differs from autoregressive models, so factor that into timeout and streaming configurations for latency-sensitive pipelines.

## When to use

### Best For
- Agentic loops that chain many sequential inference calls and require low per-step latency
- Real-time voice interface backends where response delay is perceptible to end users
- High-throughput coding assistants processing many simultaneous requests
- RAG pipelines that need fast, structured retrieval summarization with JSON output
- Workloads where per-token inference cost is a primary optimization target

### Consider Alternatives When
- Tasks require very long output sequences that push against the cap of 128K tokens
- Evaluation criteria prioritize certain domain-specific benchmarks over raw throughput
- Your pipeline relies on streaming token-by-token output patterns that assume autoregressive generation
- You need multimodal input variety (images, audio) alongside text reasoning

## Best for

- **Sequential agent loops:** Chains of many inference calls need low per-step latency
- **Real-time voice backends:** Response delay is perceptible to end users
- **High-throughput coding assistants:** Many simultaneous requests processed concurrently
- **Fast structured RAG:** Retrieval summarization returned as JSON output
- **Token cost optimization:** Diffusion-based parallel token refinement reduces per-token inference cost compared to autoregressive models

## Consider alternatives

- **Very long outputs:** Tasks push against the cap of 128K tokens
- **Domain-specific benchmarks:** Evaluation prioritizes specific benchmarks over raw throughput
- **Token-by-token streaming:** Pipeline assumes autoregressive generation patterns
- **Multimodal input required:** You need image or audio input alongside text reasoning

## Frequently asked questions

### What makes Mercury 2 architecturally different from other reasoning models?

It uses diffusion instead of autoregressive generation. Mercury 2 starts with a draft of the full response and refines all token positions simultaneously across iterative steps, rather than generating one token at a time left to right. That follows the same conceptual lineage as image and video diffusion models, applied to language.

### How does tunable reasoning depth work in Mercury 2?

You adjust the number of diffusion refinement steps at inference time. Fewer steps yield faster responses; more steps let the model converge on higher-quality answers. You match compute to task difficulty on each request.

### What throughput does Mercury 2 achieve compared to autoregressive reasoning models?

Mercury 2 generates faster than autoregressive approaches. Live throughput metrics appear on this page.

### Is Mercury 2 compatible with OpenAI client libraries?

Yes. Mercury 2 exposes an OpenAI-compatible API. Through AI Gateway, call Mercury 2 with the AI SDK, Chat Completions API, Responses API, Messages API, or other API formats, from TypeScript or Python. Set the base URL to AI Gateway and the model identifier to `inception/mercury-2`; existing OpenAI SDK code routes through without further changes.

### What context length does Mercury 2 support?

A context window of 128K tokens. That suits long document processing, extended conversation history, and multi-document retrieval tasks.

### Does Mercury 2 support structured output for agent orchestration?

Yes. Mercury 2 includes native schema-aligned JSON output and tool use. You can plug it into function-calling orchestration frameworks without extra parsing middleware.

### How is Mercury 2 priced?

This page lists the current rates. Multiple providers can serve Mercury 2, so AI Gateway surfaces live pricing rather than a single fixed figure.

## Links

- [Model page](https://vercel.com/ai-gateway/models/mercury-2)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://platform.inceptionlabs.ai/docs#models)
- [Provider pricing](https://platform.inceptionlabs.ai/docs#models)
