# 为 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)
- [组织你的 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
