Mercury 2 API

inception/mercury-2
Mercury 2 on AIMLAPI.
Context
128K tokens
Input
$0.2645 / 1M tokens
Output
$0.7935 / 1M tokens
Released
Mar 4, 2026

Overview

What is Mercury 2 API?

Mercury 2 is available through AIMLAPI.

Technical Specifications
- Supported inputs: Image, Text
- Output: Text
- Context window: 128,000 tokens / Max output: 50,000 tokens
- Endpoint: /chat/completions

Performance Benchmarks
[embed]

Mercury 2 API Pricing
- Input: $0.325 / 1M tokens
- Output: $0.975 / 1M tokens

Where to Use Mercury 2

Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.

Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.

Complex reasoning
Extended reasoning improves reliability on multi-step math, logic, and technical analysis.

Long-document analysis
Summarize and extract from contracts, papers, and reports without aggressive chunking.

Code Sample
[embed]

Uptime and performance

  • Uptime (7d): 100%

Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.

Use cases

Coding and editing: Mercury 2 is documented for autocomplete, next-edit suggestions, refactors, and interactive code agents, where the developer stays in the loop and pauses break flow.

Agentic loops: It is described as suited to multi-step agent workflows, including loops where latency compounds across many inference calls and tighter feedback cycles improve controllability and trust.

Search and RAG pipelines: Mercury 2 is documented for multi-hop retrieval, reranking, and summarization workflows, where it can add reasoning to search loops without exceeding the latency budget.

Real-time voice and interaction: It is described as suitable for voice interfaces and other latency-sensitive interactions, including support and sales voice agents, customer support copilots, interactive tutoring Q&A, and real-time translation.

How to use Mercury 2 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to inception/mercury-2.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/chat/completions",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "inception/mercury-2",
      "messages": [
        {
          "role": "user",
          "content": "Hello!"
        }
      ]
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "inception/mercury-2",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"inception/mercury-2","messages":[{"role":"user","content":"Hello!"}]}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Mercury 2 API Pricing

TypePrice
Input
$0.2645 / 1M tokens
Output
$0.7935 / 1M tokens
Cached input
$0.02645 / 1M tokens

Mercury 2 Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
Intelligence
11.5
Composite score across standardised reasoning, knowledge and problem-solving evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026
Coding
31.1
Composite score across standardised coding evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026
AIME 2025
91.1
Competition mathematics (AIME), 2025SourceSeptember 21, 2026
GPQA Diamond
73.6
Google-proof graduate science questions (hardest subset)SourceSeptember 21, 2026
Humanity's Last Exam
17.1%
Expert-level questions across many domainsSourceSeptember 21, 2026

Mercury 2 vs other models

ModelInputOutputContextBest for
Mercury 2
This page
$0.2645 / 1M tokens
$0.7935 / 1M tokens
128K tokens
Reasoning + agents
$5 / 1M tokens
$30 / 1M tokens
1M tokens
Reasoning + agents
$2 / 1M tokens
$10 / 1M tokens
1M tokens
Balanced coding + agents
$3 / 1M tokens
$15 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$1.5 / 1M tokens
$9 / 1M tokens
1M tokens
Reasoning + agents

Frequently asked questions

Mercury 2 has a 128,000 tokens context window and can return up to 50,000 tokens.

Mercury 2 takes image, text as input and returns text.

Use inception/mercury-2 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

Mercury 2 is priced at input $0.34385 / 1M tokens, output $1.03155 / 1M tokens, cached input $0.034385 / 1M tokens.

Yes, Mercury 2 can stream responses as they are generated.

Yes, Mercury 2 accepts image input alongside text.

No. Mercury 2 handles image and text input with text output only; audio is not supported.

Yes. It supports function calling, tool use, and parallel tool calls.

Yes. Mercury 2 includes reasoning as a supported feature and capability.

Start building with Mercury 2

Get API Key
1000+ models, one API.