Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to DocRaptor

Scalekit connector
Open markdown

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.

Tools
7
What they doRead · write · destructive
3 · 3 · 13 read3 write1 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .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.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • docraptor_document_status_getGet the status of an asynchronous DocRaptor document.Read-only

    Get Document Status

    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.

    Inputs

    idstringrequired
    The status_id returned when the asynchronous document was created. Example: 1b3fbd0e-5a2f-4b39-8f8c-0e2b5c3a9f11.
  • docraptor_documents_listList the documents created with your DocRaptor account, newest first.Read-only

    List Documents

    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.

    Inputs

    pageinteger
    Page number to return, starting at 1. Defaults to 1. Example: 1.
    per_pageinteger
    Documents per page. DocRaptor defaults to 100. Example: 25.
  • docraptor_ips_listList the IP addresses DocRaptor currently uses to download document assets.Read-only

    List Asset Download IPs

    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.

    Inputs

    This tool takes no inputs.

  • docraptor_document_create_asyncStart converting HTML or a web page into a PDF or Excel file in the background.Write

    Create Document (Async)

    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.

    Inputs

    document_typestringrequired
    Kind of document to create: pdf, xls or xlsx. Excel output needs XML content. Example: pdf.one of pdfxlsxlsx
    namestringrequired
    A name that identifies the document in your DocRaptor documents log. Example: July Invoice for User 1234.
    baseurlstring
    PDF only: base URL used to resolve relative asset URLs in document_content. Example: https://example.com/assets/.
    callback_urlstring
    URL that receives a POST with download_url and download_id when the document is ready. Example: https://example.com/docraptor/callback.
    document_contentstring
    HTML (or XML for Excel) to convert. Send this or document_url, not both. Example: <html><body><h1>Invoice</h1></body></html>.
    document_urlstring
    Public URL DocRaptor fetches the HTML from. Send this or document_content, not both. Example: https://docraptor.com/examples/invoice.html.
    http_timeoutinteger
    PDF only: seconds to wait for each external asset, from 1 to 60. DocRaptor waits 10 by default. Example: 10.
    ignore_console_messagesboolean
    When true, JavaScript console messages do not halt rendering. Example: true.
    ignore_resource_errorsboolean
    When true (the default), failed image, CSS or script downloads do not stop rendering. Set false to fail on resource errors. Example: true.
    javascriptboolean
    Run DocRaptor's JavaScript engine on the page before conversion. Off by default. Example: false.
    mediastring
    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 printscreen
    page_marginstring
    PDF only: page margin as a CSS length. Example: 1in.
    pdf_formsboolean
    PDF only: make HTML form fields editable in the PDF. Example: false.
    pdf_titlestring
    PDF only: title stored in the PDF metadata. Example: Invoice 1234.
    pipelinestring
    DocRaptor pipeline version (Prince and JavaScript engine combination), such as 10.1. Leave empty to use your account default. Example: 10.1.
    prince_javascriptboolean
    PDF only: run Prince's own JavaScript engine (needed for canvas drawing). Separate from the javascript option. Example: false.
    referrerstring
    HTTP referrer to send when fetching the document and its assets. Example: https://example.com.
    strictstring
    Set html to force strict HTML validation, or none. Example: none.one of nonehtml
    tagstring
    A small piece of metadata stored with the document. Example: invoice-1234.
    testboolean
    Create a free, watermarked test document that does not count against your plan. Set false for a production document. Example: true.
  • docraptor_hosted_document_createConvert HTML or a web page into a PDF or Excel file and host it at a public, unbranded DocRaptor URL.Write

    Create Hosted Document

    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.

    Inputs

    document_typestringrequired
    Kind of document to create: pdf, xls or xlsx. Excel output needs XML content. Example: pdf.one of pdfxlsxlsx
    namestringrequired
    A name that identifies the document in your DocRaptor documents log. Example: July Invoice for User 1234.
    baseurlstring
    PDF only: base URL used to resolve relative asset URLs in document_content. Example: https://example.com/assets/.
    document_contentstring
    HTML (or XML for Excel) to convert. Send this or document_url, not both. Example: <html><body><h1>Invoice</h1></body></html>.
    document_urlstring
    Public URL DocRaptor fetches the HTML from. Send this or document_content, not both. Example: https://docraptor.com/examples/invoice.html.
    hosted_download_limitinteger
    How many times the hosted document can be downloaded. Unlimited when empty. Example: 5.
    hosted_expires_atstring
    ISO 8601 date and time when the hosted document is removed. Never expires when empty. Example: 2026-12-31T23:59:59Z.
    http_timeoutinteger
    PDF only: seconds to wait for each external asset, from 1 to 60. DocRaptor waits 10 by default. Example: 10.
    ignore_console_messagesboolean
    When true, JavaScript console messages do not halt rendering. Example: true.
    ignore_resource_errorsboolean
    When true (the default), failed image, CSS or script downloads do not stop rendering. Set false to fail on resource errors. Example: true.
    javascriptboolean
    Run DocRaptor's JavaScript engine on the page before conversion. Off by default. Example: false.
    mediastring
    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 printscreen
    page_marginstring
    PDF only: page margin as a CSS length. Example: 1in.
    pdf_formsboolean
    PDF only: make HTML form fields editable in the PDF. Example: false.
    pdf_titlestring
    PDF only: title stored in the PDF metadata. Example: Invoice 1234.
    pipelinestring
    DocRaptor pipeline version (Prince and JavaScript engine combination), such as 10.1. Leave empty to use your account default. Example: 10.1.
    prince_javascriptboolean
    PDF only: run Prince's own JavaScript engine (needed for canvas drawing). Separate from the javascript option. Example: false.
    referrerstring
    HTTP referrer to send when fetching the document and its assets. Example: https://example.com.
    strictstring
    Set html to force strict HTML validation, or none. Example: none.one of nonehtml
    tagstring
    A small piece of metadata stored with the document. Example: invoice-1234.
    testboolean
    Create a free, watermarked test document that does not count against your plan. Set false for a production document. Example: true.
  • docraptor_hosted_document_create_asyncStart converting HTML or a web page into a hosted PDF or Excel file in the background.Write

    Create Hosted Document (Async)

    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.

    Inputs

    document_typestringrequired
    Kind of document to create: pdf, xls or xlsx. Excel output needs XML content. Example: pdf.one of pdfxlsxlsx
    namestringrequired
    A name that identifies the document in your DocRaptor documents log. Example: July Invoice for User 1234.
    baseurlstring
    PDF only: base URL used to resolve relative asset URLs in document_content. Example: https://example.com/assets/.
    callback_urlstring
    URL that receives a POST with download_url and download_id when the document is ready. Example: https://example.com/docraptor/callback.
    document_contentstring
    HTML (or XML for Excel) to convert. Send this or document_url, not both. Example: <html><body><h1>Invoice</h1></body></html>.
    document_urlstring
    Public URL DocRaptor fetches the HTML from. Send this or document_content, not both. Example: https://docraptor.com/examples/invoice.html.
    hosted_download_limitinteger
    How many times the hosted document can be downloaded. Unlimited when empty. Example: 5.
    hosted_expires_atstring
    ISO 8601 date and time when the hosted document is removed. Never expires when empty. Example: 2026-12-31T23:59:59Z.
    http_timeoutinteger
    PDF only: seconds to wait for each external asset, from 1 to 60. DocRaptor waits 10 by default. Example: 10.
    ignore_console_messagesboolean
    When true, JavaScript console messages do not halt rendering. Example: true.
    ignore_resource_errorsboolean
    When true (the default), failed image, CSS or script downloads do not stop rendering. Set false to fail on resource errors. Example: true.
    javascriptboolean
    Run DocRaptor's JavaScript engine on the page before conversion. Off by default. Example: false.
    mediastring
    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 printscreen
    page_marginstring
    PDF only: page margin as a CSS length. Example: 1in.
    pdf_formsboolean
    PDF only: make HTML form fields editable in the PDF. Example: false.
    pdf_titlestring
    PDF only: title stored in the PDF metadata. Example: Invoice 1234.
    pipelinestring
    DocRaptor pipeline version (Prince and JavaScript engine combination), such as 10.1. Leave empty to use your account default. Example: 10.1.
    prince_javascriptboolean
    PDF only: run Prince's own JavaScript engine (needed for canvas drawing). Separate from the javascript option. Example: false.
    referrerstring
    HTTP referrer to send when fetching the document and its assets. Example: https://example.com.
    strictstring
    Set html to force strict HTML validation, or none. Example: none.one of nonehtml
    tagstring
    A small piece of metadata stored with the document. Example: invoice-1234.
    testboolean
    Create a free, watermarked test document that does not count against your plan. Set false for a production document. Example: true.
  • docraptor_hosted_document_expireExpire a hosted DocRaptor document so its public URL stops working.Destructive

    Expire Hosted Document

    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.

    • Idempotent

    Inputs

    idstringrequired
    The download_id of the hosted document, from docraptor_hosted_document_create or docraptor_document_status_get. Example: 1b3fbd0e-5a2f-4b39-8f8c-0e2b5c3a9f11.