Voyage AI
Replace https://api.voyageai.com/
with https://llmfoundry.straive.com/voyageai/
.
All Voyage AI embedding models are supported, including:
voyage-3-large
voyage-3
voyage-3-lite
voyage-code-3
voyage-finance-2
voyage-law-2
voyage-code-2
Curl
curl -X POST https://llmfoundry.straive.com/voyageai/v1/embeddings \
-H "Authorization: Bearer $LLMFOUNDRY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model": "voyage-3-lite", "input": "Alpha Beta Gamma"}'
Python requests
import os
import requests # Or replace requests with httpx
response = requests.post(
"https://llmfoundry.straive.com/voyageai/v1/embeddings",
headers={"Authorization": f"Bearer {os.environ['LLMFOUNDRY_TOKEN']}"},
json={"model": "voyage-3-lite", "input": "Alpha Beta Gamma"}
)
print(response.json())
JavaScript
const token = process.env.LLMFOUNDRY_TOKEN;
const response = await fetch("https://llmfoundry.straive.com/voyageai/v1/embeddings", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}` },
// If the user is already logged into LLM Foundry, use `credentials: "include"` to send **THEIR** API token instead of the `Authorization` header.
credentials: "include",
body: JSON.stringify({ model: "voyage-3-lite", input: "Alpha Beta Gamma" }),
});
console.log(await response.json());