1find1234one ranked list2readthe source, whole and exact3citethe passage, with its page3 calls, from a question to a citation
Get a key
Create an API key athttps://app.getclean.ai and put it in your environment. The SDKs and the commands on this page read it from there.
YOUR_API_KEY with your key.
Install an SDK
The cURL commands on this page need no install. For Python or TypeScript, install the SDK.Find the source
Send the question tosearch in 4 wordings and 3 languages, and ask for official and primary sources first.
201 Created
Find the passage in the source
Fetch the address of that result, and send your question with the fetch as a highlight. Withmax_characters set to 0, the response has the outline of the source and the place of the passage, and no page text.
SOURCE_URL with the url of the first result.
The response is a record, the stored copy of the source. This one is cut to the highlight and to one row of the outline, and the words of the passage are shortened.
201 Created
basis says judged. text has the regulation’s own words, never the model’s. The highlight names its place: the section “Article 50”, and one block in it.
Open the passage again
The record’s id and the block’s id are a citation. Anyone who has them can read the passage from the stored copy, at no charge.CONTENTS_ID with the id of the record and BLOCK_ID with the block_id of the highlight.
The response has the whole block, as the source has it. A sentence of your report that rests on this passage can name the record and the block, and a reviewer can open it with this call.
Check what the 3 calls cost
The search is charged one search unit, one unit for each datasource it ran on, and 2 model steps: one for the ranking and one for the choice of datasources. The fetch is charged one unit and one model step, because a model judged the highlight. The read of the block costs nothing. Every charged response hascost, with the units and the amount.
For the whole run, from a question to a checked report, see From a question to a checked report.