Mercury 2 API

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

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.34385 / 1M tokens
Output
$1.03155 / 1M tokens
Cached input
$0.034385 / 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.34385 / 1M tokens
$1.03155 / 1M tokens
128K tokens
Reasoning + agents
$6.5 / 1M tokens
$39 / 1M tokens
1M tokens
Reasoning + agents
$2.6 / 1M tokens
$13 / 1M tokens
1M tokens
Balanced coding + agents
$3.9 / 1M tokens
$19.5 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$1.95 / 1M tokens
$11.7 / 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.