import Anthropic from '@anthropic-ai/sdk'; import spaceTrim from 'spaceTrim'; const anthropic = new Anthropic({ apiKey: 'my_api_key', // defaults to process.env["ANTHROPIC_API_KEY"] }); const msg = await anthropic.messages.create({ model: 'claude-2.1', max_tokens: 1000, temperature: 0, messages: [ { role: 'user', content: spaceTrim(` Write a study plan for a 16-year-old student ## Example Algebra Geometry Calculus Grammar Literature Composition `), }, ], }); console.log(msg);