Skip to content

Voyage Law 2

Voyage Law 2 is Voyage AI's legal-specialized embedding model trained on one trillion legal tokens. It outperforms OpenAI text-embedding-3-large by 6% across eight legal datasets and achieves 84.44 NDCG@10 on long-context legal retrieval versus 68.40 for OpenAI.

index.ts
import { embed } from 'ai';
const result = await embed({
model: 'voyage/voyage-law-2',
value: 'Sunny day at the beach',
})

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Voyage AI
Legal:Terms
Privacy
$0.12/M
03/01/2024