# Moondream 3.1 — Use via Hanzo AI API

> Moondream 3.1 is a vision-language model from Moondream, the successor to Moondream 3 Preview, with 9B total parameters and 2B active (mixtu... Access via Hanzo&#x27;s OpenAI-compatible API. Context: 32K. Get started free.

[Models](https://hanzo.ai/models)/[moondream](https://hanzo.ai/models/moondream)/moondream3.1-9b-a2b

m

# Moondream 3.1

[moondream](https://hanzo.ai/models/moondream)

Moondream 3.1 is a vision-language model from Moondream, the successor to Moondream 3 Preview, with 9B total parameters and 2B active (mixture-of-experts). It handles visual question answering, captioning, OCR, and...

text

[Get API Key](https://platform.hanzo.ai/api-keys)[View Docs](https://docs.hanzo.ai)[Try in Chat](https://hanzo.ai/chat)

## Specifications

Context Window

32K

Modalities

text

Price

…

Status

available

Category

third-party

Model ID

moondream/moondream3.1-9b-a2b

## Quick Start

Instant Guest API Keyguest_temp_key

No account or sign up required

Test right now from your terminal. No credentials needed:

cURL · instant guest request

Copy

```
curl https://api.hanzo.ai/v1/chat/completions \ -H "Authorization: Bearer guest_temp_key" \ -d &#x27;{"model": "zen-free", "messages": [{"role": "user", "content": "hello"}]}&#x27;
```

TypeScript

```
import OpenAI from &#x27;openai&#x27; const client = new OpenAI({ apiKey: process.env.HANZO_API_KEY, baseURL: &#x27;https://api.hanzo.ai/v1&#x27; }) const response = await client.chat.completions.create({ model: &#x27;moondream/moondream3.1-9b-a2b&#x27;, messages: [{ role: &#x27;user&#x27;, content: &#x27;Hello!&#x27; }] }) console.log(response.choices[0].message.content)
```

Python

```
from openai import OpenAI client = OpenAI( api_key=os.environ["HANZO_API_KEY"], base_url="https://api.hanzo.ai/v1" ) response = client.chat.completions.create( model="moondream/moondream3.1-9b-a2b", messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content)
```

cURL

```
curl https://api.hanzo.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $HANZO_API_KEY" \ -d &#x27;{ "model": "moondream/moondream3.1-9b-a2b", "messages": [{"role": "user", "content": "Hello!"}] }&#x27;
```

Go

```
package main import ( "context" "fmt" "os" "github.com/sashabaranov/go-openai" ) func main() { cfg := openai.DefaultConfig(os.Getenv("HANZO_API_KEY")) cfg.BaseURL = "https://api.hanzo.ai/v1" client := openai.NewClientWithConfig(cfg) resp, _ := client.CreateChatCompletion(context.Background(), openai.ChatCompletionRequest{ Model: "moondream/moondream3.1-9b-a2b", Messages: []openai.ChatCompletionMessage{ {Role: openai.ChatMessageRoleUser, Content: "Hello!"}, }, }, ) fmt.Println(resp.Choices[0].Message.Content) }
```

## More from moondream

[Moondream 3 Preview32KMoondream 3 Preview is a vision-language model from Moondream with 9B total parameters and 2B active (mixture-of-experts). It handles visual question answering, captioning, OCR, and visual reasoning over images, with...](https://hanzo.ai/models/moondream/moondream3-preview)

[View all moondream models →](https://hanzo.ai/models/moondream)

## Use Moondream 3.1 via Hanzo AI

One API key. Every major model. OpenAI-compatible. Start free.

[Get Free API Key](https://platform.hanzo.ai/api-keys)[Browse All Models](https://hanzo.ai/models)
