API Requests
Below is an outline of the data processing workflow when you submit a request—such as redrafting a clause—using Sonar Legal. We illustrate four scenarios, with Redraft Clause as a working example: Direct Processing (No Knowledge Base), Direct Processing (Knowledge Base), Processing via OpenRouter (No Knowledge Base), and Processing via OpenRouter (Knowledge Base).
Direct Processing
(No Knowledge Base)
Input Collection
Select clause and choose the redraft function
API Request
Text is sent to the provider's endpoint through the Sonar APIs
Data Processing
Provider processes request
Response Delivery
Redrafted clause is returned from the Sonar Legal APIs to the Sonar Legal Add-in
No Data Storage
Data processed in transit only. No data is stored after response generation.
Processing via OpenRouter
(No Knowledge Base)
Input Collection
Select clause and choose the redraft function
Routing Request
Request sent to OpenRouter via the Sonar APIs
Provider Selection
OpenRouter routes to best available provider
Data Processing
Provider processes request
Response Relay
Redrafted clause is returned from the provider to OpenRouter and forwarded to the Sonar Legal APIs
Response Delivery
Redrafted clause is returned from the Sonar Legal APIs to the Sonar Legal Add-in
No Data Storage
Data processed in transit only. No data is stored after response generation.
Direct Processing
(With Knowledge Base)
Input Collection
Select clause and choose the redraft function
Vectorization
The clause is sent to the JinaAI API to generate a vector representation of the clause, which is then used to search the Knowledge Base in-memory.
Knowledge Base Search
The clause is compared with the available clauses in the Knowledge Base in-memory. A set of clauses is selected to enrich the LLM query. The initial clause never leaves the Sonar Legal APIs at this stage.
API Request
Text is sent to the provider's endpoint through the Sonar APIs
Data Processing
Provider processes request
Response Delivery
Redrafted clause is returned from the Sonar Legal APIs to the Sonar Legal Add-in
No Data Storage
Data processed in transit only. No data is stored after response generation.
Processing via OpenRouter (With Knowledge Base)
Input Collection
Select clause and choose the redraft function
Vectorization
The clause is sent to the JinaAI API to generate a vector representation of the clause, which is then used to search the Knowledge Base in-memory.
Knowledge Base Search
The clause is compared with the available clauses in the Knowledge Base in-memory. A set of clauses is selected to enrich the LLM query. The initial clause never leaves the Sonar Legal APIs at this stage.
Routing Request
Request sent to OpenRouter via the Sonar APIs
Provider Selection
OpenRouter routes to best available provider
Data Processing
Provider processes request
Response Relay
Redrafted clause is returned from the provider to OpenRouter and forwarded to the Sonar Legal APIs
Response Delivery
Redrafted clause is returned from the Sonar Legal APIs to the Sonar Legal Add-in
No Data Storage
Data processed in transit only. No data is stored after response generation.