The Basics

In this section, you'll learn how to upload documents to Butler's REST API.

Let's start by copying important keys and IDs we will need to start integrating

Get your API Key

Before getting started, you'll need your API Key. To generate your API key, select the User Icon in the top right corner, and go to the Settings page.


Once there, click the Regenerate button and copy your API Key so we can use it to access our API.

Write this down, as we'll need it when we write our script.

Go to the Model Details Page

Go to the model details page of the desired model from the "Your Models" tab. Once there, go to the APIs tab and you should see:


On this tab, you'll see your Queue ID, metrics around how frequently you have processed documents with the API, as well as Sample Code you can easily copy to test out the API.

We'll walk through the different pieces of the sample code below.

But first, copy the Queue ID from underneath the tabs and write it down for later use.

Now let's start writing some code!

Choose how to integrate

Upload and Extract Documents synchronously in one API call (Recommended)


When to integrate Synchronously

Integrate Synchronously when you have documents less than 5 pages in length, and you want it processed as fast as possible.

  • Batch Upload and Extract Documents Async


When to integrate Async

Integrate via async endpoints when you have documents more than 5 pages in length, or if you receive documents in batches and would like batches of documents processed together.

Where to next

You now have all the tools you need to add document processing into any product or workflow. We can’t wait to see what you’re going to build!

If you want to learn more about document extraction models, checkout out the Model Library or Customizing your models sections.

If you are building an app that needs a document review interface, check out Butler Blocks, our library of JavaScript for building delightful document review experiences.

If you're ready to build your production integration, check out the API Reference Section for more details on the specific endpoints.