Medium 3.1 API

Medium 3.1 on AIMLAPI.

Modalities
Image, TextText
In / Out price
$0.4232/$2.12per 1M
Context window
128K tokens
Released
Aug 13, 2025

Medium 3.1 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 Medium 3.1 through AI/ML API

Medium 3.1 specs

Model ID
mistralai/mistral-medium-3.1
Developer
Mistral AI
Context window
131,072 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

Mistral Medium 3.1 is documented as suited to software development, including writing, reviewing, debugging, and explaining code. It is also documented for document analysis, such as analyzing reports, specifications, forms, research papers, and other long-form documents.

It is documented for business and knowledge work, including drafting content, analyzing information, summarizing materials, and supporting everyday professional workflows. It is also documented for multimodal analysis, such as interpreting screenshots, charts, diagrams, and other visual information alongside text.

Capabilities

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

Medium 3.1 benchmarks by Artificial Analysis

See how Medium 3.1 scores on independent evaluations. Data retrieved Nov 3, 2026.

Benchmark results

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

Humanity's Last Exam

Expert-written questions across academic subjects.

Medium 3.1 API pricing

Medium 3.1 pricing in US dollars
UsagePriceUnit
Input$0.42321M tokens
Output$2.121M tokens
Cached input$0.04231M tokens

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

Medium 3.1 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
Medium 3.1$0.4232$2.12
Small 4$0.1984$0.7935
Seed 1.6$0.2645$2.12
Mistral Large 4$1.36$4.18
Medium 3.5$1.59$7.93

How to use the Medium 3.1 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": "mistralai/mistral-medium-3.1",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

Medium 3.1 FAQ

What is the context window of Medium 3.1?

Medium 3.1 has a 131,072 tokens context window.

What inputs and outputs does Medium 3.1 support?

Medium 3.1 takes image, text as input and returns text.

What is the model ID for Medium 3.1?

Use mistralai/mistral-medium-3.1 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

How much does Medium 3.1 cost?

Medium 3.1 costs $0.4232 input and $2.12 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does Medium 3.1 support streaming?

Yes, Medium 3.1 can stream responses as they are generated.

Can Medium 3.1 read images?

Yes, Medium 3.1 accepts image input alongside text.

Who created Medium 3.1?

Medium 3.1 was built by Mistral AI.

Is Medium 3.1 a reasoning model?

Yes, it includes reasoning as one of its listed capabilities.

Can Medium 3.1 call external tools or functions?

Yes, it supports function calling and parallel tool calls.

Start building with Medium 3.1

Medium 3.1 API

mistralai/mistral-medium-3.1

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": "mistralai/mistral-medium-3.1",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'