How to Use the Moondream 3 Preview API
Call moondream3-preview at Moondream's /v1 API with an X-Moondream-Auth key or OpenAI-compatible bearer token; pricing starts at $0.30 per 1M input tokens as of 2026-10-17.

Summary
- Use model ID moondream3-preview with Moondream's skill endpoints or /v1/chat/completions.
- OpenAI-compatible image requests require base64 data URLs; remote image URLs return HTTP 400.
- Cloud pricing is $0.30 per 1M input tokens and $2.50 per 1M output tokens as of 2026-10-17.
- The default limit is 2 requests per second; accounts with at least $10 balance get 10 requests per second.
On this page
Use the preview model ID
Set model to moondream3-preview. Moondream lists that ID for both its direct skill API and its OpenAI-compatible chat endpoint (API documentation). The direct API base URL is https://api.moondream.ai/v1/, and every request needs a model field.
For visual question answering, send a POST request to /query with your API key in X-Moondream-Auth:
curl -X POST https://api.moondream.ai/v1/query \
-H 'Content-Type: application/json' \
-H 'X-Moondream-Auth: YOUR_API_KEY' \
-d '{
"model": "moondream3-preview",
"image_url": "data:image/jpeg;base64,...",
"question": "What is in this image?"
}'
Replace YOUR_API_KEY with a key from the Moondream Cloud Console. The response should contain a request_id and an answer.
The same API documents /detect for bounding boxes, /point for object coordinates, /caption for descriptions, and /segment for SVG masks. Use the endpoint that matches the result your application needs. Each request still includes model: "moondream3-preview" and an image.
Use the OpenAI-compatible chat endpoint
Point an OpenAI SDK or another OpenAI-format client at https://api.moondream.ai/v1, pass the Moondream key as a bearer token, and use the same model ID. Moondream documents multi-turn messages, streaming, image inputs, and reasoning on this endpoint (OpenAI compatibility guide). If your client is Cline, see pointing Cline at a compatible provider for the base URL, key, and model ID fields.
A text-only request looks like this:
curl https://api.moondream.ai/v1/chat/completions \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "moondream3-preview",
"messages": [{"role": "user", "content": "What is 2 + 2?"}]
}'
For vision, put an image and text in the user's content array. The image must be a base64 data URL. Moondream says remote http(s) image URLs are rejected with HTTP 400.
curl https://api.moondream.ai/v1/chat/completions \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "moondream3-preview",
"messages": [{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}},
{"type": "text", "text": "What is in this image?"}
]
}]
}'
When the request succeeds, read the answer from choices[0].message.content. You can set stream to true for Server-Sent Events. If the stream should include token totals, add stream_options: {"include_usage": true}; the final chunk carries the usage fields.
The documented parameters include temperature, top_p, max_completion_tokens, reasoning, and stream. max_completion_tokens includes reasoning tokens and is capped at 4096. Tool and function calling, and stop sequences, are not currently supported. For changes across other APIs, see recent API parameter updates.
Check the request limit before sending traffic
Moondream lists a default limit of 2 requests per second for moondream3-preview. An account with at least $10 balance receives 10 requests per second (rate-limit table). If your worker sends more requests than its tier allows, add client-side throttling or request a higher limit from Moondream for a production workload.
The limit is a request rate, not a token budget. Your billing still depends on the number of input and output tokens in each request.
Calculate the Cloud price
As of 2026-10-17, Moondream Cloud charges $0.30 per 1M input tokens and $2.50 per 1M output tokens on its standard pay-as-you-go plan (Cloud pricing). Charges accrue as requests are sent, with no minimum commitment. The pricing page also lists $5.00 in free credits each month.
Prepaid tokens remain valid for 12 months from purchase. Unused tokens expire after one year and are non-refundable except where required by law. Use the usage dashboard to inspect token consumption before estimating a larger workload.
For a rough estimate, multiply input tokens by 0.30 / 1,000,000 and output tokens by 2.50 / 1,000,000. Image requests can consume different amounts of input tokens, so measure usage from the API response instead of assuming every image costs the same.
Run the open model locally
The Moondream 3 Preview model card on Hugging Face provides a Transformers path and a vLLM path. The model repository is moondream/moondream3-preview.
For a local vLLM server, the model card documents:
pip install vllm
vllm serve "moondream/moondream3-preview"
Its example calls the resulting OpenAI-compatible server at http://localhost:8000/v1/completions with the model repository name. Confirm the serving framework's current image-input support before moving a vision workload from Moondream Cloud to a local endpoint. For another local OpenAI-compatible setup, see the Dory 1.0 local API guide.
The model page describes Moondream 3 Preview as a 9B mixture-of-experts model with 2B active parameters per token, a 32K-token context, and built-in query, detection, pointing, captioning, segmentation, OCR, structured-output, and reasoning skills (Moondream model lineup). Those model characteristics do not change the Cloud API model ID: use moondream3-preview.
Not confirmed yet
The public API pages do not promise that every third-party OpenAI-compatible provider supports Moondream's image format, reasoning field, or grounded skill endpoints. Before switching providers, check that provider's model catalog and image-input documentation, then send one request with the exact moondream3-preview ID. The official pages also do not document tool calling support; the OpenAI compatibility page explicitly lists it as unsupported.