> ## Documentation Index
> Fetch the complete documentation index at: https://docs-docflow.textin.ai/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-bbb41569/Hl8q91UUG5hgv3co/docflow-global/en/images/example-generate-code.png?fit=max&auto=format&n=Hl8q91UUG5hgv3co&q=85&s=a0b035452c5dd09333aabb63ecbfa14c" alt="Generate sample code" width="823" height="946" data-path="docflow-global/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>
