Ai Engineering Core / LLM Ecosystem & Integrations

Trying Dedicated Client Library

πŸ“¦ 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

response.choices[0].message.content

response.content[0].text

response.text

max_tokens

Optional

Mandatory

Optional

Method

chat.completions.create()

messages.create()

generate_content()

πŸ’‘ Recommendation: Stick with the OpenAI client library wherever possible β€” it works across most providers and keeps your code consistent.