Getting started with AI SRE API

How AI SRE API works

Our API follows the JSON:API specification.

API requests to the AI SRE API are authorized using the Bearer Authentication standard: add an Authorization: Bearer $TOKEN header to your requests. The AI SRE API uses the same tokens as the Telemetry API.

Chats run asynchronously. Create a chat or reply to one and the request returns as soon as your message is saved, with the chat in the processing status. Then:

  1. Poll the chat status until it leaves processing.
  2. When the status is awaiting_confirmation, approve or deny each pending confirmation. The agent then continues and the status returns to processing.
  3. When the status is idle, get the chat and read the last ai message. Its text carries the answer as markdown and its artifacts carry any reports.

Write requests to the AI SRE API are limited to 100 per minute per token.

Get a global API token

A global API token is a token valid across all your teams, for managing anything within Better Stack.

Global API Token

Get a Telemetry API token

A Telemetry API token is a team-scoped token for managing your Telemetry resources, including AI SRE chats. You can get a separate API token for each of your teams.

Telemetry API Token