Skip to main content

Voyage AI

Voyage AI provides text embeddings. Promptfoo calls its /embeddings endpoint for similarity assertions. Examples include voyage-4-large, voyage-4, voyage-4-lite, and voyage-code-4. The provider does not call Voyage's separate multimodal or contextualized embedding endpoints.

To use it, set the VOYAGE_API_KEY environment variable.

To select it for one assertion:

assert:
- type: similar
value: The expected output
provider: voyage:voyage-4-large

You can enable it for every similarity comparison using the defaultTest property:

defaultTest:
options:
provider:
embedding: voyage:voyage-4-large

You can also override the API key or API base URL:

defaultTest:
options:
provider:
embedding:
id: voyage:voyage-4-large
config:
apiKeyEnvar: MY_VOYAGE_KEY
apiBaseUrl: https://api.voyageai.com/v1
headers:
X-Custom-Header: value

apiBaseUrl can also be set with the VOYAGE_API_BASE_URL environment variable.