हम cookies इस्तेमाल करते हैं. Cookies और ब्राउज़र स्टोरेज आपको साइन इन रखते हैं और आपकी प्राथमिकताएं याद रखते हैं। आपकी अनुमति से हम यह भी मापते हैं कि साइट कैसे इस्तेमाल होती है। आप कभी भी । हमारी cookie नीति देखें।
ज़रूरीसेशन, सुरक्षा और प्राथमिकताएं। साइट चलाने के लिए ज़रूरी।हमेशा चालू
यहां नए हैं? देखें यह कैसे काम करता हैप्लेग्राउंड, मॉडल और आपकी API key का 1 मिनट का टूर।
इनपुट कीमत 45 एम्बेडिंग्स मॉडल के मीडियन से 60% कम है।
32,000 tokens की context window, लंबे दस्तावेज़ों और कई चरणों वाली बातचीत के लिए काफी।
Perplexity: Embed V2 Context 0.6B API कैसे कॉल करें
अपने dashboard में API key बनाएं।
अपनी भाषा के लिए आधिकारिक openai SDK इंस्टॉल करें।
baseURL को https://api14.com/api/v1 और model को "perplexity/pplx-embed-v2-context-0.6b" पर सेट करें।
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])
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());
// 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(())
}
स्पेसिफिकेशन
Context लंबाई
32,000
अधिकतम आउटपुट
28,800
इनपुट
text, image
आउटपुट
embeddings
api14 पर requests · पिछले 7 दिन
Perplexity: Embed V2 Context 0.6B: अक्सर पूछे जाने वाले सवाल
Perplexity: Embed V2 Context 0.6B API की कीमत कितनी है?
Perplexity: Embed V2 Context 0.6B की कीमत इनपुट $0.07 / 1M टोकन है। शुल्क आपके USD बैलेंस से सिर्फ सफल requests के लिए कटता है; फेल हुई requests मुफ्त हैं।
Perplexity: Embed V2 Context 0.6B की context window कितनी है?
Perplexity: Embed V2 Context 0.6B हर request में 32,000 tokens तक पढ़ता है, prompt, इतिहास और दस्तावेज़ मिलाकर। यह हर जवाब में 28,800 आउटपुट tokens तक लिखता है।
Perplexity: Embed V2 Context 0.6B क्या कर सकता है?
Perplexity: Embed V2 Context 0.6B text, image स्वीकार करता है और embeddings लौटाता है।
अपने कोड से Perplexity: Embed V2 Context 0.6B कैसे कॉल करूं?
किसी भी OpenAI SDK को https://api14.com/api/v1 पर पॉइंट करें और model को "perplexity/pplx-embed-v2-context-0.6b" पर सेट करें, कोड में और कोई बदलाव नहीं। इस पेज के कोड पैनल से तैयार उदाहरण कॉपी करें।
Perplexity: Embed V2 Context 0.6B के विकल्प क्या हैं?
मिलती-जुलती कीमत वाले एम्बेडिंग्स मॉडल: Cohere: Embed 5 Fast, Cohere: Embed 5 Pro, Perplexity: Embed V2 Context 9B। सभी एक ही API key से चलते हैं, इसलिए बदलना बस एक string बदलना है।