Skip to main content
You can integrate a Unit to your existing service using our Rei Core SDK or via REST API.

Quick start

JavaScript

Python

Constructor

Import the SDK or the client and then initialize it with your API key

JavaScript

Python

Functions

Get Agent

Retrieve details about the Rei Agent using the getAgent function.

JavaScript

Python

Chat Completions

Send a message to the Rei Agent and receive a chat completion using the chatCompletions function.

JavaScript

Python

Some examples

Get the Latest Biology Research

Example Response:
Example Response:

Get the Latest News

Example Response:

Tips & Tricks

  • Specific Questions Get Better Answers: “What are the three biggest advancements in CRISPR this year?” works better than “Tell me about CRISPR.”
  • Handle Errors Like a Pro:

Common Issues

  • “Can’t connect to api.reilabs.org” - Check your internet or VPN. REIgent needs to access the web.
  • “Invalid API key” - Double-check your key. Copy-paste issues happen to the best of us.
  • Timeout errors - Research queries might take longer. Increase your timeout settings.