Voyage AI · embedding model
voyage-law-2 API
Legal-domain embedding model (1024 dimensions).
Call voyage-law-2 through Nicrron with one API key, next to every other model in the catalog. Use the model id voyage/voyage-law-2 with any OpenAI SDK.
Pricing
voyage-law-2 costs $0.12 per million input tokens. That is the provider's list price. Requests paid from credit add a 5% platform fee; with your own provider key, the provider bills you and Nicrron charges 5% of the list price. No subscription: add credit and pay for what you use.
Call voyage-law-2
cURL
curl https://api.nicrron.ai/v1/embeddings \
-H "Authorization: Bearer $NICRRON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "voyage/voyage-law-2",
"input": ["The quick brown fox", "Semantic search with Nicrron"]
}'Python (OpenAI SDK)
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.nicrron.ai/v1",
api_key=os.environ["NICRRON_API_KEY"],
)
out = client.embeddings.create(
model="voyage/voyage-law-2",
input=["The quick brown fox", "Semantic search with Nicrron"],
)
print(len(out.data[0].embedding))New to Nicrron? The quickstart takes two minutes.
Questions
- How much does the voyage-law-2 API cost?
- On Nicrron, voyage-law-2 costs $0.12 per million input tokens, the provider's list price. Requests paid from credit add a 5% platform fee. There is no subscription: you add credit and pay for what you use.
- What is the context window of voyage-law-2?
- voyage-law-2 takes up to 16,000 tokens (16k) of context.
- How do I call voyage-law-2 through an API?
- Point any OpenAI SDK at https://api.nicrron.ai/v1, use a Nicrron API key, and set the model to "voyage/voyage-law-2". The endpoint is /v1/embeddings.
- Who makes voyage-law-2?
- voyage-law-2 is a embedding model made by Voyage AI. Nicrron gives you it and every other model in the catalog through one API key and one bill.