Workers AI just got a blazing-fast vision AI: Moondream 3.1!
Hi, it's me, I'm so excited! Today's news is about AI that understands images. Cloudflare has teamed up with Moondream to bring a new vision language model to Workers AI. Getting an image model to run this fast at the edge is genuinely exciting, so let me walk you through it!
Cloudflare ChangelogWhat was announced?
According to Cloudflare's Changelog, Moondream 3.1 has joined Workers AI through a partnership with Moondream. The model id is @cf/moondream/moondream3.1-9B-A2B. As the name suggests, it's a vision language model built on a mixture-of-experts (MoE) architecture, with 9B total parameters but only 2B active at any time. That gives it frontier-level visual reasoning while keeping inference fast and cost-efficient.
It also comes with a 32K token context window, so it can handle complex queries and structured outputs.
Why it matters
Vision workloads like live camera feeds, robotics, content moderation, and interactive agents often need answers in milliseconds, not seconds. Moondream 3.1's small active footprint (2B active parameters) pairs really well with Workers AI's serverless, globally distributed inference: requests run close to your users, and streaming responses start returning almost immediately. That combination is what makes it possible to bring a frontier-level model into real-time, edge-based vision use cases that used to be out of reach.
What changes
Developers working with images can now call this vision language model through the Workers AI binding (env.AI.run()) or the REST API at /ai/run, and it also works with AI Gateway. That makes use cases like live video overlays, document field extraction, and agents analyzing screenshots to decide their next action much more realistic to build with acceptable latency.
Dive Deep
Moondream 3.1 offers four main capabilities.
- Query — ask open-ended questions about an image, with an optional reasoning parameter that returns the model's reasoning behind an answer
- Caption — generate short, normal, or long descriptions of an image
- Point — return coordinates for objects matching a target phrase
- Detect — return bounding boxes for objects matching a target phrase
Median end-to-end latencies measured in testing (including the network round trip) were:
- Query: about 770 ms
- Caption: about 480 ms
- Point: about 145 ms
- Detect: about 160 ms
On top of that, the first token of a streaming response came back in roughly 20-30 ms during testing, which suggests it should feel very snappy in practice.
Wrap-up
Here's a recap of today's announcement.
- Moondream 3.1 (
@cf/moondream/moondream3.1-9B-A2B) has joined Workers AI through a partnership with Moondream - It's a mixture-of-experts model with 9B total parameters, 2B active, and a 32K token context window
- It supports four capabilities: Query, Caption, Point, and Detect
- Median latency is about 770 ms for Query, 480 ms for Caption, 145 ms for Point, and 160 ms for Detect, with first tokens streaming back in roughly 20-30 ms
- You can access it via the
env.AI.run()binding or the/ai/runREST API, and it works with AI Gateway too
If you're building products around low-latency vision, like live video analysis, robotics, or content moderation, this update is well worth a look!