How to Use the Brim 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 in this article.
  2. By uploading and downloading single patient documents, as described in the single-note API article..

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


Why Use the Brim Bulk API?

You might use the API to:

  • Create and update patients in bulk
  • Run automated abstraction workflows
  • Retrieve structured data outputs
  • Integrate Brim with other systems
  • Monitor abstraction progress programmatically

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 Bulk API


Upload Data & Resources

  • Upload new or updated patient notes as a CSV.
  • Upload new or updated resource or reference documents that can be used to create or optimize variables.

Run Generation Automatically

  • Generate labels for some or all patients and variables

Export Generated Labels

  • Download generated labels.

An example workflow for how to combine these capabilities is shown below.

Upload, generate, and download results with the API.


Example Scripts

Start with our example shell script that uploads data, generates, and downloads results. Use it with the supporting python scripts for uploading files and fetching results.



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.


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.