In this guide, you learn how to generate your first vector embeddings with Voyage AI and build a basic application.
Create a Model API Key
To access Voyage AI models, create a model API key in the MongoDB Atlas UI.
Sign up for a free Atlas account or log in.
If you're new to Atlas, it creates an organization and project for you.
To learn more, see Create an Atlas Account.
Create a model API key for your project.
In your Atlas project, select AI Model APIs from the navigation bar.
Click Create model API key.
Give the API key a name and then click Create.
To learn more, see Manage Voyage AI Model API Keys.
Generate Your First Embeddings
In this section, you generate vector embeddings using a Voyage AI embedding model and the Python client.

Create your script.
Create a file named quickstart.py in your project and paste the following code into it. This code initializes the Voyage AI client, defines sample texts, and uses the client to access the Voyage API to generate vector embeddings with the voyage-4-large model.
For details, see Python Client or explore the full API specification.
import voyageai # Initialize Voyage client vo = voyageai.Client() # Sample texts texts = [ "hello, world", "welcome to voyage ai!" ] # Generate embeddings result = vo.embed( texts, model="voyage-4-large" ) print(f"Generated {len(result.embeddings)} embeddings") print(f"Each embedding has {len(result.embeddings[0])} dimensions") print(f"First embedding (truncated): {result.embeddings[0][:5]}...")
Run the script.
Run the following command in your terminal to generate the embeddings.
python quickstart.py
Generated 2 embeddings Each embedding has 1024 dimensions First embedding (truncated): [0.05843968689441681, -0.035438042134046555, -0.059422507882118225, -0.018386829644441605, -0.04523468762636185]...
Build a Basic RAG Application
Now that you know how to generate vector embeddings, build a basic RAG application to learn how to use Voyage AI models to implement AI search and retrieval. RAG enables LLMs to generate context-aware responses by retrieving relevant information from your data before generating answers.
Note
RAG applications require access to an LLM. This tutorial provides examples using Anthropic or OpenAI, but you can use any LLM provider of your choice.

Learning Summary
Now that you've created your first application with Voyage AI, expand the following sections to learn more about the concepts covered in this quick start:
Next Steps
To continue learning, see the following resources:
Skill Level | Documentation Resources |
|---|---|
Basic | |
Intermediate |