> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Extracta AI

The Extracta AI connector lets your AI agent act in each user's Extracta AI account. Each user connects their own Extracta AI access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 13 tools.

**Authentication:** Bearer Token
**Categories:** Files & Documents, AI
**Tools:** 13: 5 read, 4 write, 4 destructive
**Users sign in with:** Access token
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=EXTRACTA)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Extracta AI connection

   In **AgentKit > Connections**, create an Extracta AI connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'extracta'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Extracta AI:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'extracta_credits_get',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "extracta"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Extracta AI:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="extracta_credits_get",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Extracta AI credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'extracta_classification_batch_results_get',
  toolInput: {
    batch_id: '<batch_id>',
    classification_id: '<classification_id>',
  },
  connector: 'extracta',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="extracta_classification_batch_results_get",
    tool_input={
        "batch_id": "<batch_id>",
        "classification_id": "<classification_id>",
    },
    connection_name="extracta",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `extracta_classification_batch_results_get`

Get Classification Batch Results · Read-only

Get the predicted document types for a batch of files in an Extracta document classification, or for one file.
Returns each file's ID, name, status, predicted document type and, when an extraction is linked, its extracted data.
Use this to read results; wait at least 2 seconds between calls.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `batch_id` (`string`, required): Batch ID. Each upload of files (in the Extracta dashboard or API) creates a batch. Example: -OQc1Ab2Cd3Ef4Gh5Ij.
- `classification_id` (`string`, required): Classification ID returned by extracta_classification_create. Example: -OQb7Lk2Hn3XyZ9aB1cD.
- `file_id` (`string`, optional): File ID to return the result for only that file. Example: -OQc1Zz9Yy8Xx7Ww6Vv.

Example input: `{"batch_id":"<batch_id>","classification_id":"<classification_id>"}`

### `extracta_classification_get`

Get Classification · Read-only

Get an Extracta document classification's settings.
Returns its name, description, document types with keywords and linked extraction IDs, and its batches.
Use this to check a classification or find batch IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `classification_id` (`string`, required): Classification ID returned by extracta_classification_create. Example: -OQb7Lk2Hn3XyZ9aB1cD.

Example input: `{"classification_id":"<classification_id>"}`

### `extracta_credits_get`

Get Credits · Read-only

Get the number of processing credits left on your Extracta account (1 credit = 1 page).
Returns status and credits.
Use this before processing many documents.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `extracta_extraction_batch_results_get`

Get Extraction Batch Results · Read-only

Get the extracted data for a batch of documents in an Extracta extraction, or for one file in it.
Returns the batch status and, for each file, its fileId, fileName, status, extracted result and file URL.
Use this to read results; wait at least 2 seconds between calls. Use extracta_extraction_get to find batch IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `batch_id` (`string`, required): Batch ID. Each upload of files (in the Extracta dashboard or API) creates a batch. Example: -OQc1Ab2Cd3Ef4Gh5Ij.
- `extraction_id` (`string`, required): Extraction ID returned by extracta_extraction_create. Example: -OPXR1F82I0cRYJPcHNo.
- `file_id` (`string`, optional): File ID to return results for only that file. Example: -OQc1Zz9Yy8Xx7Ww6Vv.

Example input: `{"batch_id":"<batch_id>","extraction_id":"<extraction_id>"}`

### `extracta_extraction_get`

Get Extraction · Read-only

Get an Extracta extraction template's settings.
Returns the extraction's name, description, language, options, fields and its batches.
Use this to check a template or find batch IDs. Use extracta_extraction_update to change it.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `extraction_id` (`string`, required): Extraction ID returned by extracta_extraction_create. Example: -OPXR1F82I0cRYJPcHNo.

Example input: `{"extraction_id":"<extraction_id>"}`

### `extracta_classification_create`

Create Classification · Write

