跳转到内容
新 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 密钥。