TAAFT
Free mode
100% free
Freemium
Free Trial
Deals

Voyage code 2

voyage-code-2 is a text embedding model designed for code-related applications including semantic code search, code completion, and code assistant tools. With a 16,000-token context window and 1536-dimensional embeddings, it handles diverse programming languages including Python, C++, Java, and ML frameworks such as NumPy, PyTorch, and TensorFlow. Trained on large-scale code datasets using advanced loss functions and contrastive pair techniques, it achieves 14.52% recall improvement over competitors on 11 code retrieval benchmarks derived from HumanEval, MBPP, APPS, DS-1000, Codechef, and LeetCode. It also exceeds OpenAI embeddings by 3.03% on general-purpose text datasets. Accessible via the Voyage AI API and Python client, it is optimized for production environments with low inference latency and high throughput, making it suitable for RAG pipelines and large-scale semantic search systems.
Coding Gen 2
Released: January 23, 2024

Overview

voyage-code-2 is an embedding model optimized for semantic code retrieval. It supports a 16,000-token context window and produces 1536-dimensional vector embeddings. Trained on large-scale code datasets using advanced loss functions and contrastive learning, it outperforms competing models on code retrieval benchmarks and also improves on general-purpose text retrieval tasks.

Pricing

Compare Voyage code 2 with other models listed in the same vendor pricing tiers and context lengths.

Tier

Standard

Model Input Cached input Output Unit
rerank 2.5 Voyage AI
$0.05 - $0 per 1M tokens
Rerank 2.5 lite Voyage AI
$0.02 - $0 per 1M tokens
Voyage 4 Voyage AI
$0.06 - $0 per 1M tokens
Voyage 4 large Voyage AI
$0.12 - $0 per 1M tokens
Voyage 4 lite Voyage AI
$0.02 - $0 per 1M tokens
Voyage code 2 This model Voyage AI
$0.12 - $0 per 1M tokens
Voyage code 3 Voyage AI
$0.18 - $0 per 1M tokens
Voyage context 3 Voyage AI
$0.18 - $0 per 1M tokens
Voyage finance 2 Voyage AI
$0.12 - $0 per 1M tokens
Voyage law 2 Voyage AI
$0.12 - $0 per 1M tokens
$0.12 - $0 per 1M tokens
$0.12 - $0 per 1M tokens
$0.12 - $0 per 1M tokens

About Voyage AI

Voyage AI provides best-in-class embedding models and rerankers for search and retrieval over unstructured data, used to power retrieval-augmented generation (RAG) and AI applications. It offers general-purpose, domain-specific (finance, legal, code) and company-specific fine-tuned models. Founded in 2023 and based in Palo Alto, the company was acquired by MongoDB, Inc. in February 2025 and now operates as a MongoDB subsidiary.

Industry: Artificial Intelligence
Location: Palo Alto, California, US
View Company Profile
Last updated: June 23, 2026
0 AIs selected
Clear selection
#
Name
Task