Skip to main content
This page documents the HTTP endpoints exposed by the Aomi backend. All endpoints are relative to your backend URL (e.g., https://api.aomi.dev).

Authentication

Most endpoints take these headers:

Endpoints

Create Session

Create a new chat session.
Headers: Request Body (optional):
Response:

Get Session

Fetch one thread by ID.
Path Parameters: Response:
To list every thread for a wallet, call GET /api/sessions?public_key=.... See List Threads.

Send Message (Chat)

Send a message to the assistant. This returns a JSON snapshot of the updated session, not a stream. The message and its options ride in the query string. To stream the assistant’s work as it happens, open the updates channel and poll session state.
Query Parameters: Headers: Response: JSON snapshot of the session.

Get Session State

Get the current state snapshot for a session. Poll this to watch is_processing and pick up new messages while the assistant works.
Headers: Query Parameters: Response:
Wallet fields are nested under user_state: the EVM address is user_state.evm.address, the chain is user_state.evm.chain_id, and connection status is user_state.connection.is_connected.

Interrupt Generation

Cancel an in-progress response.
Headers: Response: the same JSON session snapshot returned by Send Message.

Subscribe to Updates

Open a long-lived Server-Sent Events (SSE) channel for a session. Use it to react to title changes and tool progress in real time. Open it with a header-based fetch and read the stream body, since the session ID travels in a header rather than a query parameter.
Headers: Response: SSE stream. Each event is a JSON object carrying type and session_id. Event Types:

List Threads

List every thread bound to a wallet address.
Headers: Query Parameters: Response: an array of threads.

Set Model

Set the model (rig) for a session.
Headers: Query Parameters: Response:

List Available Models

Get the models available for the current session.
Response: an array of model identifiers.

List Apps

Get the Apps available to this session, each with the secret slots it declares.
Headers: Response: an array of App descriptors. secrets is present only for Apps that declare slots.

Consuming the Updates Stream in JavaScript

The updates channel ships the session ID in a header, so open it with fetch and read the response body. Do not use EventSource with a query parameter.

Error Responses

Next Steps

Last modified on June 4, 2026