Integrations
Bun integration
Call the OpenAI-compatible /v1/chat/completions endpoint from Bun with fetch.
Updated 2026-01-03
Bun supports fetch out of the box, so you can call abliteration.ai directly.
Keep the API key in ABLIT_KEY and pass it as a Bearer token.
const res = await fetch("https://api.abliteration.ai/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ABLIT_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "abliterated-model",
messages: [{ role: "user", content: "Hello from Bun." }],
}),
});
const data = await res.json();
console.log(data.choices[0]?.message?.content);