Voyage: Voyage Code 3
voyage-code-3- Input / Output
- $0.18 / $0.00
- Context
- 32K
- Modalities
- Embedding
About Voyage Code 3
Voyage Code 3 is Voyage AI's text embedding model optimized for code retrieval. It maps natural-language questions and source files into one vector space, so a search can return the function or file that answers a question. Voyage now points to Voyage Code 4 as the newer code model. It returns 1024 dimensions by default, with 256, 512, and 2048 optional.
Where it works well
- Voyage optimizes it for code retrieval specifically, not for general prose.
- It matches plain-language questions to relevant source code in a repository index.
- Output dimensions of 256, 512, 1024, and 2048 can be requested.
- It supports int8, uint8, binary, and ubinary outputs for compact storage.
When to choose another model
- Voyage Code 4 is its newer successor, so a fresh build should evaluate that first.
- It is tuned for code, so ordinary document search is better served by Voyage 4 or Voyage 4 Large.
Getting started
Create API key
Create a key in Console, then use it with every model on the platform.
Send your first request
Copy the example for your language and run it against the endpoint.
EmbeddingTokenLab endpointPOST/v1/embeddingscurl -X POST "https://api.tokenlab.sh/v1/embeddings" \ -H "Authorization: Bearer sk-xxx" \ -H "Content-Type: application/json" \ -d '{ "encoding_format": "float", "model": "voyage-code-3", "input": "The quick brown fox jumps over the lazy dog." }'
Parameters
Embedding
| Parameter | Values and limits | Default | Notes |
|---|---|---|---|
encoding_format | Not provided | Not provided | This field is accepted. The current public contract does not specify a complete value range or list. No additional values are promised. The omitted-field default is not verified. |
input | Inputs: ≥ 1, ≤ 1000 | Not provided | Not provided |
Pricing
The Verified price applies to Verified, which costs less on most models. The Official price is the model maker's published price and applies to the more reliable Official route. Auto bills the route that completes the request.
Embedding
per 1M tokens- Official price
- Input $0.18 / Output $0.00
- Verified price
- —
- Discount
- —
| Official priceper 1M tokens | Verified priceper 1M tokens | Discount | |
|---|---|---|---|
| Embedding | Input $0.18 / Output $0.00 | — | — |
Usage & activity
Success rate is the share of requests that completed. Latency is how long a full response takes; P95 means 95% of requests finished within that time.
Usage & availability
Last 24 hours- Requests
- Success rate
- P95 latency
- Total tokens
Data is based on aggregate user requests, excluding status checks.
Open in Console
Open Voyage Code 3 in Console with a prompt ready to edit or send.
Help me try voyage-code-3 with embedding at /v1/embeddings. Show the result and cost.
Use cases
Repository search
Embed functions and files so a developer can ask where retries are handled and get the right module back.
Context for coding assistants
Retrieve the most relevant code snippets and hand them to a chat model before it edits or explains something.
Duplicate and similar-code finding
Embed snippets from many services to cluster near-identical implementations and spot code worth merging.
Prompt examples
Embed the query: where do we validate the webhook signature?
Embed this Python function as a document for the code index.
Embed the query: example of paginated database query with cursor.
This model has conditional pricing. Monthly token totals alone cannot produce a reliable estimate; use the detailed pricing for the request specification, cache, and applicable time window.
FAQ
What is Voyage Code 3 for?
Retrieving source code. Voyage describes it as optimized for code retrieval, so natural-language questions land near the code that answers them. It is used to build repository search and to feed relevant code to coding assistants.
Should I use Voyage Code 3 or Voyage Code 4?
Voyage lists Voyage Code 4 as the newer code model, so evaluate it first on a new build. Keep Voyage Code 3 when your stored code vectors already use it and re-embedding is not yet planned.
Is Voyage Code 3 better than Voyage Code 2?
Voyage Code 3 is the later model, and the earlier Voyage Code 2 index can be migrated to it. The two have different vector spaces, so re-embed the repository and test retrieval before replacing the old one.
Which dimensions can it return?
1024 by default, with 256, 512, and 2048 available, and int8, uint8, binary, or ubinary output types. Use one setting across the whole index. Smaller vectors save storage.
How much does Voyage Code 3 cost?
On TokenLab, Voyage Code 3 costs Input $0.18 / Output $0.00 per 1M tokens. The pricing table above shows the full breakdown. Rates depend on the billing unit, specification, and usage. Compare matching conditions in the model's detailed pricing; a single rate does not determine the total cost.
Which endpoint should Voyage Code 3 use?
Use https://api.tokenlab.sh/v1/embeddings for Voyage Code 3. The request example below shows the matching code shape.
Which operations does Voyage Code 3 support?
Voyage Code 3 supports Embedding. Select an operation above to see its endpoint and request example.
Compare Voyage Code 3
Sources
Reviewed Oct 2, 2026