Append user input and start an assistant turn
POST/api/v2/chat-sessions/:session_id/turns
The request creates one user message and one asynchronous turn. The response is the updated canonical session, not a separate job object. Only one active turn is allowed per session.
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 409
- 412
- 500
User input persisted and assistant generation accepted
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Strong session revision tag. Polish has no suffix; other supported languages append the language code. Use the same Accept-Language on reads and conditional mutations.
RFC 8288 link to the accepted turn's SSE stream.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
Malformed request
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
Missing or invalid API key
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
Authenticated, but the API key's account has no access to this resource
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
Resource does not exist or is not visible to the caller
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
The session already has an active turn.
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
If-Match refers to an older session revision
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
Unexpected request failure.
Response Headers
Version of the gaius-api-contracts release the backend runs (legalgpt-contracts), sent on every response. Clients compare it with the @legalgpt/contracts version they were built with; both packages share one version per contract.
Prevents storage of sensitive authenticated chat data.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.