How to Use the Brim Single-Note API

Brim offers a powerful REST API that allows you to automate chart abstraction tasks, streamline your research workflows, and integrate Brim into your existing data infrastructure.


There are two main ways to use the Brim API:

  1. Bulk upload and download, as described here.
  2. By uploading and downloading single patient documents, which is covered in this article.

This guide provides an overview of how to get started, what you can do with the single-note API, and how to authenticate securely.


Getting Access

To use the API, you need an API Token. You'll find instructions for creating one here.


Brim uses bearer token authentication. Include your token in the header of each API request like this:

Authorization: Bearer YOUR_TOKEN_HERE     



What You Can Do With the Single-Note API


Upload Notes

  • Upload a single note and initiate label generation for it.

Export Generated Labels

  • Download generated labels for a single note.

Completed Generations Queue

  • Manage the queue of completed API generation tasks (more below)

The Generation Queue

Completed generation tasks are managed via a first in, first out queue.


Completed generations are added to the queue.

  • The API enables peeking at the top of the queue or popping results from the oldest generation off the top.

Generations with errors are added to the error list.


Try It Out

You can explore and test all available endpoints at:

👉 https://demo.brimanalytics.com/api/docs#/

This interactive interface lets you try the API with your token and see example responses.


Example Scripts

To use the single-upload API, you'll need two processes: one to upload files, and another to pull results.


  1. A process to upload a CSV of notes one at a time. This should respect rate limits and retry on network errors. Download an example upload script.
  2. A process to pull results off the generation queue and write the exported result to the place its needed. Download an example export script.

Need Help?

If you run into issues or have a question about what’s possible via the API, reach out to our team at any time by emailing support@brimanalytics.com.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.