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

# Extraction Model Versions

export const adePythonLibrary = 'ade-python';

export const dpt2 = 'DPT-2';

export const dpt1 = 'DPT-1';

export const dpt = 'Document Pre-Trained Transformer';

export const companyName = 'LandingAI';

export const extract = 'ADE Extract';

export const parse = 'ADE Parse';

export const ade = 'Agentic Document Extraction';

An extraction model powers the field extraction capabilities of the [{extract}](https://docs.landing.ai/api-reference/tools/ade-extract) API. It analyzes your Markdown content and extracts structured data according to your JSON schema.

You can specify a model when calling the [{extract}](https://docs.landing.ai/api-reference/tools/ade-extract) API directly or when using the [client libraries](#set-the-model-with-the-client-libraries). If you don't specify a model, the API uses the latest extraction model (currently `extract-20260314`).

```shell {5} theme={null}
curl -X POST 'https://api.va.landing.ai/v1/ade/extract' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'schema=...' \
  -F 'markdown=@markdown.md' \
  -F 'model=extract-20260314'
```

## Model Versions

The following table lists the available `model` values for the {extract} API:

| Model Values       | Description                                                                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `extract-20260314` | Use the extraction model snapshot released on March 14, 2026. For more information, go to [extract-20260314](#extract-20260314). This is the default model. |
| `extract-latest`   | Use the latest extraction model snapshot.                                                                                                                   |

<Info>
  These models have been deprecated and will result in errors: `extract-20250930` and `extract-20251024`.
</Info>

### Why Model Versioning Matters

When integrating the API, you have two options for specifying the model:

1. **Use `extract-latest`** to always get the newest version. This automatically gives you improvements and updates, but extraction results may change when new model versions are released.
2. **Use a specific version** (like `extract-20260314`) to pin to an exact model version. This ensures consistent extraction results over time, but you won't receive improvements.

## extract-20260314

This model version introduces the following capabilities:

* **Unlimited schema size**: No limits on the number of fields, nesting levels, or characters in a schema.
* **Semantic field matching**: Use the [`x-alternativeNames`](./ade-extract-schema-json#alternative-names) keyword to define alternative labels for a field. The model maps fields by meaning, so fields with different names across documents resolve to the same schema field.
* **Cross-page table reconstruction**: Tables that span page breaks are returned as a single array, with no post-processing needed.
* **Master schemas**: Generate a single schema from multiple documents to handle field and layout variation across document types. Available in the [Playground](./ade-extract-playground) and via the [{buildExtract} API](./ade-extract-schema-api).
* **Schema drift detection**: Update an existing schema when new or changed fields appear in your documents. Available in the [Playground](./ade-extract-playground) and via the [{buildExtract} API](./ade-extract-schema-api).

This version also introduces the `metadata.warnings` field in the API response. For more information, go to [Warnings](./ade-extract-troubleshoot#warnings).

<Info>
  Extraction model `extract-20260314` has different JSON schema requirements than the previous model. Learn about all schema requirements in [Extraction Schema (JSON)](./ade-extract-schema-json).
</Info>

## Set the Model in the API

When calling the [{extract}](https://docs.landing.ai/api-reference/tools/ade-extract) endpoint, you can set the model using the `model` parameter.

If you omit the `model` parameter, the API uses the latest model.

This example shows how to specify a model:

```shell {5} theme={null}
curl -X POST 'https://api.va.landing.ai/v1/ade/extract' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'schema={"type": "object", "properties": {"field1": {"type": "string"}, "field2": {"type": "string"}}}' \
  -F 'markdown=@markdown.md' \
  -F 'model=extract-latest'
```

## Set the Model with the Client Libraries

When using the Python or TypeScript library, you can set the model using the `model` parameter in the `extract()` method.

If you omit the `model` parameter, the library will use the latest extraction model.

<CodeGroup>
  ```python {20} Python theme={null}
  import json
  from pathlib import Path
  from landingai_ade import LandingAIADE

  # Define your extraction schema
  schema_dict = {
      "type": "object",
      "properties": {
          "field1": {"type": "string"},
          "field2": {"type": "string"}
      }
  }

  client = LandingAIADE()
  schema_json = json.dumps(schema_dict)

  response = client.extract(
      schema=schema_json,
      markdown=Path("/path/to/output.md"),
      model="extract-latest"
  )
  ```

  ```typescript {26} TypeScript theme={null}
  import LandingAIADE, { toFile } from "landingai-ade";
  import fs from "fs";

  // Define your extraction schema
  const schemaDict = {
    type: "object",
    properties: {
      field1: { type: "string" },
      field2: { type: "string" }
    }
  };

  const client = new LandingAIADE();
  const schemaJson = JSON.stringify(schemaDict);

  // Parse the document first
  const parseResponse = await client.parse({
    document: fs.createReadStream("/path/to/document.pdf"),
    model: "dpt-2-latest"
  });

  // Extract with the specified model
  const extractResponse = await client.extract({
    schema: schemaJson,
    markdown: await toFile(Buffer.from(parseResponse.markdown), "document.md"),
    model: "extract-latest"
  });
  ```
</CodeGroup>

## The Playground Uses the Most Recent Model

The [Playground](https://va.landing.ai/) always uses the most recent extraction model. If you pin a specific model version in your code, results may differ slightly from what you see in the Playground.

## The Model Impacts the Schema Requirements

Different model versions have different [JSON schema requirements](./ade-extract-schema-json). For details on supported keywords, field types, and structure, see [Extraction Schema (JSON)](./ade-extract-schema-json).
