From claude-commands
Provides usage notes for Gemini 3 API via google-genai SDK, covering ThinkingConfig parameters, code execution tool, structured JSON output, and integration checklist.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:gemini-3-apiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this when wiring Gemini 3 models in the Python SDK to avoid outdated params.
Use this when wiring Gemini 3 models in the Python SDK to avoid outdated params.
Use the google-genai SDK ThinkingConfig fields (thinking_budget, include_thoughts).
from google import genai
from google.genai import types
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-pro-preview",
contents="Explain how AI works.",
config=types.GenerateContentConfig(
thinking_config=types.ThinkingConfig(thinking_budget=1024),
),
)
print(response.text)
Notes:
ThinkingConfig fields are thinking_budget and include_thoughts in the current SDK.Enable code execution via tools in GenerateContentConfig:
from google import genai
from google.genai import types
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents="Compute the sum of the first 50 primes using code.",
config=types.GenerateContentConfig(
tools=[types.Tool(code_execution=types.ToolCodeExecution)],
),
)
for part in response.candidates[0].content.parts:
if part.executable_code is not None:
print(part.executable_code.code)
if part.code_execution_result is not None:
print(part.code_execution_result.output)
Gemini supports structured JSON outputs via response_mime_type and schema. Gemini 3 can combine structured outputs with built-in tools, including code execution.
from google import genai
from google.genai import types
from pydantic import BaseModel
class Result(BaseModel):
summary: str
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-pro-preview",
contents="Summarize this text in one sentence.",
config=types.GenerateContentConfig(
response_mime_type="application/json",
response_json_schema=Result.model_json_schema(),
),
)
npx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsGuides developers in using the Gemini API for text generation, multimodal, function calling, structured output, and more. Covers models, SDKs (Python, JS, Go), and API spec.
Clarifies which Gemini models can combine code_execution with JSON mode/structured outputs. Essential for building Gemini-powered apps needing both code execution and controlled generation.
Build, integrate, and debug Gemini API applications on Google Cloud Agent Platform using the unified google-genai SDK. Covers text, multimodal, function calling, structured output, embeddings, caching, streaming, Live API, and model tuning across Python, TypeScript, Go, Java, and C#.