> This page is for version v2024-12-23.
> 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.

# Run Processor

In general, the recommended way to integrate with Extend in production is via workflows, using the [Run Workflow](/2024-12-23/developers/workflow-endpoints/run-workflow) endpoint.
This is due to several factors:

* file parsing/pre-processing will automatically be reused across multiple processors, which will give you simplicity and cost savings given that many use cases will require multiple processors to be run on the same document.
* workflows provide dedicated human in the loop document review, when needed.
* workflows allow you to model and manage your pipeline with a single endpoint and corresponding UI for modeling and monitoring.

However, there are a number of legitimate use cases and systems where it might be easier to model the pipeline via code and run processors directly. This endpoint is provided for this purpose.

Similar to workflow runs, processor runs are asynchronous and will return a status of `PROCESSING` until the run is complete.

* You can [configure webhooks](/2024-12-23/developers/webhooks/events) to receive notifications when a processor run is complete or failed.
* Or you can [poll the get endpoint](/2024-12-23/developers/processor-endpoints/get-processor-run) for updates on the status of the processor run.

### Body

**`processorId`** `string` — required

The ID of the processor that will process the input. This ID can be fetched
from viewing the processor on the Extend platform.

---

**`file`** `object`

A file object containing either a URL or base64 encoded content. Must contain
either fileUrl or fileBase64. Presigned URLs are recommended for most
production use cases. Supported file types can be found
[here](/2024-12-23/developers/guides/supported-file-types).

#### properties

**`fileName`** `string` — required

The name of the file.

---

**`fileUrl`** `string`

A presigned URL for the file. Though we will download immediately, we
recommend a 5 - 15 minute expiration time.

---

**`fileBase64`** `string` — deprecated

Base64 encoded content of the file. Can be used instead of fileUrl in development environments.

**DEPRECATED**: This field is deprecated and will be removed in a future release. Use the [`/upload` endpoint](/2024-12-23/developers/file-endpoints/upload-file) instead.

---

**`fileId`** `string`

If you already have an Extend file id (for instance from running a parser or a previous file creation) then you can
run a processor via file id, and any parsed data will be reused.

---

---

**`rawText`** `string`

A raw string to be processed. Can be used in place of file when passing raw
text data streams. Either file or rawText must be provided.

---

**`version`** `string` — default: latest

An optional version of the processor to use. When not supplied, the most
recent published version of the processor will be used. Special values
include: - "latest" for the most recent published version (the default). If no
published versions, the draft version will be used. - "draft" for the draft
version. - Specific version numbers corresponding to versions your team has
published, e.g. "1.0", "2.2", etc.

---

**`priority`** `number` — default: 50

An optional value used to determine the relative order of processor runs when
rate limiting is in effect. Priority values must be an integer between 1 and
100 inclusive. Lower values will be prioritized before higher values. The
default priority value is 50.

---

**`metadata`** `object`

An optional object that can be passed in to identify the processor run in your
systems. It will be returned in the response and webhooks.

To categorize runs for billing and usage tracking, include usage tags with the `extend:usage_tags` key.

---

**`config`** `object`

An optional configuration object that can override the processor's default configuration.
The structure depends on the processor type. See the [processor configuration documentation](/2024-12-23/developers/guides/processor-configs)
for more details.

This config will not persist/save to the processor version, but will be used for this run.

---

**`Example Request`**

```bash Example Request
curl --location --request POST 'https://api-prod.extend.app/processor_runs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_TOKEN>' \
--data '{
    "processorId": "dp_1234",
    "file": {
        "fileName": "example.pdf",
        "fileUrl": "https://test.s3.amazonaws.com/example.pdf"
    },
    "version": "1.0",
    "priority": 50,
    "metadata": {
        "internal_id": "id_1234"
    }
}'
```

**`Node.js`**

```javascript Node.js
const runProcessor = async () => {
  const response = await fetch("https://api-prod.extend.app/processor_runs", {
    method: "POST",
    headers: {
      Authorization: "Bearer <API_TOKEN>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      processorId: "dp_1234",
      file: {
        fileName: "example.pdf",
        fileUrl: "https://test.s3.amazonaws.com/example.pdf",
      },
      version: "1.0",
      priority: 50,
      metadata: {
        internal_id: "id_1234",
      },
    }),
  });

  if (!response.ok) {
    const error = await response.json();
    console.error("Error:", error);
    return;
  }

  const data = await response.json();
  console.log("Processor run created:", data);
};

runProcessor();
```

**`Python`**

```python Python
import requests

url = "https://api-prod.extend.app/processor_runs"
headers = {
    "Authorization": "Bearer <API_TOKEN>",
    "Content-Type": "application/json"
}
payload = {
    "processorId": "dp_1234",
    "file": {
        "fileName": "example.pdf",
        "fileUrl": "https://test.s3.amazonaws.com/example.pdf"
    },
    "version": "1.0",
    "priority": 50,
    "metadata": {
        "internal_id": "id_1234"
    }
}

try:
    response = requests.post(url, json=payload, headers=headers)
    response.raise_for_status()
    print("Processor run created:", response.json())
except requests.exceptions.RequestException as e:
    print("Error:", e)
```

### Response

**`success`** `boolean`

A true or false value indicating whether the processor run was created
successfully.

---

**`processorRun`** `object`

Details about the created processor run.

See the [ProcessorRun object](/2024-12-23/developers/objects/processor-run) for more details.

---

### Common errors

**`400 Bad Request`**

Returned when: - Required fields are missing (e.g., `processorId`) - Neither
`file` nor `rawText` is provided - Invalid files: - The provided `fileUrl` is
invalid - The provided `fileBase64` is invalid - It's an unsupported file type

* The file is corrupted or otherwise cannot be downloaded - The `priority`
  value is outside the allowed range (must be between 1 and 100)

---

**`404 Not Found`**

Returned when: - The specified processor ID doesn't exist - The specified
processor version doesn't exist

---

**`401 Unauthorized`**

Returned when: - The API token is missing - The API token is invalid

---

**`403 Forbidden`**

Returned when: - The authenticated workspace doesn't have permission to access
the specified processor - The API token doesn't have sufficient permissions

---

**`Example Response`**

```json Example Response
{
  "success": true,
  "processorRun": {
    "object": "document_processor_run",
    "id": "dpr_1234",
    "output": null, // Will be null until the run is processed
    "processorId": "dp_5678",
    "processorVersionId": "dpv_91011",
    "processorName": "Invoice Extractor",
    "status": "PROCESSING",
    "metadata": {
      "internal_id": "id_1234"
    },
    "reviewed": false,
    "edited": false,
    "edits": null,
    "type": "EXTRACT",
    "config": {
      "schema": {
        "type": "object",
        "properties": {
          "invoice_number": {
            "type": ["string", "null"],
            "description": "The unique identifier for this invoice"
          },
          "amount": {
            "type": "object",
            "properties": {
              "value": {
                "type": ["number", "null"]
              },
              "iso_4217_currency_code": {
                "type": ["string", "null"]
              }
            },
            "required": ["value", "iso_4217_currency_code"],
            "additionalProperties": false
          }
        },
        "required": ["invoice_number", "amount"],
        "additionalProperties": false
      }
    },
    "files": [
      {
        "name": "example.pdf"
      }
    ],
    "url": "https://dashboard.extend.app/runs/dpr_1234"
  }
}
```