https://api.aomi.dev).
Authentication
Most endpoints take these headers:Endpoints
Create Session
Create a new chat session.
Request Body (optional):
Get Session
Fetch one thread by ID.
Response:
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.
Headers:
Response: JSON snapshot of the session.
Get Session State
Get the current state snapshot for a session. Poll this to watchis_processing and pick up new messages while the assistant works.
Query Parameters:
Response:
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.
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-basedfetch and read the stream body, since the session ID travels in a header rather than a query parameter.
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.
Query Parameters:
Response: an array of threads.
Set Model
Set the model (rig) for a session.
Query Parameters:
Response:
List Available Models
Get the models available for the current session.List Apps
Get the Apps available to this session, each with the secret slots it declares.
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 withfetch and read the response body. Do not use EventSource with a query parameter.
Error Responses
Next Steps
- Sessions: how sessions and threads are managed
- Building Apps: app configuration and deployment
- Quickstart: get a working integration in minutes