> This page is for version v2025-04-21.
> For other versions, use one of these documentation indexes:
> - v2026-02-09 (default): https://docs.extend.ai/2026-02-09/llms.txt
> - v2025-04-21: https://docs.extend.ai/2025-04-21/llms.txt
> - v2024-12-23: https://docs.extend.ai/2024-12-23/llms.txt

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.ai/llms.txt
> Use this file to discover all available pages before exploring further.
>
> ## API version
> The current API version is `2026-02-09`, served at the site root (no version prefix in URLs).
> If this page URL contains `/2025-04-21/` or `/2024-12-23/`, you are reading an older API version.
> Prefer the current docs at https://docs.extend.ai/llms.txt unless the user explicitly needs that older version.
> Do not treat older-version pages as the source of truth for new integrations.

# Generate extractor JSON schemas via the REST API when you create an extractor

> Pass generate on POST /extractors with one to five sample files and Extend generates a JSON extraction schema from your examples.

For API version `2026-02-09`, you can optionally pass `generate` on [`POST /extractors`](/2026-02-09/api-reference/endpoints/extract/create-extractor) instead of supplying `config`. Provide one to five sample inputs as Extend file IDs or file URLs and Extend will generate a JSON extraction schema from those examples and return the extractor with the schema applied. Optionally add `generate.instructions` (up to 2,500 characters) to provide additional context about the document type or requirements for how values should be extracted. You cannot combine `generate` with `cloneExtractorId` or `config`.

* **`generate.files`**: 1–5 entries, each a file `{ id }` or `{ url }`.
* **`generate.instructions`**: optional free-text guidance to steer schema generation.