Gen-AI Developer Classroom notes 23/Sep/2026

Create a Claude api key

Creating an open ai api key

setting up the project with api keys

  • Execute the following
mkdir openai_n_claude_api_samples
cd openai_n_claude_api_samples
uv init .
uv add python-dotenv

Interacting with models

  • We have two libraries generally
    • low level calls
    • agent framework

Interacting with claude

  • Package name is anthropic
uv add anthropic
  • Refer Here for the library docs

  • anthropic expects us to use client object

  • Create a client object
  • now generate response using client.messages.create

Interacting with openai

  • Package name is openai
uv add openai
  • Create a client object
  • now generate response using client.responses.create

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading