> **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 DocRaptor

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

**Authentication:** API Key
**Categories:** Files & Documents
**Tools:** 7: 3 read, 3 write, 1 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=DOCRAPTOR)

## 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 DocRaptor connection

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

## 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: 'docraptor_document_status_get',
  toolInput: {
    id: '<id>',
  },
  connector: 'docraptor',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="docraptor_document_status_get",
    tool_input={
        "id": "<id>",
    },
    connection_name="docraptor",
    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.

### `docraptor_document_status_get`

Get Document Status · Read-only

Get the status of an asynchronous DocRaptor document.
Returns status (queued, working, completed or failed), and when completed the download_url, download_id and number_of_pages; validation_errors when it failed.
Use this after docraptor_document_create_async or docraptor_hosted_document_create_async.

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

Inputs:

- `id` (`string`, required): The status_id returned when the asynchronous document was created. Example: 1b3fbd0e-5a2f-4b39-8f8c-0e2b5c3a9f11.

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

### `docraptor_documents_list`

List Documents · Read-only

List the documents created with your DocRaptor account, newest first.
Returns each document's metadata, such as name, type, test flag, tag and creation date. DocRaptor does not store document files, so no content is returned.
Use this to review past conversions. Use docraptor_document_status_get for one asynchronous document's status.

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

Inputs:

- `page` (`integer`, optional): Page number to return, starting at 1. Defaults to 1. Example: 1.
- `per_page` (`integer`, optional): Documents per page. DocRaptor defaults to 100. Example: 25.

Example input: `{}`

### `docraptor_ips_list`

List Asset Download IPs · Read-only

List the IP addresses DocRaptor currently uses to download document assets.
Returns the IP addresses as JSON.
Use this only to allowlist DocRaptor on an asset host; the addresses change without notice.

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

Inputs: none.

Example input: `{}`

### `docraptor_document_create_async`

Create Document (Async) · Write

Start converting HTML or a web page into a PDF or Excel file in the background.
Returns a status_id. Poll docraptor_document_status_get with it; when status is completed the response has a temporary download_url.
Use this to make a document an agent can fetch by URL. Use docraptor_hosted_document_create_async for a long-lived hosted URL.

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

Inputs:

- `document_type` (`string`, required): Kind of document to create: pdf, xls or xlsx. Excel output needs XML content. Example: pdf. One of: `pdf`, `xls`, `xlsx`.
- `name` (`string`, required): A name that identifies the document in your DocRaptor documents log. Example: July Invoice for User 1234.
- `baseurl` (`string`, optional): PDF only: base URL used to resolve relative asset URLs in document_content. Example: https://example.com/assets/.
- `callback_url` (`string`, optional): URL that receives a POST with download_url and download_id when the document is ready. Example: https://example.com/docraptor/callback.
- `document_content` (`string`, optional): HTML (or XML for Excel) to convert. Send this or document_url, not both. Example: <html><body><h1>Invoice</h1></body></html>.
- `document_url` (`string`, optional): Public URL DocRaptor fetches the HTML from. Send this or document_content, not both. Example: https://docraptor.com/examples/invoice.html.
- `http_timeout` (`integer`, optional): PDF only: seconds to wait for each external asset, from 1 to 60. DocRaptor waits 10 by default. Example: 10.
- `ignore_console_messages` (`boolean`, optional): When true, JavaScript console messages do not halt rendering. Example: true.
- `ignore_resource_errors` (`boolean`, optional): When true (the default), failed image, CSS or script downloads do not stop rendering. Set false to fail on resource errors. Example: true.
- `javascript` (`boolean`, optional): Run DocRaptor's JavaScript engine on the page before conversion. Off by default. Example: false.
- `media` (`string`, optional): PDF only: CSS media type to apply, print (default) or screen. Try screen if the PDF looks different from the browser. Example: screen. One of: `print`, `screen`.
- `page_margin` (`string`, optional): PDF only: page margin as a CSS length. Example: 1in.
- `pdf_forms` (`boolean`, optional): PDF only: make HTML form fields editable in the PDF. Example: false.
- `pdf_title` (`string`, optional): PDF only: title stored in the PDF metadata. Example: Invoice 1234.
- `pipeline` (`string`, optional): DocRaptor pipeline version (Prince and JavaScript engine combination), such as 10.1. Leave empty to use your account default. Example: 10.1.
- `prince_javascript` (`boolean`, optional): PDF only: run Prince's own JavaScript engine (needed for canvas drawing). Separate from the javascript option. Example: false.
- `referrer` (`string`, optional): HTTP referrer to send when fetching the document and its assets. Example: https://example.com.
- `strict` (`string`, optional): Set html to force strict HTML validation, or none. Example: none. One of: `none`, `html`.
- `tag` (`string`, optional): A small piece of metadata stored with the document. Example: invoice-1234.
- `test` (`boolean`, optional): Create a free, watermarked test document that does not count against your plan. Set false for a production document. Example: true.

Example input: `{"document_type":"pdf","name":"<name>"}`

### `docraptor_hosted_document_create`

Create Hosted Document · Write

Convert HTML or a web page into a PDF or Excel file and host it at a public, unbranded DocRaptor URL. Hosting is a paid DocRaptor add-on.
Returns status, download_url, download_id and number_of_pages.
Use this for small documents that finish quickly. Use docraptor_hosted_document_create_async for large ones.

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

Inputs:

- `document_type` (`string`, required): Kind of document to create: pdf, xls or xlsx. Excel output needs XML content. Example: pdf. One of: `pdf`, `xls`, `xlsx`.
- `name` (`string`, required): A name that identifies the document in your DocRaptor documents log. Example: July Invoice for User 1234.
- `baseurl` (`string`, optional): PDF only: base URL used to resolve relative asset URLs in document_content. Example: https://example.com/assets/.
- `document_content` (`string`, optional): HTML (or XML for Excel) to convert. Send this or document_url, not both. Example: <html><body><h1>Invoice</h1></body></html>.
- `document_url` (`string`, optional): Public URL DocRaptor fetches the HTML from. Send this or document_content, not both. Example: https://docraptor.com/examples/invoice.html.
- `hosted_download_limit` (`integer`, optional): How many times the hosted document can be downloaded. Unlimited when empty. Example: 5.
- `hosted_expires_at` (`string`, optional): ISO 8601 date and time when the hosted document is removed. Never expires when empty. Example: 2026-12-31T23:59:59Z.
- `http_timeout` (`integer`, optional): PDF only: seconds to wait for each external asset, from 1 to 60. DocRaptor waits 10 by default. Example: 10.
- `ignore_console_messages` (`boolean`, optional): When true, JavaScript console messages do not halt rendering. Example: true.
- `ignore_resource_errors` (`boolean`, optional): When true (the default), failed image, CSS or script downloads do not stop rendering. Set false to fail on resource errors. Example: true.
- `javascript` (`boolean`, optional): Run DocRaptor's JavaScript engine on the page before conversion. Off by default. Example: false.
- `media` (`string`, optional): PDF only: CSS media type to apply, print (default) or screen. Try screen if the PDF looks different from the browser. Example: screen. One of: `print`, `screen`.
- `page_margin` (`string`, optional): PDF only: page margin as a CSS length. Example: 1in.
- `pdf_forms` (`boolean`, optional): PDF only: make HTML form fields editable in the PDF. Example: false.
- `pdf_title` (`string`, optional): PDF only: title stored in the PDF metadata. Example: Invoice 1234.
- `pipeline` (`string`, optional): DocRaptor pipeline version (Prince and JavaScript engine combination), such as 10.1. Leave empty to use your account default. Example: 10.1.
- `prince_javascript` (`boolean`, optional): PDF only: run Prince's own JavaScript engine (needed for canvas drawing). Separate from the javascript option. Example: false.
- `referrer` (`string`, optional): HTTP referrer to send when fetching the document and its assets. Example: https://example.com.
- `strict` (`string`, optional): Set html to force strict HTML validation, or none. Example: none. One of: `none`, `html`.
- `tag` (`string`, optional): A small piece of metadata stored with the document. Example: invoice-1234.
- `test` (`boolean`, optional): Create a free, watermarked test document that does not count against your plan. Set false for a production document. Example: true.

