This integration method is maintained but no longer actively developed. For the best experience and latest features, use our new AI Gateway with unified API access to 100+ models.
1
2
Copy
Ask AI
HELICONE_API_KEY=<your-helicone-api-key>
LLAMA_API_KEY=<your-llama-api-key>
3
Copy
Ask AI
import LlamaAPIClient from 'llama-api-client';
const client = new LlamaAPIClient({
apiKey: process.env.LLAMA_API_KEY,
baseURL: "https://llama.helicone.ai/v1",
defaultHeaders: {
"Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}`
}
});
const response = await client.chat.completions.create({
model: 'Llama-4-Maverick-17B-128E-Instruct-FP8',
messages: [
{
role: 'user',
content: 'Hello, how are you?'
}
],
max_completion_tokens: 1024,
temperature: 0.7,
});
console.log(response);
4