> ## Documentation Index
> Fetch the complete documentation index at: https://docs-docflow.textin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 生成示例代码

> 让 Agent 根据文档自动生成可用的 Docflow API 调用代码

## 01 场景说明

安装 Docflow 文档 Skill 后，Agent 可以根据 API 文档自动生成规范的调用代码，包含参数处理、错误处理等完整逻辑。

## 02 示例

### 2.1 生成文档抽取调用代码

```text theme={null}
帮我生成一个调用 Docflow 文档抽取 API 的 Python 代码
```

![生成示例代码](https://mintcdn.com/docflow/Jdb0x48l-7Fd9FGi/docflow/cn/images/example-generate-code.png?fit=max\&auto=format\&n=Jdb0x48l-7Fd9FGi\&q=85\&s=0f8810f86395834453c86e96d14a6ac4)

> [!TIP]
>
> Agent 生成的代码会自动引用最新的 API 文档，确保参数名称和接口地址是准确的。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.