Gcp gemini api developer

From VincentChuWaiChow/vanguard-frontier-agentic · View interactive version

Gcp gemini api developer is an AI agent skill from the GitHub repository VincentChuWaiChow/vanguard-frontier-agentic. Build, integrate, and debug Gemini API applications on Google Cloud Agent Platform (formerly Vertex AI) using the unified google-genai SDK. Covers text generation, multimodal inputs, function calling, structured output, embeddings, context caching, batch prediction, streaming, Live API (bidirectiona

How to use this skill

Skill file

GCP Gemini API Developer

IMPORTANT BRANDING NOTE

"Agent Platform" (full name: Gemini Enterprise Agent Platform) was previously named "Vertex AI". Many web resources still use "Vertex AI" branding.

CRITICAL SDK NOTE

The following SDKs are DEPRECATED and must NOT be used:

Use ONLY the unified Gen AI SDK:

Authentication

# Application Default Credentials (ADC) — preferred
export GOOGLE_CLOUD_PROJECT='your-project-id'
export GOOGLE_CLOUD_LOCATION='global'  # Use 'global' for automatic region routing
export GOOGLE_GENAI_USE_VERTEXAI=true

Model Selection

Quick Start (Python)

from google import genai
client = genai.Client  # picks up env vars automatically
response = client.models.generate_content(
    model="gemini-3-flash-preview",
    contents="Explain transformer architecture"
)
print(response.text)

Reference Directory

Load only when needed:

| Scenario | Trigger Keywords | Reference |

|---|---|---|

| Text + multimodal | chat, image, video, audio, streaming | references/text-multimodal.md |

| Function calling + tools | tool use, function call, grounding, code execution | references/tools.md |

| Structured output | JSON, schema, structured, typed response | references/structured-output.md |

| Embeddings | embedding, semantic search, vector | references/embeddings.md |

| Context caching | cache, large context, caching tokens | references/caching.md |

| Batch prediction | batch, async, large dataset | references/batch.md |

| Live API | live, realtime, voice, video streaming, bidirectional | references/live-api.md |

| Model tuning | fine-tune, SFT, preference tuning | references/tuning.md |

| Safety | safety filter, threshold, harm category | references/safety.md |

| SDK migration | migrate, deprecated, upgrade | references/migration.md |

Core Rules

Official Docs

Security Notes

Read-only advisory. Never embed API keys or service account credentials in code examples. Use ADC and environment variables. Do not call batch jobs or fine-tuning jobs on production data without explicit user approval.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.