> ## Documentation Index
> Fetch the complete documentation index at: https://www.meilisearch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Semantic Search with Voyage AI Embeddings

> Set up Meilisearch with Voyage AI's v3.5 embedding models for semantic search.

Voyage AI provides high-quality embedding models optimized for search and retrieval. This guide shows you how to configure Meilisearch with Voyage AI embeddings using the REST embedder.

## Requirements

* A Meilisearch project
* A [Voyage AI](https://www.voyageai.com/) account with an API key

## Available models

Voyage AI offers the following embedding models:

| Model              | Dimensions                | Use case                                                |
| ------------------ | ------------------------- | ------------------------------------------------------- |
| `voyage-4-large`   | 256, 512, 1,024, or 2,048 | Best general-purpose and multilingual retrieval quality |
| `voyage-4`         | 256, 512, 1,024, or 2,048 | Balanced general-purpose and multilingual               |
| `voyage-4-lite`    | 256, 512, 1,024, or 2,048 | Optimized for latency and cost                          |
| `voyage-code-3`    | 256, 512, 1,024, or 2,048 | Specialized for code retrieval                          |
| `voyage-finance-2` | 1,024                     | Specialized for finance                                 |
| `voyage-law-2`     | 1,024                     | Specialized for legal                                   |

All Series 4 models support 32,000 token context and flexible output dimensions.

<Note>
  The older `voyage-3.5` and `voyage-2` families are still supported but Voyage recommends upgrading to the Series 4 for better performance. See the [Voyage AI documentation](https://docs.voyageai.com/docs/embeddings) for the full model catalog.
</Note>

## Configure the embedder

Update your index settings with the Voyage AI embedder configuration:

```json theme={null}
{
  "voyage": {
    "source": "rest",
    "apiKey": "<VOYAGE_API_KEY>",
    "documentTemplate": "A product named '{{doc.name}}': {{doc.description}}",
    "url": "https://api.voyageai.com/v1/embeddings",
    "request": {
      "model": "voyage-4-lite",
      "input": ["{{text}}", "{{..}}"]
    },
    "response": {
      "data": [
        { "embedding": "{{embedding}}" },
        "{{..}}"
      ]
    }
  }
}
```

Send this configuration to Meilisearch:

```sh theme={null}
curl \
  -X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer MEILISEARCH_KEY' \
  --data-binary '{
    "embedders": {
      "voyage": {
        "source": "rest",
        "apiKey": "<VOYAGE_API_KEY>",
        "documentTemplate": "A product named '\''{{doc.name}}'\'': {{doc.description}}",
        "url": "https://api.voyageai.com/v1/embeddings",
        "request": {
          "model": "voyage-4-lite",
          "input": ["{{text}}", "{{..}}"]
        },
        "response": {
          "data": [
            { "embedding": "{{embedding}}" },
            "{{..}}"
          ]
        }
      }
    }
  }'
```

Replace `<VOYAGE_API_KEY>` with your actual Voyage AI API key. Adjust `model` depending on your quality and cost requirements.

Meilisearch handles batching and rate limiting automatically. Monitor the [tasks queue](/reference/api/tasks/list-tasks) to track indexing progress.

## Test the search

```json theme={null}
{
  "q": "comfortable shoes for walking",
  "hybrid": {
    "semanticRatio": 0.5,
    "embedder": "voyage"
  }
}
```

## Next steps

* [Document template best practices](/capabilities/hybrid_search/advanced/document_template_best_practices) to optimize which fields are embedded
* [Custom hybrid ranking](/capabilities/hybrid_search/advanced/custom_hybrid_ranking) to tune the balance between keyword and semantic results
* [Embedder settings reference](/reference/api/settings/list-all-settings) for all configuration options
