Skip to main content

Voyage Python Library

Voyage AI provides cutting-edge embedding and rerankers.

Embedding models are neural net models (e.g., transformers) that convert unstructured and complex data, such as documents, images, audios, videos, or tabular data, into dense numerical vectors (i.e. embeddings) that capture their semantic meanings. These vectors serve as representations/indices for datapoints and are essential building blocks for semantic search and retrieval-augmented generation (RAG), which is the predominant approach for domain-specific or company-specific chatbots and other AI applications.

Rerankers are neural nets that output relevance scores between a query and multiple documents. It is common practice to use the relevance scores to rerank the documents initially retrieved with embedding-based methods (or with lexical search algorithms such as BM25 and TF-IDF). Selecting the highest-scored documents refines the retrieval results into a more relevant subset.

Voyage AI provides API endpoints for embedding and reranking models that take in your data (e.g., documents, queries, or query-document pairs) and return their embeddings or relevance scores. Embedding models and rerankers, as modular components, seamlessly integrate with other parts of a RAG stack, including vector stores and generative Large Language Models (LLMs).

Voyage AI’s embedding models and rerankers are state-of-the-art in retrieval accuracy. Please read our announcing blog post for details. Please also check out a high-level introduction of embedding models, semantic search, and RAG, and our step-by-step quickstart tutorial on implementing a minimalist RAG chatbot using Voyage model endpoints.

Local models (voyage-4-nano)

voyage-4-nano can run locally, without an API key, via sentence-transformers. Install the optional extra:

pip install "voyageai[local]"

Requirements:

  • Python 3.10+ (the local model's code uses 3.10+ typing syntax). On older Python the extra is skipped and local models are unavailable.
  • The extra pulls in torch and sentence-transformers; a pure-API install of voyageai never imports them, so API-only users pay no import cost.

Usage is identical to the hosted API — just pass the local model name; no API key is required:

import voyageai

vo = voyageai.Client()  # no API key needed for local models
result = vo.embed(["Hello, world!"], model="voyage-4-nano", input_type="document")
print(result.embeddings[0])

The local path mirrors the hosted API's behavior (input validation, unit-norm Matryoshka embeddings at every dimension, token accounting, and the 1000-input batch limit). int8/uint8 output dtypes are the one exception — they require fixed calibration ranges we don't ship locally yet and raise NotImplementedError; use float/float32 or binary/ubinary instead.

Voyage AI Official Documentation

Metadata

Release files for voyageai 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for voyageai 0.6.0
File Size Uploaded Provenance Actions
voyageai-0.6.0.tar.gz 38.4 kB Without provenance Details for voyageai-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for voyageai 0.6.0
File Interpreter ABI Platform Actions
voyageai-0.6.0-py3-none-any.whl Python 3 none any Details for voyageai-0.6.0-py3-none-any.whl

Total release size: 86.4 kB

Release files / voyageai-0.6.0.tar.gz

Download URL voyageai-0.6.0.tar.gz
Size 38.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9327de6130f8f755211470a4d135186461796c3c316488199c7485eea9213b69
BLAKE2b-256 checksum
How to use checksums
0c4df5cd158dbeb75e63ed955e84ac242184a8a73e07bdab0cbb6cdc6bc651d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.16 Linux/6.8.0-1070-azure

Release files / voyageai-0.6.0-py3-none-any.whl

Download URL voyageai-0.6.0-py3-none-any.whl
Size 48.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54056603896c867d63c78d159415239a4bb767d8973bebb731500584444986ef
BLAKE2b-256 checksum
How to use checksums
44970c47cc38ee936356aef9dc7597577f08abbb6bdc8fee731ef2e0282bf36c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.16 Linux/6.8.0-1070-azure

Security for voyageai 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page