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.
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.
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.
Input is billed at $0.41262 per 1M tokens and output at $3.4385 per 1M tokens.
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.
import requests r = requests.post( "https://api.aimlapi.com/v1/chat/completions", headers={"Authorization": "Bearer " + AIMLAPI_KEY}, json={ "model": "moondream/moondream3.1-9b-a2b", "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": "moondream/moondream3.1-9b-a2b", "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":"moondream/moondream3.1-9b-a2b","messages":[{"role":"user","content":"Hello!"}]}'
OpenAI-compatible — swap the base URL and it works with your existing SDK.
| Type | Price |
|---|---|
| Input | |
| Output | |
Billed per token: $0.41262 / 1M input tokens and $3.4385 / 1M output tokens.
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
Moondream 3.1 This page | Image Q&A, captions and OCR | |||
| Image Q&A, captions and OCR | ||||
| Documents, GUI screenshots and video |
Yes. Moondream 3.1 is live on AI/ML API as moondream/moondream3.1-9b-a2b, through the chat completions endpoint.
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.
Visual question answering, captioning, OCR and visual reasoning over images. It takes text and images as input and returns text.
32,000 tokens, with up to 4,096 output tokens per request.
Input $0.41262 / 1M tokens and output $3.4385 / 1M tokens.