Choose Auto, TokenLab Verified, or Official for each request, with prices shown up front. See what's new

Voyage: voyage-code-2

Voyage Code 2 is an earlier embedding model specialized for source-code retrieval. It provides compatibility for existing code-search indexes built with this model, while new deployments can evaluate the newer Voyage Code 3 model separately.
Compare models
voyage-code-2
AvailableVoyageEmbeddingSync
Context
16K
Modalities
Embedding

Getting started

  1. Create API key

    Create a key in Console, then use it with every model on the platform.

  2. Send your first request

    Copy the example for your language and run it against the endpoint.

    EmbeddingTokenLab endpoint
    POST/v1/embeddings
    curl -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-2",
      "input": "The quick brown fox jumps over the lazy dog."
    }'

Pricing

Official price is the model maker's public baseline. TokenLab price is what you pay for this model on TokenLab.

Embedding

Per 1M tokens
Official price
Input $0.12 / Output $0.00
TokenLab price
-
Discount
-

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

No data yet

Model performance
Metrics appear once privacy and data volume thresholds are met.

Data is based on aggregate user requests, excluding status checks.

Open in Console

Open Voyage Code 2 in Console with a prompt ready to edit or send.

Help me try voyage-code-2 with embedding at /v1/embeddings. Show the result and cost.

Use cases

01

Semantic search

Build vector representations for search, recommendations, clustering, and RAG.

02

Side-by-side test

Compare response quality, latency, and price side by side.

Prompt examples

Embed five product FAQ snippets and explain the response shape.

Send the smallest possible request and show me the result and cost.

Compare this model with a cheaper one in the same category — when is each worth it?

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

How much does Voyage Code 2 cost?

On TokenLab, Voyage Code 2 costs — 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.

How do I test Voyage Code 2?

Open Voyage Code 2 in Create. A sample for /v1/embeddings will be ready to try.

Which endpoint should Voyage Code 2 use?

Use https://api.tokenlab.sh/v1/embeddings for Voyage Code 2. The request example below shows the matching code shape.

Can I test Voyage Code 2 before integrating it?

Yes. Open Console starts a ready draft for Voyage Code 2 and keeps your prompt after sign-in, so you don’t lose context.

Which operations does Voyage Code 2 support?

Voyage Code 2 supports Embedding. Select an operation above to see its endpoint and request example.

More from Voyage Embedding

Related models