# AI 智能体文档

这些文档既面向 AI 助手，也面向人类读者。将以下入口之一交给你的智能体，它就可以编写正确的集成代码，而无需猜测参数名称或价格。

## 入口

| URL | 说明 |
|---|---|
| [https://doitong.com/developers/llms.txt](https://doitong.com/developers/llms.txt) | [llms.txt](https://llmstxt.org) 格式的索引：每篇指南和每个模型均附有一行描述。 |
| [https://doitong.com/developers/llms-full.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/models/flux/schnell.md) 或 [https://doitong.com/developers/docs/quickstart.md](https://doitong.com/developers/docs/quickstart.md)。 |
| `/developers/models/<id>/llms.txt` | 与模型的 `.md` 版本相同。 |
| [https://doitong.com/developers/openapi.json](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 复制

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

## 有效的提示词

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

```text 提示词
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 服务器](https://doitong.com/developers/docs/mcp)。这样，智能体就可以使用工具搜索模型、获取报价、运行模型并获取结果，同时无法花费超过预算的额度。
