VoyageAI by MongoDB: voyage-code-4 contre Perplexity: Embed V2 Context 0.6B
Un comparatif côte à côte de VoyageAI by MongoDB: voyage-code-4 (0,42 $US / 1M jetons (≈ 0,39 €)) et Perplexity: Embed V2 Context 0.6B (0,07 $US / 1M jetons (≈ 0,06 €)) d’après les prix actuels en USD et les capacités du catalogue api14. Les deux passent par la même API compatible OpenAI.
Caractéristiques
| VoyageAI by MongoDB: voyage-code-4 | Perplexity: Embed V2 Context 0.6B | |
|---|---|---|
| Fournisseur | VoyageAI by MongoDB | Perplexity |
| Entrée | 0,42 $US / 1M jetons (≈ 0,39 €) | 0,07 $US / 1M jetons (≈ 0,06 €) |
| Image en entrée | - | 1,40 $US / 1M jetons (≈ 1,29 €) |
| Fenêtre de contexte | 32 000 | 32 000 |
| Sortie max. | 28 800 | 28 800 |
| Entrée | text | text, image |
| Sortie | embeddings | embeddings |
| Appel d’outils | ||
| Sortie structurée | ||
| Contrôle du raisonnement | ||
| Ajouté le | 13 août 2026 | 20 nov. 2026 |
Principales différences
- Perplexity: Embed V2 Context 0.6B est 83% moins cher sur les tokens d’entrée.
Changer de modèle en une chaîne
Les deux modèles utilisent le même endpoint et la même structure de requête. Remplacez la valeur de model "mongodb/voyage-code-4" par "perplexity/pplx-embed-v2-context-0.6b" : prompts, streaming et outils continuent de fonctionner.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.embeddings.create({
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
});
console.log(result.data.map((d) => d.embedding.length));
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api14.com/api/v1",
api_key=os.environ["API14_API_KEY"],
)
result = client.embeddings.create(
model="perplexity/pplx-embed-v2-context-0.6b",
input=[
"The quick brown fox",
"Lorem ipsum"
],
)
print([len(d.embedding) for d in result.data])
curl https://api14.com/api/v1/embeddings \
-H "Authorization: Bearer $API14_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
}'
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
}`)
req, _ := http.NewRequest("POST", "https://api14.com/api/v1/embeddings", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("API14_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}
<?php
$ch = curl_init("https://api14.com/api/v1/embeddings");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("API14_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"model" => "perplexity/pplx-embed-v2-context-0.6b",
"input" => [
"The quick brown fox",
"Lorem ipsum"
]
]),
]);
$response = json_decode(curl_exec($ch), true);
print_r($response);
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api14.com/api/v1/embeddings"))
.header("Authorization", "Bearer " + System.getenv("API14_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
using System.Net.Http.Headers;
using System.Text;
var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("API14_API_KEY"));
var body = """
{
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
}
""";
var res = await http.PostAsync("https://api14.com/api/v1/embeddings", new StringContent(body, Encoding.UTF8, "application/json"));
Console.WriteLine(await res.Content.ReadAsStringAsync());
require "net/http"
require "json"
uri = URI("https://api14.com/api/v1/embeddings")
req = Net::HTTP::Post.new(uri, {
"Authorization" => "Bearer #{ENV["API14_API_KEY"]}",
"Content-Type" => "application/json",
})
req.body = {
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
puts JSON.parse(res.body)
// Cargo.toml: reqwest = { version = "0.12", features = ["json"] }, tokio = { version = "1", features = ["full"] }, serde_json = "1"
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let key = std::env::var("API14_API_KEY")?;
let res = reqwest::Client::new()
.post("https://api14.com/api/v1/embeddings")
.bearer_auth(key)
.json(&json!({
"model": "perplexity/pplx-embed-v2-context-0.6b",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
}))
.send()
.await?
.text()
.await?;
println!("{res}");
Ok(())
}
Plus de comparatifs
- Cohere: Embed 5 Fast contre Cohere: Embed English v3
- Cohere: Embed 5 Fast contre Cohere: Embed Multilingual v3
- Cohere: Embed 5 Fast contre Perplexity: Embed V2 Context 0.6B
- Cohere: Embed 5 Fast contre Perplexity: Embed V2 Context 9B
- Cohere: Embed English v3 contre Cohere: Embed Multilingual v3
- Cohere: Embed English v3 contre Perplexity: Embed V2 Context 0.6B
- Cohere: Embed English v3 contre Perplexity: Embed V2 Context 9B
- Cohere: Embed Multilingual v3 contre Perplexity: Embed V2 Context 0.6B