Voyage AI
How to create Voyage AI embeddings
Create embeddings with REST or the official Python client, batching within model and account limits.
Documentation reviewed · 2 methods with sources
Ways to do it
- Requirements
- Voyage API key, supported model, and JSON input.
- Limitations
- The input list can contain up to 1,000 texts. The voyage-3.5 model accepts up to 320,000 total tokens per request.
Example shell
curl --fail https://api.voyageai.com/v1/embeddings -H "Authorization: Bearer $VOYAGE_API_KEY" -H "Content-Type: application/json" -d '{"input":["A short document"],"model":"voyage-3.5"}'- Requirements
- Python, voyageai, and API key.
- Limitations
- The default truncation setting shortens individual texts that exceed the model context length. Set truncation=False to surface an error instead.
Example text
import voyageai
client = voyageai.Client()
result = client.embed(["A short document"], model="voyage-3.5", input_type="document")