Mercury 2 API

Mercury 2 on AIMLAPI.

Modalities
Image, TextText
In / Out price
$0.2645/$0.7935per 1M
Context window
125K tokens
Released
Mar 4, 2026

Mercury 2 overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 3, 2026.

SVG of a pelican riding a bicycle, written by Mercury 2 through AI/ML API

Mercury 2 specs

Model ID
inception/mercury-2
Developer
Inception
Context window
128,000 tokens
Max output
50,000 tokens
Input
Image, Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

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.

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.

Capabilities

  • Function calling
  • Reasoning
  • Streaming
  • Structured outputs
  • Web search

Mercury 2 benchmarks by Artificial Analysis

See how Mercury 2 scores on independent evaluations. Data retrieved Nov 3, 2026.

Benchmark results

Compare 15 models available on AI/ML API across 5 independent benchmarks.

Humanity's Last Exam

Expert-written questions across academic subjects.

Mercury 2 API pricing

Mercury 2 pricing in US dollars
UsagePriceUnit
Input$0.26451M tokens
Output$0.79351M tokens
Cached input$0.02651M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

Mercury 2 vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Mercury 2$0.2645$0.7935
Mercury 3$0.2116$0.7406
Mercury 2.5$0.2116$0.7935
Small 4$0.1984$0.7935
ReMM-SLERP-L2-13B$0.529$0.7935

How to use the Mercury 2 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl '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": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

Mercury 2 FAQ

What is the context window of Mercury 2?

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

What inputs and outputs does Mercury 2 support?

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

What is the model ID for Mercury 2?

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

How much does Mercury 2 cost?

Mercury 2 costs $0.2645 input and $0.7935 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does Mercury 2 support streaming?

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

Can Mercury 2 read images?

Yes, Mercury 2 accepts image input alongside text.

Does Mercury 2 have voice or audio capabilities?

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

Can Mercury 2 call external tools or functions?

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

Does Mercury 2 support reasoning capabilities?

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

Start building with Mercury 2

Mercury 2 API

inception/mercury-2

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl '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": "Write a haiku about the ocean."
    }
  ]
}'