> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/api-references.md).

# 为 API 编写文档

- [OpenAPI](https://gitbook.com/docs/documentation/zh/api-references/openapi.md): 将 OpenAPI 规范添加到页面，并让你的用户通过交互式块直接在页面上测试端点。
- [添加 OpenAPI 规范](https://gitbook.com/docs/documentation/zh/api-references/openapi/add-an-openapi-specification.md): 了解如何在 GitBook 应用中或通过 CLI 添加和更新 OpenAPI 规范
- [在文档中插入 API 参考](https://gitbook.com/docs/documentation/zh/api-references/openapi/insert-api-reference-in-your-docs.md): 从你的 OpenAPI 规范中插入完整的 API 参考，或选择单个操作或 schema
- [指南](https://gitbook.com/docs/documentation/zh/api-references/guides.md)
- [OpenAPI 布局](https://gitbook.com/docs/documentation/zh/api-references/guides/openapi-layouts.md): 在“按标签一页”与“按操作一页”之间为你的 API 参考文档进行选择
- [组织你的 API 参考文档](https://gitbook.com/docs/documentation/zh/api-references/guides/structuring-your-api-reference.md): 了解如何使用图标和描述，在多个页面中组织你的 API 参考文档
- [添加自定义代码示例](https://gitbook.com/docs/documentation/zh/api-references/guides/adding-custom-code-samples.md): 了解如何配置自定义代码示例，以便在 API 端点旁显示
- [管理 API 操作](https://gitbook.com/docs/documentation/zh/api-references/guides/managing-api-operations.md): 了解如何将 OpenAPI API 操作标记为实验性、已弃用，或在文档中将其隐藏
- [配置“测试它”按钮](https://gitbook.com/docs/documentation/zh/api-references/guides/configuring-the-test-it-button.md)
- [使用 OpenAPI 代理](https://gitbook.com/docs/documentation/zh/api-references/guides/using-openapi-proxy.md)
- [描述枚举](https://gitbook.com/docs/documentation/zh/api-references/guides/describing-enums.md): 了解如何为枚举添加描述
- [与 CI/CD 集成](https://gitbook.com/docs/documentation/zh/api-references/guides/support-for-ci-cd-with-api-blocks.md): 了解如何在 GitBook 中自动更新你的 OpenAPI 规范
- [扩展参考](https://gitbook.com/docs/documentation/zh/api-references/extensions-reference.md): GitBook 支持的 OpenAPI 扩展完整参考


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/api-references.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
