[Voyage AI](/ai-gateway/models/labs/voyage)

# Voyage 4

Voyage 4 is a mid-sized model in Voyage AI's Voyage 4 family. Voyage AI reports it approaches voyage-3-large retrieval quality with a context window of 32K tokens, Matryoshka dimensions (2048, 1024, 512, 256), and multiple quantization options. All Voyage 4 models share one embedding space, so you can mix models for asymmetric retrieval. Your use is subject to Voyage AI's [Terms](https://www.voyageai.com/tos) & [Privacy](https://www.voyageai.com/privacy) Policies.

[Use with AI Gateway](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Futm_source%3Dgateway-model-page%26utm_campaign%3Dai-gateway-models&title=Get+Started+with+Vercel+AI+Gateway) [View docs](https://vercel.com/docs/ai-gateway)

```
1import { embed } from 'ai';
2

3const result = await embed({
4  model: 'voyage/voyage-4',
5  value: 'Sunny day at the beach',
6})
```

[Read docs](https://vercel.com/docs/ai-gateway/sdks-and-apis/ai-sdk)

[Overview](/ai-gateway/models/voyage-4) [About](/ai-gateway/models/voyage-4/about) [Providers](/ai-gateway/models/voyage-4/providers) [Similar](/ai-gateway/models/voyage-4/similar) [FAQ](/ai-gateway/models/voyage-4/faq)

## [Copy link to heading](#frequently-asked-questions)Frequently Asked Questions

- What is the difference between Voyage 4, voyage-4-large, and voyage-4-lite?

    `voyage-4-large` is the MoE flagship with the highest average retrieval scores in Voyage AI's published Voyage 4 benchmarks. Voyage 4 is the mid-sized model; Voyage AI reports it approaches voyage-3-large quality. `voyage-4-lite` uses fewer parameters; Voyage AI reports it approaches voyage-3.5 retrieval accuracy. All three share one embedding space.

- How does Voyage 4 compare to voyage-3.5?

    Voyage 4 is a Voyage 4 model with a shared embedding space and updated training. Voyage AI positions `voyage-4-lite` near voyage-3.5 accuracy; Voyage 4 targets voyage-3-large-level quality. Moving from Voyage 3.x requires re-embedding your corpus.

- What is the context window for Voyage 4?

    32K tokens. Set chunk sizes so single-pass embeds stay under this limit on long texts.

- Can I use Voyage 4 for RAG applications?

    Yes. Voyage 4 is a text embedding model for semantic search and retrieval-augmented generation across mixed content types, including technical documentation, business text, and conversational text.

- How do I access Voyage 4 through Vercel AI Gateway?

    Add your Voyage AI API key in AI Gateway settings, then send embedding requests through AI Gateway. AI Gateway authenticates requests and records usage.

- Do I need to re-embed my data to switch from Voyage 3.x to Voyage 4?

    Yes. Voyage 3 and Voyage 4 use different embedding spaces, so you re-embed and re-index when you move generations. Within Voyage 4, you can often change query models without re-vectorizing documents if you follow Voyage AI's asymmetric retrieval pattern with `voyage-4-large` document embeddings.

- What is shared embedding space in Voyage 4?

    All Voyage 4 models map text into the same vector space, so embeddings from different models in the family are compatible. You can search document vectors from `voyage-4-large` with query vectors from Voyage 4 or `voyage-4-lite`.