> ## 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.

# Generate Sample Code

> Let Agent automatically generate Docflow API calling code based on documentation

## 01 Scenario

After installing Docflow Document Skill, the Agent can automatically generate standardized calling code based on API documentation, including parameter handling and error handling.

## 02 Examples

### 2.1 Generate Document Extraction Code

```text theme={null}
Generate a Python code example for calling the Docflow document extraction API
```

<img src="https://mintcdn.com/docflow/Jdb0x48l-7Fd9FGi/docflow/en/images/example-generate-code.png?fit=max&auto=format&n=Jdb0x48l-7Fd9FGi&q=85&s=daca732183be8deaedd5ff418fb82719" alt="Generate sample code" width="823" height="946" data-path="docflow/en/images/example-generate-code.png" />

<Tip>
  The Agent-generated code automatically references the latest API documentation, ensuring parameter names and endpoint URLs are accurate.
</Tip>
