跳转到内容

Moondream

集成

模型 id moondream/batched
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/moondream/batched?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": [
      {
        "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
      }
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此请求: ≈$0.004 4 API 积分 在此页面运行

获取 API 密钥
Moondream 视觉 #multimodal#vision

通过传入提示词和图像 URL 对列表,在一次调用中回答有关多张图像的问题

Moondream · 数据(JSON)

你的第一个结果会显示在这里

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存,也可免费保存 7 天。

构建请求

控件根据模型架构生成。修改控件时,代码和价格会同步更新。

•必填

包含图像输入提示词和 URL 的列表。

高级 max_tokens · temperature · top_p · repetition_penalty
默认 64

新生成 Token 的上限。

默认 0.2

采样温度设置。

默认 1

采样 top-P 设置。

默认 1

采样期间应用于重复内容的惩罚。

POST /run/moondream/batched?wait=20 报价 → $0.004
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/moondream/batched?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": [
      {
        "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
      }
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 Moondream

Moondream 视觉语言模型的批处理版本。向 `inputs` 传入对象列表,每个对象包含提示词和图像 URL,并获得生成结果列表以及已处理的文件名和耗时。生成可通过 `max_tokens`(32 到 1024,默认 64)、`temperature`(0 到 1)、`top_p` 和 `repetition_penalty`(1 到 2)进行调节。响应还包含一个用于指示结果是否为部分结果的标志。

参数

名称类型 默认值允许值 描述
inputs必填
类型object[]
包含图像输入提示词和 URL 的列表。
inputs[].image_url必填
类型url · image
指向待处理图像的 URL。
inputs[].prompt可选
类型string
默认值Describe this image.
应用于图像的提示词。
max_tokens可选
类型integer
默认值64
32 – 1,024
新生成 Token 的上限。
temperature可选
类型number
默认值0.2
≤ 1> 0
采样温度设置。
top_p可选
类型number
默认值1
0 – 1
采样 top-P 设置。
repetition_penalty可选
类型number
默认值1
1 – 2
采样期间应用于重复内容的惩罚。
必填

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "moondream/batched",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 4,
    "usd": "0.004",
    "charged": 4,
    "refunded": 0
  },
  "input": {
    "inputs": [
      {
        "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
      }
    ]
  },
  "output": {
    "outputs": [
      "string"
    ],
    "partial": false,
    "timings": {},
    "filenames": [
      "string"
    ]
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
文件由你选择每个 outputs[].url 都是我们存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
所有模型的结构一致图像、视频和音频的字段均为 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
outputs
array of string包含生成结果的列表。
partial
boolean指示输出是否不完整。
timings
object各处理阶段的耗时测量。
filenames
array of string | null已处理图像文件的名称。

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh-CN/developers/models/moondream/batched.md. 所有模型和指南: https://doitong.com/developers/llms.txt