Create an Extracta document classification that sorts uploaded files into the document types you define, optionally running an extraction on each type.
Returns status and the new classificationId.
Files are uploaded in the Extracta dashboard or with the multipart upload API, then read with extracta_classification_batch_results_get.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `document_types` (`array`, required): The document types to sort files into. Each type has a name, a description, uniqueWords (keywords that identify it) and, optionally, the extractionId of an extraction template to run on files of that type. Example: [{"name": "Invoice", "description": "Commercial invoice from a vendor", "uniqueWords": ["invoice number", "bill to", "total amount"]}, {"name": "Receipt", "d...
- `name` (`string`, required): A name for the classification. Example: Financial Document Classifier.
- `description` (`string`, optional): What the classification is for. Example: Sorts uploaded files into financial document types.

Example input: `{"document_types":[],"name":"<name>"}`

### `extracta_classification_update`

Update Classification · Write

Update an Extracta document classification's name, description and document types.
Returns status and the updated classification.
Send the full list of document types; it replaces the current list. Use extracta_classification_get first.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `classification_id` (`string`, required): Classification ID returned by extracta_classification_create. Example: -OQb7Lk2Hn3XyZ9aB1cD.
- `description` (`string`, required): What the classification is for. Example: Sorts uploaded files into financial document types.
- `document_types` (`array`, required): The document types to sort files into. Each type has a name, a description, uniqueWords (keywords that identify it) and, optionally, the extractionId of an extraction template to run on files of that type. Example: [{"name": "Invoice", "description": "Commercial invoice from a vendor", "uniqueWords": ["invoice number", "bill to", "total amount"]}, {"name": "Receipt", "d...
- `name` (`string`, required): A name for the classification. Example: Financial Document Classifier.

Example input: `{"classification_id":"<classification_id>","description":"<description>","document_types":[],"name":"<name>"}`

### `extracta_extraction_create`

Create Extraction · Write

Create an Extracta extraction template that defines which fields to pull out of documents and how to process them.
Returns status and the new extractionId.
Files are then uploaded to the extraction (in the Extracta dashboard, by email or with the multipart upload API) and read with extracta_extraction_batch_results_get.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `fields` (`array`, required): The data to extract. Each field has a key, a description, an example and a type: string for one value, object with a properties list of sub-fields, or array with items describing each list element (a string, or an object with properties). Example: [{"key": "name", "description": "Full name of the person", "example": "Alex Smith", "type": "string"}, {"key": "languages", "description": "Languages spoken"...
- `language` (`string`, required): Language of the documents. Use Multi-Lingual for mixed or other languages. Example: English. One of: `Multi-Lingual`, `Arabic`, `Bangla`, `Bulgarian`, `Croatian`, `Czech`, `English`, `Filipino`, `French`, `German`, `Hindi`, `Hungarian`, `Italian`, `Nepali`, `Polish`, `Portuguese`, `Romanian`, `Russian`, `Serbian`, `Spanish`, `Turkish`, `Ukrainian`, `Urdu`, `Vietnamese`.
- `name` (`string`, required): A descriptive name for the extraction template. Example: CVs Extraction.
- `checkbox_recognition` (`boolean`, optional): Set true to read checkbox states (checked or unchecked). Defaults to false. Example: false.
- `description` (`string`, optional): What the extraction is for. Example: Extract candidate details from CVs.
- `handwritten_text_recognition` (`boolean`, optional): Set true when documents contain handwriting. Defaults to false. Example: false.
- `has_table` (`boolean`, optional): Set true when documents contain tables, to add a table analysis step. Defaults to false. Example: false.
- `has_visuals` (`boolean`, optional): Set true when documents contain charts, graphs or diagrams to read. Defaults to false. Example: false.
- `long_document` (`boolean`, optional): Set true for very long or complex documents, to avoid timeouts. Defaults to false. Example: false.
- `split_pdf_pages` (`boolean`, optional): Set true to treat each PDF page as a separate document, for example a PDF of one-page invoices. Defaults to false. Example: false.

Example input: `{"fields":[],"language":"Multi-Lingual","name":"<name>"}`

### `extracta_extraction_update`

Update Extraction · Write

Update an Extracta extraction template. Only the settings you send change.
Returns status and the updated extraction.
Send fields only to replace the whole field list. Use extracta_extraction_get first to see the current fields.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `extraction_id` (`string`, required): Extraction ID returned by extracta_extraction_create. Example: -OPXR1F82I0cRYJPcHNo.
- `checkbox_recognition` (`boolean`, optional): Set true to read checkbox states (checked or unchecked). Defaults to false. Example: false.
- `description` (`string`, optional): What the extraction is for. Example: Extract candidate details from CVs.
- `fields` (`array`, optional): The data to extract. Each field has a key, a description, an example and a type: string for one value, object with a properties list of sub-fields, or array with items describing each list element (a string, or an object with properties). Example: [{"key": "name", "description": "Full name of the person", "example": "Alex Smith", "type": "string"}, {"key": "languages", "description": "Languages spoken"...
- `handwritten_text_recognition` (`boolean`, optional): Set true when documents contain handwriting. Defaults to false. Example: false.
- `has_table` (`boolean`, optional): Set true when documents contain tables, to add a table analysis step. Defaults to false. Example: false.
- `has_visuals` (`boolean`, optional): Set true when documents contain charts, graphs or diagrams to read. Defaults to false. Example: false.
- `language` (`string`, optional): Language of the documents. Use Multi-Lingual for mixed or other languages. Example: English. One of: `Multi-Lingual`, `Arabic`, `Bangla`, `Bulgarian`, `Croatian`, `Czech`, `English`, `Filipino`, `French`, `German`, `Hindi`, `Hungarian`, `Italian`, `Nepali`, `Polish`, `Portuguese`, `Romanian`, `Russian`, `Serbian`, `Spanish`, `Turkish`, `Ukrainian`, `Urdu`, `Vietnamese`.
- `long_document` (`boolean`, optional): Set true for very long or complex documents, to avoid timeouts. Defaults to false. Example: false.
- `name` (`string`, optional): A descriptive name for the extraction template. Example: CVs Extraction.
- `split_pdf_pages` (`boolean`, optional): Set true to treat each PDF page as a separate document, for example a PDF of one-page invoices. Defaults to false. Example: false.

Example input: `{"extraction_id":"<extraction_id>"}`

### `extracta_classification_batch_delete`

Delete Classification Batch · Destructive

Permanently delete one batch, with its files and results, from an Extracta document classification.
Returns status and a confirmation message.
Use extracta_classification_files_delete to remove only some files.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `batch_id` (`string`, required): Batch ID. Each upload of files (in the Extracta dashboard or API) creates a batch. Example: -OQc1Ab2Cd3Ef4Gh5Ij.
- `classification_id` (`string`, required): Classification ID returned by extracta_classification_create. Example: -OQb7Lk2Hn3XyZ9aB1cD.

Example input: `{"batch_id":"<batch_id>","classification_id":"<classification_id>"}`

### `extracta_classification_delete`

Delete Classification · Destructive

Permanently delete an Extracta document classification with all its batches, results and files.
Returns status and a confirmation message.
Use extracta_classification_batch_delete or extracta_classification_files_delete to remove less.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `classification_id` (`string`, required): Classification ID returned by extracta_classification_create. Example: -OQb7Lk2Hn3XyZ9aB1cD.

Example input: `{"classification_id":"<classification_id>"}`

### `extracta_classification_files_delete`

Delete Classification Files · Destructive

Permanently delete specific files, and their results, from a batch in an Extracta document classification.
Returns status and a confirmation message.
Use extracta_classification_batch_results_get to find file IDs.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `batch_id` (`string`, required): Batch ID. Each upload of files (in the Extracta dashboard or API) creates a batch. Example: -OQc1Ab2Cd3Ef4Gh5Ij.
- `classification_id` (`string`, required): Classification ID returned by extracta_classification_create. Example: -OQb7Lk2Hn3XyZ9aB1cD.
- `file_ids` (`array`, required): IDs of the files to delete. Example: ["-OQc1Zz9Yy8Xx7Ww6Vv", "-OQc1Zz9Yy8Xx7Ww6Vw"]

Example input: `{"batch_id":"<batch_id>","classification_id":"<classification_id>","file_ids":["-OQc1Zz9Yy8Xx7Ww6Vv","-OQc1Zz9Yy8Xx7Ww6Vw"]}`

### `extracta_extraction_delete`

Delete Extraction, Batch or File · Destructive

Permanently delete an Extracta extraction with all its batches and files, or only one batch, or one file in a batch.
Returns status and a confirmation message.
Send only extraction_id to delete everything; add batch_id to delete one batch; add batch_id and file_id to delete one file.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `extraction_id` (`string`, required): Extraction ID returned by extracta_extraction_create. Example: -OPXR1F82I0cRYJPcHNo.
- `batch_id` (`string`, optional): Batch ID to delete only that batch (and its files) instead of the whole extraction. Example: -OQc1Ab2Cd3Ef4Gh5Ij.
- `file_id` (`string`, optional): File ID to delete only that file. Needs batch_id too. Example: -OQc1Zz9Yy8Xx7Ww6Vv.

Example input: `{"extraction_id":"<extraction_id>"}`

## Related

Other Files & Documents connectors ([all 76](/agentkit/connectors/?category=files-documents)):

- [Notion](/agentkit/connectors/notion/): Scalekit connector, OAuth, 51 tools
- [Google Sheets](/agentkit/connectors/googlesheets/): Scalekit connector, OAuth, 48 tools
- [Google Drive](/agentkit/connectors/googledrive/): Scalekit connector, OAuth, 47 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
