AI Chat

Submit a user message and start a server-owned turn. The command returns as soon as the turn is durable; subscribe to the conversation WebSocket for real-time output.

post/projects/{project_id}/ai/conversations/{public_id}/messages

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/projects/{project_id}/ai/conversations/{public_id}/messages
  • Auth: HTTP bearer

Path parameters

project_idinteger required
public_idstring required

Request body

ai_modelstring nullable

Optional next-turn model. The provider harness remains pinned, but its advertised models may be changed between turns.

ai_permission_modestring nullable

Optional next-turn permission mode for the pinned provider harness.

ai_thinking_levelstring nullable

Optional next-turn thinking level.

contentstring required
page_contextstring nullable

Optional, client-supplied description of the page/entity the user is currently viewing (e.g. a trace in a project). Injected into the model's view of this turn only — never stored or shown in history. Capped server side; oversized values are ignored rather than rejected.

turn_idstring nullable

Client-generated opaque idempotency key for this turn. Retries with the same id never create a second user message or harness execution.

Response

Turn accepted; output follows on the conversation WebSocket

statusstring required
turn_idstring required
turn_started_atstring required

Server timestamp used by every observer to render one continuous elapsed-time counter across refreshes and reconnects.

Changes

No recorded changes to this operation across all 50 revisions of this API.