Skip to main content
The Rei Chat platform exposes two complementary HTTP APIs: the Agent API for managing your agents and their configuration, and the Inference API for running chat and response generation against an agent. This guide explains the scope of each, which credential to use, and how to make your first request.

APIs at a glance

All paths are versioned under /v1. Always send your credential in the Authorization header as a bearer token: Authorization: Bearer <SECRET_KEY>.

Agent API

Base URL: https://api.reilabs.org/v1 Scope & usage: Use the Agent API to manage the lifecycle and configuration of your agents: the control-plane operations you typically run from a backend or during setup. It is split into two sub-categories based on which credential authorizes the call.

Account & Unit Management

Operations that create or change agents on your account. These are authorized with your Account API Key, because they act across your account rather than on behalf of a single agent.

Agent Operations

Operations that read or update a single agent and its tools. These are authorized with that agent’s Unit API Key.

Inference API

Base URL: https://rei-api.reilabs.org/v1 Scope & usage: Use the Inference API at runtime to interact with a configured agent, sending messages and receiving generated output. All Inference API calls are authorized with the Unit API Key of the agent you are calling.

Chat & Responses


Authentication

Rei Chat uses two types of bearer credentials. Pick the one required by the endpoint you are calling (see the tables above).

Account API Key

To manage resources.

Unit API Key

To act on behalf of a specific agent.

Make your first request

Once you have an Unit API Key, call the Inference API to run a chat completion:
To manage agents instead, call the Agent API with your Account API Key:
See the Agent API and Inference API sections in the sidebar for the full request and response schema of every endpoint.