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

# Generate Schema

> Auto-generate extraction schema from a document

## Endpoint

```
POST https://api.documind.cloud/api/v1/schema/{document_id}
```

## Path Parameters

| Parameter     | Type          | Required | Description                 |
| ------------- | ------------- | -------- | --------------------------- |
| `document_id` | string (UUID) | Yes      | ID of the uploaded document |

## Response

```json theme={null}
{
  "schema": {
    "type": "object",
    "named_entities": {
      "field_name": {
        "type": "string",
        "description": "Auto-detected field"
      }
    }
  }
}
```

## Example

```python theme={null}
response = requests.post(
    f"https://api.documind.cloud/api/v1/schema/{document_id}",
    headers={"X-API-Key": API_KEY}
)

schema = response.json()["schema"]
```
