Your first API call
Install @anthropic-ai/sdk, create a client, send a message, and parse the response. Real TypeScript code.
ENМатеріали курсів поки англійською. Інтерфейс, ШІ-наставник і перевірка завдань — українською.
Install
npm install @anthropic-ai/sdk
Use the current major version: @anthropic-ai/sdk 1.x (for Python, anthropic 2.x), released on 2026-10-21. These versions send the anthropic-version: 2026-10-21 header. That API version removed temperature, top_p and top_k, so code from older tutorials that sets them returns a 400 error.
Get a key in the Claude Console at platform.claude.com (the old console.anthropic.com address redirects there), under API keys. Put it in the ANTHROPIC_API_KEY environment variable. Never hardcode the key in the repository.
Далі урок відкривається після безкоштовної реєстрації
Реєстрація через email або Google відкриває перші два уроки кожного курсу назавжди і 7 днів повного доступу до всього каталогу. Картка не потрібна.


