palmshed sdk

Gemini AI client for Python

Text generation, chat, thinking, URL context, image generation, text-to-speech, and deep research. One import, clean interface, no framework coupling.

Install

pip install palmshed-sdk

Quick start

from palmshed_sdk import GeminiAI

client = GeminiAI(api_key="your-key")

# Simple text generation
response = client.generate_text("Write a haiku about Python")

# Chat with history
messages = [
    {"role": "user", "content": "What is Flask?"},
    {"role": "assistant", "content": "Flask is a lightweight web framework."},
    {"role": "user", "content": "How do I install it?"},
]
response = client.generate_chat(messages)

# Thinking mode
result = client.generate_text_with_thinking("Explain quantum computing")
print(result["response"])
print(result["thinking_summary"])

# Text-to-speech
filepath = client.text_to_speech("Hello world")

# Image generation
result = client.generate_image("A sunset over the ocean")
print(result.filepath)

What it does

Resources