Skip to content

Voyage Code 2

Voyage Code 2 is Voyage AI's code-specialized embedding model with a context window of 0 tokens. It improves code retrieval by 14.52% over OpenAI text-embedding-3-large and supports Python, C++, Java, and major ML framework documentation.

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

More models by Voyage AI

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
Providers
ZDR
No Training
Release Date
32K
$0.05/M
voyage logo
08/11/2025
$0.06/M
voyage logo
05/20/2025
$0.18/M
voyage logo
09/01/2024
$0.18/M
voyage logo
09/01/2024
32K
$0.02/M
voyage logo
32K
$0.12/M
voyage logo