π¦ Native Provider SDKs
Most providers now just use the OpenAI-compatible API β but they do have their own SDKs. You may encounter these in industry, so it's worth knowing they exist.
Google Gemini SDK
βΆοΈ Create a new code cell and run it: ( Level2 β part1.ipynb )
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-2.5-flash-lite", contents="Describe the color Blue to someone who's never been able to see in 1 sentence"
)
print(response.text)β Expected Response:
"Blue is like the feeling of coolness on a summer day, the vastness of the sky, and the deep calm of the ocean."
Anthropic SDK
βΆοΈ Create a new code cell and run it: ( Level2 β part1.ipynb )
from anthropic import Anthropic
client = Anthropic()
response = client.messages.create(
model="claude-sonnet-4-5-20250929",
messages=[{"role": "user", "content": "Describe the color Blue to someone who's never been able to see in 1 sentence"}],
max_tokens=100
)
print(response.content[0].text)β Expected Response:
"Blue is the color that feels like cool water on your skin, sounds like calm ocean waves or a soft whistle, and carries the peaceful quietness of early morning air."
A beautifully analytical yet poetic answer β appealing to both feeling and sound.
π SDK Differences at a Glance
Feature | OpenAI SDK | Anthropic SDK | Gemini SDK |
|---|---|---|---|
Response access |
|
|
|
| Optional | Mandatory | Optional |
Method |
|
|
|
π‘ Recommendation: Stick with the OpenAI client library wherever possible β it works across most providers and keeps your code consistent.