Read the complete canonical chat session
GET/api/v2/chat-sessions/:session_id
Returns the newest 50 turns in chronological order. Pass turns_next_cursor as turns_before to read the preceding page. Page size is fixed at 50; turn_limit and before_turn are not HTTP parameters. An unknown turns_before anchor currently falls back to the newest page.
If-None-Match equal to the current language-specific session ETag returns 304. This comparison occurs before pagination. Prefer: wait is ignored; responses are immediate. Polling is a fallback to the normal SSE stream.
Request
Responses
- 200
- 304
- 400
- 401
- 403
- 404
- 500
Current complete session representation
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.
Language selected for outgoing generic tool-status labels and known HTTP/timeline error text. HTTP reason-phrase titles remain language-neutral.
Session has not changed since If-None-Match.
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.
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.
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.