跳至內容
最新 Kling 3.0 和 Seedance 2.0 已上線

一個 API,支援最佳的影像、影片和音訊模型

所有模型使用相同的請求格式。執行前顯示確切價格。檔案可永久保留,或免費保留 7 天,由您選擇。

POSTapi.doitong.com/v1/run/{model_id}

1,496模型
84實驗室
圖像影片音訊3D文字資料(JSON)檔案
所有模型共用一種請求格式
快速入門

從金鑰到完成的影片,只需一次呼叫

閱讀快速入門
終端機
# Keys start with doitong_
export DOITONG_API_KEY="doitong_..."

# Check it works: returns your API credit balance
curl https://api.doitong.com/v1/account \
  -H "Authorization: Bearer $DOITONG_API_KEY"
終端機
# 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/kling-video/v3/pro/image-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "The banana manager turns to the camera, smiles and waves while coworkers keep typing, gentle handheld camera",
    "image": "https://content.doitong.com/images/gp/image_20260610003801_541d9719_316882.png",
    "duration": 5
  }'

# 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"
response.json
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "model": "kling-video/v3/pro/image-to-video",
  "status": "succeeded",
  "cost": {
    "credits": 840,
    "usd": "0.84",
    "charged": 840,
    "refunded": 0
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ]
}
1,496 個模型 · 21 個分類

查看每個模型能生成的內容

所有類別(21)

依實驗室瀏覽

所有實驗室(84)
為什麼選擇 Doitong API

學會一種請求,使用所有模型。

統一參數

image、duration 和 aspect_ratio 在所有模型中都代表相同意義。模型原生名稱仍可作為別名使用。

"image": "…", "duration": 5

所有模型共用一個請求 URL

只要變更路徑即可切換模型。驗證、請求本文和回應格式維持不變。

POST /run/{model_id}

報價 = 費用

POST /quote/{model_id} 會返回此次輸入的確切價格。這就是你要支付的費用,不會更多。

→ { "credits": 560, "usd": "0.56" }

檔案依您的需求保存

每個輸出都會複製到我們的儲存空間。每 GB 每月支付 $0.10 即可永久保留,或免費保留 7 天:可在帳戶中切換,也可依請求設定。

?storage=permanent | temporary

統一錯誤格式

每個錯誤都會指出參數、原因和文件連結,所有模型皆適用。無效輸入不會收費。

"param": "duration", "code": "out_of_range"

每個金鑰設定預算 + MCP

為每個金鑰設定支出上限,再透過 MCP 伺服器將該金鑰交給代理程式使用。

api.doitong.com/v1/mcp
專為 AI 代理程式打造

讓你的代理程式選擇模型、取得報價並執行

使用與 REST 相同的金鑰,將 Claude、ChatGPT 或 Cursor 連接至 Doitong MCP 伺服器。每個文件頁面也都提供 Markdown 版本,讓代理程式讀取的內容與你完全相同。

  • 每次執行前先取得報價,讓代理程式維持在預算內
  • 錯誤會指出代理程式必須修正的參數
  • 每個頁面都提供 Markdown 版本,適用於上下文視窗

將提示詞貼到 Claude、ChatGPT 或 Cursor,然後描述你想建構的內容。

顯示提示詞
You can generate images, video, audio and 3D with the Doitong API.
Read https://doitong.com/developers/llms.txt first, then the .md page of each model you plan to use.
Base URL: https://api.doitong.com/v1. Authenticate with the header "Authorization: Bearer $DOITONG_API_KEY".
List models with GET /models and read one model's schema with GET /models/{model_id}.
Always call POST /quote/{model_id} with the input first and tell me the price (1000 API credits = 1 USD).
Then call POST /run/{model_id}?wait=20 with the same JSON body and an Idempotency-Key header.
If the status is still queued or running, poll GET /requests/{id}?wait=20.
Use outputs[].url from the response; files are kept forever unless the account keeps them 7 days
(pass ?storage=temporary for throwaway runs). Use only parameters from the model schema.
claude mcp add --transport http doitong-models https://api.doitong.com/v1/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

在專案資料夾中執行一次。使用與 REST API 相同的 Bearer 金鑰。