Blog Post

Mercury 2.5 API: Test a Diffusion LLM in Production

Mercury 2.5 API offers fast diffusion-based generation through an OpenAI-compatible endpoint, but teams should test tail latency and output stability.

Mercury 2.5 API: Test a Diffusion LLM in Production - Blog post featured image

The mercury-2.5 model is available through an OpenAI-compatible chat completions endpoint with a 260K context window and up to 65,536 output tokens. The Mercury 2.5 API is worth testing when model generation dominates response time, especially for interactive agents, but it is not a drop-in performance win. Diffusion changes how text arrives, current pricing is promotional, and production teams still need to measure tail latency, tool-call reliability, and output quality on their own workload.

What the Mercury 2.5 API changes

Most language models produce one token after another. Mercury 2.5 uses diffusion, refining multiple positions across a block of text in parallel. Inception describes ordinary streaming as block-by-block delivery, not token-by-token delivery. Its optional diffusing mode exposes successive full-text revisions while the answer is denoised.

That distinction matters more than the model label. A normal chat UI can consume the stable block stream. A debugging or demonstration interface can show diffusion revisions, but it must replace the displayed text on every event. Appending each event would repeat the answer many times.

The official model documentation lists tool calling and structured outputs for Mercury 2.5. It also lists a 260K chat context window and a 65,536-token maximum output. Those are vendor-published limits, not proof that a 260K prompt will meet your latency or accuracy target.

How parallel refinement reaches your application

The API keeps a familiar client surface while changing generation behind it:

This compatibility layer reduces migration work. It does not erase semantic differences. Code that assumes every streamed delta is an immutable token fragment should use the normal stream. Code that enables diffusing: true must treat each delta as the current full answer.

Our position is that diffusion mode belongs in evaluation tooling, not the default customer interface. Rewriting visible words can distract users and complicate accessibility. The stable stream is the safer product behavior unless watching refinement is itself the feature.

Make the smallest possible integration

The cleanest evaluation uses the official SDK and one environment variable:

npm install inceptionai
export INCEPTION_API_KEY="your_api_key_here"

Then send a streamed request:

import Inception from "inceptionai";

const client = new Inception();

const stream = await client.chat.completions.create({
  model: "mercury-2.5",
  messages: [
    {
      role: "user",
      content: "Return a two-step rollback plan for a failed schema migration.",
    },
  ],
  reasoning_effort: "medium",
  max_completion_tokens: 600,
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta.content ?? "");
}

We checked the package name, model identifier, request fields, and streaming loop against Inception's current quick start. The example is deliberately small. Add timeouts, retries, request IDs, and cancellation in your application layer rather than hiding them inside a demo.

Teams already using the OpenAI client can instead point base_url at https://api.inceptionlabs.ai/v1. Keep provider-specific parameters behind an adapter. That makes a rollback to another model a configuration change rather than a rewrite.

If you are planning that adapter across an existing model stack, our AI integration service is relevant at the boundary where provider-specific streaming, telemetry, and fallback behavior have to become one reliable interface.

Test latency as a distribution, not a demo

Diffusion models attract attention because parallel decoding can produce high throughput. The original Mercury technical report reported more than 700 tokens per second for earlier Mercury Coder models on H100 hardware, with higher throughput for the Mini model. That independent-looking benchmark was authored by Inception Labs researchers, so it is still vendor-reported evidence.

Do not turn that number into a Mercury 2.5 service-level expectation. Hardware benchmarks, shared API traffic, reasoning effort, prompt length, and tool calls are different layers.

Run at least 100 production-shaped requests and record these checks for Mercury 2.5 and your current model:

Time to first stable text

Why it matters: Determines perceived responsiveness.

Failure signal: Fast total time but a long blank screen.

P50 and P95 completion time

Why it matters: Separates typical speed from slow outliers.

Failure signal: Good median with unacceptable tail latency.

Successful tool calls

Why it matters: Tests agent behavior, not prose speed.

