跳至內容

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-TW/developers/models/moondream/batched.md. 所有模型與指南: https://doitong.com/developers/llms.txt