Skip to content
Dashboard

Mercury 2

Mercury 2 is Inception's reasoning diffusion language model. It refines tokens in parallel with tunable reasoning depth, native tool use, and a context window of 128K tokens.

View API reference
Input and output price
Input $0.25, Output $0.75, Per 1M tokens
24h uptime
Loading AI Gateway uptime
import { streamText } from 'ai'
const result = streamText({
model: 'inception/mercury-2',
prompt: 'Why is the sky blue?'
})
Read docs

Copy link to headingPlayground

Try out Mercury 2 by Inception. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

inception logo
inception logo

Mercury 2

Copy link to headingProviders

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Max Output
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
ZDR
No Training
Free Tier
Release Date
128K128K0.4 s
$0.25/M
$0.75/M
Read$0.03/M
02/24/2026

Copy link to headingUptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

Copy link to headingThroughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Copy link to headingLatency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Getting started

Call Mercury 2 through AI Gateway with the AI SDK generateText and streamText functions, or through the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages APIs by changing the base URL. AI Gateway authenticates the request and routes it to an available provider.

Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the text generation quickstart.

index.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'inception/mercury-2',
prompt: 'Why is the sky blue?',
});
console.log(result.text);
}
main().catch(console.error);

Top-level parameters

The same Mercury 2 request in each API format AI Gateway supports.

top-level-params.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'inception/mercury-2',
system: 'You are a concise technical assistant.',
prompt: 'Summarize the tradeoffs between static generation and SSR.',
maxOutputTokens: 1024,
});
console.log(result.text);
}
main().catch(console.error);

Standard parameters like prompt, messages, temperature, and tools work as documented in the AI SDK docs. These are the parameters with model-specific behavior.

ParameterTypeRequiredDescription
modelstringYesModel ID in the form creator/model, e.g. inception/mercury-2. AI Gateway routes the request to an available provider.
maxOutputTokensnumberNoHard cap on generated tokens. Mercury 2 supports up to 128,000 output tokens. Reasoning tokens count toward this limit.
reasoning'provider-default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'NoProvider-agnostic reasoning effort, available in AI SDK 7 or later. Maps to the provider’s native reasoning configuration; reasoning settings under providerOptions take precedence when both are set. See the Reasoning section below.
providerOptionsRecord<string, JSONValue>NoAI Gateway routing options under gateway, plus any provider-native options under the provider’s own namespace — see the table below.

Input limits

InputFormatsSourcesMax countMax sizeLimits
TextPrompt and response share the 128K-token context window

Provider options

Set AI Gateway routing options under providerOptions.gateway. For provider-specific options, pass them under the provider’s namespace as documented by the AI SDK.

Learn more in the AI SDK provider docs.

provider-options.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'inception/mercury-2',
prompt: 'Why is the sky blue?',
providerOptions: {
gateway: {
only: ['inception'],
},
},
});
console.log(result.text);
}
main().catch(console.error);

These AI Gateway routing options apply to every model. Provider-specific options pass through under the provider’s own namespace (for example providerOptions.anthropic) exactly as documented by the AI SDK.

ParameterTypeRequiredDescription
providerOptions.gateway.onlystring[]NoRestrict routing to these provider slugs. Requests fail over only within the listed providers.
providerOptions.gateway.orderstring[]NoPreferred provider order. Listed providers are tried first; unlisted providers remain available as fallbacks.
providerOptions.gateway.sort'cost' | 'ttft' | 'tps'NoRank candidate providers by price, time to first token, or tokens per second instead of the default routing order.
providerOptions.gateway.zeroDataRetentionbooleanNoRoute only to providers with a zero-data-retention policy for this model.

Routing across providers

AI Gateway serves the same model through multiple providers and fails over automatically. order expresses a preference while keeping every provider eligible; only is a hard allowlist — if none of the listed providers are available the request fails instead of falling back.

Options under a provider's own namespace (for example providerOptions.anthropic) are forwarded to that provider with the request. Providers ignore option namespaces that don't apply to them, so it is safe to set provider options alongside gateway routing options.

Reasoning

AI Gateway bridges reasoning across every API format. The AI SDK exposes a provider-agnostic top-level reasoning level (none, minimal, low, medium, high, or xhigh); the Chat Completions and Responses formats take the same effort under reasoning.effort; and the Anthropic Messages format uses a native thinking token budget. Whichever you send, the gateway maps it to the target model’s native configuration, converting between effort levels and token budgets as needed. Reasoning-related settings under providerOptions take full precedence over the top-level reasoning value and are never merged. Reasoning tokens typically count toward your output-token usage, though how they’re reported and billed varies by provider.

Learn more in the AI Gateway reasoning guide.

reasoning.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'inception/mercury-2',
prompt: 'Explain the Monty Hall problem step by step.',
reasoning: 'high',
});
console.log(result.text);
}
main().catch(console.error);

Tool calling

Expose tools the model can call. Define each tool’s inputs with a Zod schema.

tool-calling.ts
import { generateText, tool } from 'ai';
import { z } from 'zod';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'inception/mercury-2',
prompt: 'What is the weather in San Francisco?',
tools: {
getWeather: tool({
description: 'Get the current weather for a location',
inputSchema: z.object({ location: z.string() }),
execute: async ({ location }) => ({ location, temperatureC: 18 }),
}),
},
});
console.log(result.text);
}
main().catch(console.error);

Copy link to headingMore models by Inception

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
Providers
ZDR
No Training
Free Tier
Release Date
260K1.4 s
$0.04/M
$0.15/M
Read$0.004/M
inception logo
09/08/2026
32K0.4 s
$0.25/M
$1/M
inception logo
02/26/2025

Copy link to headingAbout Mercury 2

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.

Copy link to headingWhat To Consider When Choosing a Provider

  • Configuration: 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.
  • Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

Copy link to headingWhen to Use Mercury 2

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 when

  • 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

Mercury 2 brings a different execution model to production reasoning workloads. Diffusion-based parallel refinement keeps throughput high while preserving tool calling, structured output, and tunable reasoning depth. If inference latency or per-call cost limits how you scale your product, use Mercury 2 on Vercel AI Gateway.

Copy link to headingFrequently 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.

Your use is subject to Inception's Terms & Privacy Policies.