Example input: `{"document_type":"pdf","name":"<name>"}`

### `docraptor_hosted_document_create_async`

Create Hosted Document (Async) · Write

Start converting HTML or a web page into a hosted PDF or Excel file in the background. Hosting is a paid DocRaptor add-on.
Returns a status_id. Poll docraptor_document_status_get; when completed it returns the hosted download_url and download_id.
Use this for large hosted documents. Use docraptor_hosted_document_create to get the URL in one call.

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

Inputs:

- `document_type` (`string`, required): Kind of document to create: pdf, xls or xlsx. Excel output needs XML content. Example: pdf. One of: `pdf`, `xls`, `xlsx`.
- `name` (`string`, required): A name that identifies the document in your DocRaptor documents log. Example: July Invoice for User 1234.
- `baseurl` (`string`, optional): PDF only: base URL used to resolve relative asset URLs in document_content. Example: https://example.com/assets/.
- `callback_url` (`string`, optional): URL that receives a POST with download_url and download_id when the document is ready. Example: https://example.com/docraptor/callback.
- `document_content` (`string`, optional): HTML (or XML for Excel) to convert. Send this or document_url, not both. Example: <html><body><h1>Invoice</h1></body></html>.
- `document_url` (`string`, optional): Public URL DocRaptor fetches the HTML from. Send this or document_content, not both. Example: https://docraptor.com/examples/invoice.html.
- `hosted_download_limit` (`integer`, optional): How many times the hosted document can be downloaded. Unlimited when empty. Example: 5.
- `hosted_expires_at` (`string`, optional): ISO 8601 date and time when the hosted document is removed. Never expires when empty. Example: 2026-12-31T23:59:59Z.
- `http_timeout` (`integer`, optional): PDF only: seconds to wait for each external asset, from 1 to 60. DocRaptor waits 10 by default. Example: 10.
- `ignore_console_messages` (`boolean`, optional): When true, JavaScript console messages do not halt rendering. Example: true.
- `ignore_resource_errors` (`boolean`, optional): When true (the default), failed image, CSS or script downloads do not stop rendering. Set false to fail on resource errors. Example: true.
- `javascript` (`boolean`, optional): Run DocRaptor's JavaScript engine on the page before conversion. Off by default. Example: false.
- `media` (`string`, optional): PDF only: CSS media type to apply, print (default) or screen. Try screen if the PDF looks different from the browser. Example: screen. One of: `print`, `screen`.
- `page_margin` (`string`, optional): PDF only: page margin as a CSS length. Example: 1in.
- `pdf_forms` (`boolean`, optional): PDF only: make HTML form fields editable in the PDF. Example: false.
- `pdf_title` (`string`, optional): PDF only: title stored in the PDF metadata. Example: Invoice 1234.
- `pipeline` (`string`, optional): DocRaptor pipeline version (Prince and JavaScript engine combination), such as 10.1. Leave empty to use your account default. Example: 10.1.
- `prince_javascript` (`boolean`, optional): PDF only: run Prince's own JavaScript engine (needed for canvas drawing). Separate from the javascript option. Example: false.
- `referrer` (`string`, optional): HTTP referrer to send when fetching the document and its assets. Example: https://example.com.
- `strict` (`string`, optional): Set html to force strict HTML validation, or none. Example: none. One of: `none`, `html`.
- `tag` (`string`, optional): A small piece of metadata stored with the document. Example: invoice-1234.
- `test` (`boolean`, optional): Create a free, watermarked test document that does not count against your plan. Set false for a production document. Example: true.

Example input: `{"document_type":"pdf","name":"<name>"}`

### `docraptor_hosted_document_expire`

Expire Hosted Document · Destructive

Expire a hosted DocRaptor document so its public URL stops working.
Returns HTTP 200 on success, or errors when the document cannot be expired.
Use this to take a hosted document offline. It cannot be undone.

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

Inputs:

- `id` (`string`, required): The download_id of the hosted document, from docraptor_hosted_document_create or docraptor_document_status_get. Example: 1b3fbd0e-5a2f-4b39-8f8c-0e2b5c3a9f11.

Example input: `{"id":"<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 |
