OpenAI API from A to Z · Урок 1
SDK install and first call
Install the openai SDK, create a client and make your first call with the Responses API on gpt-6-luna, then the same request with Chat Completions. Parse the response, status and finish_reason, usage, length limits and reasoning effort.
ENМатеріали курсів поки англійською. Інтерфейс, ШІ-наставник і перевірка завдань — українською.
Install
npm install openai
# or for Python
pip install openai
Create a key at platform.openai.com/api-keys and put it in the OPENAI_API_KEY environment variable. Never hardcode the key in your repo.
Далі урок відкривається після безкоштовної реєстрації
Реєстрація через email або Google відкриває перші два уроки кожного курсу назавжди і 7 днів повного доступу до всього каталогу. Картка не потрібна.


