跳转到内容
AI 智能体

面向 AI 智能体的文档

以 Markdown 查看 更新时间

这些文档既供 AI 助手阅读,也供人类阅读。将下面的某个入口交给你的智能体, 它就能编写正确的集成代码,而无需猜测参数名称或价格。

入口

URL 说明
https://doitong.com/developers/llms.txt llms.txt 格式的索引:每篇指南和每个模型都附有一行说明。
https://doitong.com/developers/llms-full.txt 一份 Markdown 文件,包含所有完整指南、完整的精选模型,以及全部 1,496 个模型的必要信息(id、厂商、价格、完整页面链接)。
/<lang>/developers/llms.txt 使用其他网站语言的相同索引,例如 https://doitong.com/de/developers/llms.txt(默认使用英语)。
<any page>.md 页面的 Markdown 版本,例如 https://doitong.com/developers/models/flux/schnell.md 或 https://doitong.com/developers/docs/quickstart.md。
/developers/models/<id>/llms.txt 与模型的 .md 版本相同。
https://doitong.com/developers/openapi.json 供代码生成器使用的 OpenAPI 3.1:包含每个端点和精选模型的类型化请求体;添加 ?model=<id>、?category=<id> 或 ?models=all 可包含其他模型。
https://api.doitong.com/v1/models 以 JSON 返回的目录(无需密钥)。

每个模型的 Markdown 页面都包含以 USD 和 API 积分表示的价格、每个参数及其所有允许值、仅包含必需字段的示例和完整示例、响应结构,以及适用于 curl、JavaScript、Python 和 MCP 的现成代码。

为 AI 复制

每个模型页面都有 为 AI 复制 按钮:将页面复制为 Markdown,或在 ChatGPT 或 Claude 中打开页面,并附带 指向 Markdown 版本的提示词。

有效的提示词

将以下内容粘贴到 Claude、ChatGPT 或 Cursor 中,然后描述你想构建的内容:

提示词
I want to generate images/video/audio with the Doitong API.
Read https://doitong.com/developers/llms.txt first, then the .md page of each model you plan to use.
Facts: base URL https://api.doitong.com/v1; auth header "Authorization: Bearer <key>" with the key from the
DOITONG_API_KEY environment variable; run with POST /run/{model_id}?wait=20 and, if the status is
still queued or running, poll GET /requests/{id}?wait=20; outputs[].url are file URLs on Doitong storage
(kept forever by default; add ?storage=temporary for throwaway runs, deleted after 7 days).
Get the price first with POST /quote/{model_id} (same body): exact, or for a model charged by usage the
most the run can cost (the unused part is refunded). Prices are in USD; 1000 API credits = 1 USD.
Use the parameter names from the model page; never invent parameters.

让智能体自行调用模型

要让智能体直接生成媒体,请使用带有 API 积分预算的密钥连接 MCP 服务器。 随后,智能体即可使用工具搜索模型、获取报价、运行模型并获取结果,且无法超出预算。