Integration example
Call Encevra from another site
This page does exactly what your own application would do: send a question and the material, get a run id back immediately, poll until the panel finishes, then read the grounded findings and decision brief.
A full panel usually takes 60–120 seconds.
The same call in your code
Call it from your server, not the browser, so the key never reaches your users.
const res = await fetch("https://encevra.com/api/public/v1/panel", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.ENCEVRA_API_KEY}`,
},
body: JSON.stringify({ question, material, mode: "async" }),
});
const { run_id } = await res.json();
// poll until status === "succeeded"
const run = await fetch(`https://encevra.com/api/public/v1/runs/${run_id}`, {
headers: { Authorization: `Bearer ${process.env.ENCEVRA_API_KEY}` },
}).then((r) => r.json());