Moondream 3.1 API

The successor to Moondream 3 Preview: a vision-language model with 9B total and 2B active parameters for visual question answering, captioning, OCR and visual reasoning.

Modalities
Text, ImageText
In / Out price
$0.3174/$2.65per 1M
Context window
32K tokens
Released
Oct 15, 2026

Moondream 3.1 overview

Moondream 3.1 by Moondream

Send an image with a text prompt to the chat completions endpoint and receive a text answer.

Moondream 3.1 specs

Model ID
moondream/moondream3.1-9b-a2b
Developer
Moondream
Context window
32,000 tokens
Max output
4,096 tokens
Input
Text, Image
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

What Is Moondream 3.1?

Moondream 3.1 is a vision-language model from Moondream and the successor to Moondream 3 Preview. It is a mixture-of-experts model with 9B total parameters, of which 2B are active for each token. It reads images together with a text prompt and answers in text, covering visual question answering, captioning, OCR and visual reasoning. It is available on AI/ML API as moondream/moondream3.1-9b-a2b.

Specifications

  • Available on AI/ML API since: 15 October 2026
  • Architecture: mixture of experts, 9B total / 2B active parameters
  • Input: text and images, output: text
  • Capabilities: vision, streaming

Moondream 3.1 vs Moondream 3 Preview

Both models share the 9B/2B mixture-of-experts layout, the 32,000-token context window, the 4,096-token output limit and the same price on AI/ML API. Moondream 3.1 is the newer release of the line; Moondream 3 Preview remains available for workloads that were built and evaluated on it.

What It Is Built For

The model is sized for high-volume image understanding: answering questions about photos and screenshots, writing captions, reading text in images and reasoning about what an image shows, at a per-token price well below larger multimodal models.

Use cases

Visual question answering over photos, screenshots and product images, where an application needs a short, specific text answer.

Captioning and alt text generation for image libraries, catalogues and user uploads.

OCR on signs, labels, receipts, documents and UI screenshots.

A low-cost vision step inside a larger pipeline, for example classifying or describing an image before passing it to another model or tool.

Capabilities

  • Streaming
  • Vision

Moondream 3.1 API pricing

Moondream 3.1 pricing in US dollars
UsagePriceUnit
Input$0.31741M tokens
Output$2.651M tokens

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

Moondream 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
Moondream 3.1$0.3174$2.65
Moondream 3 Preview$0.3174$2.65
Nova 2 Lite$0.3174$2.65
Seed 2.1 Turbo$0.529$2.65
Kimi K2 Thinking$0.6348$2.65

How to use the Moondream 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": "moondream/moondream3.1-9b-a2b",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Moondream 3.1 FAQ

Is Moondream 3.1 available on AI/ML API?

Yes. Moondream 3.1 is live on AI/ML API as moondream/moondream3.1-9b-a2b, through the chat completions endpoint.

What is new in Moondream 3.1?

Moondream 3.1 is the successor to Moondream 3 Preview. It keeps the same 9B total / 2B active mixture-of-experts layout, limits and price on AI/ML API.

What can Moondream 3.1 do?

Visual question answering, captioning, OCR and visual reasoning over images. It takes text and images as input and returns text.

What is the context window of Moondream 3.1?

32,000 tokens, with up to 4,096 output tokens per request.

How much does Moondream 3.1 cost?

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

What is the Moondream 3.1 model ID?

Use moondream/moondream3.1-9b-a2b as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.

Start building with Moondream 3.1

Moondream 3.1 API

moondream/moondream3.1-9b-a2b

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": "moondream/moondream3.1-9b-a2b",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'