Skip to main content

Quick Start

Get started with Voyage AI in under 2 minutes:
from portkey_ai import Portkey

# 1. Install: pip install portkey-ai
# 2. Add @voyage provider in model catalog
# 3. Use it:

portkey = Portkey(api_key="PORTKEY_API_KEY")

embedding = portkey.embeddings.create(
    model="@voyage/voyage-3",
    input="Name the tallest buildings in Hawaii"
)

print(embedding.data[0].embedding)
Tip: You can also set provider="@voyage" in Portkey() and use just model="voyage-3" in the request.

Add Provider in Model Catalog

Before making requests, add Voyage AI to your Model Catalog:
  1. Go to Model Catalog → Add Provider
  2. Select Voyage AI
  3. Enter your Voyage API key
  4. Name your provider (e.g., voyage)

Complete Setup Guide

See all setup options and detailed configuration instructions

Voyage AI Capabilities

Embeddings

Generate high-quality embeddings:
from portkey_ai import Portkey

portkey = Portkey(api_key="PORTKEY_API_KEY", provider="@voyage")

embedding = portkey.embeddings.create(
    model="voyage-3",
    input="Name the tallest buildings in Hawaii"
)

print(embedding.data[0].embedding)

Reranking

Rerank documents for better search results:
from portkey_ai import Portkey

portkey = Portkey(api_key="PORTKEY_API_KEY", provider="@voyage")

    response = portkey.post(
            "/rerank",
            model="rerank-2-lite",
            query="What is the capital of the United States?",
            documents=[
                "Carson City is the capital city of the American state of Nevada.",
        "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean.",
        "Washington, D.C. is the capital of the United States.",
        "Capital punishment has existed in the United States since before it was a country."
            ]
        )

    print(response)

Supported Models

Voyage AI offers specialized embedding and reranking models:
ModelTypeDescription
voyage-3EmbeddingLatest general-purpose embedding model
voyage-3-liteEmbeddingFaster, lighter version
voyage-code-3EmbeddingOptimized for code
rerank-2RerankingHigh-quality reranking
rerank-2-liteRerankingFaster reranking
Check Voyage AI’s documentation for the complete model list.

Next Steps

For complete SDK documentation:

SDK Reference

Complete Portkey SDK documentation