voyage-2

This documentation is valid for the following list of our models:

  • voyage-2

Model Overview

A general-purpose embedding model that delivers state-of-the-art performance across multiple domains while maintaining high efficiency. It's optimized for a balance between cost, latency, and retrieval quality.

Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.

API Schema

post
Authorizations
AuthorizationstringRequired

Bearer key

Body
modelundefined · enumRequiredPossible values:
inputany ofRequired

Input text to embed, encoded as a string or array of tokens.

string · min: 1 · max: 8000Optional
or
string[]Optional
input_typestring · enumOptional

The type of input data for the model.

Default: documentPossible values:
Responses
post
/v1/embeddings
201Success

No content

Example in Python

This Python example shows how to set up an API client, send text to the embedding API, and print the response with the embedding vector. See how large a vector response the model generates from just a single short input phrase.

Response

You can find a more advanced example of using embedding vectors in our article Find Relevant Answers: Semantic Search with Text Embeddings in the Use Cases section.

Last updated

Was this helpful?