Minimal example
const key = process.env.AI24X_API_KEY;
const r = await fetch("https://api.ai24x.com/v1/chat/run", {
method: "POST",
headers: {
"X-API-Key": key,
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "Hello",
model: "flash",
max_tokens: 200,
}),
});
const data = await r.json();
console.log(r.status, data);
Keep the key in env vars. Prefer flash for cost; pro for harder tasks; VIP ids only after VIP is active.
curl · HTTP / Python · Sign up