aktonay/skillz / skills/cloud/gemini-api
gemini-api
VerifiedGuides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK. Use when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.6 KB |
| references/advanced_features.md | markdown | 4.4 KB |
| references/bounding_box.md | markdown | 1.8 KB |
| references/embeddings.md | markdown | 3.0 KB |
| references/live_api.md | markdown | 1.0 KB |
| references/media_generation.md | markdown | 2.9 KB |
| references/model_tuning.md | markdown | 934 B |
| references/safety.md | markdown | 1.8 KB |
| references/structured_and_tools.md | markdown | 3.7 KB |
| references/text_and_multimodal.md | markdown | 2.3 KB |
references/text_and_multimodal.md
View on GitHub# Text and Multimodal Generation
## Basic Text Generation
```python
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents="How does AI work?"
)
print(response.text)
```
## Chat (Multi-turn conversations)
```python
from google import genai
from google.genai import types
client = genai.Client()
chat_session = client.chats.create(
model="gemini-3-flash-preview",
history=[
types.UserContent(parts=[types.Part.from_text(text="Hello")]),
types.ModelContent(parts=[types.Part.from_text(text="Great to meet you. What would you like to know?")]),
],
)
response = chat_session.send_message("Tell me a story.")
print(response.text)
```
## Synchronous Streaming
Generate content in a streaming format so that the model outputs streams back
to you, rather than being returned as one chunk.
```python
from google import genai
from google.genai import types
client = genai.Client()
for chunk in client.models.generate_content_stream(
model="gemini-3-flash-preview", contents="Tell me a story in 300 words."
):
print(chunk.text, end='')
```
## Multimodal Inputs (Images, Audio, Video)
You can provide files natively using Google Cloud Storage URIs or local bytes.
```python
from google import genai
from google.genai import types
client = genai.Client()
gcs_image = types.Part.from_uri(file_uri="gs://cloud-samples-data/generative-ai/image/scones.jpg", mime_type="image/jpeg")
with open("local_image.jpg", "rb") as f:
local_image = types.Part.from_bytes(data=f.read(), mime_type="image/jpeg")
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents=[
"Generate a list of all the objects contained in both images.",
gcs_image,
local_image,
],
)
print(response.text)
```
### YouTube Videos
```python
from google import genai
from google.genai import types
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents=[
types.Part.from_uri(
file_uri="https://www.youtube.com/watch?v=3KtWfp0UopM",
mime_type="video/mp4",
),
"Write a short and engaging blog post based on this video.",
],
)
print(response.text)
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |