Skip to main content
The Sensei endpoint accepts requests in the OpenAI and Anthropic formats. Use the client library you already have and change the base URL.

Base URLs

The values for your account are under Access management, on the Endpoints tab.

Authentication

Send a Sensei key in one of these headers. Keys start with amfs_.

Endpoints

Model names

For a project with a live version of its model, Sensei is that version. You do not name versions in a request.

Request features

A conversation that approaches the context window is compacted automatically. One that still does not fit returns 400 with the code context_too_long.

Request headers

All of these are optional.

Response headers

Rate limits

Each key has a limit in requests per minute. Keys created on the dashboard start at 120. Over the limit, the endpoint answers 429 with a retry-after header.

Examples

Errors

Errors come back in the format of the request. The error reference lists every code.