1. Set up your account
Head to the Isaacus Platform to create a new account. Once signed up, add a payment method to claim your free credits. After adding a payment method, create a new API key. Make sure to keep your API key safe. You won’t be able to see it again after you create it. But don’t worry, you can always generate a new one.2. Install the Isaacus API client
Now that your account is set up, install the Isaacus LangChain integration package.3. Embed a document
With our API client installed, let’s embed our first legal query and document. To start, you need to initialize the client with your API key. You can do this by setting theISAACUS_API_KEY environment variable or by passing it directly, which is what we’re doing in this example.
We’re going to use Kanon 2 Embedder, the world’s most accurate legal embedding model on the Massive Legal Embedding Benchmark as of 20 October 2025.
.embed_documents() method of our API client. Using this method indicates that we’re embedding a document (as opposed to a search query) which is important for ensuring that our embeddings are optimized for retrieval (as opposed to other tasks like classification or sentence similarity).
.embed_query() method of our API client, which indicates that we’re embedding a search query.
numpy’s dot function to compute the dot product of our embeddings (which is equivalent to their cosine similarity since all our embeddings are L2-normalized). If you prefer, you can use another library to compute the cosine similarity of the embeddings (e.g., torch via torch.nn.functional.cosine_similarity), or you could write your own implementation.