import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.sailresearch.com",
apiKey: process.env.SAIL_API_KEY,
});
const message = await client.messages.create({
model: "zai-org/GLM-5.3",
max_tokens: 1000,
messages: [
{
role: "user",
content: "Explain the key ideas behind transformers.",
},
],
});
// Reasoning models can return a thinking block first, so select text by type.
for (const block of message.content) {
if (block.type === "text") console.log(block.text);
}