import OpenAI from "openai";
const client = new OpenAI({
baseURL: `${process.env.TRELLIS_URL}/api/v1`,
apiKey: process.env.TRELLIS_KEY,
});
const reply = await client.chat.completions.create({
model: "meta-llama/llama-3.3-70b-instruct",
messages: [{ role: "user", content: "Hello" }],
});
Returned with the answer
- x-receipt-id
- The signed receipt for this call. Look it up on /verify/ or through the API.
- x-generation-id
- The generation record: model, provider, exact tokens and cost.
- x-trellis-lane
- The lane that served the call.