// Server-side JavaScript (Node 20+ or Bun). Set JEV_API_KEY.
const response = await fetch("https://jevaimodel.net/v1/systemone", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.JEV_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "liquid/d1",
"state": "I was charged twice for order A-4471. Please refund the duplicate payment.",
"questions": {
"route": {
"type": "choice",
"instructions": "Which team should handle this ticket? Use other when no option fits.",
"criteria": {
"billing": "Payments, charges and refunds",
"technical": "Bugs and product errors",
"account": "Login and account access",
"other": "None of these teams"
}
}
}
}),
});
const body = await response.json();
if (!response.ok || body.code !== 0) throw new Error(body.message);
console.log(body.data.result.answers);
console.log(body.data.creditsUsed);
Berechnung einer Bruttomarge von 50 %
Zum aktuellen Paketwert entspricht ein Guthabenpunkt $0,0001. Bei positiven Upstream-Kosten erfordert eine Bruttomarge von 50 % einen Verkaufspreis in Höhe des Doppelten der Kosten: Guthabenpunkte pro Million = Upstream-Kosten in Dollar pro Million × 20.000. Bei Jev mit $0,042 pro Million Eingabetokens wären 840 Guthabenpunkte pro Million für 50 % nötig; der aktuelle Tarif von 600 Punkten entspricht 30 % Bruttomarge. Liquid d1 wird derzeit mit $0 gelistet und daher nur mit dem Mindestbetrag von 1 Guthabenpunkt je erfolgreicher Anfrage berechnet.