Gaius-Lex Agent API
The Gaius-Lex legal agent (API version 2) for clients with an organization API key.
Authentication: send Authorization: Api-Key <YOUR_KEY>. The key acts as its own account
in the organization, so the sessions it creates belong to that key; the account is created
on the key's first request. A read-only key can only read: every POST and PATCH gets
403 with error_code read_only_api_key. A missing, revoked or expired key gets 401;
a key of an organization without active billing gets 403.
Flow:
POST /api/v2/chat-sessions/creates a session. Withfirst_turnit also starts the agent and returns202; the session'sactive_turn_idis the running turn.GET .../turns/{turn_id}/eventsstreams the turn as server-sent events: each event carries a complete replacement of a message or of the turn. Reconnect withLast-Event-ID;GET /api/v2/chat-sessions/{session_id}returns the full history.POST .../turnsadds the next user message. When the agent asks a question, answer or reject it through.../questions/{message_id}/answersor.../reject.
Commands accept an Idempotency-Key header, so a retried request does not start a second
turn. Accept-Language selects the language of status labels and error details.
Authentication
- API Key: GaiusAuth
Enter the full Authorization header value: Authorization: Api-Key <YOUR_KEY>
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | Authorization |