
Vertex Ai Api Dev
Wire Gemini models through Vertex AI and the unified Gen AI SDK with the right enterprise patterns for chat, tools, multimodal, caching, and batch jobs.
Overview
vertex-ai-api-dev is an agent skill for the Build phase that guides Gemini on Vertex AI using the unified Gen AI SDK for enterprise chat, tools, multimodal, caching, and batch workloads.
Install
npx skills add https://github.com/google-gemini/gemini-skills --skill vertex-ai-api-devWhat is this skill?
- Mandates Gen AI SDK (`google-genai`, `@google/genai`, Go/Java/C# packages)—not legacy Vertex or `google-generativeai` cl
- Covers text, multimodal, function calling, structured JSON, embeddings, context caching, Live API, and batch prediction
- Enterprise Vertex AI path with explicit GCP credential requirement
- Multi-language SDK entry points in one skill
- Live Realtime API guidance for low-latency voice and video streams
- Five language SDK families documented (Python, JS/TS, Go, Java, C#)
- Eight capability areas listed including Live API and batch prediction
Adoption & trust: 1.3k installs on skills.sh; 3.6k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need Gemini on Vertex AI but agents keep suggesting legacy SDKs or the wrong client libraries for your language.
Who is it for?
Indie SaaS and agent builders shipping on GCP who want one consistent SDK story for Gemini in production.
Skip if: Consumer-only Google AI Studio experiments with no Cloud project, or teams locked into non-Google model stacks.
When should I use this skill?
User asks about Gemini in an enterprise environment, explicitly mentions Vertex AI, or needs Gen AI SDK usage for tools, multimedia, caching, or batch prediction.
What do I get? / Deliverables
Your integration follows current Gen AI SDK patterns with the Vertex capabilities you need—tools, structured output, caching, Live API, or batch—ready to drop into app code.
- SDK-correct Vertex Gemini call patterns
- Capability-specific snippets (tools, structured output, embeddings, caching, batch, Live API)
Recommended Skills
Journey fit
Build is canonical because the skill is SDK integration and capability implementation on Google Cloud, not market validation or production monitoring runbooks. Integrations captures external AI platform APIs, auth, and SDK usage across Python, JS/TS, Go, Java, and C#.
How it compares
Vertex + Gen AI SDK integration skill, not a generic prompt pack or self-hosted open-weight inference guide.
Common Questions / FAQ
Who is vertex-ai-api-dev for?
Developers using Claude Code, Cursor, or Codex who deploy on Google Cloud and need correct Vertex AI Gemini SDK usage across supported languages.
When should I use vertex-ai-api-dev?
Use it in Build → integrations when implementing model calls, tools, embeddings, caching, Live API streams, or batch jobs against Vertex; skip if you are not on GCP or only need high-level model shopping.
Is vertex-ai-api-dev safe to install?
The skill implies network and cloud credential use in your app, not in the skill file itself; review IAM, billing, and the Security Audits panel on this Prism page before enabling APIs in production projects.
SKILL.md
READMESKILL.md - Vertex Ai Api Dev
# Gemini API in Vertex AI Access Google's most advanced AI models built for enterprise use cases using the Gemini API in Vertex AI. Provide these key capabilities: - **Text generation** - Chat, completion, summarization - **Multimodal understanding** - Process images, audio, video, and documents - **Function calling** - Let the model invoke your functions - **Structured output** - Generate valid JSON matching your schema - **Context caching** - Cache large contexts for efficiency - **Embeddings** - Generate text embeddings for semantic search - **Live Realtime API** - Bidirectional streaming for low latency Voice and Video interactions - **Batch Prediction** - Handle massive async dataset prediction workloads ## Core Directives - **Unified SDK**: ALWAYS use the Gen AI SDK (`google-genai` for Python, `@google/genai` for JS/TS, `google.golang.org/genai` for Go, `com.google.genai:google-genai` for Java, `Google.GenAI` for C#). - **Legacy SDKs**: DO NOT use `google-cloud-aiplatform`, `@google-cloud/vertexai`, or `google-generativeai`. ## SDKs - **Python**: Install `google-genai` with `pip install google-genai` - **JavaScript/TypeScript**: Install `@google/genai` with `npm install @google/genai` - **Go**: Install `google.golang.org/genai` with `go get google.golang.org/genai` - **C#/.NET**: Install `Google.GenAI` with `dotnet add package Google.GenAI` - **Java**: - groupId: `com.google.genai`, artifactId: `google-genai` - Latest version can be found here: https://central.sonatype.com/artifact/com.google.genai/google-genai/versions (let's call it `LAST_VERSION`) - Install in `build.gradle`: ``` implementation("com.google.genai:google-genai:${LAST_VERSION}") ``` - Install Maven dependency in `pom.xml`: ```xml <dependency> <groupId>com.google.genai</groupId> <artifactId>google-genai</artifactId> <version>${LAST_VERSION}</version> </dependency> ``` > [!WARNING] > Legacy SDKs like `google-cloud-aiplatform`, `@google-cloud/vertexai`, and `google-generativeai` are deprecated. Migrate to the new SDKs above urgently by following the Migration Guide. ## Authentication & Configuration Prefer environment variables over hard-coding parameters when creating the client. Initialize the client without parameters to automatically pick up these values. ### Application Default Credentials (ADC) Set these variables for standard [Google Cloud authentication](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/gcp-auth): ```bash export GOOGLE_CLOUD_PROJECT='your-project-id' export GOOGLE_CLOUD_LOCATION='global' export GOOGLE_GENAI_USE_VERTEXAI=true ``` - By default, use `location="global"` to access the global endpoint, which provides automatic routing to regions with available capacity. - If a user explicitly asks to use a specific region (e.g., `us-central1`, `europe-west4`), specify that region in the `GOOGLE_CLOUD_LOCATION` parameter instead. Reference the [supported regions documentation](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/learn/locations) if needed. ### Vertex AI in Express Mode Set these variables when using [Express Mode](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/api-keys?usertype=expressmode) with an API key: ```bash export GOOGLE_API_KEY='your-api-key' export GOOGLE_GENAI_USE_VERTEXAI=true ``` ### Initialization Initialize the client without arguments to pick up environment variables: ```python from google import genai client = genai.Client() ``` Alternatively, you can hard-code i