packages/google/README.md
The Google Generative AI provider for the AI SDK contains language model support for the Google Generative AI APIs.
The Google Generative AI provider is available in the @ai-sdk/google module. You can install it with
npm i @ai-sdk/google
If you use coding agents such as Claude Code or Cursor, we highly recommend adding the AI SDK skill to your repository:
npx skills add vercel/ai
You can import the default provider instance google from @ai-sdk/google:
import { google } from '@ai-sdk/google';
import { google } from '@ai-sdk/google';
import { generateText } from 'ai';
const { text } = await generateText({
model: google('gemini-2.5-pro'),
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});
Please check out the Google Generative AI provider documentation for more information.