Failure signal: Invalid arguments or missed required calls.

Schema-valid responses

Why it matters: Measures structured-output reliability.

Failure signal: Retries erase the latency advantage.

Cost per accepted result

Why it matters: Includes failed and retried requests.

Failure signal: Cheap tokens but expensive completed tasks.

Our earlier analysis of the OpenAI Ultrafast API reaches the same operational conclusion from a different architecture: generation speed matters only when generation is the bottleneck. Retrieval, browser work, database queries, and build jobs do not accelerate because the model decodes faster.

Price the workload using the non-promotional rate

Inception currently lists Mercury 2.5 at an 80 percent promotional discount: $0.04 per million input tokens, $0.004 per million cached input tokens, and $0.15 per million output tokens. The struck-through standard rates are $0.20, $0.02, and $0.75 respectively.

Use the standard rate in capacity planning unless the vendor provides a contractual end date and price. A workload with 100 million uncached input tokens and 20 million output tokens costs about $19 at the promotional rate, but $35 at the listed standard rate. That is still inexpensive, yet the 84 percent jump between those two totals can break a budget built from a launch discount.

Also model retries. If 8 percent of structured responses fail validation and must be regenerated, token price is not the final price. Cost per accepted response is.

The catch is mutable streaming

The most novel Mercury behavior is also the easiest integration bug. With diffusing: true, each chunk contains the full text in its current state. It may replace words that appeared in the previous chunk.

That affects more than rendering:

  • Do not trigger tools from intermediate diffusion text.
  • Do not persist every revision as a separate assistant message.
  • Do not run moderation or schema validation until the final answer is identified.
  • Do not calculate output tokens by summing the lengths of full-text revisions.

For user-facing chat, normal block streaming avoids these problems. Diffusion visualization is useful when engineers need to understand model behavior, but it adds state management without improving the final answer.

When Mercury 2.5 is not worth using

Choose a simpler option when the model returns short classifications, routes requests, or runs in an offline batch. Network time and queueing may dominate a ten-token response. A smaller autoregressive model or deterministic code can be easier to operate.

Mercury 2.5 is also a weak fit if your provider abstraction depends on identical streaming semantics across vendors. Supporting mutable diffusion events introduces a special path. Unless that path yields a measured user benefit, keep diffusing disabled.

Finally, do not migrate because the launch price looks unusually low. Promotional pricing can change, and the API documentation does not publish a latency service-level agreement. The model should earn its place through an evaluation set, not a throughput headline.

What to do next

Start with normal streaming and a fixed evaluation set. Compare Mercury 2.5 against the model you already run, using the same prompts, tool definitions, output schemas, timeout, and retry policy. Log provider response IDs and the selected reasoning effort. Report P95 latency and cost per accepted result.

Only then test diffusion visualization in an internal interface. If the stable stream is faster and quality holds, ship the provider behind a feature flag with a fallback. If retrieval or tools dominate total time, fix those components first.

Frequently asked questions

Is the Mercury 2.5 API compatible with the OpenAI SDK?

Yes. Inception documents an OpenAI-compatible base URL at https://api.inceptionlabs.ai/v1 and supports chat completions. Compatibility covers the request surface, but provider-specific behavior still matters. Test streaming, tool calls, structured outputs, retries, and error handling before treating two providers as interchangeable in production.

What does diffusing: true do in Mercury 2.5?

It streams intermediate denoising steps instead of only stable output blocks. Each event contains the current full text, so the client should replace its display rather than append the delta. Use it for evaluation or visualization. Do not execute tools or persist messages from an unfinished diffusion revision.

How much does the Mercury 2.5 API cost?

Inception currently lists promotional prices of $0.04 per million input tokens and $0.15 per million output tokens. The same page shows standard prices of $0.20 and $0.75. Budget against standard pricing, include retries, and calculate cost per accepted result instead of relying on the launch discount.

Explore More Articles

Discover other insightful articles and stories from our blog.