deCloud
MA CHAIN · 20260131
← All models

VoyageAI by MongoDB: voyage-code-4

Origin
voyageai/voyage-code-4

voyage-code-4 is a code embedding model from Voyage AI, a MongoDB company. It is designed for coding agents and code retrieval, with Matryoshka embeddings at 2048, 1024, 512, and 256...

Pricing
Input · 0.144 MA / 1M tokens

Billing follows the provider's own reported cost. The unit prices here are for reference; a model marked "billed at actual usage" has no reliable pre-call price, so your usage page is the record of what you paid.

Capabilities

Code

Call it

Embedding models are served on POST /v1/embeddings, with the same request and response shape as OpenAI's Embeddings API. input is a string or an array of strings, and each input gets one vector back.

curl https://macdecloud.com/v1/embeddings \
  -H "Authorization: Bearer dcld-sk-..." \
  -H "Content-Type: application/json" \
  -d '{"model":"voyageai/voyage-code-4","input":["first text","second text"]}'

Python (OpenAI SDK)

The official OpenAI SDK works as is; just point base_url at deCloud.

from openai import OpenAI

client = OpenAI(base_url="https://macdecloud.com/v1", api_key="dcld-sk-...")
resp = client.embeddings.create(model="voyageai/voyage-code-4", input=["first text", "second text"])
print(len(resp.data), len(resp.data[0].embedding))
VoyageAI by MongoDB: voyage-code-4 (ORIGIN) · deCloud